All Products
Search
Document Center

Elastic Compute Service:DescribeAutoSnapshotPolicyEx

Last Updated:Mar 19, 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 ID of the automatic snapshot policy.

cn-hangzhou
AutoSnapshotPolicyIdstringNo

The name of the automatic snapshot policy.

sp-bp67acfmxazb4ph****
AutoSnapshotPolicyNamestringNo

The number of the page to return.

Page start from page 1.

Default value: 1.

TestName
PageNumberintegerNo

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

1
PageSizeintegerNo

The tags.

10
Tagobject []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. It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

KeystringNo

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. It can be up to 128 characters in length and cannot start with acs: or contain http:// or https://.

TestKey
ValuestringNo

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.
TestValue
ResourceGroupIdstringNo

The number of entries returned per page.

rg-aek2kkmhmhs****

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The ID of the request.

10
RequestIdstring

The page number of the returned page.

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

The total number of automatic snapshot policies.

1
TotalCountinteger

Details about the automatic snapshot policies.

1
AutoSnapshotPoliciesobject []

The points in time of the day at which to create automatic snapshots.

The time is displayed in UTC+8. Unit: hours. Valid values are 0 to 23, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. 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"].

TimePointsstring

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.

["1"]
CreationTimestring

The state 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.
2019-12-10T16:00Z
Statusstring

The name of the automatic snapshot policy.

Normal
AutoSnapshotPolicyNamestring
Note This parameter is in invitational preview and unavailable for general users.
testAutoSnapshotPolicyName
TargetCopyRegionsstring
Note This parameter is in invitational preview and unavailable for general users.
test
CopiedSnapshotsRetentionDaysinteger

The ID of the automatic snapshot policy.

0
AutoSnapshotPolicyIdstring

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

  • -1: The automatic snapshot is retained until it is deleted.
  • 1 to 65536: The automatic snapshot is retained for the specified number of days.
sp-bp67acfmxazb4ph****
RetentionDaysinteger

The region ID of the automatic snapshot policy.

7
RegionIdstring

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

cn-hangzhou
DiskNumsinteger
Note This parameter is in invitational preview and unavailable for general users.
1
EnableCrossRegionCopyboolean

The days of the week on which to create automatic snapshots. Valid values: 1 to 7, which correspond to the days of the week. 1 indicates Monday. One or more days can be specified.

false
RepeatWeekdaysstring

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

["6"]
VolumeNumsinteger

The ID of the resource group.

2
ResourceGroupIdstring

The tags of the automatic snapshot policy.

rg-aek2kkmhmhs****
Tagsobject []

The tag value of the automatic snapshot policy.

TagValuestring

The tag key of the automatic snapshot policy.

TestValue

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

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.