Class: OCI::Core::Models::LaunchInstanceDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/models/launch_instance_details.rb

Overview

Instance launch details. Use the sourceDetails parameter to specify whether a boot volume or an image should be used to launch a new instance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LaunchInstanceDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/oci/core/models/launch_instance_details.rb', line 393

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']

  raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')

  self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain']

  self.capacity_reservation_id = attributes[:'capacityReservationId'] if attributes[:'capacityReservationId']

  raise 'You cannot provide both :capacityReservationId and :capacity_reservation_id' if attributes.key?(:'capacityReservationId') && attributes.key?(:'capacity_reservation_id')

  self.capacity_reservation_id = attributes[:'capacity_reservation_id'] if attributes[:'capacity_reservation_id']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.create_vnic_details = attributes[:'createVnicDetails'] if attributes[:'createVnicDetails']

  raise 'You cannot provide both :createVnicDetails and :create_vnic_details' if attributes.key?(:'createVnicDetails') && attributes.key?(:'create_vnic_details')

  self.create_vnic_details = attributes[:'create_vnic_details'] if attributes[:'create_vnic_details']

  self.dedicated_vm_host_id = attributes[:'dedicatedVmHostId'] if attributes[:'dedicatedVmHostId']

  raise 'You cannot provide both :dedicatedVmHostId and :dedicated_vm_host_id' if attributes.key?(:'dedicatedVmHostId') && attributes.key?(:'dedicated_vm_host_id')

  self.dedicated_vm_host_id = attributes[:'dedicated_vm_host_id'] if attributes[:'dedicated_vm_host_id']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']

  self.security_attributes = attributes[:'securityAttributes'] if attributes[:'securityAttributes']

  raise 'You cannot provide both :securityAttributes and :security_attributes' if attributes.key?(:'securityAttributes') && attributes.key?(:'security_attributes')

  self.security_attributes = attributes[:'security_attributes'] if attributes[:'security_attributes']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self. = attributes[:'extendedMetadata'] if attributes[:'extendedMetadata']

  raise 'You cannot provide both :extendedMetadata and :extended_metadata' if attributes.key?(:'extendedMetadata') && attributes.key?(:'extended_metadata')

  self. = attributes[:'extended_metadata'] if attributes[:'extended_metadata']

  self.fault_domain = attributes[:'faultDomain'] if attributes[:'faultDomain']

  raise 'You cannot provide both :faultDomain and :fault_domain' if attributes.key?(:'faultDomain') && attributes.key?(:'fault_domain')

  self.fault_domain = attributes[:'fault_domain'] if attributes[:'fault_domain']

  self.cluster_placement_group_id = attributes[:'clusterPlacementGroupId'] if attributes[:'clusterPlacementGroupId']

  raise 'You cannot provide both :clusterPlacementGroupId and :cluster_placement_group_id' if attributes.key?(:'clusterPlacementGroupId') && attributes.key?(:'cluster_placement_group_id')

  self.cluster_placement_group_id = attributes[:'cluster_placement_group_id'] if attributes[:'cluster_placement_group_id']

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.compute_cluster_id = attributes[:'computeClusterId'] if attributes[:'computeClusterId']

  raise 'You cannot provide both :computeClusterId and :compute_cluster_id' if attributes.key?(:'computeClusterId') && attributes.key?(:'compute_cluster_id')

  self.compute_cluster_id = attributes[:'compute_cluster_id'] if attributes[:'compute_cluster_id']

  self.hostname_label = attributes[:'hostnameLabel'] if attributes[:'hostnameLabel']

  raise 'You cannot provide both :hostnameLabel and :hostname_label' if attributes.key?(:'hostnameLabel') && attributes.key?(:'hostname_label')

  self.hostname_label = attributes[:'hostname_label'] if attributes[:'hostname_label']

  self.image_id = attributes[:'imageId'] if attributes[:'imageId']

  raise 'You cannot provide both :imageId and :image_id' if attributes.key?(:'imageId') && attributes.key?(:'image_id')

  self.image_id = attributes[:'image_id'] if attributes[:'image_id']

  self.ipxe_script = attributes[:'ipxeScript'] if attributes[:'ipxeScript']

  raise 'You cannot provide both :ipxeScript and :ipxe_script' if attributes.key?(:'ipxeScript') && attributes.key?(:'ipxe_script')

  self.ipxe_script = attributes[:'ipxe_script'] if attributes[:'ipxe_script']

  self.launch_options = attributes[:'launchOptions'] if attributes[:'launchOptions']

  raise 'You cannot provide both :launchOptions and :launch_options' if attributes.key?(:'launchOptions') && attributes.key?(:'launch_options')

  self.launch_options = attributes[:'launch_options'] if attributes[:'launch_options']

  self.instance_options = attributes[:'instanceOptions'] if attributes[:'instanceOptions']

  raise 'You cannot provide both :instanceOptions and :instance_options' if attributes.key?(:'instanceOptions') && attributes.key?(:'instance_options')

  self.instance_options = attributes[:'instance_options'] if attributes[:'instance_options']

  self.availability_config = attributes[:'availabilityConfig'] if attributes[:'availabilityConfig']

  raise 'You cannot provide both :availabilityConfig and :availability_config' if attributes.key?(:'availabilityConfig') && attributes.key?(:'availability_config')

  self.availability_config = attributes[:'availability_config'] if attributes[:'availability_config']

  self.preemptible_instance_config = attributes[:'preemptibleInstanceConfig'] if attributes[:'preemptibleInstanceConfig']

  raise 'You cannot provide both :preemptibleInstanceConfig and :preemptible_instance_config' if attributes.key?(:'preemptibleInstanceConfig') && attributes.key?(:'preemptible_instance_config')

  self.preemptible_instance_config = attributes[:'preemptible_instance_config'] if attributes[:'preemptible_instance_config']

  self. = attributes[:'metadata'] if attributes[:'metadata']

  self.agent_config = attributes[:'agentConfig'] if attributes[:'agentConfig']

  raise 'You cannot provide both :agentConfig and :agent_config' if attributes.key?(:'agentConfig') && attributes.key?(:'agent_config')

  self.agent_config = attributes[:'agent_config'] if attributes[:'agent_config']

  self.shape = attributes[:'shape'] if attributes[:'shape']

  self.shape_config = attributes[:'shapeConfig'] if attributes[:'shapeConfig']

  raise 'You cannot provide both :shapeConfig and :shape_config' if attributes.key?(:'shapeConfig') && attributes.key?(:'shape_config')

  self.shape_config = attributes[:'shape_config'] if attributes[:'shape_config']

  self.source_details = attributes[:'sourceDetails'] if attributes[:'sourceDetails']

  raise 'You cannot provide both :sourceDetails and :source_details' if attributes.key?(:'sourceDetails') && attributes.key?(:'source_details')

  self.source_details = attributes[:'source_details'] if attributes[:'source_details']

  self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId']

  raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id')

  self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id']

  self.launch_volume_attachments = attributes[:'launchVolumeAttachments'] if attributes[:'launchVolumeAttachments']

  raise 'You cannot provide both :launchVolumeAttachments and :launch_volume_attachments' if attributes.key?(:'launchVolumeAttachments') && attributes.key?(:'launch_volume_attachments')

  self.launch_volume_attachments = attributes[:'launch_volume_attachments'] if attributes[:'launch_volume_attachments']

  self.is_pv_encryption_in_transit_enabled = attributes[:'isPvEncryptionInTransitEnabled'] unless attributes[:'isPvEncryptionInTransitEnabled'].nil?

  raise 'You cannot provide both :isPvEncryptionInTransitEnabled and :is_pv_encryption_in_transit_enabled' if attributes.key?(:'isPvEncryptionInTransitEnabled') && attributes.key?(:'is_pv_encryption_in_transit_enabled')

  self.is_pv_encryption_in_transit_enabled = attributes[:'is_pv_encryption_in_transit_enabled'] unless attributes[:'is_pv_encryption_in_transit_enabled'].nil?

  self.platform_config = attributes[:'platformConfig'] if attributes[:'platformConfig']

  raise 'You cannot provide both :platformConfig and :platform_config' if attributes.key?(:'platformConfig') && attributes.key?(:'platform_config')

  self.platform_config = attributes[:'platform_config'] if attributes[:'platform_config']

  self.placement_constraint_details = attributes[:'placementConstraintDetails'] if attributes[:'placementConstraintDetails']

  raise 'You cannot provide both :placementConstraintDetails and :placement_constraint_details' if attributes.key?(:'placementConstraintDetails') && attributes.key?(:'placement_constraint_details')

  self.placement_constraint_details = attributes[:'placement_constraint_details'] if attributes[:'placement_constraint_details']

  self.is_ai_enterprise_enabled = attributes[:'isAIEnterpriseEnabled'] unless attributes[:'isAIEnterpriseEnabled'].nil?
  self.is_ai_enterprise_enabled = false if is_ai_enterprise_enabled.nil? && !attributes.key?(:'isAIEnterpriseEnabled') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isAIEnterpriseEnabled and :is_ai_enterprise_enabled' if attributes.key?(:'isAIEnterpriseEnabled') && attributes.key?(:'is_ai_enterprise_enabled')

  self.is_ai_enterprise_enabled = attributes[:'is_ai_enterprise_enabled'] unless attributes[:'is_ai_enterprise_enabled'].nil?
  self.is_ai_enterprise_enabled = false if is_ai_enterprise_enabled.nil? && !attributes.key?(:'isAIEnterpriseEnabled') && !attributes.key?(:'is_ai_enterprise_enabled') # rubocop:disable Style/StringLiterals

  self.instance_configuration_id = attributes[:'instanceConfigurationId'] if attributes[:'instanceConfigurationId']

  raise 'You cannot provide both :instanceConfigurationId and :instance_configuration_id' if attributes.key?(:'instanceConfigurationId') && attributes.key?(:'instance_configuration_id')

  self.instance_configuration_id = attributes[:'instance_configuration_id'] if attributes[:'instance_configuration_id']

  self.licensing_configs = attributes[:'licensingConfigs'] if attributes[:'licensingConfigs']

  raise 'You cannot provide both :licensingConfigs and :licensing_configs' if attributes.key?(:'licensingConfigs') && attributes.key?(:'licensing_configs')

  self.licensing_configs = attributes[:'licensing_configs'] if attributes[:'licensing_configs']
end

Instance Attribute Details

#agent_configOCI::Core::Models::LaunchInstanceAgentConfigDetails



222
223
224
# File 'lib/oci/core/models/launch_instance_details.rb', line 222

def agent_config
  @agent_config
end

#availability_configOCI::Core::Models::LaunchInstanceAvailabilityConfigDetails



164
165
166
# File 'lib/oci/core/models/launch_instance_details.rb', line 164

def availability_config
  @availability_config
end

#availability_domainString

[Required] The availability domain of the instance.

Example: Uocm:PHX-AD-1

Returns:

  • (String)


18
19
20
# File 'lib/oci/core/models/launch_instance_details.rb', line 18

def availability_domain
  @availability_domain
end

#capacity_reservation_idString

The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see Capacity Reservations.

Returns:

  • (String)


25
26
27
# File 'lib/oci/core/models/launch_instance_details.rb', line 25

def capacity_reservation_id
  @capacity_reservation_id
end

#cluster_placement_group_idString

The OCID of the cluster placement group of the instance.

Returns:

  • (String)


94
95
96
# File 'lib/oci/core/models/launch_instance_details.rb', line 94

def cluster_placement_group_id
  @cluster_placement_group_id
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


29
30
31
# File 'lib/oci/core/models/launch_instance_details.rb', line 29

def compartment_id
  @compartment_id
end

#compute_cluster_idString

The OCID of the compute cluster that the instance will be created in.

Returns:

  • (String)


108
109
110
# File 'lib/oci/core/models/launch_instance_details.rb', line 108

def compute_cluster_id
  @compute_cluster_id
end

#create_vnic_detailsOCI::Core::Models::CreateVnicDetails



32
33
34
# File 'lib/oci/core/models/launch_instance_details.rb', line 32

def create_vnic_details
  @create_vnic_details
end

#dedicated_vm_host_idString

The OCID of the dedicated virtual machine host to place the instance on.

Returns:

  • (String)


37
38
39
# File 'lib/oci/core/models/launch_instance_details.rb', line 37

def dedicated_vm_host_id
  @dedicated_vm_host_id
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


45
46
47
# File 'lib/oci/core/models/launch_instance_details.rb', line 45

def defined_tags
  @defined_tags
end

#display_nameString

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


60
61
62
# File 'lib/oci/core/models/launch_instance_details.rb', line 60

def display_name
  @display_name
end

#extended_metadataHash<String, Object>

Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the metadata object.

They are distinguished from metadata fields in that these can be nested JSON objects (whereas metadata fields are string/string maps only).

The combined size of the metadata and extendedMetadata objects can be a maximum of 32,000 bytes.

Returns:

  • (Hash<String, Object>)


72
73
74
# File 'lib/oci/core/models/launch_instance_details.rb', line 72

def 
  @extended_metadata
end

#fault_domainString

A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains.

If you do not specify the fault domain, the system selects one for you.

To get a list of fault domains, use the list_fault_domains operation in the Identity and Access Management Service API.

Example: FAULT-DOMAIN-1

Returns:

  • (String)


90
91
92
# File 'lib/oci/core/models/launch_instance_details.rb', line 90

def fault_domain
  @fault_domain
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


102
103
104
# File 'lib/oci/core/models/launch_instance_details.rb', line 102

def freeform_tags
  @freeform_tags
end

#hostname_labelString

Deprecated. Instead use hostnameLabel in CreateVnicDetails. If you provide both, the values must match.

Returns:

  • (String)


115
116
117
# File 'lib/oci/core/models/launch_instance_details.rb', line 115

def hostname_label
  @hostname_label
end

#image_idString

Deprecated. Use sourceDetails with instance_source_via_image_details source type instead. If you specify values for both, the values must match.

Returns:

  • (String)


121
122
123
# File 'lib/oci/core/models/launch_instance_details.rb', line 121

def image_id
  @image_id
end

#instance_configuration_idString

The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch.

Returns:

  • (String)


266
267
268
# File 'lib/oci/core/models/launch_instance_details.rb', line 266

def instance_configuration_id
  @instance_configuration_id
end

#instance_optionsOCI::Core::Models::InstanceOptions



161
162
163
# File 'lib/oci/core/models/launch_instance_details.rb', line 161

def instance_options
  @instance_options
end

#ipxe_scriptString

This is an advanced option.

When a bare metal or virtual machine instance boots, the iPXE firmware that runs on the instance is configured to run an iPXE script to continue the boot process.

If you want more control over the boot process, you can provide your own custom iPXE script that will run when the instance boots. Be aware that the same iPXE script will run every time an instance boots, not only after the initial LaunchInstance call.

The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot.

If your instance boot volume attachment type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume attachment type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive.

For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see Bring Your Own Image.

For more information about iPXE, see ipxe.org.

Returns:

  • (String)


155
156
157
# File 'lib/oci/core/models/launch_instance_details.rb', line 155

def ipxe_script
  @ipxe_script
end

#is_ai_enterprise_enabledBOOLEAN

Whether to enable AI enterprise on the instance.

Returns:

  • (BOOLEAN)


262
263
264
# File 'lib/oci/core/models/launch_instance_details.rb', line 262

def is_ai_enterprise_enabled
  @is_ai_enterprise_enabled
end

#is_pv_encryption_in_transit_enabledBOOLEAN

Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false.

Returns:

  • (BOOLEAN)


251
252
253
# File 'lib/oci/core/models/launch_instance_details.rb', line 251

def is_pv_encryption_in_transit_enabled
  @is_pv_encryption_in_transit_enabled
end

#launch_optionsOCI::Core::Models::LaunchOptions



158
159
160
# File 'lib/oci/core/models/launch_instance_details.rb', line 158

def launch_options
  @launch_options
end

#launch_volume_attachmentsArray<OCI::Core::Models::LaunchAttachVolumeDetails>

Volume attachments to create as part of the launch instance operation.



247
248
249
# File 'lib/oci/core/models/launch_instance_details.rb', line 247

def launch_volume_attachments
  @launch_volume_attachments
end

#licensing_configsArray<OCI::Core::Models::LaunchInstanceLicensingConfig>

List of licensing configurations associated with target launch values.



270
271
272
# File 'lib/oci/core/models/launch_instance_details.rb', line 270

def licensing_configs
  @licensing_configs
end

#metadataHash<String, String>

Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance.

A metadata service runs on every launched instance. The service is an HTTP endpoint listening on 169.254.169.254. You can use the service to:

  • Provide information to Cloud-Init to be used for various system initialization tasks.

  • Get information about the instance, including the custom metadata that you provide when you launch the instance.

Providing Cloud-Init Metadata

You can use the following metadata key names to provide information to Cloud-Init:

"ssh_authorized_keys" - Provide one or more public SSH keys to be included in the ~/.ssh/authorized_keys file for the default user on the instance. Use a newline character to separate multiple keys. The SSH keys must be in the format necessary for the authorized_keys file, as shown in the example below.

"user_data" - Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the Cloud-Init Documentation.

Metadata Example

  \"metadata\" : {
     \"quake_bot_level\" : \"Severe\",
     \"ssh_authorized_keys\" : \"ssh-rsa <your_public_SSH_key>== rsa-key-20160227\",
     \"user_data\" : \"<your_public_SSH_key>==\"
  }

Getting Metadata on the Instance

To get information about your instance, connect to the instance using SSH and issue any of the following GET requests:

 curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/
 curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/
 curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/<any-key-name>

You'll get back a response that includes all the instance information; only the metadata information; or the metadata information for the specified key name, respectively.

The combined size of the metadata and extendedMetadata objects can be a maximum of 32,000 bytes.

Returns:

  • (Hash<String, String>)


219
220
221
# File 'lib/oci/core/models/launch_instance_details.rb', line 219

def 
  @metadata
end

#placement_constraint_detailsOCI::Core::Models::PlacementConstraintDetails



257
258
259
# File 'lib/oci/core/models/launch_instance_details.rb', line 257

def placement_constraint_details
  @placement_constraint_details
end

#platform_configOCI::Core::Models::LaunchInstancePlatformConfig



254
255
256
# File 'lib/oci/core/models/launch_instance_details.rb', line 254

def platform_config
  @platform_config
end

#preemptible_instance_configOCI::Core::Models::PreemptibleInstanceConfigDetails



167
168
169
# File 'lib/oci/core/models/launch_instance_details.rb', line 167

def preemptible_instance_config
  @preemptible_instance_config
end

#security_attributesHash<String, Hash<String, Object>>

Security attributes are labels for a resource that can be referenced in a Zero Trust Packet Routing (ZPR) policy to control access to ZPR-supported resources.

Example: {\"Oracle-DataSecurity-ZPR\": {\"MaxEgressCount\": {\"value\":\"42\",\"mode\":\"audit\"}}}

Returns:

  • (Hash<String, Hash<String, Object>>)


54
55
56
# File 'lib/oci/core/models/launch_instance_details.rb', line 54

def security_attributes
  @security_attributes
end

#shapeString

The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.

You can enumerate all available shapes by calling list_shapes.

Returns:

  • (String)


230
231
232
# File 'lib/oci/core/models/launch_instance_details.rb', line 230

def shape
  @shape
end

#shape_configOCI::Core::Models::LaunchInstanceShapeConfigDetails



233
234
235
# File 'lib/oci/core/models/launch_instance_details.rb', line 233

def shape_config
  @shape_config
end

#source_detailsOCI::Core::Models::InstanceSourceDetails



236
237
238
# File 'lib/oci/core/models/launch_instance_details.rb', line 236

def source_details
  @source_details
end

#subnet_idString

Deprecated. Instead use subnetId in CreateVnicDetails. At least one of them is required; if you provide both, the values must match.

Returns:

  • (String)


243
244
245
# File 'lib/oci/core/models/launch_instance_details.rb', line 243

def subnet_id
  @subnet_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/oci/core/models/launch_instance_details.rb', line 273

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'availabilityDomain',
    'capacity_reservation_id': :'capacityReservationId',
    'compartment_id': :'compartmentId',
    'create_vnic_details': :'createVnicDetails',
    'dedicated_vm_host_id': :'dedicatedVmHostId',
    'defined_tags': :'definedTags',
    'security_attributes': :'securityAttributes',
    'display_name': :'displayName',
    'extended_metadata': :'extendedMetadata',
    'fault_domain': :'faultDomain',
    'cluster_placement_group_id': :'clusterPlacementGroupId',
    'freeform_tags': :'freeformTags',
    'compute_cluster_id': :'computeClusterId',
    'hostname_label': :'hostnameLabel',
    'image_id': :'imageId',
    'ipxe_script': :'ipxeScript',
    'launch_options': :'launchOptions',
    'instance_options': :'instanceOptions',
    'availability_config': :'availabilityConfig',
    'preemptible_instance_config': :'preemptibleInstanceConfig',
    'metadata': :'metadata',
    'agent_config': :'agentConfig',
    'shape': :'shape',
    'shape_config': :'shapeConfig',
    'source_details': :'sourceDetails',
    'subnet_id': :'subnetId',
    'launch_volume_attachments': :'launchVolumeAttachments',
    'is_pv_encryption_in_transit_enabled': :'isPvEncryptionInTransitEnabled',
    'platform_config': :'platformConfig',
    'placement_constraint_details': :'placementConstraintDetails',
    'is_ai_enterprise_enabled': :'isAIEnterpriseEnabled',
    'instance_configuration_id': :'instanceConfigurationId',
    'licensing_configs': :'licensingConfigs'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/oci/core/models/launch_instance_details.rb', line 314

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'String',
    'capacity_reservation_id': :'String',
    'compartment_id': :'String',
    'create_vnic_details': :'OCI::Core::Models::CreateVnicDetails',
    'dedicated_vm_host_id': :'String',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'security_attributes': :'Hash<String, Hash<String, Object>>',
    'display_name': :'String',
    'extended_metadata': :'Hash<String, Object>',
    'fault_domain': :'String',
    'cluster_placement_group_id': :'String',
    'freeform_tags': :'Hash<String, String>',
    'compute_cluster_id': :'String',
    'hostname_label': :'String',
    'image_id': :'String',
    'ipxe_script': :'String',
    'launch_options': :'OCI::Core::Models::LaunchOptions',
    'instance_options': :'OCI::Core::Models::InstanceOptions',
    'availability_config': :'OCI::Core::Models::LaunchInstanceAvailabilityConfigDetails',
    'preemptible_instance_config': :'OCI::Core::Models::PreemptibleInstanceConfigDetails',
    'metadata': :'Hash<String, String>',
    'agent_config': :'OCI::Core::Models::LaunchInstanceAgentConfigDetails',
    'shape': :'String',
    'shape_config': :'OCI::Core::Models::LaunchInstanceShapeConfigDetails',
    'source_details': :'OCI::Core::Models::InstanceSourceDetails',
    'subnet_id': :'String',
    'launch_volume_attachments': :'Array<OCI::Core::Models::LaunchAttachVolumeDetails>',
    'is_pv_encryption_in_transit_enabled': :'BOOLEAN',
    'platform_config': :'OCI::Core::Models::LaunchInstancePlatformConfig',
    'placement_constraint_details': :'OCI::Core::Models::PlacementConstraintDetails',
    'is_ai_enterprise_enabled': :'BOOLEAN',
    'instance_configuration_id': :'String',
    'licensing_configs': :'Array<OCI::Core::Models::LaunchInstanceLicensingConfig>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
# File 'lib/oci/core/models/launch_instance_details.rb', line 599

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    availability_domain == other.availability_domain &&
    capacity_reservation_id == other.capacity_reservation_id &&
    compartment_id == other.compartment_id &&
    create_vnic_details == other.create_vnic_details &&
    dedicated_vm_host_id == other.dedicated_vm_host_id &&
    defined_tags == other.defined_tags &&
    security_attributes == other.security_attributes &&
    display_name == other.display_name &&
     == other. &&
    fault_domain == other.fault_domain &&
    cluster_placement_group_id == other.cluster_placement_group_id &&
    freeform_tags == other.freeform_tags &&
    compute_cluster_id == other.compute_cluster_id &&
    hostname_label == other.hostname_label &&
    image_id == other.image_id &&
    ipxe_script == other.ipxe_script &&
    launch_options == other.launch_options &&
    instance_options == other.instance_options &&
    availability_config == other.availability_config &&
    preemptible_instance_config == other.preemptible_instance_config &&
     == other. &&
    agent_config == other.agent_config &&
    shape == other.shape &&
    shape_config == other.shape_config &&
    source_details == other.source_details &&
    subnet_id == other.subnet_id &&
    launch_volume_attachments == other.launch_volume_attachments &&
    is_pv_encryption_in_transit_enabled == other.is_pv_encryption_in_transit_enabled &&
    platform_config == other.platform_config &&
    placement_constraint_details == other.placement_constraint_details &&
    is_ai_enterprise_enabled == other.is_ai_enterprise_enabled &&
    instance_configuration_id == other.instance_configuration_id &&
    licensing_configs == other.licensing_configs
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/oci/core/models/launch_instance_details.rb', line 661

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


641
642
643
# File 'lib/oci/core/models/launch_instance_details.rb', line 641

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



650
651
652
# File 'lib/oci/core/models/launch_instance_details.rb', line 650

def hash
  [availability_domain, capacity_reservation_id, compartment_id, create_vnic_details, dedicated_vm_host_id, defined_tags, security_attributes, display_name, , fault_domain, cluster_placement_group_id, freeform_tags, compute_cluster_id, hostname_label, image_id, ipxe_script, launch_options, instance_options, availability_config, preemptible_instance_config, , agent_config, shape, shape_config, source_details, subnet_id, launch_volume_attachments, is_pv_encryption_in_transit_enabled, platform_config, placement_constraint_details, is_ai_enterprise_enabled, instance_configuration_id, licensing_configs].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



694
695
696
697
698
699
700
701
702
703
# File 'lib/oci/core/models/launch_instance_details.rb', line 694

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



688
689
690
# File 'lib/oci/core/models/launch_instance_details.rb', line 688

def to_s
  to_hash.to_s
end