pub struct Instance {Show 36 fields
pub availability_domain: String,
pub compartment_id: String,
pub id: String,
pub lifecycle_state: InstanceLifecycleState,
pub region: String,
pub shape: String,
pub time_created: DateTime<Utc>,
pub capacity_reservation_id: Option<String>,
pub placement_constraint_details: Option<HostGroupPlacementConstraintDetails>,
pub is_aienterprise_enabled: Option<bool>,
pub cluster_placement_group_id: Option<String>,
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 security_attributes_state: Option<InstanceSecurityAttributesState>,
pub display_name: Option<String>,
pub extended_metadata: Option<HashMap<String, Value>>,
pub fault_domain: Option<String>,
pub freeform_tags: Option<HashMap<String, String>>,
pub image_id: Option<String>,
pub ipxe_script: Option<String>,
pub launch_mode: Option<InstanceLaunchMode>,
pub launch_options: Option<LaunchOptions>,
pub instance_options: Option<InstanceOptions>,
pub availability_config: Option<InstanceAvailabilityConfig>,
pub preemptible_instance_config: Option<PreemptibleInstanceConfigDetails>,
pub metadata: Option<HashMap<String, String>>,
pub shape_config: Option<InstanceShapeConfig>,
pub is_cross_numa_node: Option<bool>,
pub source_details: Option<InstanceSourceViaImageDetails>,
pub system_tags: Option<HashMap<String, HashMap<String, Value>>>,
pub agent_config: Option<InstanceAgentConfig>,
pub time_maintenance_reboot_due: Option<DateTime<Utc>>,
pub platform_config: Option<AmdMilanBmPlatformConfig>,
pub instance_configuration_id: Option<String>,
pub licensing_configs: Option<Vec<LicensingConfig>>,
}Expand description
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 {@link #listVnicAttachments(ListVnicAttachmentsRequest) listVnicAttachments} operation to get the VNIC ID for the instance, and then call {@link #getVnic(GetVnicRequest) getVnic} 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.
Fields§
§availability_domain: StringThe availability domain the instance is running in.
Example: {@code Uocm:PHX-AD-1}
compartment_id: StringThe OCID of the compartment that contains the instance.
id: StringThe OCID of the instance.
lifecycle_state: InstanceLifecycleStateThe current state of the instance.
region: StringThe region that contains the availability domain the instance is running in.
For the us-phoenix-1 and us-ashburn-1 regions, {@code phx} and {@code iad} are returned, respectively. For all other regions, the full region name is returned.
Examples: {@code phx}, {@code eu-frankfurt-1}
shape: StringThe 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 {@link #listShapes(ListShapesRequest) listShapes}.
time_created: DateTime<Utc>The date and time the instance was created, in the format defined by RFC3339.
Example: {@code 2016-08-25T21:10:29.600Z}
capacity_reservation_id: Option<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.
placement_constraint_details: Option<HostGroupPlacementConstraintDetails>§is_aienterprise_enabled: Option<bool>Whether AI enterprise is enabled on the instance.
cluster_placement_group_id: Option<String>The OCID of the cluster placement group of the instance.
dedicated_vm_host_id: Option<String>The OCID of the dedicated virtual machine host that the instance is placed 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"}}}}
security_attributes_state: Option<InstanceSecurityAttributesState>The lifecycle state of the {@code securityAttributes}
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).
fault_domain: Option<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: {@code FAULT-DOMAIN-1}
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"}}
image_id: Option<String>Deprecated. Use {@code sourceDetails} instead.
ipxe_script: Option<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 http://ipxe.org.
launch_mode: Option<InstanceLaunchMode>Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * {@code NATIVE} - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * {@code EMULATED} - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * {@code PARAVIRTUALIZED} - VM instances launch with paravirtualized devices using VirtIO drivers. * {@code CUSTOM} - VM instances launch with custom configuration settings specified in the {@code LaunchOptions} parameter.
launch_options: Option<LaunchOptions>§instance_options: Option<InstanceOptions>§availability_config: Option<InstanceAvailabilityConfig>§preemptible_instance_config: Option<PreemptibleInstanceConfigDetails>§metadata: Option<HashMap<String, String>>Custom metadata that you provide.
shape_config: Option<InstanceShapeConfig>§is_cross_numa_node: Option<bool>Whether the instance\u2019s OCPUs and memory are distributed across multiple NUMA nodes.
source_details: Option<InstanceSourceViaImageDetails>System tags for this resource. Each key is predefined and scoped to a namespace. Example: {@code {"foo-namespace": {"bar-key": "value"}}}
agent_config: Option<InstanceAgentConfig>§time_maintenance_reboot_due: Option<DateTime<Utc>>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: {@code 2018-05-25T21:10:29.600Z}
platform_config: Option<AmdMilanBmPlatformConfig>§instance_configuration_id: Option<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.
licensing_configs: Option<Vec<LicensingConfig>>List of licensing configurations associated with the instance.
Implementations§
Source§impl Instance
impl Instance
Sourcepub fn new(required: InstanceRequired) -> Self
pub fn new(required: InstanceRequired) -> Self
Create a new Instance 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_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_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
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_security_attributes_state(
self,
value: Option<InstanceSecurityAttributesState>,
) -> Self
pub fn set_security_attributes_state( self, value: Option<InstanceSecurityAttributesState>, ) -> Self
Set security_attributes_state
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
Set freeform_tags
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_mode(self, value: Option<InstanceLaunchMode>) -> Self
pub fn set_launch_mode(self, value: Option<InstanceLaunchMode>) -> Self
Set launch_mode
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<InstanceAvailabilityConfig>,
) -> Self
pub fn set_availability_config( self, value: Option<InstanceAvailabilityConfig>, ) -> 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_lifecycle_state(self, value: InstanceLifecycleState) -> Self
pub fn set_lifecycle_state(self, value: InstanceLifecycleState) -> Self
Set lifecycle_state
Sourcepub fn set_region(self, value: String) -> Self
pub fn set_region(self, value: String) -> Self
Set region
Sourcepub fn set_shape_config(self, value: Option<InstanceShapeConfig>) -> Self
pub fn set_shape_config(self, value: Option<InstanceShapeConfig>) -> Self
Set shape_config
Sourcepub fn set_is_cross_numa_node(self, value: Option<bool>) -> Self
pub fn set_is_cross_numa_node(self, value: Option<bool>) -> Self
Set is_cross_numa_node
Sourcepub fn set_source_details(
self,
value: Option<InstanceSourceViaImageDetails>,
) -> Self
pub fn set_source_details( self, value: Option<InstanceSourceViaImageDetails>, ) -> Self
Set source_details
Set system_tags
Sourcepub fn set_time_created(self, value: DateTime<Utc>) -> Self
pub fn set_time_created(self, value: DateTime<Utc>) -> Self
Set time_created
Sourcepub fn set_agent_config(self, value: Option<InstanceAgentConfig>) -> Self
pub fn set_agent_config(self, value: Option<InstanceAgentConfig>) -> Self
Set agent_config
Sourcepub fn set_time_maintenance_reboot_due(
self,
value: Option<DateTime<Utc>>,
) -> Self
pub fn set_time_maintenance_reboot_due( self, value: Option<DateTime<Utc>>, ) -> Self
Set time_maintenance_reboot_due
Sourcepub fn set_platform_config(
self,
value: Option<AmdMilanBmPlatformConfig>,
) -> Self
pub fn set_platform_config( self, value: Option<AmdMilanBmPlatformConfig>, ) -> Self
Set platform_config
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<LicensingConfig>>) -> Self
pub fn set_licensing_configs(self, value: Option<Vec<LicensingConfig>>) -> 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_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_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)
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_security_attributes_state(
self,
value: InstanceSecurityAttributesState,
) -> Self
pub fn with_security_attributes_state( self, value: InstanceSecurityAttributesState, ) -> Self
Set security_attributes_state (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)
Set freeform_tags (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_mode(self, value: InstanceLaunchMode) -> Self
pub fn with_launch_mode(self, value: InstanceLaunchMode) -> Self
Set launch_mode (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: InstanceAvailabilityConfig) -> Self
pub fn with_availability_config(self, value: InstanceAvailabilityConfig) -> 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_shape_config(self, value: InstanceShapeConfig) -> Self
pub fn with_shape_config(self, value: InstanceShapeConfig) -> Self
Set shape_config (unwraps Option)
Sourcepub fn with_is_cross_numa_node(self, value: bool) -> Self
pub fn with_is_cross_numa_node(self, value: bool) -> Self
Set is_cross_numa_node (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)
Set system_tags (unwraps Option)
Sourcepub fn with_agent_config(self, value: InstanceAgentConfig) -> Self
pub fn with_agent_config(self, value: InstanceAgentConfig) -> Self
Set agent_config (unwraps Option)
Sourcepub fn with_time_maintenance_reboot_due(self, value: DateTime<Utc>) -> Self
pub fn with_time_maintenance_reboot_due(self, value: DateTime<Utc>) -> Self
Set time_maintenance_reboot_due (unwraps Option)
Sourcepub fn with_platform_config(self, value: AmdMilanBmPlatformConfig) -> Self
pub fn with_platform_config(self, value: AmdMilanBmPlatformConfig) -> Self
Set platform_config (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<LicensingConfig>) -> Self
pub fn with_licensing_configs(self, value: Vec<LicensingConfig>) -> Self
Set licensing_configs (unwraps Option)