Deletes a snapshot-consistent group.
Usage notes
If a disk snapshot that is contained in a snapshot-consistent group is used to create a custom image, the disk snapshot is retained after the snapshot-consistent group is deleted. Before you can delete the disk snapshot, you must call the DeleteImage operation to delete the custom image. Then, you can call the DeleteSnapshot operation to delete the disk snapshot.
Debugging
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 snapshot-consistent group ID. You can call the DescribeSnapshotGroups operation to query the IDs of 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 operation. |
|
OperationProgress | |||
ErrorMsg | String | testErrorMsg | The error message. This parameter is empty when the operation is successful. For information about error codes and error messages, see Service error codes. |
ErrorCode | String | 400 | The error code. This parameter is empty when the operation is successful. For information about error codes and error messages, see Service error codes. |
OperationStatus | String | Success | Indicates whether the request was successful. If the operation was successful, the value of Success was returned. If the operation failed, an error code and an error message were returned. |
RelatedItemSet | Array of RelatedItem | The resources. |
|
RelatedItem | |||
Name | String | SnapshotId | The resource name. |
Value | String | s-j6c9lpuyxo2uxxnx**** | The resource ID. |
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
HTTP status code |
Error code |
Error message |
Description |
403 | SnapshotCreatedImage | The snapshot has been used to create user defined image(s). | If the snapshot was used to create custom images, the snapshot 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 operation is not supported. |
403 | SnapshotCreatedDisk | The snapshot that you are trying to delete is in use by one or more Disks. | The snapshot that you want to delete is used to create disks. |
For a list of error codes, see Service error codes.