You can call this operation to delete an automatic snapshot policy. After you delete an automatic snapshot policy, the policy will no longer be applied to the disks that it previously took effect on.

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
autoSnapshotPolicyId String Yes p-233e6ylv0

The ID of the automatic snapshot policy. You can call the DescribeAutoSnapshotPolicyEx operation to view the available automatic snapshot policies.

regionId String Yes cn-hangzhou

The region ID of the automatic snapshot policy. You can call the DescribeRegions operation to query the most recent region list.

Action String No DeleteAutoSnapshotPolicy

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

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request. This parameter is returned regardless of whether the operation is successful.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DeleteAutoSnapshotPolicy
&autoSnapshotPolicyId=p-233e6ylv0
&regionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DeleteAutoSnapshotPolicyResponse>
      <RequestId>F3CD6886-D8D0-4FEE-B93E-1B73239673DE</RequestId> 
</DeleteAutoSnapshotPolicyResponse>

JSON format

{
    "RequestId":"F3CD6886-D8D0-4FEE-B93E-1B73239673DE"
}

Error codes

HTTP status code Error code Error message Description
404 ParameterInvalid The specified automatic snapshot policy does not exist. The error message returned because the specified autoSnapshotPolicyID does not exist. Check whether the parameter value is correct.
404 ParameterInvalid The specified automatic snapshot policy does not exist in the region. The error message returned because the specified autoSnapshotPolicyID does not exist in this region. Check whether the parameter value is correct.

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