All Products
Search
Document Center

Elastic Compute Service:DescribeSnapshots

Last Updated:Jun 26, 2026

Queries the snapshot list of a disk, such as snapshot status, remaining time for a snapshot being created, and automatic snapshot retention days.

Operation description

InstanceId, DiskId, and SnapshotIds are not required request parameters, but you can use them to build filter logic. These parameters are evaluated with a logical AND relationship.

When you invoke this operation by using Cloud Assistant CLI, request parameters of different data types must follow specific format requirements. For details, see CLI parameter format.

Request examples:

Query the snapshot list of all disks of an ECS instance in the China (Hangzhou) region

.
RegionId:  ap-southeast-1,   //Specify the region.
InstanceId:  i-bp1fh7by6d9mw7zr****   //Specify the instance ID to query.

.

Query the snapshot information of a specific disk in the China (Hangzhou) region

.
RegionId:  ap-southeast-1,   //Specify the region.
DiskId:   d-bp10e7ej8z743dmu****   //Specify the disk ID to query.
.

Query the information of two snapshots in the China (Hangzhou) region by snapshot ID

.
RegionId:  ap-southeast-1,   //Specify the region.
SnapshotIds:   ["d-bp10e7ej8z743dmu****", "s-bp19vd1lorzgzt2s****"]   //Specify the snapshot ID array to query.

.

Query the snapshot information created after a specific point in time in the China (Hangzhou) region

.
RegionId:  ap-southeast-1,   //Specify the region.
Filter.1.Key:   CreationStartTime,   //Specify the filter key for the creation start time.
Filter.1.Value:   2024-11-27T00:00Z.

.

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:DescribeSnapshots

get

Snapshot

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

Snapshot

acs:ecs:{#regionId}:{#accountId}:snapshot/{#snapshotId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

No

The instance ID. Specify this parameter to query snapshot information of disks attached to the specified instance.

i-bp67acfmxazb4p****

DiskId

string

No

The ID of the disk.

d-bp67acfmxazb4p****

SnapshotLinkId

string

No

The ID of the snapshot chain.

sl-bp1grgphbcc9brb5****

RegionId

string

Yes

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

cn-hangzhou

SnapshotIds

string

No

The IDs of snapshots. The value is a JSON array that consists of up to 100 snapshot IDs. Separate the IDs with commas (,).

["s-bp67acfmxazb4p****", "s-bp67acfmxazb5p****", … "s-bp67acfmxazb6p****"]

PageNumber

integer

No

Note

This parameter is about to be deprecated. Use NextToken and MaxResults for paging query operations.

1

PageSize

integer

No

Note

This parameter is about to be deprecated. Use NextToken and MaxResults for paging query operations.

10

NextToken

string

No

The pagination token. Obtained from the response of the previous request.

caeba0bbb2be03f84eb48b699f0a4883

MaxResults

integer

No

The maximum number of entries per page for a paging query. Maximum value: 100.

Default value: 10.

10

SnapshotName

string

No

The name of the snapshot.

testSnapshotName

Status

string

No

The status of the snapshot. Valid values:

  • progressing: The snapshot is being created.

  • accomplished: The snapshot is created.

  • failed: The snapshot failed to be created.

  • all (default): all snapshot statuses.

all

SnapshotType

string

No

The type of automatic creation. Valid values:

  • auto: automatic snapshot.

  • user: manual snapshot.

  • all (default): all automatic creation types.

all

Filter.1.Key

string

No

The filter key used to query resources. Set the value to CreationStartTime. When you specify both Filter.1.Key and Filter.1.Value, you can query resources created after the specified point in time.

CreationStartTime

Filter.2.Key

string

No

The filter key used to query resources. Set the value to CreationEndTime. When you specify both Filter.2.Key and Filter.2.Value, you can query resources created before the specified point in time.

CreationEndTime

Filter.1.Value

string

No

The filter value used to query resources. When you specify this parameter, you must also specify Filter.1.Key. Specify the time in the yyyy-MM-ddTHH:mmZ format in UTC.

2019-12-13T17:00Z

Filter.2.Value

string

No

The filter value used to query resources. When you specify this parameter, you must also specify Filter.2.Key. Specify the time in the yyyy-MM-ddTHH:mmZ format in UTC.

2019-12-13T22:00Z

Usage

string

No

Specifies whether the snapshot has been used to create images or disks. Valid values:

  • image: The snapshot has been used to create custom images.

  • disk: The snapshot has been used to create disks.

  • image_disk: The snapshot has been used to create both data disks and custom images.

  • none: The snapshot has not been used.

none

SourceDiskType

string

No

The type of the source disk. Valid values:

  • system: system disk.

  • data: data disk.

Note

The value is case-insensitive.

system

Encrypted

boolean

No

Specifies whether to filter encrypted snapshots. Default value: false.

false

ResourceGroupId

string

No

The ID of the resource group. When you use this parameter to filter resources, the resource count cannot exceed 1000.

Note

Filtering by default resource group is not supported.

rg-bp67acfmxazb4p****

DryRun

boolean

No

Specifies whether to perform only a dry run, without performing the actual request.

  • true: sends a check request without querying resource status. The check items include whether your AccessKey pair is valid, whether Resource Access Management (RAM) user authorization is valid, and whether the required parameters are specified. If the check fails, the corresponding error is returned. If the check succeeds, the DryRunOperation error code is returned.

  • false (default): sends a normal request. After the check succeeds, a 2xx HTTP status code is returned and the resource status is queried.

false

KMSKeyId

string

No

The ID of the Key Management Service (KMS) key used by the data disk.

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

Category

string

No

The category of the snapshot. Valid values:

  • Standard: Normal snapshot.

  • Flash: local snapshot. This value is about to be deprecated. Local snapshots have been replaced by the snapshot instant access feature. The metric description is as follows:
    • If you used local snapshots before December 14, 2020, you can use this parameter as it is still active.

    • If you did not use local snapshots before December 14, 2020, you cannot use this parameter.

  • archive: archive snapshot.

Standard

Tag

array<object>

No

The tags.

object

No

key

string

No

The tag key of the resource.

Note

For better compatibility, use Tag.N.Key instead.

SnapshotTest

Key

string

No

The tag key of the snapshot. Valid values of N: 1 to 20.

If you use a single tag to filter resources, the resource count with the specified tag cannot exceed 1000. If you use multiple tags to filter resources, the resource count with all specified tags attached cannot exceed 1000. If the resource count exceeds 1000, call the ListTagResources operation.

TestKey

Value

string

No

The tag value of the snapshot. Valid values of N: 1 to 20.

TestValue

value

string

No

The tag value of the resource.

Note

For better compatibility, use Tag.N.Value instead.

SnapshotTest

Response elements

Element

Type

Description

Example

object

NextToken

string

The pagination token for the next query.

caeba0bbb2be03f84eb48b699f0a4883

PageSize

integer

Note

This parameter is about to be deprecated. Use NextToken and MaxResults for paging query operations.

10

PageNumber

integer

Note

This parameter is about to be deprecated. Use NextToken and MaxResults for paging query operations.

1

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

The total number of snapshots.

Note

When you use the MaxResults and NextToken parameters for paging queries, the returned TotalCount parameter value is invalid.

1

Snapshots

object

Snapshot

array<object>

The snapshot details.

array<object>

Status

string

The status of the snapshot. Valid values:

  • progressing: The snapshot is being created.

  • accomplished: The snapshot is successfully created.

  • failed: Snapshot creation failed.

accomplished

CreationTime

string

The time when the snapshot was created. The time follows the ISO 8601 standard and is displayed in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

2020-08-20T14:52:28Z

Progress

string

The progress of snapshot creation, as a percentage.

100%

InstantAccess

boolean

Indicates whether the instant access feature is enabled. Valid values:

  • true: The feature is enabled. The instant access feature is enabled by default for snapshots of ESSD cloud disks and ESSD Entry cloud disks.

  • false: The feature is disabled, and the snapshot is a standard snapshot.

Note

This parameter is deprecated. Standard snapshots of ESSD cloud disks are instant access-enabled by default. You do not need to configure this feature, and no extra fees are incurred.

false

Available

boolean

Indicates whether the snapshot can be used to create a cloud disk or roll back a cloud disk. Valid values:

  • true: The snapshot is available.

  • false: The snapshot is unavailable.

false

RemainTime

integer

The time remaining to create the snapshot, in seconds.

38

SourceDiskSize

string

The size of the source cloud disk, in GiB.

40

RetentionDays

integer

The retention period of the automatic snapshot, in days.

30

SourceDiskType

string

The type of the source cloud disk. Valid values:

  • system: system disk

  • data: data disk

system

SourceStorageType

string

The category of the source disk.

Note

This parameter is deprecated. We recommend that you use other parameters to ensure compatibility.

disk

Usage

string

Indicates whether the snapshot was used to create a custom image or cloud disk. Valid values:

  • image: The snapshot was used to create a custom image.

  • disk: The snapshot was used to create a cloud disk.

  • image_disk: The snapshot was used to create a custom image and data disks.

  • none: The snapshot is not in use.

image

LastModifiedTime

string

The time when the snapshot was last modified. The time follows the ISO 8601 standard and is displayed in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

2020-08-25T14:18:09Z

Encrypted

boolean

Indicates whether the snapshot is encrypted. Valid values:

  • true: The snapshot is encrypted.

  • false: The snapshot is not encrypted.

false

SnapshotType

string

The method used to create the snapshot. Valid values:

  • auto or timer: an automatic snapshot.

  • user: a manual snapshot.

  • all: all snapshot creation methods.

all

SourceDiskId

string

The ID of the source disk is retained even after the source disk is released.

d-bp67acfmxazb4ph****

SnapshotName

string

The name of the snapshot. Returned only if a name was specified during creation.

testSnapshotName

InstantAccessRetentionDays

integer

The retention period of the instant access feature. After the retention period ends, the instant access feature is automatically disabled.

By default, the value of this parameter is the same as the value of RetentionDays.

Note

This parameter is deprecated. Standard snapshots of ESSD cloud disks are instant access-enabled by default. You do not need to configure this feature, and no extra fees are incurred.

30

Description

string

The description of the snapshot.

testDescription

SnapshotId

string

The snapshot ID.

s-bp67acfmxazb4p****

RegionId

string

The ID of the region in which the snapshot resides.

cn-hangzhou

ResourceGroupId

string

The ID of the resource group to which the snapshot belongs.

rg-bp67acfmxazb4p****

Category

string

The category of the snapshot. Valid values:

  • Standard: standard snapshot.

  • Flash: local snapshot. This value is deprecated. The local snapshot feature has been replaced by the instant access feature.

  • archive: archive snapshot.

standard

KMSKeyId

string

The ID of the KMS key that is used to encrypt the snapshot.

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

SnapshotSN

string

The serial number of the snapshot.

64472-116742336-61976****

ProductCode

string

The product code inherited from the Marketplace image.

jxsc000****

SourceSnapshotId

string

The ID of the source snapshot.

s-bp67acfmxazb4p****

SourceRegionId

string

The ID of the snapshot's source region.

cn-hangzhou

FullSnapshotSizeInBytes

integer

The size of the full snapshot in bytes.

65535

Tags

object

The tags of the snapshot.

Tag

array<object>

An array of tags.

object

TagValue

string

The value of the tag.

TestValue

TagKey

string

The key of the tag.

TestKey

SnapshotLinkId

string

The ID of the snapshot chain to which the snapshot belongs.

sl-bp1grgphbcc9brb5****

Examples

Success response

JSON format

{
  "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
  "PageSize": 10,
  "PageNumber": 1,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount": 1,
  "Snapshots": {
    "Snapshot": [
      {
        "Status": "accomplished",
        "CreationTime": "2020-08-20T14:52:28Z",
        "Progress": "100%",
        "InstantAccess": false,
        "Available": false,
        "RemainTime": 38,
        "SourceDiskSize": "40",
        "RetentionDays": 30,
        "SourceDiskType": "system",
        "SourceStorageType": "disk",
        "Usage": "image",
        "LastModifiedTime": "2020-08-25T14:18:09Z",
        "Encrypted": false,
        "SnapshotType": "all",
        "SourceDiskId": "d-bp67acfmxazb4ph****",
        "SnapshotName": "testSnapshotName",
        "InstantAccessRetentionDays": 30,
        "Description": "testDescription",
        "SnapshotId": "s-bp67acfmxazb4p****",
        "RegionId": "cn-hangzhou",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "Category": "standard",
        "KMSKeyId": "0e478b7a-4262-4802-b8cb-00d3fb40****",
        "SnapshotSN": "64472-116742336-61976****",
        "ProductCode": "jxsc000****",
        "SourceSnapshotId": "s-bp67acfmxazb4p****",
        "SourceRegionId": "cn-hangzhou",
        "FullSnapshotSizeInBytes": 65535,
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestValue",
              "TagKey": "TestKey"
            }
          ]
        },
        "SnapshotLinkId": "sl-bp1grgphbcc9brb5****"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

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.
500 InternalError The request processing has failed due to some unknown error.
403 InvalidSnapshotIds.Malformed The amount of specified specified snapshot Ids exceeds the limit.
403 InvalidSnapshotCategory.Malformed The specified Category is not valid. The specified Category parameter is invalid.
403 InvalidCategory.SnapshotLinkMismatch The specified category does not match the actual category of the snapshot link. The specified category does not match the snapshot chain.
404 InvalidFilterKey.NotFound The specified FilterKey is not found. The specified filter key does not exist.
404 InvalidFilterValue The specified FilterValue exceeds the limit. The specified filter value is invalid.
404 InvalidUsage The specifed Usage is not valid. The specified Usage parameter is invalid.
404 InvalidSourceDiskType The specifed SourceDiskType is not valid.
404 InvalidStatus.NotFound The specified Status is not found.
404 InvalidSnapshotType.NotFound The specfied SnapshotType is not found.
404 InvalidSnapshotLinkId.NotFound The specified snapshot link is not found. The specified snapshot chain does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.