Class: OCI::Core::Models::Instance
- Inherits:
-
Object
- Object
- OCI::Core::Models::Instance
- Defined in:
- lib/oci/core/models/instance.rb
Overview
A compute host. The image used to launch the instance determines its operating system and other software. The shape specified during the launch process determines the number of CPUs and memory allocated to the instance.
When you launch an instance, it is automatically attached to a virtual network interface card (VNIC), called the primary VNIC. The VNIC has a private IP address from the subnet's CIDR. You can either assign a private IP address of your choice or let Oracle automatically assign one. You can choose whether the instance has a public IP address. To retrieve the addresses, use the list_vnic_attachments operation to get the VNIC ID for the instance, and then call get_vnic with the VNIC ID.
For more information, see Overview of the Compute Service.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.
Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.
Constant Summary collapse
- SECURITY_ATTRIBUTES_STATE_ENUM =
[ SECURITY_ATTRIBUTES_STATE_STABLE = 'STABLE'.freeze, SECURITY_ATTRIBUTES_STATE_UPDATING = 'UPDATING'.freeze, SECURITY_ATTRIBUTES_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LAUNCH_MODE_ENUM =
[ LAUNCH_MODE_NATIVE = 'NATIVE'.freeze, LAUNCH_MODE_EMULATED = 'EMULATED'.freeze, LAUNCH_MODE_PARAVIRTUALIZED = 'PARAVIRTUALIZED'.freeze, LAUNCH_MODE_ACCELERATEDPV = 'ACCELERATEDPV'.freeze, LAUNCH_MODE_CUSTOM = 'CUSTOM'.freeze, LAUNCH_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_MOVING = 'MOVING'.freeze, LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze, LIFECYCLE_STATE_RUNNING = 'RUNNING'.freeze, LIFECYCLE_STATE_STARTING = 'STARTING'.freeze, LIFECYCLE_STATE_STOPPING = 'STOPPING'.freeze, LIFECYCLE_STATE_STOPPED = 'STOPPED'.freeze, LIFECYCLE_STATE_CREATING_IMAGE = 'CREATING_IMAGE'.freeze, LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze, LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #agent_config ⇒ OCI::Core::Models::InstanceAgentConfig
- #availability_config ⇒ OCI::Core::Models::InstanceAvailabilityConfig
-
#availability_domain ⇒ String
[Required] The availability domain the instance is running in.
-
#capacity_reservation_id ⇒ String
The OCID of the compute capacity reservation this instance is launched under.
-
#cluster_placement_group_id ⇒ String
The OCID of the cluster placement group of the instance.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the instance.
-
#dedicated_vm_host_id ⇒ String
The OCID of the dedicated virtual machine host that the instance is placed on.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#extended_metadata ⇒ Hash<String, Object>
Additional metadata key/value pairs that you provide.
-
#fault_domain ⇒ String
The name of the fault domain the instance is running in.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the instance.
-
#image_id ⇒ String
Deprecated.
-
#instance_configuration_id ⇒ String
The OCID of the Instance Configuration used to source launch details for this instance.
- #instance_options ⇒ OCI::Core::Models::InstanceOptions
-
#ipxe_script ⇒ String
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.
-
#is_ai_enterprise_enabled ⇒ BOOLEAN
Whether AI enterprise is enabled on the instance.
-
#is_cross_numa_node ⇒ BOOLEAN
Whether the instanceu2019s OCPUs and memory are distributed across multiple NUMA nodes.
-
#launch_mode ⇒ String
Specifies the configuration mode for launching virtual machine (VM) instances.
- #launch_options ⇒ OCI::Core::Models::LaunchOptions
-
#licensing_configs ⇒ Array<OCI::Core::Models::LicensingConfig>
List of licensing configurations associated with the instance.
-
#lifecycle_state ⇒ String
[Required] The current state of the instance.
-
#metadata ⇒ Hash<String, String>
Custom metadata that you provide.
- #placement_constraint_details ⇒ OCI::Core::Models::PlacementConstraintDetails
- #platform_config ⇒ OCI::Core::Models::PlatformConfig
- #preemptible_instance_config ⇒ OCI::Core::Models::PreemptibleInstanceConfigDetails
-
#region ⇒ String
[Required] The region that contains the availability domain the instance is running in.
-
#security_attributes ⇒ Hash<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.
-
#security_attributes_state ⇒ String
The lifecycle state of the
securityAttributes. -
#shape ⇒ String
[Required] The shape of the instance.
- #shape_config ⇒ OCI::Core::Models::InstanceShapeConfig
- #source_details ⇒ OCI::Core::Models::InstanceSourceDetails
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] The date and time the instance was created, in the format defined by RFC3339.
-
#time_maintenance_reboot_due ⇒ DateTime
The date and time the instance is expected to be stopped / started, in the format defined by RFC3339.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Instance
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ Instance
Initializes the object
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 591 592 593 594 595 596 597 598 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 |
# File 'lib/oci/core/models/instance.rb', line 420 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.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.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.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. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = 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.security_attributes_state = attributes[:'securityAttributesState'] if attributes[:'securityAttributesState'] raise 'You cannot provide both :securityAttributesState and :security_attributes_state' if attributes.key?(:'securityAttributesState') && attributes.key?(:'security_attributes_state') self.security_attributes_state = attributes[:'security_attributes_state'] if attributes[:'security_attributes_state'] 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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.id = attributes[:'id'] if attributes[:'id'] 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_mode = attributes[:'launchMode'] if attributes[:'launchMode'] raise 'You cannot provide both :launchMode and :launch_mode' if attributes.key?(:'launchMode') && attributes.key?(:'launch_mode') self.launch_mode = attributes[:'launch_mode'] if attributes[:'launch_mode'] self. = attributes[:'launchOptions'] if attributes[:'launchOptions'] raise 'You cannot provide both :launchOptions and :launch_options' if attributes.key?(:'launchOptions') && attributes.key?(:'launch_options') self. = attributes[:'launch_options'] if attributes[:'launch_options'] self. = attributes[:'instanceOptions'] if attributes[:'instanceOptions'] raise 'You cannot provide both :instanceOptions and :instance_options' if attributes.key?(:'instanceOptions') && attributes.key?(:'instance_options') self. = 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.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self. = attributes[:'metadata'] if attributes[:'metadata'] self.region = attributes[:'region'] if attributes[:'region'] 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.is_cross_numa_node = attributes[:'isCrossNumaNode'] unless attributes[:'isCrossNumaNode'].nil? self.is_cross_numa_node = false if is_cross_numa_node.nil? && !attributes.key?(:'isCrossNumaNode') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isCrossNumaNode and :is_cross_numa_node' if attributes.key?(:'isCrossNumaNode') && attributes.key?(:'is_cross_numa_node') self.is_cross_numa_node = attributes[:'is_cross_numa_node'] unless attributes[:'is_cross_numa_node'].nil? self.is_cross_numa_node = false if is_cross_numa_node.nil? && !attributes.key?(:'isCrossNumaNode') && !attributes.key?(:'is_cross_numa_node') # rubocop:disable Style/StringLiterals 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. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] 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.time_maintenance_reboot_due = attributes[:'timeMaintenanceRebootDue'] if attributes[:'timeMaintenanceRebootDue'] raise 'You cannot provide both :timeMaintenanceRebootDue and :time_maintenance_reboot_due' if attributes.key?(:'timeMaintenanceRebootDue') && attributes.key?(:'time_maintenance_reboot_due') self.time_maintenance_reboot_due = attributes[:'time_maintenance_reboot_due'] if attributes[:'time_maintenance_reboot_due'] 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.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_config ⇒ OCI::Core::Models::InstanceAgentConfig
269 270 271 |
# File 'lib/oci/core/models/instance.rb', line 269 def agent_config @agent_config end |
#availability_config ⇒ OCI::Core::Models::InstanceAvailabilityConfig
214 215 216 |
# File 'lib/oci/core/models/instance.rb', line 214 def availability_config @availability_config end |
#availability_domain ⇒ String
[Required] The availability domain the instance is running in.
Example: Uocm:PHX-AD-1
67 68 69 |
# File 'lib/oci/core/models/instance.rb', line 67 def availability_domain @availability_domain end |
#capacity_reservation_id ⇒ String
The OCID of the compute capacity reservation this instance is launched under. When this field contains an empty string or is null, the instance is not currently in a capacity reservation. For more information, see Capacity Reservations.
74 75 76 |
# File 'lib/oci/core/models/instance.rb', line 74 def capacity_reservation_id @capacity_reservation_id end |
#cluster_placement_group_id ⇒ String
The OCID of the cluster placement group of the instance.
90 91 92 |
# File 'lib/oci/core/models/instance.rb', line 90 def cluster_placement_group_id @cluster_placement_group_id end |
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the instance.
78 79 80 |
# File 'lib/oci/core/models/instance.rb', line 78 def compartment_id @compartment_id end |
#dedicated_vm_host_id ⇒ String
The OCID of the dedicated virtual machine host that the instance is placed on.
95 96 97 |
# File 'lib/oci/core/models/instance.rb', line 95 def dedicated_vm_host_id @dedicated_vm_host_id end |
#defined_tags ⇒ Hash<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\"}}
103 104 105 |
# File 'lib/oci/core/models/instance.rb', line 103 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
122 123 124 |
# File 'lib/oci/core/models/instance.rb', line 122 def display_name @display_name end |
#extended_metadata ⇒ Hash<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).
131 132 133 |
# File 'lib/oci/core/models/instance.rb', line 131 def @extended_metadata end |
#fault_domain ⇒ String
The name of the fault domain the instance is running in.
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.
Example: FAULT-DOMAIN-1
146 147 148 |
# File 'lib/oci/core/models/instance.rb', line 146 def fault_domain @fault_domain end |
#freeform_tags ⇒ Hash<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\"}
154 155 156 |
# File 'lib/oci/core/models/instance.rb', line 154 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the instance.
158 159 160 |
# File 'lib/oci/core/models/instance.rb', line 158 def id @id end |
#image_id ⇒ String
Deprecated. Use sourceDetails instead.
163 164 165 |
# File 'lib/oci/core/models/instance.rb', line 163 def image_id @image_id end |
#instance_configuration_id ⇒ String
The OCID of the Instance Configuration used to source launch details for this instance. Any other fields supplied in the instance launch request override the details stored in the Instance Configuration for this instance launch.
284 285 286 |
# File 'lib/oci/core/models/instance.rb', line 284 def instance_configuration_id @instance_configuration_id end |
#instance_options ⇒ OCI::Core::Models::InstanceOptions
211 212 213 |
# File 'lib/oci/core/models/instance.rb', line 211 def @instance_options end |
#ipxe_script ⇒ String
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.
195 196 197 |
# File 'lib/oci/core/models/instance.rb', line 195 def ipxe_script @ipxe_script end |
#is_ai_enterprise_enabled ⇒ BOOLEAN
Whether AI enterprise is enabled on the instance.
86 87 88 |
# File 'lib/oci/core/models/instance.rb', line 86 def is_ai_enterprise_enabled @is_ai_enterprise_enabled end |
#is_cross_numa_node ⇒ BOOLEAN
Whether the instanceu2019s OCPUs and memory are distributed across multiple NUMA nodes.
250 251 252 |
# File 'lib/oci/core/models/instance.rb', line 250 def is_cross_numa_node @is_cross_numa_node end |
#launch_mode ⇒ String
Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * NATIVE - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * EMULATED - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * PARAVIRTUALIZED - VM instances launch with paravirtualized devices using VirtIO drivers. * ACCELERATEDPV - VM instances launch with accelerated paravirtualized networking type. * CUSTOM - VM instances launch with custom configuration settings specified in the LaunchOptions parameter.
205 206 207 |
# File 'lib/oci/core/models/instance.rb', line 205 def launch_mode @launch_mode end |
#launch_options ⇒ OCI::Core::Models::LaunchOptions
208 209 210 |
# File 'lib/oci/core/models/instance.rb', line 208 def @launch_options end |
#licensing_configs ⇒ Array<OCI::Core::Models::LicensingConfig>
List of licensing configurations associated with the instance.
288 289 290 |
# File 'lib/oci/core/models/instance.rb', line 288 def licensing_configs @licensing_configs end |
#lifecycle_state ⇒ String
[Required] The current state of the instance.
221 222 223 |
# File 'lib/oci/core/models/instance.rb', line 221 def lifecycle_state @lifecycle_state end |
#metadata ⇒ Hash<String, String>
Custom metadata that you provide.
225 226 227 |
# File 'lib/oci/core/models/instance.rb', line 225 def @metadata end |
#placement_constraint_details ⇒ OCI::Core::Models::PlacementConstraintDetails
81 82 83 |
# File 'lib/oci/core/models/instance.rb', line 81 def placement_constraint_details @placement_constraint_details end |
#platform_config ⇒ OCI::Core::Models::PlatformConfig
280 281 282 |
# File 'lib/oci/core/models/instance.rb', line 280 def platform_config @platform_config end |
#preemptible_instance_config ⇒ OCI::Core::Models::PreemptibleInstanceConfigDetails
217 218 219 |
# File 'lib/oci/core/models/instance.rb', line 217 def preemptible_instance_config @preemptible_instance_config end |
#region ⇒ String
[Required] The region that contains the availability domain the instance is running in.
For the us-phoenix-1 and us-ashburn-1 regions, phx and iad are returned, respectively. For all other regions, the full region name is returned.
Examples: phx, eu-frankfurt-1
235 236 237 |
# File 'lib/oci/core/models/instance.rb', line 235 def region @region end |
#security_attributes ⇒ Hash<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\"}}}
112 113 114 |
# File 'lib/oci/core/models/instance.rb', line 112 def security_attributes @security_attributes end |
#security_attributes_state ⇒ String
The lifecycle state of the securityAttributes
116 117 118 |
# File 'lib/oci/core/models/instance.rb', line 116 def security_attributes_state @security_attributes_state end |
#shape ⇒ String
[Required] The shape of the instance. The shape determines the number of CPUs and the amount of memory allocated to the instance. You can enumerate all available shapes by calling list_shapes.
242 243 244 |
# File 'lib/oci/core/models/instance.rb', line 242 def shape @shape end |
#shape_config ⇒ OCI::Core::Models::InstanceShapeConfig
245 246 247 |
# File 'lib/oci/core/models/instance.rb', line 245 def shape_config @shape_config end |
#source_details ⇒ OCI::Core::Models::InstanceSourceDetails
253 254 255 |
# File 'lib/oci/core/models/instance.rb', line 253 def source_details @source_details end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
259 260 261 |
# File 'lib/oci/core/models/instance.rb', line 259 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time the instance was created, in the format defined by RFC3339.
Example: 2016-08-25T21:10:29.600Z
266 267 268 |
# File 'lib/oci/core/models/instance.rb', line 266 def time_created @time_created end |
#time_maintenance_reboot_due ⇒ DateTime
The date and time the instance is expected to be stopped / started, in the format defined by RFC3339. After that time if instance hasn't been rebooted, Oracle will reboot the instance within 24 hours of the due time. Regardless of how the instance was stopped, the flag will be reset to empty as soon as instance reaches Stopped state. Example: 2018-05-25T21:10:29.600Z
277 278 279 |
# File 'lib/oci/core/models/instance.rb', line 277 def time_maintenance_reboot_due @time_maintenance_reboot_due end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/oci/core/models/instance.rb', line 291 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'availabilityDomain', 'capacity_reservation_id': :'capacityReservationId', 'compartment_id': :'compartmentId', 'placement_constraint_details': :'placementConstraintDetails', 'is_ai_enterprise_enabled': :'isAIEnterpriseEnabled', 'cluster_placement_group_id': :'clusterPlacementGroupId', 'dedicated_vm_host_id': :'dedicatedVmHostId', 'defined_tags': :'definedTags', 'security_attributes': :'securityAttributes', 'security_attributes_state': :'securityAttributesState', 'display_name': :'displayName', 'extended_metadata': :'extendedMetadata', 'fault_domain': :'faultDomain', 'freeform_tags': :'freeformTags', 'id': :'id', 'image_id': :'imageId', 'ipxe_script': :'ipxeScript', 'launch_mode': :'launchMode', 'launch_options': :'launchOptions', 'instance_options': :'instanceOptions', 'availability_config': :'availabilityConfig', 'preemptible_instance_config': :'preemptibleInstanceConfig', 'lifecycle_state': :'lifecycleState', 'metadata': :'metadata', 'region': :'region', 'shape': :'shape', 'shape_config': :'shapeConfig', 'is_cross_numa_node': :'isCrossNumaNode', 'source_details': :'sourceDetails', 'system_tags': :'systemTags', 'time_created': :'timeCreated', 'agent_config': :'agentConfig', 'time_maintenance_reboot_due': :'timeMaintenanceRebootDue', 'platform_config': :'platformConfig', 'instance_configuration_id': :'instanceConfigurationId', 'licensing_configs': :'licensingConfigs' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/oci/core/models/instance.rb', line 335 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'String', 'capacity_reservation_id': :'String', 'compartment_id': :'String', 'placement_constraint_details': :'OCI::Core::Models::PlacementConstraintDetails', 'is_ai_enterprise_enabled': :'BOOLEAN', 'cluster_placement_group_id': :'String', 'dedicated_vm_host_id': :'String', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'security_attributes': :'Hash<String, Hash<String, Object>>', 'security_attributes_state': :'String', 'display_name': :'String', 'extended_metadata': :'Hash<String, Object>', 'fault_domain': :'String', 'freeform_tags': :'Hash<String, String>', 'id': :'String', 'image_id': :'String', 'ipxe_script': :'String', 'launch_mode': :'String', 'launch_options': :'OCI::Core::Models::LaunchOptions', 'instance_options': :'OCI::Core::Models::InstanceOptions', 'availability_config': :'OCI::Core::Models::InstanceAvailabilityConfig', 'preemptible_instance_config': :'OCI::Core::Models::PreemptibleInstanceConfigDetails', 'lifecycle_state': :'String', 'metadata': :'Hash<String, String>', 'region': :'String', 'shape': :'String', 'shape_config': :'OCI::Core::Models::InstanceShapeConfig', 'is_cross_numa_node': :'BOOLEAN', 'source_details': :'OCI::Core::Models::InstanceSourceDetails', 'system_tags': :'Hash<String, Hash<String, Object>>', 'time_created': :'DateTime', 'agent_config': :'OCI::Core::Models::InstanceAgentConfig', 'time_maintenance_reboot_due': :'DateTime', 'platform_config': :'OCI::Core::Models::PlatformConfig', 'instance_configuration_id': :'String', 'licensing_configs': :'Array<OCI::Core::Models::LicensingConfig>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
# File 'lib/oci/core/models/instance.rb', line 677 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 && placement_constraint_details == other.placement_constraint_details && is_ai_enterprise_enabled == other.is_ai_enterprise_enabled && cluster_placement_group_id == other.cluster_placement_group_id && dedicated_vm_host_id == other.dedicated_vm_host_id && == other. && security_attributes == other.security_attributes && security_attributes_state == other.security_attributes_state && display_name == other.display_name && == other. && fault_domain == other.fault_domain && == other. && id == other.id && image_id == other.image_id && ipxe_script == other.ipxe_script && launch_mode == other.launch_mode && == other. && == other. && availability_config == other.availability_config && preemptible_instance_config == other.preemptible_instance_config && lifecycle_state == other.lifecycle_state && == other. && region == other.region && shape == other.shape && shape_config == other.shape_config && is_cross_numa_node == other.is_cross_numa_node && source_details == other.source_details && == other. && time_created == other.time_created && agent_config == other.agent_config && time_maintenance_reboot_due == other.time_maintenance_reboot_due && platform_config == other.platform_config && instance_configuration_id == other.instance_configuration_id && licensing_configs == other.licensing_configs end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/oci/core/models/instance.rb', line 742 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
722 723 724 |
# File 'lib/oci/core/models/instance.rb', line 722 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
731 732 733 |
# File 'lib/oci/core/models/instance.rb', line 731 def hash [availability_domain, capacity_reservation_id, compartment_id, placement_constraint_details, is_ai_enterprise_enabled, cluster_placement_group_id, dedicated_vm_host_id, , security_attributes, security_attributes_state, display_name, , fault_domain, , id, image_id, ipxe_script, launch_mode, , , availability_config, preemptible_instance_config, lifecycle_state, , region, shape, shape_config, is_cross_numa_node, source_details, , time_created, agent_config, time_maintenance_reboot_due, platform_config, instance_configuration_id, licensing_configs].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
775 776 777 778 779 780 781 782 783 784 |
# File 'lib/oci/core/models/instance.rb', line 775 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_s ⇒ String
Returns the string representation of the object
769 770 771 |
# File 'lib/oci/core/models/instance.rb', line 769 def to_s to_hash.to_s end |