All Products
Search
Document Center

Elastic Compute Service:DescribeAutoSnapshotPolicyEx

Last Updated:Aug 07, 2026

Queries the details of automatic snapshot policies that are created in a specified region.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeAutoSnapshotPolicyEx

get

AutoSnapshotPolicy

acs:ecs:{#regionId}:{#accountId}:snapshotpolicy/*

AutoSnapshotPolicy

acs:ecs:{#regionId}:{#accountId}:snapshotpolicy/{#snapshotpolicyId}

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 ["0", "1", ... "23"]. A maximum of 24 points in time can be specified, separated by commas (,).

["1"]

RetentionDays

integer

The retention period of the automatic snapshot. Unit: days. Valid values:

  • -1: The snapshot is permanently retained.

  • 1 to 65536: The snapshot is retained for the specified number of days.

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: The policy is normal.

  • Expire: The policy cannot be used because the account has an overdue payment.

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:

  • true: Enabled.

  • false: Disabled.

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: a user-defined snapshot policy.

  • System: a system-defined 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.