Queries snapshot chains of disks. A snapshot chain consists of all snapshots of a disk. Each disk corresponds to one snapshot chain.
Operation description
Operation description
When you call this operation, take note of the following items:
-
The request parameters RegionId, DiskIds, and InstanceId act as filters. These parameters have a logical AND relationship.
-
If you do not specify any parameters, the filters do not take effect. If DiskIds and SnapshotLinkIds are both empty arrays, the filters are considered valid, but an empty result set is returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeSnapshotLinks |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the disk. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| InstanceId |
string |
No |
The instance ID. |
i-bp1h6jmbefj2cyqs**** |
| DiskIds |
string |
No |
The IDs of disks. You can specify up to 100 disk IDs at a time. The DiskIds parameter is a JSON array. Separate multiple disk IDs with commas (,). |
["d-bp1d6tsvznfghy7y****", "d-bp1ippxbaql9zet7****", … "d-bp1ib7bcz07lcxa9****"] |
| SnapshotLinkIds |
string |
No |
The IDs of snapshot chains. You can specify up to 100 snapshot chain IDs at a time. The SnapshotLinkIds parameter is a JSON array. Separate multiple IDs with commas (,). |
["sl-bp1grgphbcc9brb5****", "sl-bp1c4izumvq0i5bs****", … "sl-bp1akk7isz866dds****"] |
| PageNumber |
integer |
No |
The page number of the disk status list. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page for a paged query. Valid values: 1 to 100. Default value: 10. |
50 |
| NextToken |
string |
No |
The pagination token. Set this parameter to the NextToken value returned in the previous API call. |
caeba0bbb2be03f84eb48b699f0a**** |
| MaxResults |
integer |
No |
The maximum number of entries per page for a paged query. Maximum value: 100. Default value:
|
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination token returned in this call. |
caeba0bbb2be03f84eb48b699f0a**** |
| PageNumber |
integer |
The page number of the snapshot chain list. |
1 |
| PageSize |
integer |
The number of entries per page that you specified in the request. |
50 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| SnapshotLinks |
object |
||
| SnapshotLink |
array<object> |
The collection of snapshot chain information. |
|
|
object |
|||
| Category |
string |
The type of the snapshot chain. Valid values:
|
standard |
| InstanceId |
string |
The instance ID. |
i-bp1h6jmbefj2cyqs**** |
| InstanceName |
string |
Instance name |
testInstanceName |
| InstantAccess |
boolean |
Indicates whether the snapshot instant access feature is enabled. Valid values:
Note
This parameter is deprecated. Standard snapshots of ESSD disks have been upgraded to instant access by default. No additional configuration or fees are required. |
false |
| RegionId |
string |
The region ID of the source disk of the snapshot chain. |
cn-hangzhou |
| SnapshotLinkId |
string |
The snapshot chain ID. |
sl-2ze0y1jwzpb1geqx**** |
| SourceDiskId |
string |
The source disk ID. This field is retained even if the source disk of the snapshot has been deleted. |
d-bp1d6tsvznfghy7y**** |
| SourceDiskName |
string |
The name of the source disk. |
testSourceDiskName |
| SourceDiskSize |
integer |
The capacity of the source disk. Unit: GiB. |
40 |
| SourceDiskType |
string |
The type of the source disk. Valid values:
|
data |
| TotalCount |
integer |
The total number of snapshots. |
1 |
| TotalSize |
integer |
The total size of all snapshots in the snapshot chain. Unit: bytes. |
2097152 |
| TotalCount |
integer |
The total number of snapshot chains. Note
When you use the MaxResults and NextToken parameters for paged query, the returned TotalCount value is invalid. |
9 |
Examples
Success response
JSON format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"PageNumber": 1,
"PageSize": 50,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"SnapshotLinks": {
"SnapshotLink": [
{
"Category": "standard",
"InstanceId": "i-bp1h6jmbefj2cyqs****",
"InstanceName": "testInstanceName",
"InstantAccess": false,
"RegionId": "cn-hangzhou",
"SnapshotLinkId": "sl-2ze0y1jwzpb1geqx****",
"SourceDiskId": "d-bp1d6tsvznfghy7y****",
"SourceDiskName": "testSourceDiskName",
"SourceDiskSize": 40,
"SourceDiskType": "data",
"TotalCount": 1,
"TotalSize": 2097152
}
]
},
"TotalCount": 9
}
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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.