@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class Instance extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
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
listVnicAttachments
operation to get the
VNIC ID for the instance, and then call getVnic
with the VNIC
ID.
For more information, see [Overview of the Compute Service](https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm).
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](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).
*Warning:** Oracle recommends that you avoid using any confidential information when you
supply string values using the API.
Note: Objects should always be created or deserialized using the Instance.Builder
. This model
distinguishes fields that are null
because they are unset from fields that are explicitly
set to null
. This is done in the setter methods of the Instance.Builder
, which maintain a
set of all explicitly set fields called Instance.Builder.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take the explicitly set
fields into account. The constructor, on the other hand, does not take the explicitly set fields
into account (since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
Instance.Builder |
static class |
Instance.LaunchMode
Specifies the configuration mode for launching virtual machine (VM) instances.
|
static class |
Instance.LifecycleState
The current state of the instance.
|
static class |
Instance.SecurityAttributesState
The lifecycle state of the
securityAttributes |
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
Constructor and Description |
---|
Instance(String availabilityDomain,
String capacityReservationId,
String compartmentId,
String clusterPlacementGroupId,
String dedicatedVmHostId,
Map<String,Map<String,Object>> definedTags,
Map<String,Map<String,Object>> securityAttributes,
Instance.SecurityAttributesState securityAttributesState,
String displayName,
Map<String,Object> extendedMetadata,
String faultDomain,
Map<String,String> freeformTags,
String id,
String imageId,
String ipxeScript,
Instance.LaunchMode launchMode,
LaunchOptions launchOptions,
InstanceOptions instanceOptions,
InstanceAvailabilityConfig availabilityConfig,
PreemptibleInstanceConfigDetails preemptibleInstanceConfig,
Instance.LifecycleState lifecycleState,
Map<String,String> metadata,
String region,
String shape,
InstanceShapeConfig shapeConfig,
Boolean isCrossNumaNode,
InstanceSourceDetails sourceDetails,
Map<String,Map<String,Object>> systemTags,
Date timeCreated,
InstanceAgentConfig agentConfig,
Date timeMaintenanceRebootDue,
PlatformConfig platformConfig,
String instanceConfigurationId)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static Instance.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
InstanceAgentConfig |
getAgentConfig() |
InstanceAvailabilityConfig |
getAvailabilityConfig() |
String |
getAvailabilityDomain()
The availability domain the instance is running in.
|
String |
getCapacityReservationId()
The OCID of the compute capacity reservation this instance is launched under.
|
String |
getClusterPlacementGroupId()
The OCID of the cluster placement group of the instance.
|
String |
getCompartmentId()
The OCID of the compartment that contains the instance.
|
String |
getDedicatedVmHostId()
The OCID of the dedicated virtual machine host that the instance is placed on.
|
Map<String,Map<String,Object>> |
getDefinedTags()
Defined tags for this resource.
|
String |
getDisplayName()
A user-friendly name.
|
Map<String,Object> |
getExtendedMetadata()
Additional metadata key/value pairs that you provide.
|
String |
getFaultDomain()
The name of the fault domain the instance is running in.
|
Map<String,String> |
getFreeformTags()
Free-form tags for this resource.
|
String |
getId()
The OCID of the instance.
|
String |
getImageId()
Deprecated.
|
String |
getInstanceConfigurationId()
The OCID of the Instance Configuration used to source launch details for this instance.
|
InstanceOptions |
getInstanceOptions() |
String |
getIpxeScript()
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.
|
Boolean |
getIsCrossNumaNode()
Whether the instance’s OCPUs and memory are distributed across multiple NUMA nodes.
|
Instance.LaunchMode |
getLaunchMode()
Specifies the configuration mode for launching virtual machine (VM) instances.
|
LaunchOptions |
getLaunchOptions() |
Instance.LifecycleState |
getLifecycleState()
The current state of the instance.
|
Map<String,String> |
getMetadata()
Custom metadata that you provide.
|
PlatformConfig |
getPlatformConfig() |
PreemptibleInstanceConfigDetails |
getPreemptibleInstanceConfig() |
String |
getRegion()
The region that contains the availability domain the instance is running in.
|
Map<String,Map<String,Object>> |
getSecurityAttributes()
Security Attributes for this resource.
|
Instance.SecurityAttributesState |
getSecurityAttributesState()
The lifecycle state of the
securityAttributes |
String |
getShape()
The shape of the instance.
|
InstanceShapeConfig |
getShapeConfig() |
InstanceSourceDetails |
getSourceDetails() |
Map<String,Map<String,Object>> |
getSystemTags()
System tags for this resource.
|
Date |
getTimeCreated()
The date and time the instance was created, in the format defined by
RFC3339.
|
Date |
getTimeMaintenanceRebootDue()
The date and time the instance is expected to be stopped / started, in the format defined by
RFC3339.
|
int |
hashCode() |
Instance.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"availabilityDomain","capacityReservationId","compartmentId","clusterPlacementGroupId","dedicatedVmHostId","definedTags","securityAttributes","securityAttributesState","displayName","extendedMetadata","faultDomain","freeformTags","id","imageId","ipxeScript","launchMode","launchOptions","instanceOptions","availabilityConfig","preemptibleInstanceConfig","lifecycleState","metadata","region","shape","shapeConfig","isCrossNumaNode","sourceDetails","systemTags","timeCreated","agentConfig","timeMaintenanceRebootDue","platformConfig","instanceConfigurationId"}) public Instance(String availabilityDomain, String capacityReservationId, String compartmentId, String clusterPlacementGroupId, String dedicatedVmHostId, Map<String,Map<String,Object>> definedTags, Map<String,Map<String,Object>> securityAttributes, Instance.SecurityAttributesState securityAttributesState, String displayName, Map<String,Object> extendedMetadata, String faultDomain, Map<String,String> freeformTags, String id, String imageId, String ipxeScript, Instance.LaunchMode launchMode, LaunchOptions launchOptions, InstanceOptions instanceOptions, InstanceAvailabilityConfig availabilityConfig, PreemptibleInstanceConfigDetails preemptibleInstanceConfig, Instance.LifecycleState lifecycleState, Map<String,String> metadata, String region, String shape, InstanceShapeConfig shapeConfig, Boolean isCrossNumaNode, InstanceSourceDetails sourceDetails, Map<String,Map<String,Object>> systemTags, Date timeCreated, InstanceAgentConfig agentConfig, Date timeMaintenanceRebootDue, PlatformConfig platformConfig, String instanceConfigurationId)
public static Instance.Builder builder()
Create a new builder.
public Instance.Builder toBuilder()
public String getAvailabilityDomain()
The availability domain the instance is running in.
Example: Uocm:PHX-AD-1
public String getCapacityReservationId()
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.
public String getCompartmentId()
The OCID of the compartment that contains the instance.
public String getClusterPlacementGroupId()
The OCID of the cluster placement group of the instance.
public String getDedicatedVmHostId()
The OCID of the dedicated virtual machine host that the instance is placed on.
public Map<String,Map<String,Object>> getDefinedTags()
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {"Operations": {"CostCenter": "42"}}
public Map<String,Map<String,Object>> getSecurityAttributes()
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"}}}
public Instance.SecurityAttributesState getSecurityAttributesState()
The lifecycle state of the securityAttributes
public String getDisplayName()
A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
public Map<String,Object> getExtendedMetadata()
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).
public String getFaultDomain()
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
public Map<String,String> getFreeformTags()
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"}
public String getId()
The OCID of the instance.
public String getImageId()
Deprecated. Use sourceDetails
instead.
public String getIpxeScript()
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](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm).
For more information about iPXE, see http://ipxe.org.
public Instance.LaunchMode getLaunchMode()
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.
public LaunchOptions getLaunchOptions()
public InstanceOptions getInstanceOptions()
public InstanceAvailabilityConfig getAvailabilityConfig()
public PreemptibleInstanceConfigDetails getPreemptibleInstanceConfig()
public Instance.LifecycleState getLifecycleState()
The current state of the instance.
public Map<String,String> getMetadata()
Custom metadata that you provide.
public String getRegion()
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
public String getShape()
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 listShapes
.
public InstanceShapeConfig getShapeConfig()
public Boolean getIsCrossNumaNode()
Whether the instance’s OCPUs and memory are distributed across multiple NUMA nodes.
public InstanceSourceDetails getSourceDetails()
public Map<String,Map<String,Object>> getSystemTags()
System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace": {"bar-key": "value"}}
public Date getTimeCreated()
The date and time the instance was created, in the format defined by RFC3339.
Example: 2016-08-25T21:10:29.600Z
public InstanceAgentConfig getAgentConfig()
public Date getTimeMaintenanceRebootDue()
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
public PlatformConfig getPlatformConfig()
public String getInstanceConfigurationId()
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.
public String toString()
toString
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public int hashCode()
hashCode
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Copyright © 2016–2024. All rights reserved.