Queries enterprise-level snapshot policies by specifying parameters such as PolicyIds, ResourceGroupId, and Tag.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ebs:DescribeEnterpriseSnapshotPolicy |
list |
*EnterpriseSnapshotPolicy
*EnterpriseSnapshotPolicy
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| PolicyIds |
array |
No |
The list of snapshot policy IDs. |
|
|
string |
No |
The policy ID. |
esp-xxx |
|
| DiskIds |
array |
No |
The list of cloud disk IDs. |
|
|
string |
No |
The cloud disk ID. |
"d-bp67acfmxazb4p****" |
|
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-acfmvs**** |
| NextToken |
string |
No |
The pagination token (Token). Set this parameter to the NextToken value returned in the previous call. You do not need to set this parameter for the first request. If NextToken is specified, the PageSize and PageNumber request parameters do not take effect, and the TotalCount value in the response is invalid. |
AAAAAdDWBF2**** |
| MaxResults |
integer |
No |
The maximum number of entries to return in this call. You can use this parameter together with NextToken. Valid values: 1 to 500. Default value: 10. |
100 |
| PageSize |
integer |
No |
The number of entries per page in a paging query. Valid values: 1 to 100. |
10 |
| PageNumber |
integer |
No |
The page number in a paging query. |
1 |
| ClientToken |
string |
No |
Ensures the idempotence of the request. The value is generated from your client and must be unique among different requests. ClientToken can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
0c593ea1-3bea-11e9-b96b-88e9fe63**** |
| Tag |
array<object> |
No |
The tag key-value pairs. Valid values of N: 1 to 20. |
|
|
object |
No |
The tag. |
||
| Key |
string |
Yes |
The tag key of the resource. |
tag-key |
| Value |
string |
Yes |
The tag value of the resource. |
tag-value |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| Policies |
array<object> |
The list of policies. |
|
|
array<object> |
The policy details. |
||
| Name |
string |
The snapshot policy name. |
xxx |
| PolicyId |
string |
The snapshot policy ID. |
esp-xxx |
| TargetType |
string |
The type. Valid values:
|
DISK |
| State |
string |
The status. Valid values:
|
DISABLED |
| ManagedForEcs |
boolean |
The snapshot managed status. |
false |
| Desc |
string |
The snapshot policy description. |
xxx |
| Schedule |
object |
The snapshot policy schedule rule. |
|
| CronExpression |
string |
The cron expression. |
1 1 1 */1 * ? |
| RetainRule |
object |
The snapshot policy retention rule. |
|
| Number |
integer |
The number of snapshots to retain. |
10 |
| TimeInterval |
integer |
The time interval of the retention rule. The unit is specified by the TimeUnit parameter. The value must be greater than 1. |
14 |
| TimeUnit |
string |
The retention time unit. |
DAYS |
| StorageRule |
object |
The snapshot policy storage rule. |
|
| EnableImmediateAccess |
boolean |
Indicates whether instant access is enabled for snapshots. |
false |
| CrossRegionCopyInfo |
object |
The snapshot cross-region copy information. |
|
| Enabled |
boolean |
Indicates whether cross-region replication is enabled. |
true |
| Regions |
array<object> |
The destination region information. |
|
|
object |
The copy destination region information. |
||
| RegionId |
string |
The snapshot copy destination region. |
cn-hangzhou |
| RetainDays |
integer |
The number of days to retain snapshots at the destination region. |
7 |
| CreateTime |
string |
The creation time in UTC ISO 8601 format. |
2023-06-24T06:03:35Z |
| TargetCount |
integer |
The number of bound targets. |
10 |
| Tags |
array<object> |
the pair tags |
|
|
object |
|||
| TagKey |
string |
The tag key of the resource. |
key |
| TagValue |
string |
The tag value of the resource. |
value |
| ResourceGroupId |
string |
the resource group |
rg-xxx |
| SpecialRetainRules |
object |
The special retention rules for the snapshot policy. |
|
| Enabled |
boolean |
Indicates whether special retention is enabled. |
true |
| Rules |
array<object> |
The special retention rules. |
|
|
object |
The special retention rules. |
||
| SpecialPeriodUnit |
string |
The special period unit. |
WEEKS |
| TimeInterval |
integer |
The time interval of the retention rule. The unit is specified by the TimeUnit parameter. The value must be greater than 1. |
1 |
| TimeUnit |
string |
The retention time unit. |
WEEKS |
| DiskIds |
array |
The list of bound cloud disk IDs. |
|
|
string |
The cloud disk ID. |
"d-bp67acfmxazb4p****" |
|
| PageNumber |
integer |
The page number for paged queries. |
1 |
| PageSize |
integer |
The number of entries per page for paged queries. |
10 |
| TotalCount |
integer |
The total number of entries. |
10 |
| RequestId |
string |
The request ID. |
549BB71F-6778-53CE-AA73-E94ACE802AB4 |
| NextToken |
string |
The pagination token (Token) returned for the next query. |
AAAAAdDWBF2**** |
Examples
Success response
JSON format
{
"Policies": [
{
"Name": "xxx",
"PolicyId": "esp-xxx",
"TargetType": "DISK",
"State": "DISABLED",
"ManagedForEcs": false,
"Desc": "xxx",
"Schedule": {
"CronExpression": "1 1 1 */1 * ?"
},
"RetainRule": {
"Number": 10,
"TimeInterval": 14,
"TimeUnit": "DAYS"
},
"StorageRule": {
"EnableImmediateAccess": false
},
"CrossRegionCopyInfo": {
"Enabled": true,
"Regions": [
{
"RegionId": "cn-hangzhou",
"RetainDays": 7
}
]
},
"CreateTime": "2023-06-24T06:03:35Z",
"TargetCount": 10,
"Tags": [
{
"TagKey": "key",
"TagValue": "value"
}
],
"ResourceGroupId": "rg-xxx",
"SpecialRetainRules": {
"Enabled": true,
"Rules": [
{
"SpecialPeriodUnit": "WEEKS",
"TimeInterval": 1,
"TimeUnit": "WEEKS"
}
]
},
"DiskIds": [
"\"d-bp67acfmxazb4p****\"\n"
]
}
],
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 10,
"RequestId": "549BB71F-6778-53CE-AA73-E94ACE802AB4",
"NextToken": "AAAAAdDWBF2****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The parameter %s is invalid. | The specified parameter value is invalid. |
| 400 | InvalidParameter.Conflict | The specified parameter %s and %s are not blank at the same time. | |
| 400 | InvalidParameter.Format | Specified parameter format is not valid. | english description |
| 400 | MissingParameter | The input parameter %s that is mandatory for processing this request is not supplied. | The parameter must be specified. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. |
| 403 | Forbidden | User is not authorized to operate. | You are not authorized to manage the resource. Check the account permissions or contact the Alibaba Cloud account. |
| 403 | Forbidden.Action | User is not authorized to operate this action. | You are not authorized to perform this operation. Check the account permissions or contact the Alibaba Cloud account. |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | LastTokenProcessing | The last token request is processing. | The value of clientToken is used in another request that is being processed. Try again later. |
| 403 | NoPermission.SLR | The RAM user does not have the permission to create service linked role: AliyunServiceLinkedRoleForEBS. | You are not authorized to create service-linked roles. |
| 403 | OperationDenied | The operation is not allowed. | The operation is not supported. |
| 404 | InvalidApi.NotFound | Specified api is not found, please check your url and method. | |
| 404 | NoSuchResource | The specified resource does not exist. | The specified resource does not exist. |
| 504 | RequestTimeout | The request is timeout, please try again later. | The request has timed out. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.