DeleteSnapshot

Last Updated: Dec 12, 2017

Description

This API deletes the specified snapshot. If the snapshot being created (or not 100% completed) needs to be canceled, this API can be called to delete the snapshot (or canceling the creation of the snapshot).

  • If the snapshot with a specified ID does not exist, the request is ignored.

  • If a snapshot has been used to create a custom image, the snapshot cannot be deleted. The snapshot can only be deleted after the appropriate custom image is deleted.

Request parameters

Name Type Required Description
Action String Yes Required parameter, value: DeleteSnapshot.
SnapshotId String Yes Snapshot ID.

Response parameters

The return parameters are all common response parameters. For more information, see Common parameters.

Error codes

Error code Error message HTTP status code Meaning
SnapshotCreatedImage The snapshot has been used to create user defined image(s). 403 The specified snapshot has already been used to create a custom image.
SnapshotCreatedDisk The snapshot has been used to create disk(s). 403 The specified snapshot has already been used to create a disk.
MissingParameter The input parameter SnapshotId that is mandatory for processing this request is not supplied. 400 The required parameter SnapshotId is missing.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=DeleteSnapshot
  2. &SnapshotId=s-923FE2BF0
  3. &<Common Request Parameters>

Response Example

XML format

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

JSON format

  1. {
  2. "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
  3. }
Thank you! We've received your feedback.