DescribeAutoSnapshotPolicyEx

更新时间:
复制 MD 格式

Queries the details of automatic snapshot policies that are created in a specific 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 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: ["0", "1", ... "23"].

["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: The automatic snapshot policy is normal.

  • Expire: The automatic snapshot policy cannot be used because your account has overdue payments.

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:

  • -1: Automatic snapshots are retained until they are deleted.

  • 1 to 65536: Auto snapshots are retained for the specified number of days. After the retention period of auto snapshots expires, the auto snapshots are automatically deleted.

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:

  • true

  • false

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

  • System: system-defined snapshot policy.

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.