Queries the information about snapshots that are created for a simple application server.
Operation description
The InstanceId
, DiskId
, SnapshotIds
, and ResourceGroupId
parameters are optional. However, you can specify them as filter conditions and combine them with the logical AND operator to filter snapshots that you want to query.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
swas-open:ListSnapshots | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the simple application server that corresponds to the snapshots. | cn-hangzhou |
InstanceId | string | No | The ID of the simple application server. | 2ad1ae67295445f598017499dc**** |
DiskId | string | No | The disk ID. | d-bp14wq0149cpp2xy**** |
SnapshotIds | string | No | The snapshot IDs. The value can be a JSON array that consists of up to 100 snapshot IDs. Separate multiple snapshot IDs with commas (,). | ["s-bp16oazlsold4dks****", "s-bp16oazlsold4abc****"] |
PageSize | integer | No | The number of entries per page. Maximum value: 100. Default value: 10. | 10 |
PageNumber | integer | No | The page number. Default value: 1. | 1 |
SourceDiskType | string | No | The type of the source disk. Valid values:
| System |
Tag | array<object> | No | Tag N that you want to add to the snapshot. | |
object | No | The tags of the snapshot. | ||
Key | string | No | The key of tag N that you want to add to the snapshot. A tag key can be 1 to 64 characters in length. Valid values of N: 1 to 20. | TestKey |
Value | string | No | The value of tag N that you want to add to the snapshot. A tag value can be up to 64 characters in length. Valid values of N: 1 to 20. | TestValue |
ResourceGroupId | string | No | The ID of the resource group. | rg-aek2bti7cf7**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"TotalCount": 1,
"RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F",
"PageSize": 10,
"PageNumber": 1,
"Snapshots": [
{
"Status": "Accomplished",
"CreationTime": "2021-03-09T07:12:49Z",
"SourceDiskId": "d-bp14wq0149cpp2xy****",
"SnapshotName": "test-SnapshotName",
"Progress": "100%",
"Remark": "test-Remark",
"SnapshotId": "s-bp16oazlsold4dks****",
"SourceDiskType": "System",
"RegionId": "cn-hangzhou",
"InstanceId": "2ad1ae67295445f598017499dc****",
"Tags": [
{
"Key": "TestKey",
"Value": "TestValue"
}
],
"RollbackTime": "2021-03-09T07:12:49Z",
"ResourceGroupId": "rg-aek2bti7cf7****"
}
]
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | RegionIdNotMatchHost | The parameter regionId does not match the endpoint host. |
403 | InvalidParam | The specified parameter value is invalid. |
404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. |
404 | InvalidDiskId.NotFound | The specified DiskId does not exist. |
500 | InternalError | An error occurred while processing your request. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-29 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2024-02-20 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-09-20 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-09-18 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-05-25 | API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |