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
- application/json
Path Parameters
-
instanceId(required): string
The OCID of the instance.
Query Parameters
-
preserveBootVolume: boolean
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
-
preserveDataVolumes: boolean
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
-
if-match: string
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.
Response
Supported Media Types
- application/json
204 Response
The instance is being terminated.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
412 Response
Precondition Failed
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
Default Response
An error has occurred.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload