Queries details about one or more created snapshots.

Description

You can specify multiple request parameters such as InstanceId, DiskId, and SnapshotIds to be queried. Specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListSnapshots

The operation that you want to perform. Set the value to ListSnapshots.

RegionId String Yes cn-hangzhou

The region ID of the simple application server to which the snapshot corresponds.

InstanceId String No 2ad1ae67295445f598017499dc****

The ID of the simple application server.

DiskId String No d-bp14wq0149cpp2xy****

The ID of the source disk.

SnapshotIds String No ["s-bp16oazlsold4dks****", "s-bp16oazlsold4abc****"]

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

PageSize Integer No 10

The number of entries to return on each page. Maximum value: 100.

Default value: 10.

PageNumber Integer No 1

The number of the page to return.

Default value: 1.

Response parameters

Parameter Type Example Description
Snapshots Array of Snapshot

Details about the snapshots.

CreationTime String 2021-03-09T07:12:49Z

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

Progress String 100%

The progress of snapshot creation.

RegionId String cn-hangzhou

The ID of the region.

Remark String test-Remark

The remarks of the snapshot.

SnapshotId String s-bp16oazlsold4dks****

The ID of the snapshot.

SnapshotName String test-SnapshotName

The name of the snapshot.

SourceDiskId String d-bp14wq0149cpp2xy****

The ID of the source disk. This parameter has a value even after the source disk is released.

SourceDiskType String System

The type of the source disk. Valid values:

  • System: system disk
  • data: data disk
Status String Accomplished

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.
TotalCount Integer 1

The total number of snapshots.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

RequestId String 20758A-585D-4A41-A9B2-28DA8F4F534F

The ID of the request.

Examples

Sample requests

https://swas.cn-hangzhou.aliyuncs.com/?Action=ListSnapshots
&DiskId=d-bp14wq0149cpp2xy****
&<Common request parameters>

Sample success responses

XML format

<ListSnapshotsResponse>
      <TotalCount>1</TotalCount>
      <RequestId>20758A-585D-4A41-A9B2-28DA8F4F534F</RequestId>
      <PageSize>10</PageSize>
      <PageNumber>1</PageNumber>
      <Snapshots>
            <Status>Accomplished</Status>
            <SnapshotId>s-bp16oazlsold4dks****</SnapshotId>
            <Progress>100%</Progress>
            <CreationTime>2021-03-09T07:12:49Z</CreationTime>
            <RegionId>cn-hangzhou</RegionId>
            <SourceDiskType>System</SourceDiskType>
            <SnapshotName>test-SnapshotName</SnapshotName>
            <SourceDiskId>d-bp14wq0149cpp2xy****</SourceDiskId>
            <Remark>test-Remark</Remark>
      </Snapshots>
</ListSnapshotsResponse>

JSON format

{
  "TotalCount": 1,
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F",
  "PageSize": 10,
  "PageNumber": 1,
  "Snapshots": [
    {
      "Status": "Accomplished",
      "SnapshotId": "s-bp16oazlsold4dks****",
      "Progress": "100%",
      "CreationTime": "2021-03-09T07:12:49Z",
      "RegionId": "cn-hangzhou",
      "SourceDiskType": "System",
      "SnapshotName": "test-SnapshotName",
      "SourceDiskId": "d-bp14wq0149cpp2xy****",
      "Remark": "test-Remark"
    }
  ]
}

Error codes

HTTP status code Error code Error message Description
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The error message returned because the specified InstanceId parameter does not exist.
404 InvalidDiskId.NotFound The specified DiskId does not exist. The error message returned because the specified DiskId parameter does not exist.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the error persists, submit a ticket.
403 InvalidParam The specified parameter value is invalid. The error message returned because a specified parameter is invalid.

For a list of error codes, visit the API Error Center.