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 such as
RegionId,DiskIds, andInstanceIdact as filters. Logical AND is used between these parameters. -
If you do not specify any parameters, the filters do not take effect. If
DiskIdsandSnapshotLinkIdsare both empty arrays, the filters are considered valid, but the response is empty.
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 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**** |
| PageSize |
integer |
The number of entries per page as specified in the request. |
50 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| PageNumber |
integer |
The page number of the snapshot chain list. |
1 |
| TotalCount |
integer |
The total number of snapshot chains. Note
When you use the |
9 |
| SnapshotLinks |
object |
||
| SnapshotLink |
array<object> |
The collection of snapshot chain information. |
|
|
object |
|||
| InstantAccess |
boolean |
Indicates whether the instant access feature is enabled. Valid values:
Note
This parameter is no longer used. By default, standard snapshots of ESSDs are upgraded to instant access snapshots free of charge without the need for additional configurations. For more information, see Use the instant access feature. |
false |
| TotalSize |
integer |
The total size of all snapshots in the snapshot chain. Unit: byte. |
2097152 |
| 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 |
| InstanceId |
string |
The ID of the instance. |
i-bp1h6jmbefj2cyqs**** |
| SnapshotLinkId |
string |
The ID of the snapshot chain. |
sl-2ze0y1jwzpb1geqx**** |
| TotalCount |
integer |
The total number of snapshots. |
1 |
| RegionId |
string |
The region ID of the source disk. |
cn-hangzhou |
| SourceDiskId |
string |
The ID of the source disk. This parameter is retained even if the source disk is deleted. |
d-bp1d6tsvznfghy7y**** |
| InstanceName |
string |
The name of the instance. |
testInstanceName |
| Category |
string |
The type of the snapshot chain. Valid values:
|
standard |
Examples
Success response
JSON format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.