ApplyAutoSnapshotPolicy

Last Updated: Dec 14, 2017

Description

You can apply automatic snapshot policies to disks.

  • Only one automatic snapshot policy can be applied to one disk. Applying an automatic snapshot policy to a disk modifies the current policy.
  • One automatic snapshot policy can be applied to multiple disks simultaneously.
  • When the same snapshot policy is applied to multiple disks, these disks may not be able to take snapshots concurrently.

Request parameters

Name Type Required Description
Action String Yes Operator interface name, required, with the value: ApplyAutoSnapshotPolicy.
RegionId String Yes The region ID in which you want to apply the automatic snapshot policy. See Regions and zones for region IDs.
AutoSnapshotPolicyId String Yes The ID of the automatic snapshot policy you want to apply.
DiskIds String Yes The disk set to which the automatic snapshot policy is applied. A formatted Json Array: [“d-xxxxxxxxx”, “d-yyyyyyyyy”, … “d-zzzzzzzzz”]. A maximum of X IDs separated by single-byte commas.

Response parameters

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

Error codes

Error code Error message HTTP status code Meaning
DiskCategory.OperationNotSupported The type of the specified disk type does not support creating a snapshot. 400 The type of the specified disk does not support creating a snapshot.
DiskCategory.OperationNotSupported The types of some disks in the disk list do not support creating snapshots. 400 The types of some disks in the disk list do not support creating snapshots.
ParameterInvalid The specified automatic snapshot policy does not exist. 404 The specified automatic snapshot policy does not exist.
ParameterInvalid The specified automatic snapshot policy does not exist in the region. 404 The specified automatic snapshot policy does not exist in the region.
ParameterInvalid The specified AutoSnapshotPolicyId is invalid. 404 The specified AutoSnapshotPolicyId is invalid.
ParameterInvalid The specified RegionId parameter is invalid. 404 The specified RegionId parameter is invalid. See Regions and zones for region IDs.
ParameterInvalid The specified DiskIds are invalid. 404 The specified DiskIds are invalid.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=ApplyAutoSnapshotPolicy
  2. &Snapshots=[“d-233e6ylv0”, d-23vbpbi03 ”, d-23vasz3ds ”]
  3. &<Common Request Parameters>

Response example

XML format

  1. <ApplyAutoSnapshotPolicyResponse>
  2. <RequestId>F3CD6886-D8D0-4FEE-B93E-1B73239673DE</RequestId>
  3. </ApplyAutoSnapshotPolicyResponse>

JSON format

  1. {
  2. "RequestId":"F3CD6886-D8D0-4FEE-B93E-1B73239673DE"
  3. }
Thank you! We've received your feedback.