You can call this operation to release 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).
Description
When you call this operation to release a pay-as-you-go data disk, take note of the following items:
- Manual snapshots of the disk are retained.
- You can call the ModifyDiskAttribute operation to configure whether to release automatic snapshots together with the disk. We recommend that you delete unneeded snapshots to maintain an enough snapshot quota for new automatic snapshots.
- The disk must be in the Unattached (Available) state.
- If the specified disk does not exist, the request is ignored.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteDisk |
The operation that you want to perform. Set the value to DeleteDisk. |
DiskId | String | Yes | d-bp14k9cxvr5uzy5**** |
The ID of the disk to be released. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DeleteDisk
&DiskId=d-bp14k9cxvr5uzy5****
&<Common request parameters>
Sample success responses
XML
format
<DeleteDiskResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
</DeleteDiskResponse>
JSON
format
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | IncorrectDiskStatus | The current disk status does not support this operation. | The error message returned because the operation is not supported while the disk is in the current state. Make sure that the disk is available and your account has no overdue payments. |
500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket. |
403 | DiskNotPortable | The specified disk is not a portable disk. | The error message returned because the specified disk is not removable. |
403 | DiskTypeViolation | The specified disk is a system disk and cannot support the operation. | The error message returned because the specified disk is a system disk and cannot be detached from the instance to which it is attached. |
403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | The error message returned because a snapshot of the specified disk is being created. |
403 | IncorrectDiskStatus.Initializing | The current disk status does not support this operation. | The error message returned because the operation is not supported while the disk is in the current state. Make sure that the disk is available and your account has no overdue payments. |
404 | InvalidDiskId.NotFound | The specified disk does not exist. | The error message returned because the specified DiskId parameter does not exist. Check whether the disk ID is correct. |
403 | DiskStillAttached | The disk is still attached to the disk. | The error message returned because the disk to be released is still attached to an instance. |
403 | UserNotInTheWhiteList | The user is not in disk white list. | The error message returned because you are not in the whitelist to manage the disk. Try again when you are in the whitelist. |
400 | InvalidRegionId.MalFormed | The specified parameter RegionId is not valid. | The error message returned because the specified RegionId parameter is invalid. |
For a list of error codes, visit the API Error Center.