All Products
Search
Document Center

Elastic Compute Service:DescribeSnapshotLinks

Last Updated:Mar 13, 2024

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

When you call this operation, take note of the following items:

  • You can configure multiple request parameters, such as RegionId, DiskIds, and InstanceId, to query snapshot chains. The parameters have logical AND relations.
  • Only the configured parameters are used as filter conditions. If DiskIds and SnapshotLinkIds are set to empty JSON arrays, the values are considered as valid filter conditions. In this case, an empty result is returned.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the disk. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
InstanceIdstringNo

The instance ID.

i-bp1h6jmbefj2cyqs****
DiskIdsstringNo

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****"]
SnapshotLinkIdsstringNo

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****"]
PageNumberintegerNo

The page number. Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 100.

Default value: 10.

50

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

50
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
PageNumberinteger

The page number.

1
TotalCountinteger

The total number of entries returned.

9
InstantAccessboolean

Indicates whether the instant access feature is enabled. Valid values:

  • true: The instant access feature is enabled. This feature can be enabled only for enhanced SSDs (ESSDs).
  • false: The instant access feature is disabled. The snapshot is a normal snapshot for which the instant access feature is disabled.
false
TotalSizelong

The total size of all snapshots in the snapshot chain. Unit: bytes.

2097152
SourceDiskNamestring

The name of the source disk.

testSourceDiskName
SourceDiskSizeinteger

The size of the source disk. Unit: GiB.

40
SourceDiskTypestring

The type of the source disk. Valid values:

  • system: system disk
  • data: data disk
data
InstanceIdstring

The instance ID.

i-bp1h6jmbefj2cyqs****
SnapshotLinkIdstring

The snapshot chain IDs.

sl-2ze0y1jwzpb1geqx****
TotalCountinteger

The total number of snapshots.

1
RegionIdstring

The ID of the region where the source disk of the snapshot chain is located.

cn-hangzhou
SourceDiskIdstring

The source disk ID. This parameter is retained even if the source disk is deleted.

d-bp1d6tsvznfghy7y****
InstanceNamestring

The name of the instance.

testInstanceName
Categorystring

The type of the snapshot.

Note This parameter will be removed in the future. We recommend that you configure InstantAccess to ensure compatibility.
standard

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidInstanceId.NotFoundThe specified instanceId is not exists. -
400InvalidRegionIdThe specified regionId is invalid.The specified RegionId parameter is invalid.
400InvalidSnapshotLinkIdsThe specified snapshotLinkIds is invalid.The specified SnapshotLinkId parameter is invalid.
400InvalidDiskIdsThe specified diskIds is invalid.The specified DiskIds parameter is invalid.
500InternalErrorThe 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.