pub struct LaunchInstanceDetails {Show 33 fields
pub availability_domain: String,
pub compartment_id: String,
pub capacity_reservation_id: Option<String>,
pub create_vnic_details: Option<CreateVnicDetails>,
pub dedicated_vm_host_id: Option<String>,
pub defined_tags: Option<HashMap<String, HashMap<String, Value>>>,
pub security_attributes: Option<HashMap<String, HashMap<String, Value>>>,
pub display_name: Option<String>,
pub extended_metadata: Option<HashMap<String, Value>>,
pub fault_domain: Option<String>,
pub cluster_placement_group_id: Option<String>,
pub freeform_tags: Option<HashMap<String, String>>,
pub compute_cluster_id: Option<String>,
pub hostname_label: Option<String>,
pub image_id: Option<String>,
pub ipxe_script: Option<String>,
pub launch_options: Option<LaunchOptions>,
pub instance_options: Option<InstanceOptions>,
pub availability_config: Option<LaunchInstanceAvailabilityConfigDetails>,
pub preemptible_instance_config: Option<PreemptibleInstanceConfigDetails>,
pub metadata: Option<HashMap<String, String>>,
pub agent_config: Option<LaunchInstanceAgentConfigDetails>,
pub shape: Option<String>,
pub shape_config: Option<LaunchInstanceShapeConfigDetails>,
pub source_details: Option<InstanceSourceViaImageDetails>,
pub subnet_id: Option<String>,
pub launch_volume_attachments: Option<Vec<LaunchAttachVolumeDetails>>,
pub is_pv_encryption_in_transit_enabled: Option<bool>,
pub platform_config: Option<AmdRomeBmGpuLaunchInstancePlatformConfig>,
pub placement_constraint_details: Option<HostGroupPlacementConstraintDetails>,
pub is_aienterprise_enabled: Option<bool>,
pub instance_configuration_id: Option<String>,
pub licensing_configs: Option<Vec<LaunchInstanceLicensingConfig>>,
}Expand description
Instance launch details. Use the {@code sourceDetails} parameter to specify whether a boot volume or an image should be used to launch a new instance.
Fields§
§availability_domain: StringThe availability domain of the instance.
Example: {@code Uocm:PHX-AD-1}
compartment_id: StringThe OCID of the compartment.
capacity_reservation_id: Option<String>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.
create_vnic_details: Option<CreateVnicDetails>§dedicated_vm_host_id: Option<String>The OCID of the dedicated virtual machine host to place the instance on.
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {@code {"Operations": {"CostCenter": "42"}}}
security_attributes: Option<HashMap<String, HashMap<String, Value>>>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: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}}
display_name: Option<String>A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
extended_metadata: Option<HashMap<String, Value>>Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the {@code metadata} object.
They are distinguished from {@code metadata} fields in that these can be nested JSON objects (whereas {@code metadata} fields are string/string maps only).
The combined size of the {@code metadata} and {@code extendedMetadata} objects can be a maximum of 32,000 bytes.
fault_domain: Option<String>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 {@link #listFaultDomains(ListFaultDomainsRequest) listFaultDomains} operation in the Identity and Access Management Service API.
Example: {@code FAULT-DOMAIN-1}
cluster_placement_group_id: Option<String>The OCID of the cluster placement group of the instance.
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: {@code {"Department": "Finance"}}
compute_cluster_id: Option<String>The OCID of the compute cluster that the instance will be created in.
hostname_label: Option<String>Deprecated. Instead use {@code hostnameLabel} in {@link CreateVnicDetails}. If you provide both, the values must match.
image_id: Option<String>Deprecated. Use {@code sourceDetails} with {@link #instanceSourceViaImageDetails(InstanceSourceViaImageDetailsRequest) instanceSourceViaImageDetails} source type instead. If you specify values for both, the values must match.
ipxe_script: Option<String>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 http://ipxe.org.
launch_options: Option<LaunchOptions>§instance_options: Option<InstanceOptions>§availability_config: Option<LaunchInstanceAvailabilityConfigDetails>§preemptible_instance_config: Option<PreemptibleInstanceConfigDetails>§metadata: Option<HashMap<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 {@code ~/.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 {@code 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/ 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 {@code metadata} and {@code extendedMetadata} objects can be a maximum of 32,000 bytes.
agent_config: Option<LaunchInstanceAgentConfigDetails>§shape: Option<String>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 {@link #listShapes(ListShapesRequest) listShapes}.
shape_config: Option<LaunchInstanceShapeConfigDetails>§source_details: Option<InstanceSourceViaImageDetails>§subnet_id: Option<String>Deprecated. Instead use {@code subnetId} in {@link CreateVnicDetails}. At least one of them is required; if you provide both, the values must match.
launch_volume_attachments: Option<Vec<LaunchAttachVolumeDetails>>Volume attachments to create as part of the launch instance operation.
is_pv_encryption_in_transit_enabled: Option<bool>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.
platform_config: Option<AmdRomeBmGpuLaunchInstancePlatformConfig>§placement_constraint_details: Option<HostGroupPlacementConstraintDetails>§is_aienterprise_enabled: Option<bool>Whether to enable AI enterprise on the instance.
instance_configuration_id: Option<String>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.
licensing_configs: Option<Vec<LaunchInstanceLicensingConfig>>List of licensing configurations associated with target launch values.
Implementations§
Source§impl LaunchInstanceDetails
impl LaunchInstanceDetails
Sourcepub fn new(required: LaunchInstanceDetailsRequired) -> Self
pub fn new(required: LaunchInstanceDetailsRequired) -> Self
Create a new LaunchInstanceDetails with required fields
Sourcepub fn set_availability_domain(self, value: String) -> Self
pub fn set_availability_domain(self, value: String) -> Self
Set availability_domain
Sourcepub fn set_capacity_reservation_id(self, value: Option<String>) -> Self
pub fn set_capacity_reservation_id(self, value: Option<String>) -> Self
Set capacity_reservation_id
Sourcepub fn set_compartment_id(self, value: String) -> Self
pub fn set_compartment_id(self, value: String) -> Self
Set compartment_id
Sourcepub fn set_create_vnic_details(self, value: Option<CreateVnicDetails>) -> Self
pub fn set_create_vnic_details(self, value: Option<CreateVnicDetails>) -> Self
Set create_vnic_details
Sourcepub fn set_dedicated_vm_host_id(self, value: Option<String>) -> Self
pub fn set_dedicated_vm_host_id(self, value: Option<String>) -> Self
Set dedicated_vm_host_id
Set defined_tags
Sourcepub fn set_security_attributes(
self,
value: Option<HashMap<String, HashMap<String, Value>>>,
) -> Self
pub fn set_security_attributes( self, value: Option<HashMap<String, HashMap<String, Value>>>, ) -> Self
Set security_attributes
Sourcepub fn set_display_name(self, value: Option<String>) -> Self
pub fn set_display_name(self, value: Option<String>) -> Self
Set display_name
Sourcepub fn set_extended_metadata(
self,
value: Option<HashMap<String, Value>>,
) -> Self
pub fn set_extended_metadata( self, value: Option<HashMap<String, Value>>, ) -> Self
Set extended_metadata
Sourcepub fn set_fault_domain(self, value: Option<String>) -> Self
pub fn set_fault_domain(self, value: Option<String>) -> Self
Set fault_domain
Sourcepub fn set_cluster_placement_group_id(self, value: Option<String>) -> Self
pub fn set_cluster_placement_group_id(self, value: Option<String>) -> Self
Set cluster_placement_group_id
Set freeform_tags
Sourcepub fn set_compute_cluster_id(self, value: Option<String>) -> Self
pub fn set_compute_cluster_id(self, value: Option<String>) -> Self
Set compute_cluster_id
Sourcepub fn set_hostname_label(self, value: Option<String>) -> Self
pub fn set_hostname_label(self, value: Option<String>) -> Self
Set hostname_label
Sourcepub fn set_image_id(self, value: Option<String>) -> Self
pub fn set_image_id(self, value: Option<String>) -> Self
Set image_id
Sourcepub fn set_ipxe_script(self, value: Option<String>) -> Self
pub fn set_ipxe_script(self, value: Option<String>) -> Self
Set ipxe_script
Sourcepub fn set_launch_options(self, value: Option<LaunchOptions>) -> Self
pub fn set_launch_options(self, value: Option<LaunchOptions>) -> Self
Set launch_options
Sourcepub fn set_instance_options(self, value: Option<InstanceOptions>) -> Self
pub fn set_instance_options(self, value: Option<InstanceOptions>) -> Self
Set instance_options
Sourcepub fn set_availability_config(
self,
value: Option<LaunchInstanceAvailabilityConfigDetails>,
) -> Self
pub fn set_availability_config( self, value: Option<LaunchInstanceAvailabilityConfigDetails>, ) -> Self
Set availability_config
Sourcepub fn set_preemptible_instance_config(
self,
value: Option<PreemptibleInstanceConfigDetails>,
) -> Self
pub fn set_preemptible_instance_config( self, value: Option<PreemptibleInstanceConfigDetails>, ) -> Self
Set preemptible_instance_config
Sourcepub fn set_agent_config(
self,
value: Option<LaunchInstanceAgentConfigDetails>,
) -> Self
pub fn set_agent_config( self, value: Option<LaunchInstanceAgentConfigDetails>, ) -> Self
Set agent_config
Sourcepub fn set_shape_config(
self,
value: Option<LaunchInstanceShapeConfigDetails>,
) -> Self
pub fn set_shape_config( self, value: Option<LaunchInstanceShapeConfigDetails>, ) -> Self
Set shape_config
Sourcepub fn set_source_details(
self,
value: Option<InstanceSourceViaImageDetails>,
) -> Self
pub fn set_source_details( self, value: Option<InstanceSourceViaImageDetails>, ) -> Self
Set source_details
Sourcepub fn set_subnet_id(self, value: Option<String>) -> Self
pub fn set_subnet_id(self, value: Option<String>) -> Self
Set subnet_id
Sourcepub fn set_launch_volume_attachments(
self,
value: Option<Vec<LaunchAttachVolumeDetails>>,
) -> Self
pub fn set_launch_volume_attachments( self, value: Option<Vec<LaunchAttachVolumeDetails>>, ) -> Self
Set launch_volume_attachments
Sourcepub fn set_is_pv_encryption_in_transit_enabled(
self,
value: Option<bool>,
) -> Self
pub fn set_is_pv_encryption_in_transit_enabled( self, value: Option<bool>, ) -> Self
Set is_pv_encryption_in_transit_enabled
Sourcepub fn set_platform_config(
self,
value: Option<AmdRomeBmGpuLaunchInstancePlatformConfig>,
) -> Self
pub fn set_platform_config( self, value: Option<AmdRomeBmGpuLaunchInstancePlatformConfig>, ) -> Self
Set platform_config
Sourcepub fn set_placement_constraint_details(
self,
value: Option<HostGroupPlacementConstraintDetails>,
) -> Self
pub fn set_placement_constraint_details( self, value: Option<HostGroupPlacementConstraintDetails>, ) -> Self
Set placement_constraint_details
Sourcepub fn set_is_aienterprise_enabled(self, value: Option<bool>) -> Self
pub fn set_is_aienterprise_enabled(self, value: Option<bool>) -> Self
Set is_aienterprise_enabled
Sourcepub fn set_instance_configuration_id(self, value: Option<String>) -> Self
pub fn set_instance_configuration_id(self, value: Option<String>) -> Self
Set instance_configuration_id
Sourcepub fn set_licensing_configs(
self,
value: Option<Vec<LaunchInstanceLicensingConfig>>,
) -> Self
pub fn set_licensing_configs( self, value: Option<Vec<LaunchInstanceLicensingConfig>>, ) -> Self
Set licensing_configs
Sourcepub fn with_capacity_reservation_id(self, value: impl Into<String>) -> Self
pub fn with_capacity_reservation_id(self, value: impl Into<String>) -> Self
Set capacity_reservation_id (unwraps Option)
Sourcepub fn with_create_vnic_details(self, value: CreateVnicDetails) -> Self
pub fn with_create_vnic_details(self, value: CreateVnicDetails) -> Self
Set create_vnic_details (unwraps Option)
Sourcepub fn with_dedicated_vm_host_id(self, value: impl Into<String>) -> Self
pub fn with_dedicated_vm_host_id(self, value: impl Into<String>) -> Self
Set dedicated_vm_host_id (unwraps Option)
Set defined_tags (unwraps Option)
Sourcepub fn with_security_attributes(
self,
value: HashMap<String, HashMap<String, Value>>,
) -> Self
pub fn with_security_attributes( self, value: HashMap<String, HashMap<String, Value>>, ) -> Self
Set security_attributes (unwraps Option)
Sourcepub fn with_display_name(self, value: impl Into<String>) -> Self
pub fn with_display_name(self, value: impl Into<String>) -> Self
Set display_name (unwraps Option)
Sourcepub fn with_extended_metadata(self, value: HashMap<String, Value>) -> Self
pub fn with_extended_metadata(self, value: HashMap<String, Value>) -> Self
Set extended_metadata (unwraps Option)
Sourcepub fn with_fault_domain(self, value: impl Into<String>) -> Self
pub fn with_fault_domain(self, value: impl Into<String>) -> Self
Set fault_domain (unwraps Option)
Sourcepub fn with_cluster_placement_group_id(self, value: impl Into<String>) -> Self
pub fn with_cluster_placement_group_id(self, value: impl Into<String>) -> Self
Set cluster_placement_group_id (unwraps Option)
Set freeform_tags (unwraps Option)
Sourcepub fn with_compute_cluster_id(self, value: impl Into<String>) -> Self
pub fn with_compute_cluster_id(self, value: impl Into<String>) -> Self
Set compute_cluster_id (unwraps Option)
Sourcepub fn with_hostname_label(self, value: impl Into<String>) -> Self
pub fn with_hostname_label(self, value: impl Into<String>) -> Self
Set hostname_label (unwraps Option)
Sourcepub fn with_image_id(self, value: impl Into<String>) -> Self
pub fn with_image_id(self, value: impl Into<String>) -> Self
Set image_id (unwraps Option)
Sourcepub fn with_ipxe_script(self, value: impl Into<String>) -> Self
pub fn with_ipxe_script(self, value: impl Into<String>) -> Self
Set ipxe_script (unwraps Option)
Sourcepub fn with_launch_options(self, value: LaunchOptions) -> Self
pub fn with_launch_options(self, value: LaunchOptions) -> Self
Set launch_options (unwraps Option)
Sourcepub fn with_instance_options(self, value: InstanceOptions) -> Self
pub fn with_instance_options(self, value: InstanceOptions) -> Self
Set instance_options (unwraps Option)
Sourcepub fn with_availability_config(
self,
value: LaunchInstanceAvailabilityConfigDetails,
) -> Self
pub fn with_availability_config( self, value: LaunchInstanceAvailabilityConfigDetails, ) -> Self
Set availability_config (unwraps Option)
Sourcepub fn with_preemptible_instance_config(
self,
value: PreemptibleInstanceConfigDetails,
) -> Self
pub fn with_preemptible_instance_config( self, value: PreemptibleInstanceConfigDetails, ) -> Self
Set preemptible_instance_config (unwraps Option)
Sourcepub fn with_metadata(self, value: HashMap<String, String>) -> Self
pub fn with_metadata(self, value: HashMap<String, String>) -> Self
Set metadata (unwraps Option)
Sourcepub fn with_agent_config(self, value: LaunchInstanceAgentConfigDetails) -> Self
pub fn with_agent_config(self, value: LaunchInstanceAgentConfigDetails) -> Self
Set agent_config (unwraps Option)
Sourcepub fn with_shape(self, value: impl Into<String>) -> Self
pub fn with_shape(self, value: impl Into<String>) -> Self
Set shape (unwraps Option)
Sourcepub fn with_shape_config(self, value: LaunchInstanceShapeConfigDetails) -> Self
pub fn with_shape_config(self, value: LaunchInstanceShapeConfigDetails) -> Self
Set shape_config (unwraps Option)
Sourcepub fn with_source_details(self, value: InstanceSourceViaImageDetails) -> Self
pub fn with_source_details(self, value: InstanceSourceViaImageDetails) -> Self
Set source_details (unwraps Option)
Sourcepub fn with_subnet_id(self, value: impl Into<String>) -> Self
pub fn with_subnet_id(self, value: impl Into<String>) -> Self
Set subnet_id (unwraps Option)
Sourcepub fn with_launch_volume_attachments(
self,
value: Vec<LaunchAttachVolumeDetails>,
) -> Self
pub fn with_launch_volume_attachments( self, value: Vec<LaunchAttachVolumeDetails>, ) -> Self
Set launch_volume_attachments (unwraps Option)
Sourcepub fn with_is_pv_encryption_in_transit_enabled(self, value: bool) -> Self
pub fn with_is_pv_encryption_in_transit_enabled(self, value: bool) -> Self
Set is_pv_encryption_in_transit_enabled (unwraps Option)
Sourcepub fn with_platform_config(
self,
value: AmdRomeBmGpuLaunchInstancePlatformConfig,
) -> Self
pub fn with_platform_config( self, value: AmdRomeBmGpuLaunchInstancePlatformConfig, ) -> Self
Set platform_config (unwraps Option)
Sourcepub fn with_placement_constraint_details(
self,
value: HostGroupPlacementConstraintDetails,
) -> Self
pub fn with_placement_constraint_details( self, value: HostGroupPlacementConstraintDetails, ) -> Self
Set placement_constraint_details (unwraps Option)
Sourcepub fn with_is_aienterprise_enabled(self, value: bool) -> Self
pub fn with_is_aienterprise_enabled(self, value: bool) -> Self
Set is_aienterprise_enabled (unwraps Option)
Sourcepub fn with_instance_configuration_id(self, value: impl Into<String>) -> Self
pub fn with_instance_configuration_id(self, value: impl Into<String>) -> Self
Set instance_configuration_id (unwraps Option)
Sourcepub fn with_licensing_configs(
self,
value: Vec<LaunchInstanceLicensingConfig>,
) -> Self
pub fn with_licensing_configs( self, value: Vec<LaunchInstanceLicensingConfig>, ) -> Self
Set licensing_configs (unwraps Option)
Trait Implementations§
Source§impl Clone for LaunchInstanceDetails
impl Clone for LaunchInstanceDetails
Source§fn clone(&self) -> LaunchInstanceDetails
fn clone(&self) -> LaunchInstanceDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more