Queries details about one or more snapshots that are created for a simple application server.

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.

QPS limits

The queries per second (QPS) limit for a single user for the API operation is 10 calls per minute. If the number of calls to the API operation per minute exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou

The region ID of the simple application server.

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 the 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.

Action String Yes ListSnapshots

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

Response parameters

Parameter Type Example Description
TotalCount Integer 1

The total number of snapshots.

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

The ID of the request.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

Snapshots Array of Snapshot

Details about the snapshots.

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

SourceDiskId String d-bp14wq0149cpp2xy****

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

SnapshotName String test-SnapshotName

The name of the snapshot.

Progress String 100%

The progress of snapshot creation.

Remark String test-Remark

The remarks of the snapshot.

SnapshotId String s-bp16oazlsold4dks****

The ID of the snapshot.

SourceDiskType String System

The type of the source disk. Valid values:

  • System: system disk
  • data: data disk
RegionId String cn-hangzhou

The ID of the region.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<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

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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
400 RegionIdNotMatchHost The parameter regionId does not match the endpoint host. The error message returned because the specified RegionId parameter does not match the service address that you selected.
403 InvalidParam The specified parameter value is invalid. The error message returned because a specified parameter is invalid.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The error message returned because the specified InstanceId parameter is invalid.
404 InvalidDiskId.NotFound The specified DiskId does not exist. The error message returned because the specified DiskId parameter is invalid.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket.

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