InstanceConfigurationLaunchInstanceDetails¶
-
class
oci.core.models.
InstanceConfigurationLaunchInstanceDetails
(**kwargs)¶ Bases:
object
Instance launch details for creating an instance from an instance configuration. Use the sourceDetails parameter to specify whether a boot volume or an image should be used to launch a new instance.
See
LaunchInstanceDetails
for more information.Attributes
LAUNCH_MODE_CUSTOM
A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. LAUNCH_MODE_EMULATED
A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. LAUNCH_MODE_NATIVE
A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. LAUNCH_MODE_PARAVIRTUALIZED
A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. PREFERRED_MAINTENANCE_ACTION_LIVE_MIGRATE
A constant which can be used with the preferred_maintenance_action property of a InstanceConfigurationLaunchInstanceDetails. PREFERRED_MAINTENANCE_ACTION_REBOOT
A constant which can be used with the preferred_maintenance_action property of a InstanceConfigurationLaunchInstanceDetails. agent_config
Gets the agent_config of this InstanceConfigurationLaunchInstanceDetails. availability_config
Gets the availability_config of this InstanceConfigurationLaunchInstanceDetails. availability_domain
Gets the availability_domain of this InstanceConfigurationLaunchInstanceDetails. capacity_reservation_id
Gets the capacity_reservation_id of this InstanceConfigurationLaunchInstanceDetails. cluster_placement_group_id
Gets the cluster_placement_group_id of this InstanceConfigurationLaunchInstanceDetails. compartment_id
Gets the compartment_id of this InstanceConfigurationLaunchInstanceDetails. create_vnic_details
Gets the create_vnic_details of this InstanceConfigurationLaunchInstanceDetails. dedicated_vm_host_id
Gets the dedicated_vm_host_id of this InstanceConfigurationLaunchInstanceDetails. defined_tags
Gets the defined_tags of this InstanceConfigurationLaunchInstanceDetails. display_name
Gets the display_name of this InstanceConfigurationLaunchInstanceDetails. extended_metadata
Gets the extended_metadata of this InstanceConfigurationLaunchInstanceDetails. fault_domain
Gets the fault_domain of this InstanceConfigurationLaunchInstanceDetails. freeform_tags
Gets the freeform_tags of this InstanceConfigurationLaunchInstanceDetails. instance_options
Gets the instance_options of this InstanceConfigurationLaunchInstanceDetails. ipxe_script
Gets the ipxe_script of this InstanceConfigurationLaunchInstanceDetails. is_pv_encryption_in_transit_enabled
Gets the is_pv_encryption_in_transit_enabled of this InstanceConfigurationLaunchInstanceDetails. launch_mode
Gets the launch_mode of this InstanceConfigurationLaunchInstanceDetails. launch_options
Gets the launch_options of this InstanceConfigurationLaunchInstanceDetails. metadata
Gets the metadata of this InstanceConfigurationLaunchInstanceDetails. platform_config
Gets the platform_config of this InstanceConfigurationLaunchInstanceDetails. preemptible_instance_config
Gets the preemptible_instance_config of this InstanceConfigurationLaunchInstanceDetails. preferred_maintenance_action
Gets the preferred_maintenance_action of this InstanceConfigurationLaunchInstanceDetails. security_attributes
Gets the security_attributes of this InstanceConfigurationLaunchInstanceDetails. shape
Gets the shape of this InstanceConfigurationLaunchInstanceDetails. shape_config
Gets the shape_config of this InstanceConfigurationLaunchInstanceDetails. source_details
Gets the source_details of this InstanceConfigurationLaunchInstanceDetails. Methods
__init__
(**kwargs)Initializes a new InstanceConfigurationLaunchInstanceDetails object with values from keyword arguments. -
LAUNCH_MODE_CUSTOM
= 'CUSTOM'¶ A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. This constant has a value of “CUSTOM”
-
LAUNCH_MODE_EMULATED
= 'EMULATED'¶ A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. This constant has a value of “EMULATED”
-
LAUNCH_MODE_NATIVE
= 'NATIVE'¶ A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. This constant has a value of “NATIVE”
-
LAUNCH_MODE_PARAVIRTUALIZED
= 'PARAVIRTUALIZED'¶ A constant which can be used with the launch_mode property of a InstanceConfigurationLaunchInstanceDetails. This constant has a value of “PARAVIRTUALIZED”
-
PREFERRED_MAINTENANCE_ACTION_LIVE_MIGRATE
= 'LIVE_MIGRATE'¶ A constant which can be used with the preferred_maintenance_action property of a InstanceConfigurationLaunchInstanceDetails. This constant has a value of “LIVE_MIGRATE”
-
PREFERRED_MAINTENANCE_ACTION_REBOOT
= 'REBOOT'¶ A constant which can be used with the preferred_maintenance_action property of a InstanceConfigurationLaunchInstanceDetails. This constant has a value of “REBOOT”
-
__init__
(**kwargs)¶ Initializes a new InstanceConfigurationLaunchInstanceDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - availability_domain (str) – The value to assign to the availability_domain property of this InstanceConfigurationLaunchInstanceDetails.
- capacity_reservation_id (str) – The value to assign to the capacity_reservation_id property of this InstanceConfigurationLaunchInstanceDetails.
- compartment_id (str) – The value to assign to the compartment_id property of this InstanceConfigurationLaunchInstanceDetails.
- cluster_placement_group_id (str) – The value to assign to the cluster_placement_group_id property of this InstanceConfigurationLaunchInstanceDetails.
- create_vnic_details (oci.core.models.InstanceConfigurationCreateVnicDetails) – The value to assign to the create_vnic_details property of this InstanceConfigurationLaunchInstanceDetails.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this InstanceConfigurationLaunchInstanceDetails.
- security_attributes (dict(str, dict(str, object))) – The value to assign to the security_attributes property of this InstanceConfigurationLaunchInstanceDetails.
- display_name (str) – The value to assign to the display_name property of this InstanceConfigurationLaunchInstanceDetails.
- extended_metadata (dict(str, object)) – The value to assign to the extended_metadata property of this InstanceConfigurationLaunchInstanceDetails.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this InstanceConfigurationLaunchInstanceDetails.
- ipxe_script (str) – The value to assign to the ipxe_script property of this InstanceConfigurationLaunchInstanceDetails.
- metadata (dict(str, str)) – The value to assign to the metadata property of this InstanceConfigurationLaunchInstanceDetails.
- shape (str) – The value to assign to the shape property of this InstanceConfigurationLaunchInstanceDetails.
- shape_config (oci.core.models.InstanceConfigurationLaunchInstanceShapeConfigDetails) – The value to assign to the shape_config property of this InstanceConfigurationLaunchInstanceDetails.
- platform_config (oci.core.models.InstanceConfigurationLaunchInstancePlatformConfig) – The value to assign to the platform_config property of this InstanceConfigurationLaunchInstanceDetails.
- source_details (oci.core.models.InstanceConfigurationInstanceSourceDetails) – The value to assign to the source_details property of this InstanceConfigurationLaunchInstanceDetails.
- fault_domain (str) – The value to assign to the fault_domain property of this InstanceConfigurationLaunchInstanceDetails.
- dedicated_vm_host_id (str) – The value to assign to the dedicated_vm_host_id property of this InstanceConfigurationLaunchInstanceDetails.
- launch_mode (str) – The value to assign to the launch_mode property of this InstanceConfigurationLaunchInstanceDetails. Allowed values for this property are: “NATIVE”, “EMULATED”, “PARAVIRTUALIZED”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- launch_options (oci.core.models.InstanceConfigurationLaunchOptions) – The value to assign to the launch_options property of this InstanceConfigurationLaunchInstanceDetails.
- agent_config (oci.core.models.InstanceConfigurationLaunchInstanceAgentConfigDetails) – The value to assign to the agent_config property of this InstanceConfigurationLaunchInstanceDetails.
- is_pv_encryption_in_transit_enabled (bool) – The value to assign to the is_pv_encryption_in_transit_enabled property of this InstanceConfigurationLaunchInstanceDetails.
- preferred_maintenance_action (str) – The value to assign to the preferred_maintenance_action property of this InstanceConfigurationLaunchInstanceDetails. Allowed values for this property are: “LIVE_MIGRATE”, “REBOOT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- instance_options (oci.core.models.InstanceConfigurationInstanceOptions) – The value to assign to the instance_options property of this InstanceConfigurationLaunchInstanceDetails.
- availability_config (oci.core.models.InstanceConfigurationAvailabilityConfig) – The value to assign to the availability_config property of this InstanceConfigurationLaunchInstanceDetails.
- preemptible_instance_config (oci.core.models.PreemptibleInstanceConfigDetails) – The value to assign to the preemptible_instance_config property of this InstanceConfigurationLaunchInstanceDetails.
-
agent_config
¶ Gets the agent_config of this InstanceConfigurationLaunchInstanceDetails.
Returns: The agent_config of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationLaunchInstanceAgentConfigDetails
-
availability_config
¶ Gets the availability_config of this InstanceConfigurationLaunchInstanceDetails.
Returns: The availability_config of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationAvailabilityConfig
-
availability_domain
¶ Gets the availability_domain of this InstanceConfigurationLaunchInstanceDetails. The availability domain of the instance.
Example: Uocm:PHX-AD-1
Returns: The availability_domain of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
capacity_reservation_id
¶ Gets the capacity_reservation_id of this InstanceConfigurationLaunchInstanceDetails. The OCID of the compute capacity reservation this instance is launched under.
Returns: The capacity_reservation_id of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
cluster_placement_group_id
¶ Gets the cluster_placement_group_id of this InstanceConfigurationLaunchInstanceDetails. The OCID of the cluster placement group of the instance.
Returns: The cluster_placement_group_id of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
compartment_id
¶ Gets the compartment_id of this InstanceConfigurationLaunchInstanceDetails. The OCID of the compartment containing the instance. Instances created from instance configurations are placed in the same compartment as the instance that was used to create the instance configuration.
Returns: The compartment_id of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
create_vnic_details
¶ Gets the create_vnic_details of this InstanceConfigurationLaunchInstanceDetails.
Returns: The create_vnic_details of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationCreateVnicDetails
-
dedicated_vm_host_id
¶ Gets the dedicated_vm_host_id of this InstanceConfigurationLaunchInstanceDetails. The OCID of the dedicated virtual machine host to place the instance on.
Dedicated VM hosts can be used when launching individual instances from an instance configuration. They cannot be used to launch instance pools.
Returns: The dedicated_vm_host_id of this InstanceConfigurationLaunchInstanceDetails. Return type: str
Gets the defined_tags of this InstanceConfigurationLaunchInstanceDetails. 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: The defined_tags of this InstanceConfigurationLaunchInstanceDetails. Return type: dict(str, dict(str, object))
-
display_name
¶ Gets the display_name of this InstanceConfigurationLaunchInstanceDetails. A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
Returns: The display_name of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
extended_metadata
¶ Gets the extended_metadata of this InstanceConfigurationLaunchInstanceDetails. 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: The extended_metadata of this InstanceConfigurationLaunchInstanceDetails. Return type: dict(str, object)
-
fault_domain
¶ Gets the fault_domain of this InstanceConfigurationLaunchInstanceDetails. 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: The fault_domain of this InstanceConfigurationLaunchInstanceDetails. Return type: str
Gets the freeform_tags of this InstanceConfigurationLaunchInstanceDetails. 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: The freeform_tags of this InstanceConfigurationLaunchInstanceDetails. Return type: dict(str, str)
-
instance_options
¶ Gets the instance_options of this InstanceConfigurationLaunchInstanceDetails.
Returns: The instance_options of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationInstanceOptions
-
ipxe_script
¶ Gets the ipxe_script of this InstanceConfigurationLaunchInstanceDetails. 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; however, you should 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, you should use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot.
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 http://ipxe.org.
Returns: The ipxe_script of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
is_pv_encryption_in_transit_enabled
¶ Gets the is_pv_encryption_in_transit_enabled of this InstanceConfigurationLaunchInstanceDetails. Whether to enable in-transit encryption for the data volume’s paravirtualized attachment. The default value is false.
Returns: The is_pv_encryption_in_transit_enabled of this InstanceConfigurationLaunchInstanceDetails. Return type: bool
-
launch_mode
¶ Gets the launch_mode of this InstanceConfigurationLaunchInstanceDetails. 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. * CUSTOM - VM instances launch with custom configuration settings specified in the LaunchOptions parameter.
Allowed values for this property are: “NATIVE”, “EMULATED”, “PARAVIRTUALIZED”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The launch_mode of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
launch_options
¶ Gets the launch_options of this InstanceConfigurationLaunchInstanceDetails.
Returns: The launch_options of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationLaunchOptions
-
metadata
¶ Gets the metadata of this InstanceConfigurationLaunchInstanceDetails. 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: The metadata of this InstanceConfigurationLaunchInstanceDetails. Return type: dict(str, str)
-
platform_config
¶ Gets the platform_config of this InstanceConfigurationLaunchInstanceDetails.
Returns: The platform_config of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationLaunchInstancePlatformConfig
-
preemptible_instance_config
¶ Gets the preemptible_instance_config of this InstanceConfigurationLaunchInstanceDetails.
Returns: The preemptible_instance_config of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.PreemptibleInstanceConfigDetails
-
preferred_maintenance_action
¶ Gets the preferred_maintenance_action of this InstanceConfigurationLaunchInstanceDetails. The preferred maintenance action for an instance. The default is LIVE_MIGRATE, if live migration is supported. * LIVE_MIGRATE - Run maintenance using a live migration. * REBOOT - Run maintenance using a reboot.
Allowed values for this property are: “LIVE_MIGRATE”, “REBOOT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The preferred_maintenance_action of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
security_attributes
¶ Gets the security_attributes of this InstanceConfigurationLaunchInstanceDetails. Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls.
Example: {“Oracle-DataSecurity-ZPR”: {“MaxEgressCount”: {“value”:”42”,”mode”:”audit”}}}
Returns: The security_attributes of this InstanceConfigurationLaunchInstanceDetails. Return type: dict(str, dict(str, object))
-
shape
¶ Gets the shape of this InstanceConfigurationLaunchInstanceDetails. 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: The shape of this InstanceConfigurationLaunchInstanceDetails. Return type: str
-
shape_config
¶ Gets the shape_config of this InstanceConfigurationLaunchInstanceDetails.
Returns: The shape_config of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationLaunchInstanceShapeConfigDetails
-
source_details
¶ Gets the source_details of this InstanceConfigurationLaunchInstanceDetails.
Returns: The source_details of this InstanceConfigurationLaunchInstanceDetails. Return type: oci.core.models.InstanceConfigurationInstanceSourceDetails
-