Queries the details of automatic snapshot policies that are created in a specified region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeAutoSnapshotPolicyEx |
get |
AutoSnapshotPolicy
AutoSnapshotPolicy
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the automatic snapshot policies that you want to query. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| AutoSnapshotPolicyId |
string |
No |
The ID of the automatic snapshot policy. |
sp-bp67acfmxazb4ph**** |
| AutoSnapshotPolicyName |
string |
No |
The name of the automatic snapshot policy. The name must be 2 to 128 characters in length and can contain characters that are classified as letter in Unicode, including Chinese characters, English letters, and digits. The name can also contain colons (:), underscores (_), periods (.), or hyphens (-). |
TestName |
| PageNumber |
integer |
No |
The page number of the automatic snapshot policy list. The results are displayed on multiple pages. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page when the automatic snapshot policies are displayed by page. Maximum value: 100. Default value: 10. |
10 |
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The tag information. |
||
| Key |
string |
No |
The tag key of the automatic snapshot policy. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with aliyun or acs:. The tag key cannot contain http:// or https://. |
TestKey |
| Value |
string |
No |
The tag value of the automatic snapshot policy. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain http:// or https://. |
TestValue |
| ResourceGroupId |
string |
No |
The ID of the resource group. If you use this parameter to filter resources, the resource count cannot exceed 1,000. Note
Filtering by the default resource group is not supported. |
rg-aek2kkmhmhs**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
The number of entries per page when the automatic snapshot policies are displayed by page. |
10 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| PageNumber |
integer |
The page number of the automatic snapshot policy list. |
1 |
| TotalCount |
integer |
The total number of automatic snapshot policies. |
1 |
| AutoSnapshotPolicies |
object |
||
| AutoSnapshotPolicy |
array<object> |
The collection of automatic snapshot policy details. |
|
|
array<object> |
The details of an automatic snapshot policy. |
||
| AutoSnapshotPolicyId |
string |
The ID of the automatic snapshot policy. |
sp-bp67acfmxazb4ph**** |
| RegionId |
string |
The region ID of the automatic snapshot policy. |
cn-hangzhou |
| RepeatWeekdays |
string |
The days of the week on which automatic snapshots are created. Valid values: 1 to 7, where 1 indicates Monday. Multiple days can be specified. |
["6"] |
| TimePoints |
string |
The points in time at which automatic snapshots are created. The time is displayed in UTC+8. Unit: hours. Valid values: 0 to 23, where 0 indicates 00:00 and 1 indicates 01:00. Multiple points in time can be specified. The parameter value is a JSON array in the format of |
["1"] |
| RetentionDays |
integer |
The retention period of the automatic snapshot. Unit: days. Valid values:
|
7 |
| CreationTime |
string |
The time when the automatic 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. |
2019-12-10T16:00Z |
| Status |
string |
The status of the automatic snapshot policy. Valid values:
|
Normal |
| AutoSnapshotPolicyName |
string |
The name of the automatic snapshot policy. |
testAutoSnapshotPolicyName |
| EnableCrossRegionCopy |
boolean |
Note
This parameter is in invitational preview and is not publicly available. |
false |
| TargetCopyRegions |
string |
Note
This parameter is in invitational preview and is not publicly available. |
test |
| CopiedSnapshotsRetentionDays |
integer |
Note
This parameter is in invitational preview and is not publicly available. |
0 |
| CopyEncryptionConfiguration |
object |
The encryption parameters for cross-region snapshot replication. |
|
| Encrypted |
boolean |
Indicates whether encrypted cross-region snapshot replication is enabled. Valid values:
Default value: false. |
false |
| KMSKeyId |
string |
The ID of the KMS key used for encrypted cross-region snapshot replication. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| DiskNums |
integer |
The number of disks that use this policy. |
1 |
| VolumeNums |
integer |
The number of extended volumes that use this policy. |
2 |
| ResourceGroupId |
string |
The resource group ID. |
rg-aek2kkmhmhs**** |
| Tags |
object |
||
| Tag |
array<object> |
The tag key-value pairs of the automatic snapshot policy. |
|
|
object |
The tag key-value pairs of the automatic snapshot policy. |
||
| TagKey |
string |
The tag key of the automatic snapshot policy. |
TestKey |
| TagValue |
string |
The tag value of the automatic snapshot policy. |
TestValue |
| AssociationType |
string |
The association type between the automatic snapshot policy and target resources. Valid values: ● AssociatedWithDisk: associated with disks. ● AssociatedWithInstanceTag: associated with instance tags. |
AssociatedWithDisk |
| TargetTags |
object |
||
| TargetTag |
array<object> |
The list of target resource tags. The automatic snapshot policy matches target resources based on tags. |
|
|
object |
The target resource tag. |
||
| TagKey |
string |
The tag key. |
|
| TagValue |
string |
The tag value. |
|
| Type |
string |
The type of the automatic snapshot policy.
|
Custom |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageNumber": 1,
"TotalCount": 1,
"AutoSnapshotPolicies": {
"AutoSnapshotPolicy": [
{
"AutoSnapshotPolicyId": "sp-bp67acfmxazb4ph****",
"RegionId": "cn-hangzhou",
"RepeatWeekdays": "[\"6\"]",
"TimePoints": "[\"1\"]",
"RetentionDays": 7,
"CreationTime": "2019-12-10T16:00Z",
"Status": "Normal",
"AutoSnapshotPolicyName": "testAutoSnapshotPolicyName",
"EnableCrossRegionCopy": false,
"TargetCopyRegions": "test",
"CopiedSnapshotsRetentionDays": 0,
"CopyEncryptionConfiguration": {
"Encrypted": false,
"KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb40****"
},
"DiskNums": 1,
"VolumeNums": 2,
"ResourceGroupId": "rg-aek2kkmhmhs****",
"Tags": {
"Tag": [
{
"TagKey": "TestKey",
"TagValue": "TestValue"
}
]
},
"AssociationType": "AssociatedWithDisk",
"TargetTags": {
"TargetTag": [
{
"TagKey": "",
"TagValue": ""
}
]
},
"Type": "Custom"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | |
| 400 | InvalidTag.Mismatch | The specified Tag.n.Key and Tag.n.Value are not match. | The specified Tag.N.Key and Tag.N.Value parameters do not correspond to each other. |
| 400 | InvalidTagCount | The specified tags are beyond the permitted range. | The number of specified tags exceeds the upper limit. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.