All Products
Search
Document Center

Elastic Compute Service:DescribeSnapshotLinks

Last Updated:Nov 14, 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

Usage notes

Take note of the following items:

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeSnapshotLinksget
*All Resources
*
    none
none

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. Page starts 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
SnapshotLinkobject
InstantAccessboolean

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

  • true: The instant access feature is enabled. The feature can be enabled only for Enterprise SSDs (ESSDs).
  • false: The instant access feature is disabled. The snapshot is a standard snapshot for which the instant access feature is disabled.
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
TotalSizelong

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

2097152
SourceDiskNamestring

The name of the source disk.

testSourceDiskName
SourceDiskSizeinteger

The capacity 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 ID of the instance.

i-bp1h6jmbefj2cyqs****
SnapshotLinkIdstring

The ID of the snapshot chain.

sl-2ze0y1jwzpb1geqx****
TotalCountinteger

The total number of snapshots.

1
RegionIdstring

The region ID of the source disk.

cn-hangzhou
SourceDiskIdstring

The ID of the source disk. 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 chain. Valid values:

  • standard: standard snapshot chain.
  • archive: archive snapshot chain.
  • flash: instant access snapshot chain.
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.