edit-icon download-icon

DeleteDisk

Last Updated: Mar 29, 2018

Description

Releases an independent cloud disk when it is no longer in use. When you call this interface, consider the following:

  • Before you release an independent cloud disk, you must make sure that:

    • Your manual snapshot is retained in the console.

    • You can call ModifyDiskAttribute to decide whether the automatic snapshots of your cloud disk is retained or released along with the disk. We recommend that you delete unnecessary snapshots to guarantee an enough snapshot data storage for periodical automatic snapshot policies.

  • When you release a specified cloud disk, the status of the disk must be Available.

  • If the specified cloud disk does not exist, your request is ignored.

Request parameters

Name Type Required Description
Action String Yes The name of this interface. Value: DeleteDisk.
DiskId String Yes The ID of the cloud disk to be released.

Response parameters

All are common response parameters. For more information, see Common parameters.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=DeleteDisk
  2. &DiskId=d-23jbf2v5m
  3. &<Common Request Parameters>

Response example

XML format

  1. <DeleteDiskResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
  3. </DeleteDiskResponse>

JSON format

  1. {
  2. "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
  3. }

Error codes

Error code Error message HTTP status code Meaning
DiskCreatingSnapshot The operation is denied due to a snapshot of the specified disk is not completed yet. 403 A snapshot of the specified cloud disk is being created. Please try again later.
DiskNotPortable The specified disk is not a portable disk. 403 The disk cannot be detached.
DiskTypeViolation You cannot release the system disk of an instance. 403 The specified cloud disk is a system disk and cannot be released.
IncorrectDiskStatus The current disk status does not support this operation. 403 The status of the cloud disk must be Available.
Thank you! We've received your feedback.