All Products
Search
Document Center

Elastic Compute Service:DescribeAutoSnapshotPolicyEx

Last Updated:Apr 22, 2024

Queries existing automatic snapshot policies in a region.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the automatic snapshot policy. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
AutoSnapshotPolicyIdstringNo

The ID of the automatic snapshot policy.

sp-bp67acfmxazb4ph****
AutoSnapshotPolicyNamestringNo

The name of the automatic snapshot policy.

TestName
PageNumberintegerNo

The page number.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page.

Valid values: 1 to 100.

Default value: 10.

10
Tagobject []No

The tags of the automatic snapshot policy.

KeystringNo

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
ValuestringNo

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
ResourceGroupIdstringNo

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 parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

10
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
PageNumberinteger

The page number.

1
TotalCountinteger

The total number of automatic snapshot policies

1
AutoSnapshotPoliciesobject []

Details about the automatic snapshot policies.

TimePointsstring

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"]
CreationTimestring

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
Statusstring

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
AutoSnapshotPolicyNamestring

The name of the automatic snapshot policy.

testAutoSnapshotPolicyName
TargetCopyRegionsstring
Note This parameter is in invitational preview and is not publicly available.
test
CopiedSnapshotsRetentionDaysinteger
Note This parameter is in invitational preview and is not publicly available.
0
AutoSnapshotPolicyIdstring

The ID of the automatic snapshot policy.

sp-bp67acfmxazb4ph****
RetentionDaysinteger

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
RegionIdstring

The region ID of the automatic snapshot policy.

cn-hangzhou
DiskNumsinteger

The number of disks to which the automatic snapshot policy is applied.

1
EnableCrossRegionCopyboolean
Note This parameter is in invitational preview and is not publicly available.
false
RepeatWeekdaysstring

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"]
VolumeNumsinteger

The number of extended volumes to which the automatic snapshot policy is applied.

2
ResourceGroupIdstring

The ID of the resource group.

rg-aek2kkmhmhs****
Tagsobject []

The tags of the automatic snapshot policy.

TagValuestring

The tag value of the automatic snapshot policy.

TestValue
TagKeystring

The tag key of the automatic snapshot policy.

TestKey
CopyEncryptionConfigurationobject

Encryption configurations for cross-region snapshot replication.

Encryptedboolean

Whether to enable encryption for cross-region snapshot replication. Valid values:

  • true
  • false

Default value: false.

false
KMSKeyIdstring

The ID of the Key Management Service (KMS) key used to encrypt snapshots in cross-region snapshot replication.

0e478b7a-4262-4802-b8cb-00d3fb40****
Typestring

The type of the automatic snapshot policy. Valid values:

  • Custom: user-defined snapshot policy.
  • System: system-defined snapshot policy.
Custom

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidRegionId.NotFoundThe specified RegionId does not exist.The specified region ID does not exist.
400InvalidTag.MismatchThe 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.
400InvalidTagCountThe specified tags are beyond the permitted range.The number of specified tags exceeds the upper limit.

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

Change history

Change timeSummary of changesOperation
2024-02-28The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.
2024-02-02The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.