Queries the snapshot chains of disks. A snapshot chain is a chain of all the snapshots created for a disk. A disk corresponds to a chain of snapshots.
Operation description
Usage notes
Take note of the following items:
- You can specify multiple request parameters, such as
RegionId
,DiskIds
, andInstanceId
, to query snapshot chains. Specified parameters have logical AND relations. - Only the specified parameters are used as filter conditions. If the
DiskIds
andSnapshotLinkIds
parameters are set to empty JSON arrays, the values are considered as valid filter conditions. In this case, an empty result is returned.
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 |
---|---|---|---|---|
ecs:DescribeSnapshotLinks | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the disk. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
InstanceId | string | No | The instance ID. | i-bp1h6jmbefj2cyqs**** |
DiskIds | string | No | The disk IDs. You can specify a JSON array that contains a maximum of 100 disk IDs. Separate the disk IDs with commas (,). | ["d-bp1d6tsvznfghy7y****", "d-bp1ippxbaql9zet7****", … "d-bp1ib7bcz07lcxa9****"] |
SnapshotLinkIds | string | No | The snapshot chain IDs. You can specify a JSON array that contains a maximum of 100 snapshot chain IDs. Separate the snapshot chain IDs with commas (,). | ["sl-bp1grgphbcc9brb5****", "sl-bp1c4izumvq0i5bs****", … "sl-bp1akk7isz866dds****"] |
PageNumber | integer | No | The page number. Page starts from page 1. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 10. | 50 |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageSize": 50,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageNumber": 1,
"TotalCount": 9,
"SnapshotLinks": {
"SnapshotLink": [
{
"InstantAccess": false,
"TotalSize": 2097152,
"SourceDiskName": "testSourceDiskName",
"SourceDiskSize": 40,
"SourceDiskType": "data",
"InstanceId": "i-bp1h6jmbefj2cyqs****",
"SnapshotLinkId": "sl-2ze0y1jwzpb1geqx****",
"TotalCount": 1,
"RegionId": "cn-hangzhou",
"SourceDiskId": "d-bp1d6tsvznfghy7y****",
"InstanceName": "testInstanceName",
"Category": "standard"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidInstanceId.NotFound | The specified instanceId is not exists. | - |
400 | InvalidRegionId | The specified regionId is invalid. | The specified RegionId parameter is invalid. |
400 | InvalidSnapshotLinkIds | The specified snapshotLinkIds is invalid. | The specified SnapshotLinkId parameter is invalid. |
400 | InvalidDiskIds | The specified diskIds is invalid. | The specified DiskIds parameter is invalid. |
500 | InternalError | The request processing has failed due to some unknown error. | An internal error has occurred. Try again later. |
For a list of error codes, visit the Service error codes.