Skip to main content

instances

Creates, updates, deletes, gets or lists an instances resource.

Overview​

Nameinstances
TypeResource
Idoci.compute.instances

Fields​

The following fields are returned by SELECT queries:

The instance was retrieved.

NameDatatypeDescription
idstringThe OCID of the instance.
agentConfigobjectConfiguration options for the Oracle Cloud Agent software running on the instance.
availabilityConfigobjectOptions for defining the availabiity of a VM instance after a maintenance event that impacts the underlying hardware.
availabilityDomainstringThe availability domain the instance is running in. Example: Uocm:PHX-AD-1
capacityReservationIdstringThe 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](/iaas/Content/Compute/Tasks/reserve-capacity.htm#default). (x-default-description: The default reservation here refers to the reservation which is enabled by default for your tenancy.<br />If the value of this field is empty that means you have opted out of the default reservation.<br />)
clusterPlacementGroupIdstringThe OCID of the cluster placement group of the instance.
compartmentIdstringThe OCID of the compartment that contains the instance.
dedicatedVmHostIdstringThe OCID of the dedicated virtual machine host that the instance is placed on.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: &#123;"Operations": &#123;"CostCenter": "42"&#125;&#125;
displayNamestringA user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
extendedMetadataobjectAdditional 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).
faultDomainstringThe 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
freeformTagsobjectFree-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](/iaas/Content/General/Concepts/resourcetags.htm). Example: &#123;"Department": "Finance"&#125;
imageIdstringDeprecated. Use sourceDetails instead.
instanceConfigurationIdstringThe 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.
instanceOptionsobjectOptional mutable instance options
ipxeScriptstringWhen 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](/iaas/Content/Compute/References/bringyourownimage.htm). For more information about iPXE, see http:​//ipxe.org.
isAIEnterpriseEnabledbooleanWhether AI enterprise is enabled on the instance.
launchModestringSpecifies 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. * ACCELERATEDPV - VM instances launch with accelerated paravirtualized networking type. * CUSTOM - VM instances launch with custom configuration settings specified in the LaunchOptions parameter. (NATIVE, EMULATED, PARAVIRTUALIZED, ACCELERATEDPV, CUSTOM)
launchOptionsobjectOptions for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
licensingConfigsarrayList of licensing configurations associated with the instance.
lifecycleStatestringThe current state of the instance. (MOVING, PROVISIONING, RUNNING, STARTING, STOPPING, STOPPED, CREATING_IMAGE, TERMINATING, TERMINATED)
metadataobjectCustom metadata that you provide.
placementConstraintDetailsobjectThe details for providing placement constraints.
platformConfigobjectThe platform configuration for the instance.
preemptibleInstanceConfigobjectConfiguration options for preemptible instances.
regionstringThe 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
securityAttributesobject[Security attributes](/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels for a resource that can be referenced in a [Zero Trust Packet Routing](/iaas/Content/zero-trust-packet-routing/overview.htm) (ZPR) policy to control access to ZPR-supported resources. Example: &#123;"Oracle-DataSecurity-ZPR": &#123;"MaxEgressCount": &#123;"value":"42","mode":"audit"&#125;&#125;&#125;
securityAttributesStatestringThe lifecycle state of the securityAttributes (STABLE, UPDATING)
shapestringThe 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](#/en/iaas/latest/Shape/ListShapes).
shapeConfigobjectThe shape configuration for an instance. The shape configuration determines the resources allocated to an instance.
sourceDetailsobject
timeCreatedstring (date-time)The date and time the instance was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
timeMaintenanceRebootDuestring (date-time)The date and time the instance is expected to be stopped / started, in the format defined by [RFC3339](https:​//tools.ietf.org/html/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

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectinstanceId, regionGets information about the specified instance.<br /><br />Note: To retrieve public and private IP addresses for an instance, use the [ListVnicAttachments](#/en/iaas/latest/VnicAttachment/ListVnicAttachments)<br />operation to get the VNIC ID for the instance, and then call [GetVnic](#/en/iaas/latest/Vnic/GetVnic) with the VNIC ID.<br />
listselectcompartmentId, regionavailabilityDomain, capacityReservationId, computeClusterId, displayName, limit, page, sortBy, sortOrder, lifecycleStateLists the instances in the specified compartment and the specified availability domain.<br />You can filter the results by specifying an instance name (the list will include all the identically-named<br />instances in the compartment).<br /><br />Note: To retrieve public and private IP addresses for an instance, use the [ListVnicAttachments](#/en/iaas/latest/VnicAttachment/ListVnicAttachments)<br />operation to get the VNIC ID for the instance, and then call [GetVnic](#/en/iaas/latest/Vnic/GetVnic) with the VNIC ID.<br />
attachinsertinstancePoolId, region, instanceIdopc-retry-tokenAttaches an instance to an instance pool. For information about the prerequisites<br />that an instance must meet before you can attach it to a pool, see<br />[Attaching an Instance to an Instance Pool](/iaas/Content/Compute/Tasks/updatinginstancepool.htm#attach-instance).<br />
launchinsertregion, compartmentId, availabilityDomainopc-retry-tokenCreates a new instance in the specified compartment and the specified availability domain.<br />For general information about instances, see<br />[Overview of the Compute Service](/iaas/Content/Compute/Concepts/computeoverview.htm).<br /><br />For information about access control and compartments, see<br />[Overview of the IAM Service](/iaas/Content/Identity/Concepts/overview.htm).<br /><br />For information about availability domains, see<br />[Regions and Availability Domains](/iaas/Content/General/Concepts/regions.htm).<br />To get a list of availability domains, use the ListAvailabilityDomains operation<br />in the Identity and Access Management Service API.<br /><br />All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned,<br />unique ID called an Oracle Cloud Identifier (OCID).<br />When you create a resource, you can find its OCID in the response. You can<br />also retrieve a resource's OCID by using a List API operation<br />on that resource type, or by viewing the resource in the Console.<br /><br />To launch an instance using an image or a boot volume use the sourceDetails parameter in [LaunchInstanceDetails](#/en/iaas/latest/LaunchInstanceDetails).<br /><br />When you launch an instance, it is automatically attached to a virtual<br />network interface card (VNIC), called the primary VNIC. The VNIC<br />has a private IP address from the subnet's CIDR. You can either assign a<br />private IP address of your choice or let Oracle automatically assign one.<br />You can choose whether the instance has a public IP address. To retrieve the<br />addresses, use the [ListVnicAttachments](#/en/iaas/latest/VnicAttachment/ListVnicAttachments)<br />operation to get the VNIC ID for the instance, and then call<br />[GetVnic](#/en/iaas/latest/Vnic/GetVnic) with the VNIC ID.<br /><br />You can later add secondary VNICs to an instance. For more information, see<br />[Virtual Network Interface Cards (VNICs)](/iaas/Content/Network/Tasks/managingVNICs.htm).<br /><br />To launch an instance from a Marketplace image listing, you must provide the image ID of the<br />listing resource version that you want, but you also must subscribe to the listing before you try<br />to launch the instance. To subscribe to the listing, use the [GetAppCatalogListingAgreements](#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements)<br />operation to get the signature for the terms of use agreement for the desired listing resource version.<br />Then, call [CreateAppCatalogSubscription](#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription)<br />with the signature. To get the image ID for the LaunchInstance operation, call<br />[GetAppCatalogListingResourceVersion](#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion).<br /><br />When launching an instance, you may provide the securityAttributes parameter in<br />[LaunchInstanceDetails](#/en/iaas/latest/LaunchInstanceDetails) to manage security attributes via the instance, <br />or in the embedded [CreateVnicDetails](#/en/iaas/latest/CreateVnicDetails/) to manage security attributes<br />via the VNIC directly, but not both. Providing securityAttributes in both locations will return a<br />400 Bad Request response.<br /><br />To determine whether capacity is available for a specific shape before you create an instance,<br />use the [CreateComputeCapacityReport](#/en/iaas/latest/ComputeCapacityReport/CreateComputeCapacityReport)<br />operation.<br />
updateupdateinstanceId, regionopc-retry-token, if-matchUpdates certain fields on the specified instance. Fields that are not provided in the<br />request will not be updated. Avoid entering confidential information.<br /><br />Changes to metadata fields will be reflected in the instance metadata service (this may take<br />up to a minute).<br /><br />The OCID of the instance remains the same.<br />
terminatedeleteinstanceId, regionif-match, preserveBootVolume, preserveDataVolumesCreatedAtLaunch, recycleLevelPermanently terminates (deletes) the specified instance. Any attached VNICs and volumes are automatically detached<br />when the instance terminates.<br /><br />To preserve the boot volume associated with the instance, specify true for PreserveBootVolumeQueryParam.<br />To delete the boot volume when the instance is deleted, specify false or do not specify a value for PreserveBootVolumeQueryParam.<br /><br />To preserve data volumes created with the instance, specify true or do not specify a value for PreserveDataVolumesQueryParam.<br />To delete the data volumes when the instance itself is deleted, specify false for PreserveDataVolumesQueryParam.<br /><br />This is an asynchronous operation. The instance's lifecycleState changes to TERMINATING temporarily<br />until the instance is completely deleted. After the instance is deleted, the record remains visible in the list of instances<br />with the state TERMINATED for at least 12 hours, but no further action is needed.<br />
instance_actionexecinstanceId, action, regionopc-retry-token, if-matchPerforms one of the following power actions on the specified instance:<br /><br />- START - Powers on the instance.<br /><br />- STOP - Powers off the instance.<br /><br />- RESET - Powers off the instance and then powers it back on.<br /><br />- SOFTSTOP - Gracefully shuts down the instance by sending a shutdown command to the operating system.<br />After waiting 15 minutes for the OS to shut down, the instance is powered off.<br />If the applications that run on the instance take more than 15 minutes to shut down, they could be improperly stopped, resulting<br />in data corruption. To avoid this, manually shut down the instance using the commands available in the OS before you softstop the<br />instance.<br /><br />- SOFTRESET - Gracefully reboots the instance by sending a shutdown command to the operating system.<br />After waiting 15 minutes for the OS to shut down, the instance is powered off and<br />then powered back on.<br /><br /><br />- SENDDIAGNOSTICINTERRUPT - For advanced users. Caution: Sending a diagnostic interrupt to a live system can<br />cause data corruption or system failure. Sends a diagnostic interrupt that causes the instance's<br />OS to crash and then reboot. Before you send a diagnostic interrupt, you must configure the instance to generate a<br />crash dump file when it crashes. The crash dump captures information about the state of the OS at the time of<br />the crash. After the OS restarts, you can analyze the crash dump to diagnose the issue. For more information, see<br />[Sending a Diagnostic Interrupt](/iaas/Content/Compute/Tasks/sendingdiagnosticinterrupt.htm).<br /><br /><br /><br />- DIAGNOSTICREBOOT - Powers off the instance, rebuilds it, and then powers it back on.<br />Before you send a diagnostic reboot, restart the instance's OS, confirm that the instance and networking settings are configured<br />correctly, and try other [troubleshooting steps](/iaas/Content/Compute/References/troubleshooting-compute-instances.htm).<br />Use diagnostic reboot as a final attempt to troubleshoot an unreachable instance. For virtual machine (VM) instances only.<br />For more information, see [Performing a Diagnostic Reboot](/iaas/Content/Compute/Tasks/diagnostic-reboot.htm).<br /><br /><br />- REBOOTMIGRATE - Powers off the instance, moves it to new hardware, and then powers it back on. For more information, see<br />[Infrastructure Maintenance](/iaas/Content/Compute/References/infrastructure-maintenance.htm).<br /><br /><br />For more information about managing instance lifecycle states, see<br />[Stopping and Starting an Instance](/iaas/Content/Compute/Tasks/restartinginstance.htm).<br />
accept_shielded_integrity_policyexecinstanceId, regionopc-request-id, if-match, opc-retry-tokenAccept the changes to the PCR values in the measured boot report.
change_compartmentexecinstanceId, region, compartmentIdif-match, opc-request-id, opc-retry-tokenMoves an instance into a different compartment within the same tenancy. For information about<br />moving resources between compartments, see<br />[Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br /><br />When you move an instance to a different compartment, associated resources such as boot volumes and VNICs<br />are not moved.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
actionstringThe action to perform on the instance.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
instanceIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the instance.
instancePoolIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the instance pool.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
availabilityDomainstringThe name of the availability domain. Example: Uocm:PHX-AD-1
capacityReservationIdstringThe OCID of the compute capacity reservation.
computeClusterIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compute cluster. A [compute cluster](/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group.
displayNamestringA filter to return only resources that match the given display name exactly.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
lifecycleStatestringA filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50
opc-request-idstringUnique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
preserveBootVolumebooleanSpecifies whether to delete or preserve the boot volume when terminating an instance. When set to true, the boot volume is preserved. The default value is false.
preserveDataVolumesCreatedAtLaunchbooleanSpecifies whether to delete or preserve the data volumes created during launch when terminating an instance. When set to true, the data volumes are preserved. The default value is true.
recycleLevelstringThis optional parameter overrides recycle level for hosts. The parameter can be used when hosts are associated with a Capacity Reservation. * FULL_RECYCLE - Does not skip host wipe. This is the default behavior.
sortBystringThe field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive.

SELECT examples​

Gets information about the specified instance.<br /><br />Note: To retrieve public and private IP addresses for an instance, use the [ListVnicAttachments](#/en/iaas/latest/VnicAttachment/ListVnicAttachments)<br />operation to get the VNIC ID for the instance, and then call [GetVnic](#/en/iaas/latest/Vnic/GetVnic) with the VNIC ID.<br />

SELECT
id,
agentConfig,
availabilityConfig,
availabilityDomain,
capacityReservationId,
clusterPlacementGroupId,
compartmentId,
dedicatedVmHostId,
definedTags,
displayName,
extendedMetadata,
faultDomain,
freeformTags,
imageId,
instanceConfigurationId,
instanceOptions,
ipxeScript,
isAIEnterpriseEnabled,
launchMode,
launchOptions,
licensingConfigs,
lifecycleState,
metadata,
placementConstraintDetails,
platformConfig,
preemptibleInstanceConfig,
region,
securityAttributes,
securityAttributesState,
shape,
shapeConfig,
sourceDetails,
timeCreated,
timeMaintenanceRebootDue
FROM oci.compute.instances
WHERE instanceId = '{{ instanceId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Attaches an instance to an instance pool. For information about the prerequisites<br />that an instance must meet before you can attach it to a pool, see<br />[Attaching an Instance to an Instance Pool](/iaas/Content/Compute/Tasks/updatinginstancepool.htm#attach-instance).<br />

INSERT INTO oci.compute.instances (
instanceId,
instancePoolId,
region,
opc-retry-token
)
SELECT
'{{ instanceId }}' /* required */,
'{{ instancePoolId }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
availabilityDomain,
compartmentId,
displayName,
faultDomain,
instanceConfigurationId,
instancePoolId,
lifecycleState,
loadBalancerBackends,
region,
shape,
state,
timeCreated
;

UPDATE examples​

Updates certain fields on the specified instance. Fields that are not provided in the<br />request will not be updated. Avoid entering confidential information.<br /><br />Changes to metadata fields will be reflected in the instance metadata service (this may take<br />up to a minute).<br /><br />The OCID of the instance remains the same.<br />

UPDATE oci.compute.instances
SET
agentConfig = '{{ agentConfig }}',
availabilityConfig = '{{ availabilityConfig }}',
capacityReservationId = '{{ capacityReservationId }}',
dedicatedVmHostId = '{{ dedicatedVmHostId }}',
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
extendedMetadata = '{{ extendedMetadata }}',
faultDomain = '{{ faultDomain }}',
freeformTags = '{{ freeformTags }}',
instanceOptions = '{{ instanceOptions }}',
isAIEnterpriseEnabled = {{ isAIEnterpriseEnabled }},
launchOptions = '{{ launchOptions }}',
metadata = '{{ metadata }}',
securityAttributes = '{{ securityAttributes }}',
shape = '{{ shape }}',
shapeConfig = '{{ shapeConfig }}',
sourceDetails = '{{ sourceDetails }}',
timeMaintenanceRebootDue = '{{ timeMaintenanceRebootDue }}',
updateOperationConstraint = '{{ updateOperationConstraint }}'
WHERE
instanceId = '{{ instanceId }}' --required
AND region = '{{ region }}' --required
AND opc-retry-token = '{{ opc-retry-token}}'
AND if-match = '{{ if-match}}'
RETURNING
id,
agentConfig,
availabilityConfig,
availabilityDomain,
capacityReservationId,
clusterPlacementGroupId,
compartmentId,
dedicatedVmHostId,
definedTags,
displayName,
extendedMetadata,
faultDomain,
freeformTags,
imageId,
instanceConfigurationId,
instanceOptions,
ipxeScript,
isAIEnterpriseEnabled,
launchMode,
launchOptions,
licensingConfigs,
lifecycleState,
metadata,
placementConstraintDetails,
platformConfig,
preemptibleInstanceConfig,
region,
securityAttributes,
securityAttributesState,
shape,
shapeConfig,
sourceDetails,
timeCreated,
timeMaintenanceRebootDue;

DELETE examples​

Permanently terminates (deletes) the specified instance. Any attached VNICs and volumes are automatically detached<br />when the instance terminates.<br /><br />To preserve the boot volume associated with the instance, specify true for PreserveBootVolumeQueryParam.<br />To delete the boot volume when the instance is deleted, specify false or do not specify a value for PreserveBootVolumeQueryParam.<br /><br />To preserve data volumes created with the instance, specify true or do not specify a value for PreserveDataVolumesQueryParam.<br />To delete the data volumes when the instance itself is deleted, specify false for PreserveDataVolumesQueryParam.<br /><br />This is an asynchronous operation. The instance's lifecycleState changes to TERMINATING temporarily<br />until the instance is completely deleted. After the instance is deleted, the record remains visible in the list of instances<br />with the state TERMINATED for at least 12 hours, but no further action is needed.<br />

DELETE FROM oci.compute.instances
WHERE instanceId = '{{ instanceId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND preserveBootVolume = '{{ preserveBootVolume }}'
AND preserveDataVolumesCreatedAtLaunch = '{{ preserveDataVolumesCreatedAtLaunch }}'
AND recycleLevel = '{{ recycleLevel }}'
;

Lifecycle Methods​

Performs one of the following power actions on the specified instance:<br /><br />- START - Powers on the instance.<br /><br />- STOP - Powers off the instance.<br /><br />- RESET - Powers off the instance and then powers it back on.<br /><br />- SOFTSTOP - Gracefully shuts down the instance by sending a shutdown command to the operating system.<br />After waiting 15 minutes for the OS to shut down, the instance is powered off.<br />If the applications that run on the instance take more than 15 minutes to shut down, they could be improperly stopped, resulting<br />in data corruption. To avoid this, manually shut down the instance using the commands available in the OS before you softstop the<br />instance.<br /><br />- SOFTRESET - Gracefully reboots the instance by sending a shutdown command to the operating system.<br />After waiting 15 minutes for the OS to shut down, the instance is powered off and<br />then powered back on.<br /><br /><br />- SENDDIAGNOSTICINTERRUPT - For advanced users. Caution: Sending a diagnostic interrupt to a live system can<br />cause data corruption or system failure. Sends a diagnostic interrupt that causes the instance's<br />OS to crash and then reboot. Before you send a diagnostic interrupt, you must configure the instance to generate a<br />crash dump file when it crashes. The crash dump captures information about the state of the OS at the time of<br />the crash. After the OS restarts, you can analyze the crash dump to diagnose the issue. For more information, see<br />[Sending a Diagnostic Interrupt](/iaas/Content/Compute/Tasks/sendingdiagnosticinterrupt.htm).<br /><br /><br /><br />- DIAGNOSTICREBOOT - Powers off the instance, rebuilds it, and then powers it back on.<br />Before you send a diagnostic reboot, restart the instance's OS, confirm that the instance and networking settings are configured<br />correctly, and try other [troubleshooting steps](/iaas/Content/Compute/References/troubleshooting-compute-instances.htm).<br />Use diagnostic reboot as a final attempt to troubleshoot an unreachable instance. For virtual machine (VM) instances only.<br />For more information, see [Performing a Diagnostic Reboot](/iaas/Content/Compute/Tasks/diagnostic-reboot.htm).<br /><br /><br />- REBOOTMIGRATE - Powers off the instance, moves it to new hardware, and then powers it back on. For more information, see<br />[Infrastructure Maintenance](/iaas/Content/Compute/References/infrastructure-maintenance.htm).<br /><br /><br />For more information about managing instance lifecycle states, see<br />[Stopping and Starting an Instance](/iaas/Content/Compute/Tasks/restartinginstance.htm).<br />

EXEC oci.compute.instances.instance_action
@instanceId='{{ instanceId }}' --required,
@action='{{ action }}' --required,
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@if-match='{{ if-match }}'
;