All Products
Search
Document Center

Elastic Compute Service:DescribeEnterpriseSnapshotPolicy

Last Updated:Aug 02, 2024

Queries the information about enterprise-level snapshot policies. When you call this operation, you can specify parameters, such as PolicyIds, ResourceGroupId, and Tag, in the request.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ebs:DescribeEnterpriseSnapshotPolicy
  • EnterpriseSnapshotPolicy
    acs:ebs:{#regionId}:{#accountId}:enterprisesnapshotpolicy/{#EnterpriseSnapshotPolicyId}
  • EnterpriseSnapshotPolicy
    acs:ebs:{#regionId}:{#accountId}:enterprisesnapshotpolicy/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
PolicyIdsarrayNo

The IDs of enterprise-level snapshot policies.

stringNo

The ID of the enterprise-level snapshot policy.

esp-xxx
DiskIdsarrayNo

The IDs of disks.

stringNo

The ID of the disk.

["d-bp67acfmxazb4p****","d-bp67acfmxazs5t****"]
ResourceGroupIdstringNo

The ID of the resource group.

xxx
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. If you specify NextToken, the PageSize and PageNumber request parameters do not take effect, and the TotalCount response parameter is invalid.

xxx
MaxResultsintegerNo

The maximum number of entries per page.

100
PageSizeintegerNo

The number of entries per page.

10
PageNumberintegerNo

The page number.

1
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

123e4567-e89b-12d3-a456-42665544****
Tagarray<object>No

The tags of the enterprise-level snapshot policies. Valid values of N: 1 to 20.

objectNo

The tag of the policy.

KeystringYes

The key of tag N of the enterprise-level snapshot policy.

tag-key
ValuestringYes

The value of tag N of the enterprise-level snapshot policy.

tag-value

Response parameters

ParameterTypeDescriptionExample
object

The response.

Policiesarray<object>

The returned snapshot policies.

object

Details about the snapshot policy.

Namestring

The name of the enterprise-level snapshot policy.

xxx
PolicyIdstring

The ID of the enterprise-level snapshot policy.

esp-xxx
TargetTypestring

The type of the enterprise-level snapshot policy.

DISK
Statestring

The status of the enterprise-level snapshot policy.

DISABLED
ManagedForEcsboolean

Indicates whether snapshots are managed.

false
Descstring

The description of the enterprise-level snapshot policy.

xxx
Scheduleobject

The scheduling rule of the enterprise-level snapshot policy.

CronExpressionstring

The cron expression of the enterprise-level snapshot policy.

1 1 1 */1 * ?
RetainRuleobject

The retention rule of the enterprise-level snapshot policy.

Numberinteger

The maximum number of snapshots that can be retained.

10
TimeIntervalinteger

The value of the retention period of snapshots.

14
TimeUnitstring

The unit of the retention period of snapshots.

DAYS
StorageRuleobject

The storage rule of snapshots in the enterprise-level snapshot policy.

EnableImmediateAccessboolean

Indicates whether the instant access feature is enabled.

false
CrossRegionCopyInfoobject

The replication rule of snapshots in the enterprise-level snapshot policy.

Enabledboolean

Indicates whether the cross-region replication feature is enabled.

true
Regionsarray<object>

The destination regions that store snapshot copies.

object

Destination region information.

RegionIdstring

The ID of the destination region.

cn-hangzhou
RetainDaysinteger

The retention period of snapshot copies in the destination region. Unit: day.

7
CreateTimestring

The time when the enterprise-level snapshot policy was created.

2023-06-24T06:03:35Z
TargetCountinteger

The number of objects that are associated with the enterprise-level snapshot policy.

10
Tagsarray<object>

the pair tags

object

The tag.

TagKeystring

The key of the tag of the enterprise-level snapshot policy.

key
TagValuestring

The value of the tag of the enterprise-level snapshot policy.

value
ResourceGroupIdstring

the resource group

rg-xxx
SpecialRetainRulesobject

The special retention rules of the enterprise-level snapshot policy.

Enabledboolean

Indicates whether the special retention period is enabled.

true
Rulesarray<object>

The special retention rules.

object

The special retention rule.

SpecialPeriodUnitstring

The unit of the special retention period.

WEEKS
TimeIntervalinteger

The value of the retention period.

1
TimeUnitstring

The unit of the retention period.

WEEKS
DiskIdsarray

The disks that are associated with the snapshot policy.

string

The ID of the disk.

["d-xxx"]
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
TotalCountlong

The total number of entries returned.

10
RequestIdstring

The request ID.

5CA35A83-8D8A-5B67-BAA0-2E124F194DA4
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.

AAAAAdDWBF2

Examples

Sample success responses

JSONformat

{
  "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-xxx\"]"
      ]
    }
  ],
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 10,
  "RequestId": "5CA35A83-8D8A-5B67-BAA0-2E124F194DA4",
  "NextToken": "AAAAAdDWBF2"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe parameter %s is invalid.The specified parameter value is invalid.
400InvalidParameter.ConflictThe specified parameter %s and %s are not blank at the same time.-
400InvalidParameter.FormatSpecified parameter format is not valid.english description
400MissingParameterThe input parameter %s that is mandatory for processing this request is not supplied.The parameter must be specified.
403ForbiddenUser is not authorized to operate.You are not authorized to manage the resource. Check the account permissions or contact the Alibaba Cloud account.
403Forbidden.ActionUser 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.
403InvalidAccountStatus.NotEnoughBalanceYour account does not have enough balance.-
403LastTokenProcessingThe last token request is processing.The value of clientToken is used in another request that is being processed. Try again later.
403NoPermission.SLRThe RAM user does not have the permission to create service linked role: AliyunServiceLinkedRoleForEBS.You are not authorized to create service-linked roles.
403OperationDeniedThe operation is not allowed.The operation is not supported.
404InvalidApi.NotFoundSpecified api is not found, please check your url and method.-
404NoSuchResourceThe specified resource does not exist.The specified resource does not exist.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred.
504RequestTimeoutThe request is timeout, please try again later.The request has timed out. Try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-08The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details