Skip to main content

Instance

Struct Instance 

Source
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: String

The availability domain the instance is running in.

Example: {@code Uocm:PHX-AD-1}

§compartment_id: String

The OCID of the compartment that contains the instance.

§id: String

The OCID of the instance.

§lifecycle_state: InstanceLifecycleState

The current state of the instance.

§region: String

The 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: String

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 {@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: Option<HashMap<String, HashMap<String, Value>>>

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}

§freeform_tags: Option<HashMap<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: {@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: Option<HashMap<String, HashMap<String, Value>>>

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

Source

pub fn new(required: InstanceRequired) -> Self

Create a new Instance with required fields

Source

pub fn set_availability_domain(self, value: String) -> Self

Set availability_domain

Source

pub fn set_capacity_reservation_id(self, value: Option<String>) -> Self

Set capacity_reservation_id

Source

pub fn set_compartment_id(self, value: String) -> Self

Set compartment_id

Source

pub fn set_placement_constraint_details( self, value: Option<HostGroupPlacementConstraintDetails>, ) -> Self

Set placement_constraint_details

Source

pub fn set_is_aienterprise_enabled(self, value: Option<bool>) -> Self

Set is_aienterprise_enabled

Source

pub fn set_cluster_placement_group_id(self, value: Option<String>) -> Self

Set cluster_placement_group_id

Source

pub fn set_dedicated_vm_host_id(self, value: Option<String>) -> Self

Set dedicated_vm_host_id

Source

pub fn set_defined_tags( self, value: Option<HashMap<String, HashMap<String, Value>>>, ) -> Self

Set defined_tags

Source

pub fn set_security_attributes( self, value: Option<HashMap<String, HashMap<String, Value>>>, ) -> Self

Set security_attributes

Source

pub fn set_security_attributes_state( self, value: Option<InstanceSecurityAttributesState>, ) -> Self

Set security_attributes_state

Source

pub fn set_display_name(self, value: Option<String>) -> Self

Set display_name

Source

pub fn set_extended_metadata( self, value: Option<HashMap<String, Value>>, ) -> Self

Set extended_metadata

Source

pub fn set_fault_domain(self, value: Option<String>) -> Self

Set fault_domain

Source

pub fn set_freeform_tags(self, value: Option<HashMap<String, String>>) -> Self

Set freeform_tags

Source

pub fn set_id(self, value: String) -> Self

Set id

Source

pub fn set_image_id(self, value: Option<String>) -> Self

Set image_id

Source

pub fn set_ipxe_script(self, value: Option<String>) -> Self

Set ipxe_script

Source

pub fn set_launch_mode(self, value: Option<InstanceLaunchMode>) -> Self

Set launch_mode

Source

pub fn set_launch_options(self, value: Option<LaunchOptions>) -> Self

Set launch_options

Source

pub fn set_instance_options(self, value: Option<InstanceOptions>) -> Self

Set instance_options

Source

pub fn set_availability_config( self, value: Option<InstanceAvailabilityConfig>, ) -> Self

Set availability_config

Source

pub fn set_preemptible_instance_config( self, value: Option<PreemptibleInstanceConfigDetails>, ) -> Self

Set preemptible_instance_config

Source

pub fn set_lifecycle_state(self, value: InstanceLifecycleState) -> Self

Set lifecycle_state

Source

pub fn set_metadata(self, value: Option<HashMap<String, String>>) -> Self

Set metadata

Source

pub fn set_region(self, value: String) -> Self

Set region

Source

pub fn set_shape(self, value: String) -> Self

Set shape

Source

pub fn set_shape_config(self, value: Option<InstanceShapeConfig>) -> Self

Set shape_config

Source

pub fn set_is_cross_numa_node(self, value: Option<bool>) -> Self

Set is_cross_numa_node

Source

pub fn set_source_details( self, value: Option<InstanceSourceViaImageDetails>, ) -> Self

Set source_details

Source

pub fn set_system_tags( self, value: Option<HashMap<String, HashMap<String, Value>>>, ) -> Self

Set system_tags

Source

pub fn set_time_created(self, value: DateTime<Utc>) -> Self

Set time_created

Source

pub fn set_agent_config(self, value: Option<InstanceAgentConfig>) -> Self

Set agent_config

Source

pub fn set_time_maintenance_reboot_due( self, value: Option<DateTime<Utc>>, ) -> Self

Set time_maintenance_reboot_due

Source

pub fn set_platform_config( self, value: Option<AmdMilanBmPlatformConfig>, ) -> Self

Set platform_config

Source

pub fn set_instance_configuration_id(self, value: Option<String>) -> Self

Set instance_configuration_id

Source

pub fn set_licensing_configs(self, value: Option<Vec<LicensingConfig>>) -> Self

Set licensing_configs

Source

pub fn with_capacity_reservation_id(self, value: impl Into<String>) -> Self

Set capacity_reservation_id (unwraps Option)

Source

pub fn with_placement_constraint_details( self, value: HostGroupPlacementConstraintDetails, ) -> Self

Set placement_constraint_details (unwraps Option)

Source

pub fn with_is_aienterprise_enabled(self, value: bool) -> Self

Set is_aienterprise_enabled (unwraps Option)

Source

pub fn with_cluster_placement_group_id(self, value: impl Into<String>) -> Self

Set cluster_placement_group_id (unwraps Option)

Source

pub fn with_dedicated_vm_host_id(self, value: impl Into<String>) -> Self

Set dedicated_vm_host_id (unwraps Option)

Source

pub fn with_defined_tags( self, value: HashMap<String, HashMap<String, Value>>, ) -> Self

Set defined_tags (unwraps Option)

Source

pub fn with_security_attributes( self, value: HashMap<String, HashMap<String, Value>>, ) -> Self

Set security_attributes (unwraps Option)

Source

pub fn with_security_attributes_state( self, value: InstanceSecurityAttributesState, ) -> Self

Set security_attributes_state (unwraps Option)

Source

pub fn with_display_name(self, value: impl Into<String>) -> Self

Set display_name (unwraps Option)

Source

pub fn with_extended_metadata(self, value: HashMap<String, Value>) -> Self

Set extended_metadata (unwraps Option)

Source

pub fn with_fault_domain(self, value: impl Into<String>) -> Self

Set fault_domain (unwraps Option)

Source

pub fn with_freeform_tags(self, value: HashMap<String, String>) -> Self

Set freeform_tags (unwraps Option)

Source

pub fn with_image_id(self, value: impl Into<String>) -> Self

Set image_id (unwraps Option)

Source

pub fn with_ipxe_script(self, value: impl Into<String>) -> Self

Set ipxe_script (unwraps Option)

Source

pub fn with_launch_mode(self, value: InstanceLaunchMode) -> Self

Set launch_mode (unwraps Option)

Source

pub fn with_launch_options(self, value: LaunchOptions) -> Self

Set launch_options (unwraps Option)

Source

pub fn with_instance_options(self, value: InstanceOptions) -> Self

Set instance_options (unwraps Option)

Source

pub fn with_availability_config(self, value: InstanceAvailabilityConfig) -> Self

Set availability_config (unwraps Option)

Source

pub fn with_preemptible_instance_config( self, value: PreemptibleInstanceConfigDetails, ) -> Self

Set preemptible_instance_config (unwraps Option)

Source

pub fn with_metadata(self, value: HashMap<String, String>) -> Self

Set metadata (unwraps Option)

Source

pub fn with_shape_config(self, value: InstanceShapeConfig) -> Self

Set shape_config (unwraps Option)

Source

pub fn with_is_cross_numa_node(self, value: bool) -> Self

Set is_cross_numa_node (unwraps Option)

Source

pub fn with_source_details(self, value: InstanceSourceViaImageDetails) -> Self

Set source_details (unwraps Option)

Source

pub fn with_system_tags( self, value: HashMap<String, HashMap<String, Value>>, ) -> Self

Set system_tags (unwraps Option)

Source

pub fn with_agent_config(self, value: InstanceAgentConfig) -> Self

Set agent_config (unwraps Option)

Source

pub fn with_time_maintenance_reboot_due(self, value: DateTime<Utc>) -> Self

Set time_maintenance_reboot_due (unwraps Option)

Source

pub fn with_platform_config(self, value: AmdMilanBmPlatformConfig) -> Self

Set platform_config (unwraps Option)

Source

pub fn with_instance_configuration_id(self, value: impl Into<String>) -> Self

Set instance_configuration_id (unwraps Option)

Source

pub fn with_licensing_configs(self, value: Vec<LicensingConfig>) -> Self

Set licensing_configs (unwraps Option)

Trait Implementations§

Source§

impl Clone for Instance

Source§

fn clone(&self) -> Instance

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Instance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Instance

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Instance

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,