Deletes a snapshot-consistent group.

Description

If you have custom images that were created from a disk snapshot contained in a snapshot-consistent group, the disk snapshot is retained when the snapshot-consistent group is deleted. Before you can delete the disk snapshot, you must call the DeleteImage operation to delete the custom images. Then, you can call the DeleteSnapshot operation to delete the disk snapshot.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteSnapshotGroup

The operation that you want to perform. Set the value to DeleteSnapshotGroup.

RegionId String Yes cn-hangzhou

The region ID of the snapshot-consistent group. You can call the DescribeRegions operation to query the most recent region list.

SnapshotGroupId String Yes ssg-j6c9lpuyxo2uxxny****

The ID of the snapshot-consistent group. You can call the DescribeSnapshotGroups operation to query the IDs of one or more snapshot-consistent groups.

Response parameters

Parameter Type Example Description
RequestId String 6EDE885A-FDC1-4FAE-BC44-6EACAEA6CC6E

The ID of the request.

OperationProgressSet Array of OperationProgress

Details about the delete operation.

OperationProgress
ErrorMsg String testErrorMsg

The error message. This parameter is empty when the operation was successful.

For information about error codes and error messages, visit the API error center.

ErrorCode String 400

The error code. This parameter is empty when the operation was successful.

For information about error codes and error messages, visit the API error center.

OperationStatus String Success

Indicates whether the operation was successful. If the operation was successful, a value of Success is returned. If the operation failed, an error code and an error message are returned.

RelatedItemSet Array of RelatedItem

Details about the resources.

RelatedItem
Name String SnapshotId

The name of the resource.

Value String s-j6c9lpuyxo2uxxnx****

The ID of the resource.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DeleteSnapshotGroup
&RegionId=cn-hangzhou
&SnapshotGroupId=ssg-j6c9lpuyxo2uxxny****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DeleteSnapshotGroupResponse>
    <RequestId>6EDE885A-FDC1-4FAE-BC44-6EACAEA6CC6E</RequestId>
    <OperationProgressSet>
        <OperationProgress>
            <OperationStatus>Success</OperationStatus>
            <ErrorMsg/>
            <RelatedItemSet>
                <RelatedItem>
                    <Value>s-j6c9lpuyxo2uxxnx****</Value>
                    <Name>SnapshotId</Name>
                </RelatedItem>
            </RelatedItemSet>
            <ErrorCode/>
        </OperationProgress>
        <OperationProgress>
            <OperationStatus>Success</OperationStatus>
            <ErrorMsg/>
            <RelatedItemSet>
                <RelatedItem>
                    <Value>s-j6c9lpuyxo2uxxnx****</Value>
                    <Name>SnapshotId</Name>
                </RelatedItem>
            </RelatedItemSet>
            <ErrorCode/>
        </OperationProgress>
    </OperationProgressSet>
</DeleteSnapshotGroupResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "6EDE885A-FDC1-4FAE-BC44-6EACAEA6CC6E",
  "OperationProgressSet" : {
    "OperationProgress" : [ {
      "OperationStatus" : "Success",
      "ErrorMsg" : "",
      "RelatedItemSet" : {
        "RelatedItem" : [ {
          "Value" : "s-j6c9lpuyxo2uxxnx****",
          "Name" : "SnapshotId"
        } ]
      },
      "ErrorCode" : ""
    }, {
      "OperationStatus" : "Success",
      "ErrorMsg" : "",
      "RelatedItemSet" : {
        "RelatedItem" : [ {
          "Value" : "s-j6c9lpuyxo2uxxnx****",
          "Name" : "SnapshotId"
        } ]
      },
      "ErrorCode" : ""
    } ]
  }
}

Error codes

HttpCode Error code Error message Description
403 SnapshotCreatedImage The snapshot has been used to create user defined image(s). The error message returned because the specified snapshot has been used to create custom images and cannot be deleted. You must call the DeleteImage operation to delete the custom images before you can delete the snapshot.
403 Operation.Forbidden The operation is not permitted. The error message returned because the operation is not supported.

For a list of error codes, visit the API Error Center.