All Products
Search
Document Center

Elastic Compute Service:DeleteDisk

Last Updated:Apr 11, 2024

Releases a pay-as-you-go data disk. The data disk can be a basic disk, an ultra disk, a standard SSD, or an enhanced SSD (ESSD).

Operation description

When you call this operation, take note of the following items:

  • Manual snapshots of the disk are retained.
  • You can call the ModifyDiskAttribute operation to configure whether to retain automatic snapshots of the disk or release the snapshots along with the disk. We recommend that you delete the snapshots that are no longer needed to maintain a sufficient quota for new automatic snapshots.
  • The disk must be in the Unattached (Available) state.
  • If the specified DiskId parameter does not exist, the request is ignored.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DiskIdstringYes

The ID of the disk that you want to release.

d-bp14k9cxvr5uzy5****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRegionId.MalFormedThe specified parameter RegionId is not valid.The specified RegionId parameter is invalid.
403IncorrectDiskStatusThe current disk status does not support this operation.The disk is in a state that does not support the current operation. Make sure that the disk is available and that your account has no overdue payments.
403DiskNotPortableThe specified disk is not a portable disk.The specified disk is not removable.
403DiskTypeViolationThe specified disk is a system disk and cannot support the operation.The specified disk is a system disk and cannot be detached.
403DiskCreatingSnapshotThe operation is denied due to a snapshot of the specified disk is not completed yet.A snapshot is being created for the specified disk.
403IncorrectDiskStatus.InitializingThe current disk status does not support this operation.The specified disk is in an invalid status. Check if the disk is in a usable status.
403DiskStillAttachedThe disk is still attached to the disk.The specified disk is still attached to an instance.
403UserNotInTheWhiteListThe user is not in disk white list.You are not authorized to manage the disk. Try again when you are authorized.
403InvalidDiskStatus.DeleteProtectionThe specified disk is under delete protection, can not be deleted.Release protection is enabled for the specified disk and the disk cannot be released. Possible cause: The disk was detached from an instance on which it was previously used as the system disk but was retained as a data disk. This disk cannot be released before the instance is released.
404InvalidDiskId.NotFoundThe specified disk does not exist.The specified disk does not exist. Check whether the disk ID is correct.
500InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.

For a list of error codes, visit the Service error codes.