Queries the details of automatic snapshot policies that are created in a specific 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 policy. You can call the DescribeRegions operation 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. |
TestName |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 10. |
10 |
| Tag |
array<object> |
No |
The tags of the automatic snapshot policy. |
|
|
object |
No |
|||
| Key |
string |
No |
The key of tag N 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 contain http:// or https://. The tag key cannot start with acs: or aliyun. |
TestKey |
| Value |
string |
No |
The value of tag N 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://. The tag value cannot start with acs:. |
TestValue |
| ResourceGroupId |
string |
No |
The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response. Note
Resources in the default resource group are displayed in the response regardless of how this parameter is set. |
rg-aek2kkmhmhs**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| PageNumber |
integer |
The page number. |
1 |
| TotalCount |
integer |
The total number of automatic snapshot policies |
1 |
| AutoSnapshotPolicies |
object |
||
| AutoSnapshotPolicy |
array<object> |
Details about the automatic snapshot policies. |
|
|
array<object> |
|||
| TimePoints |
string |
The points in time of the day at which to create automatic snapshots. The time is displayed in UTC+8. Unit: hours. Valid values: 0 to 23, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified. The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: |
["1"] |
| 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 |
| 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 |
| AutoSnapshotPolicyId |
string |
The ID of the automatic snapshot policy. |
sp-bp67acfmxazb4ph**** |
| RetentionDays |
integer |
The retention period of the automatic snapshots. Unit: days. Valid values:
|
7 |
| RegionId |
string |
The region ID of the automatic snapshot policy. |
cn-hangzhou |
| DiskNums |
integer |
The number of disks to which the automatic snapshot policy is applied. |
1 |
| EnableCrossRegionCopy |
boolean |
Note
This parameter is in invitational preview and is not publicly available. |
false |
| RepeatWeekdays |
string |
The days of the week on which to create automatic snapshots. Valid values: 1 to 7, which correspond to the days of the week. For example, 1 indicates Monday. One or more days can be specified. |
["6"] |
| VolumeNums |
integer |
The number of extended volumes to which the automatic snapshot policy is applied. |
2 |
| ResourceGroupId |
string |
The ID of the resource group. |
rg-aek2kkmhmhs**** |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the automatic snapshot policy. |
|
|
object |
|||
| TagValue |
string |
The tag value of the automatic snapshot policy. |
TestValue |
| TagKey |
string |
The tag key of the automatic snapshot policy. |
TestKey |
| CopyEncryptionConfiguration |
object |
Encryption configurations for cross-region snapshot replication. |
|
| Encrypted |
boolean |
Whether to enable encryption for cross-region snapshot replication. Valid values:
Default value: false. |
false |
| KMSKeyId |
string |
The ID of the Key Management Service (KMS) key used to encrypt snapshots in cross-region snapshot replication. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| Type |
string |
The type of the automatic snapshot policy. Valid values:
|
Custom |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageNumber": 1,
"TotalCount": 1,
"AutoSnapshotPolicies": {
"AutoSnapshotPolicy": [
{
"TimePoints": "[\"1\"]",
"CreationTime": "2019-12-10T16:00Z",
"Status": "Normal",
"AutoSnapshotPolicyName": "testAutoSnapshotPolicyName",
"TargetCopyRegions": "test",
"CopiedSnapshotsRetentionDays": 0,
"AutoSnapshotPolicyId": "sp-bp67acfmxazb4ph****",
"RetentionDays": 7,
"RegionId": "cn-hangzhou",
"DiskNums": 1,
"EnableCrossRegionCopy": false,
"RepeatWeekdays": "[\"6\"]",
"VolumeNums": 2,
"ResourceGroupId": "rg-aek2kkmhmhs****",
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
},
"CopyEncryptionConfiguration": {
"Encrypted": false,
"KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb40****"
},
"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.