Home >Operation and Maintenance >Linux Operation and Maintenance >How to query the relationship chain composed of all snapshots of a disk

How to query the relationship chain composed of all snapshots of a disk

坏嘻嘻
坏嘻嘻Original
2018-09-21 16:53:412004browse

The content of this article is about how to query the relationship chain composed of all snapshots of a disk. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

DescribeSnapshotLinks

Query the disk snapshot chain. A snapshot chain is a relationship chain composed of all snapshots of a disk. One disk corresponds to a snapshot chain, so the snapshot chain ID is the disk ID.

Description

When calling this interface, you need to pay attention to:

The request parameters RegionId, DiskIds and InstanceId act as filters Device function, there is a logical AND relationship between parameters.

If no parameters are specified, the filter has no effect. When both DiskIds and SnapshotLinkIds are empty arrays, that is [], the filter is also considered valid, but the return result is empty.

Request parameters

How to query the relationship chain composed of all snapshots of a disk

##Return parameters

How to query the relationship chain composed of all snapshots of a disk

Example

Request Example

https://ecs.aliyuncs.com/?Action=DescribeSnapshotLinks
&RegionId=cn-beijing
&ZoneId=cn-beijing-btc-a01
&PageNumber=1
&<公共请求参数>

Return example

XML format

<DescribeSnapshotLinksResponse>
    <SnapshotLinks>
        <SnapshotLink>
            <SnapshotLinkId>d-25okbh2pj</SnapshotLinkId >
            <SourceDiskId>d-25okbh2pj</SourceDiskId>
            <SourceDiskType>data</SourceDiskType>
            <SourceDiskSize>20</SourceDiskSize>
            <RegionId> cn-beijing-btc-a01</RegionId>
            <TotalCount>1</TotalCount>
            <TotalSize>2097152</TotalSize>
        </SnapshotLink>
        <SnapshotLink>
            <SnapshotLinkId>d-2ze0y1jwzpb1geqxkroq</SnapshotLinkId >
            <SourceDiskId>d-2ze0y1jwzpb1geqxkroq</SourceDiskId>
            <SourceDiskType>system</SourceDiskType>
            <SourceDiskSize>40</SourceDiskSize>
            <RegionId> cn-beijing-btc-a01</RegionId>
            <TotalCount>1</TotalCount>
            <TotalSize>2097152</TotalSize>
         </SnapshotLink>
    </SnapshotLinks>
    <PageNumber>1</PageNumber>
    <PageSize>2</PageSize>
    <TotalCount>9</TotalCount>
    <RequestId>ED5CF6DD-71CA-462C-9C94-A61A78A01479</RequestId>
</DescribeSnapshotLinksResponse>

JSON format

{
    "SnapshotLinks": {
    "SnapshotLink": [
    {
        "SourceDiskSize": 20,
        "TotalSize": 2097152,
        "SourceDiskType": "data",
        "RegionId": "cn-beijing-btc-a01",
        "SnapshotLinkId": "d-25okbh2pj",
        "SourceDiskId": "d-25okbh2pj",
        "TotalCount": 1
    },
    {
        "SourceDiskSize": 40,
        "TotalSize": 2097152,
        "SourceDiskType": "data",
        "RegionId": "cn-beijing-btc-a01",
        "SnapshotLinkId": "d-2ze0y1jwzpb1geqxkroq",
        "SourceDiskId": "d-2ze0y1jwzpb1geqxkroq",
        "TotalCount": 1
    }
    ]
    },
    "PageNumber": 1,
    "PageSize": 2,
    "RequestId": "ACD9BBB0-A9D1-46D7-9630-B7A69889E110",
    "TotalCount": 9
}

Error code

The following are error codes unique to this interface. For more error codes, please visit the API Error Center.

How to query the relationship chain composed of all snapshots of a disk

The above is the detailed content of How to query the relationship chain composed of all snapshots of a disk. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn