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).
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 them along with the disk. We recommend that you delete the snapshots that you no longer need. This helps you free up your quota to create new automatic snapshots.
- The disk must be in the Available state.
- If the specified DiskId parameter 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 that you want to release. |
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
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteDiskResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
</DeleteDiskResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidRegionId.MalFormed | The specified parameter RegionId is not valid. | The error message returned because the specified RegionId parameter is invalid. |
| 500 | InternalError | The request processing has failed due to some unknown error. | The error message returned because an internal error occurred. Try again later. |
| 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 you have no overdue payments for it. |
| 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 the 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 is being created for the specified disk. |
| 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 you have no overdue payments for it. |
| 403 | DiskStillAttached | The disk is still attached to the disk. | The error message returned because the specified disk is still attached to an instance. |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | The error message returned because you are not authorized to manage the disk. Try again when you are authorized. |
| 403 | InvalidDiskStatus.DeleteProtection | The specified disk is under delete protection, can not be deleted. | The error message returned because deletion protection is enabled for the specified disk and the disk cannot be released. Possible cause: The disk was detached from an instance to which it was attached as the system disk, and the detached system disk was retained as a data disk. The detached system disk cannot be released before the instance is released. |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | The error message returned because the specified disk does not exist. Check whether the disk ID is correct. |
For a list of error codes, see Service error codes.