Queries the snapshot chains of disks. A snapshot chain consists of all snapshots of a disk. Each disk has one snapshot chain.
Operation description
Operation description
When you call this operation, take note of the following items:
-
Request parameters such as
RegionId,DiskIds, andInstanceIdact as filters. The logical AND operator is applied between these parameters. -
If you do not specify any parameters, the filters do not take effect. If both
DiskIdsandSnapshotLinkIdsare set to empty arrays, the filters are considered valid, but an empty result 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 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 up to 100 disk IDs at a time. Set the value of DiskIds to a JSON array. Separate multiple IDs with commas (,). |
["d-bp1d6tsvznfghy7y****", "d-bp1ippxbaql9zet7****", … "d-bp1ib7bcz07lcxa9****"] |
| SnapshotLinkIds |
string |
No |
The snapshot chain IDs. You can specify up to 100 snapshot chain IDs at a time. Set the value of SnapshotLinkIds to a JSON array. Separate multiple IDs with commas (,). |
["sl-bp1grgphbcc9brb5****", "sl-bp1c4izumvq0i5bs****", … "sl-bp1akk7isz866dds****"] |
| PageNumber |
integer |
No |
The page number of the snapshot chain list. Pages start from 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The paging Settings for the number of entries per page in a paged query. Valid values: 1 to 100. Default value: 10. |
50 |
| NextToken |
string |
No |
The pagination token. Set the value to the NextToken value returned from the last API call. |
caeba0bbb2be03f84eb48b699f0a**** |
| MaxResults |
integer |
No |
The paging Settings for the maximum number of entries per page in a paged query. Maximum value: 100. Default value:
|
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination token returned by the current call. |
caeba0bbb2be03f84eb48b699f0a**** |
| PageNumber |
integer |
The page number of the snapshot chain list. |
1 |
| PageSize |
integer |
The number of entries per page. |
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 snapshot chain type. 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 active. Valid values:
Note
This parameter is deprecated. Standard snapshots of enterprise SSD disks are upgraded to instant access by default. You do not need to perform additional configurations, and no additional fees are incurred. |
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. If the source disk of the snapshot is deleted, this field is still retained. |
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 disk 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 |
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 does not exist. Please verify the instance ID and the current region. | |
| 400 | InvalidRegionId | The specified parameter RegionId is not valid. Please call DescribeRegions to query the supported regions. | |
| 400 | InvalidSnapshotLinkIds | The specified parameter SnapshotLinkIds is not valid. Ensure the value is a valid list of snapshot link IDs. | |
| 400 | InvalidDiskIds | The specified parameter DiskIds is not valid. Ensure the value is a valid list of disk IDs. | |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.