Queries information about snapshots.
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 |
---|---|---|---|---|
ens:DescribeSnapshots | list | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
EnsRegionId | string | No | The region ID of the disk. You can call the DescribeRegions operation to query the most recent list of regions. | cn-hangzhou |
DiskId | string | No | The ID of the disk. | d-bp67acfmxazb4p**** |
InstanceId | string | No | The ID of the instance. | i-bp67acfmxazb4p**** |
SnapshotId | string | No | The ID of the snapshot. The value can be a JSON array that consists of up to 100 snapshot IDs. Separate the snapshot IDs with commas (,). | sp-bp67acfmxazb4p**** |
PageNumber | integer | No | The page number of the returned page. | 1 |
PageSize | integer | No | The number of entries per page. | 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Snapshots": [
{
"SnapshotId": "s-bp67acfmxazb4p****",
"CreationTime": "2020-08-20T14:52:28Z",
"Status": "available",
"Size": "40",
"SourceDiskId": "d-bp67acfmxazb4ph****",
"SourceDiskType": "1",
"SourceDiskCategory": "cloud_efficiency",
"SnapshotName": "testSnapshotName",
"Description": "testDescription",
"EnsRegionId": "cn-beijing-15",
"SourceSnapshotId": "s-bpdfer893jfkdqe****",
"SourceEnsRegionId": "cn-hangzhou-27"
}
],
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 1,
"RequestId": "9635ED2E-3103-1606-84D4-9F8E816B19F9"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter | The input parameter that is mandatory for processing this request is not supplied. | - |
400 | InstanceIdNotFound | The input parameter instancdId that is not found. | The specified instance ID does not exist. |
400 | NoPermission | Permission denied. | - |
400 | CallInterface | Call Interface Happen Error. | An error occurred when you call the operation. |
400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-19 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-01-22 | The Error code has changed | View Change Details |
2023-12-21 | The Error code has changed | View Change Details |