You can call this operation to query the automatic snapshot policies that you have created.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeAutoSnapshotPolicyEx |
The operation that you want to perform. Set the value to DescribeAutoSnapshotPolicyEx. |
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. |
AutoSnapshotPolicyId | String | No | sp-bp67acfmxazb4ph**** |
The ID of the automatic snapshot policy. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1 |
PageSize | Integer | No | 1 |
The number of entries to return on each page. Maximum value: 100. Default value: 10. |
Tag.N.Key | String | No | TestKey |
The key of tag N of the automatic snapshot policy. Valid values of N: 1 to 20. It cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun. |
Tag.N.Value | String | No | TestValue |
The value of tag N of the automatic snapshot policy. Valid values of N: 1 to 20. It can be an empty string. The tag value can be up to 128 characters in length and cannot contain http:// or https://. It cannot start with acs:. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
AutoSnapshotPolicies | Array of AutoSnapshotPolicy |
Details about the automatic snapshot policies. |
|
AutoSnapshotPolicy | |||
AutoSnapshotPolicyId | String | sp-bp67acfmxazb4ph**** |
The ID of the automatic snapshot policy. |
AutoSnapshotPolicyName | String | testAutoSnapshotPolicyName |
The name of the automatic snapshot policy. |
CopiedSnapshotsRetentionDays | Integer | 0 |
Note This parameter will be available soon.
|
CreationTime | String | 2014-04-21T12:08:52Z |
The time when the auto snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
DiskNums | Integer | 1 |
The number of disks to which the automatic snapshot policy is applied. |
EnableCrossRegionCopy | Boolean | false |
Note This parameter will be available soon.
|
RegionId | String | cn-hangzhou |
The region ID of the automatic snapshot policy. |
RepeatWeekdays | String | ["6"] |
The days of a week on which automatic snapshots are created. Valid values: 1 to 7, which corresponds to the days of the week. 1 indicates Monday. One or more days can be specified. |
RetentionDays | Integer | 30 |
The retention period of the automatic snapshot. Valid values:
|
Status | String | Normal |
The status of the automatic snapshot policy. Valid values:
|
Tags | Array of Tag |
Details about tags of the automatic snapshots. |
|
Tag | |||
TagKey | String | TestKey |
The tag key of the snapshot. |
TagValue | String | TestValue |
The tag value of the snapshot. |
TargetCopyRegions | String | test |
Note This parameter will be available soon.
|
TimePoints | String | ["4", "19"] |
The points in time at which automatic snapshots are created. The least interval at which snapshots can be created is one hour. Valid values: 0 to 23, which corresponds to the hours of the day from 00:00 to 23:00. 1 indicates 01:00. You can specify multiple points in time. The parameter is a JSON-formatted array: |
VolumeNums | Integer | 2 |
The number of extended volumes on which this policy is enabled. |
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 1 |
The number of entries returned per page. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
TotalCount | Integer | 2 |
The total number of automatic snapshot policies. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DescribeAutoSnapshotPolicyEx
&RegionId=cn-hangzhou
&AutoSnapshotPolicyId=sp-bp67acfmxazb4ph****
&PageNumber=1
&PageSize=1
&<Common request parameters>
Sample success responses
XML
format
<DescribeAutoSnapshotPolicyExResponse>
<PageNumber>1</PageNumber>
<TotalCount>2</TotalCount>
<AutoSnapshotPolicies>
<AutoSnapshotPolicy>
<CreationTime>2019-01-22 11:38:08</CreationTime>
<Status>Normal</Status>
<DiskNums>1</DiskNums>
<AutoSnapshotPolicyName>testAutoSnapshotPolicyName</AutoSnapshotPolicyName>
<RegionId>cn-hangzhou</RegionId>
<VolumeNums>2</VolumeNums>
<RetentionDays>30</RetentionDays>
<TimePoints>["0"]</TimePoints>
<AutoSnapshotPolicyId>sp-bp67acfmxazb4ph****</AutoSnapshotPolicyId>
<RepeatWeekdays>["7"]</RepeatWeekdays>
<Tags>
<Tag>
<TagKey>TestKey</TagKey>
<TagValue>TestValue</TagValue>
</Tag>
</Tags>
</AutoSnapshotPolicy>
</AutoSnapshotPolicies>
<PageSize>1</PageSize>
<RequestId>CC323EDF-BBB7-420F-BCD1-D9B9D2E9D424</RequestId>
</DescribeAutoSnapshotPolicyExResponse>
JSON
format
{
"PageNumber": 1,
"TotalCount": 2,
"AutoSnapshotPolicies": {
"AutoSnapshotPolicy": [
{
"CreationTime": "2019-01-22 11:38:08",
"Status": "Normal",
"DiskNums": 1,
"AutoSnapshotPolicyName": "testAutoSnapshotPolicyName",
"RegionId": "cn-hangzhou",
"VolumeNums": 2,
"RetentionDays": 30,
"TimePoints": "[\"0\"]",
"AutoSnapshotPolicyId": "sp-bp67acfmxazb4ph****",
"RepeatWeekdays": "[\"7\"]",
"Tags": {
"Tag": [
{
"TagKey": "TestKey",
"TagValue": "TestValue"
}
]
}
}
]
},
"PageSize": 1,
"RequestId": "CC323EDF-BBB7-420F-BCD1-D9B9D2E9D424"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The error message returned because the specified RegionId parameter does not exist. |
400 | InvalidTag.Mismatch | The specified Tag.n.Key and Tag.n.Value are not match. | The error message returned because the specified Tag.N.Key and Tag.N.Value parameters do not match. |
400 | InvalidTagCount | The specified tags are beyond the permitted range. | The error message returned because the maximum number of the specified tags has been reached. |
For a list of error codes, visit the API Error Center.