Terminate an Instance

delete

/20160918/instances/{instance_id}

Terminate the specified instance. Any attached VNICs and volumes are automatically detached when the instance terminates.

To preserve the boot volume associated with the instance, specify true for PreserveBootVolumeQueryParam.

To delete the boot volume when the instance is deleted, specify false or do not specify a value for PreserveBootVolumeQueryParam.

To preserve data volumes created with the instance, specify true for PreserveDataVolumesQueryParam.

To delete the data volumes when the instance itself is deleted, specify false or do not specify a value for PreserveDataVolumesQueryParam.

This is an asynchronous operation. The instance's lifecycleState will change to TERMINATING temporarily until the instance is completely removed.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Specifies 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.
    Default Value: false
  • Specifies whether to delete or preserve the data volumes when terminating an instance. When set to true, the data volumes are preserved. The default value is false.
    Default Value: true
  • This 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.
    Allowed Values: [ "FULL_RECYCLE" ]
Header Parameters
  • For 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.
Back to Top

Response

Supported Media Types

204 Response

The instance is being terminated.
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

401 Response

Unauthorized
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
  • A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
  • A human-readable error string.

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
  • A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
  • A human-readable error string.

412 Response

Precondition Failed
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
  • A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
  • A human-readable error string.

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
  • A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
  • A human-readable error string.

Default Response

An error has occurred.
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
  • A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
  • A human-readable error string.
Back to Top