Class Instance
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.
Inherited Members
Namespace: Oci.CoreService.Models
Assembly: OCI.DotNetSDK.Core.dll
Syntax
public class Instance
Properties
AgentConfig
Declaration
[JsonProperty(PropertyName = "agentConfig")]
public InstanceAgentConfig AgentConfig { get; set; }
Property Value
Type | Description |
---|---|
InstanceAgentConfig |
AvailabilityConfig
Declaration
[JsonProperty(PropertyName = "availabilityConfig")]
public InstanceAvailabilityConfig AvailabilityConfig { get; set; }
Property Value
Type | Description |
---|---|
InstanceAvailabilityConfig |
AvailabilityDomain
Declaration
[Required(ErrorMessage = "AvailabilityDomain is required.")]
[JsonProperty(PropertyName = "availabilityDomain")]
public string AvailabilityDomain { get; set; }
Property Value
Type | Description |
---|---|
string | The availability domain the instance is running in.
|
Remarks
Required
CapacityReservationId
Declaration
[JsonProperty(PropertyName = "capacityReservationId")]
public string CapacityReservationId { get; set; }
Property Value
Type | Description |
---|---|
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. |
ClusterPlacementGroupId
Declaration
[JsonProperty(PropertyName = "clusterPlacementGroupId")]
public string ClusterPlacementGroupId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the cluster placement group of the instance. |
CompartmentId
Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the compartment that contains the instance. |
Remarks
Required
DedicatedVmHostId
Declaration
[JsonProperty(PropertyName = "dedicatedVmHostId")]
public string DedicatedVmHostId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the dedicated virtual machine host that the instance is placed on. |
DefinedTags
Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Dictionary<string, object>> | Defined tags for this resource. Each key is predefined and scoped to a
namespace. For more information, see Resource Tags.
|
DisplayName
Declaration
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
ExtendedMetadata
Declaration
[JsonProperty(PropertyName = "extendedMetadata")]
public Dictionary<string, object> ExtendedMetadata { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, object> | Additional metadata key/value pairs that you provide. They serve the same purpose and functionality
as fields in the |
FaultDomain
Declaration
[JsonProperty(PropertyName = "faultDomain")]
public string FaultDomain { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the fault domain the instance is running in.
|
FreeformTags
Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<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.
|
Id
Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the instance. |
Remarks
Required
ImageId
Declaration
[JsonProperty(PropertyName = "imageId")]
public string ImageId { get; set; }
Property Value
Type | Description |
---|---|
string | Deprecated. Use |
InstanceConfigurationId
Declaration
[JsonProperty(PropertyName = "instanceConfigurationId")]
public string InstanceConfigurationId { get; set; }
Property Value
Type | Description |
---|---|
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. |
InstanceOptions
Declaration
[JsonProperty(PropertyName = "instanceOptions")]
public InstanceOptions InstanceOptions { get; set; }
Property Value
Type | Description |
---|---|
InstanceOptions |
IpxeScript
Declaration
[JsonProperty(PropertyName = "ipxeScript")]
public string IpxeScript { get; set; }
Property Value
Type | Description |
---|---|
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.
|
IsCrossNumaNode
Declaration
[JsonProperty(PropertyName = "isCrossNumaNode")]
public bool? IsCrossNumaNode { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether the instance\u2019s OCPUs and memory are distributed across multiple NUMA nodes. |
LaunchMode
Declaration
[JsonProperty(PropertyName = "launchMode")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Instance.LaunchModeEnum? LaunchMode { get; set; }
Property Value
Type | Description |
---|---|
Instance.LaunchModeEnum? | Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
|
LaunchOptions
Declaration
[JsonProperty(PropertyName = "launchOptions")]
public LaunchOptions LaunchOptions { get; set; }
Property Value
Type | Description |
---|---|
LaunchOptions |
LifecycleState
Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Instance.LifecycleStateEnum? LifecycleState { get; set; }
Property Value
Type | Description |
---|---|
Instance.LifecycleStateEnum? | The current state of the instance. |
Remarks
Required
Metadata
Declaration
[JsonProperty(PropertyName = "metadata")]
public Dictionary<string, string> Metadata { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | Custom metadata that you provide. |
PlatformConfig
Declaration
[JsonProperty(PropertyName = "platformConfig")]
public PlatformConfig PlatformConfig { get; set; }
Property Value
Type | Description |
---|---|
PlatformConfig |
PreemptibleInstanceConfig
Declaration
[JsonProperty(PropertyName = "preemptibleInstanceConfig")]
public PreemptibleInstanceConfigDetails PreemptibleInstanceConfig { get; set; }
Property Value
Type | Description |
---|---|
PreemptibleInstanceConfigDetails |
Region
Declaration
[Required(ErrorMessage = "Region is required.")]
[JsonProperty(PropertyName = "region")]
public string Region { get; set; }
Property Value
Type | Description |
---|---|
string | The region that contains the availability domain the instance is running in.
|
Remarks
Required
SecurityAttributes
Declaration
[JsonProperty(PropertyName = "securityAttributes")]
public Dictionary<string, Dictionary<string, object>> SecurityAttributes { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Dictionary<string, object>> | Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls.
|
SecurityAttributesState
Declaration
[JsonProperty(PropertyName = "securityAttributesState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Instance.SecurityAttributesStateEnum? SecurityAttributesState { get; set; }
Property Value
Type | Description |
---|---|
Instance.SecurityAttributesStateEnum? | The lifecycle state of the |
Shape
Declaration
[Required(ErrorMessage = "Shape is required.")]
[JsonProperty(PropertyName = "shape")]
public string Shape { get; set; }
Property Value
Type | Description |
---|---|
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}. |
Remarks
Required
ShapeConfig
Declaration
[JsonProperty(PropertyName = "shapeConfig")]
public InstanceShapeConfig ShapeConfig { get; set; }
Property Value
Type | Description |
---|---|
InstanceShapeConfig |
SourceDetails
Declaration
[JsonProperty(PropertyName = "sourceDetails")]
public InstanceSourceDetails SourceDetails { get; set; }
Property Value
Type | Description |
---|---|
InstanceSourceDetails |
SystemTags
Declaration
[JsonProperty(PropertyName = "systemTags")]
public Dictionary<string, Dictionary<string, object>> SystemTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Dictionary<string, object>> | System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace": {"bar-key": "value"}} |
TimeCreated
Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The date and time the instance was created, in the format defined by RFC3339.
|
Remarks
Required
TimeMaintenanceRebootDue
Declaration
[JsonProperty(PropertyName = "timeMaintenanceRebootDue")]
public DateTime? TimeMaintenanceRebootDue { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | 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 |