Query an automatic snapshot policy

Last Updated: Jul 25, 2017

Description

Queries automatic snapshot policies.

Request Parameters

Name Type Required Description
Action String Yes Required parameter, with the value: DescribeAutoSnapshotPolicyEx.
RegionId String Yes The region in which to query automatic snapshot policies.
AutoSnapshotPolicyId String No The ID of the automatic snapshot policy to query. If blank, all policies will be returned. A formatted Json Array: [“p-xxxxxxxxx”, ”p-yyyyyyyyy”, … “p-zzzzzzzzz”].
PageNumber Integer No The page number of the automatic snapshot policy list, starting from 1, and 1 by default.
PageSize Integer No Specifies the number of rows per page in case of querying by page. The maximum value is “50” and the default value is “10”.

Return Parameters

Name Type Description
TotalCount Integer The total number of snapshots.
PageNumber Integer The page number of the snapshot list.
PageSize Integer The input number of rows per page.
AutoSnapshotPolicys AutoSnapshotPolicyType The automatic snapshot policy details, a set composed of AutoSnapshotPolicyType.

Examples

Request Example

  1. https://ecs.aliyuncs.com/?Action=DescribeAutoSnapshotPolicy
  2. &<Public Request Parameters>

Return Example

XML format

  1. <DescribeAutoSnapshotPolicyResponse>
  2. <AntoSnapshotPolicys>
  3. <AntoSnapshotPolicy>
  4. <CreationTime>2014-04-21T12:08:52Z</CreationTime>
  5. <AutoSnapshotPolicyId>p-23f2i9s4t</AutoSnapshotPolicyId>
  6. <SettingTimePoints>[“2”, “9”]</SettingTimePoints>
  7. <SettingRepeatWeekdays>[“3” , “4” , “5” , “7”]</SettingRepeatWeekdays>
  8. <RetentionDays>-1< RetentionDays>
  9. </AntoSnapshotPolicy>
  10. <AntoSnapshotPolicy>
  11. <CreationTime>2014-07-24T13:00:52Z</CreationTime>
  12. <AutoSnapshotPolicyId>p-23f2i9s4t</AutoSnapshotPolicyId>
  13. <SettingTimePoints>[“0”, “1”]</SettingTimePoints>
  14. <SettingRepeatWeekdays>[“1”, “7”]</SettingRepeatWeekdays>
  15. <RetentionDays>30< RetentionDays>
  16. </AntoSnapshotPolicy>
  17. </AntoSnapshotPolicys>
  18. <PageNumber>1</PageNumber>
  19. <PageSize>2</PageSize>
  20. <TotalCount>2</TotalCount>
  21. <RequestId>F3CD6886-D8D0-4FEE-B93E-1B73239673DE</RequestId>
  22. </DescribeAutoSnapshotPolicyResponse>

JSON format

  1. {
  2. "PageNumber": 1,
  3. "PageSize": 2,
  4. "RequestId": "659F91C6-1949-43B0-90C4-B6342CA757D5",
  5. "AntoSnapshotPolicys": {
  6. " AutoSnapshotPolicy": [
  7. {
  8. "CreationTime": "2014-07-24T13:00:52Z",
  9. "AutoSnapshotPolicyId": "p-23f2i9s4t",
  10. "SettingTimePoints": "[“0”, “1”]",
  11. "SettingRepeatWeekdays": "[“1”, “7”]",
  12. "RetentionDays": "30",
  13. },
  14. {
  15. "CreationTime": "2014-04-21T12:08:52Z",
  16. "AutoSnapshotPolicyId": "p-a1fd3g5s1",
  17. "SettingTimePoints": "[“2”, “9”]",
  18. "SettingRepeatWeekdays": "[“3” , “4” , “5” , “7”]",
  19. "RetentionDays": "-1",
  20. }
  21. ]
  22. },
  23. "TotalCount": 2
  24. }
Thank you! We've received your feedback.