TerminateInstance

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: false
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. Provide this request OCID if you need to contact Oracle about this request.

401 Response

Unauthorized
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

412 Response

Precondition Failed
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

Default Response

An error has occurred.
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
Back to Top