All Products
Search
Document Center

:DescribeSnapshotGroups

更新時間:Dec 20, 2023

Queries the details of snapshot-consistent groups.

Usage notes

You can specify multiple request parameters such as InstanceId, SnapshotGroupId.N, and Status.N to be queried. Specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeSnapshotGroups

The operation that you want to perform. Set the value to DescribeSnapshotGroups.

RegionId String Yes cn-hangzhou

The region ID of the snapshot-consistent groups. You can call the DescribeRegions operation to query the most recent region list.

InstanceId String No i-j6ca469urv8ei629****

The ID of the instance.

Name String No testName

The name of the snapshot-consistent group.

NextToken String No caeba0bbb2be03f84eb48b699f0a4883

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

MaxResults Integer No 10

The number of entries per page.

Valid values: 1 to 100.

Default value: 10.

SnapshotGroupId.N String No ssg-j6ciyh3k52qp7ovm****

The ID of snapshot-consistent group N. Valid values of N: 1 to 10.

Status.N String No accomplished

The status of snapshot-consistent group N. Valid values of N: 1 to 3. Valid values:

  • progressing: The snapshot-consistent group is being created.
  • accomplished: The snapshot-consistent group is created.
  • failed: The snapshot-consistent group fails to be created.
AdditionalAttributes.N String No null
Note This parameter is not publicly available.
Tag.N.Key String No TestKey

The key of tag N of the snapshot-consistent group. Valid values of N: 1 to 20.

Tag.N.Value String No TestValue

The value of tag N of the snapshot-consistent group. Valid values of N: 1 to 20.

ResourceGroupId String No rg-bp67acfmxazb4p****

The resource group ID of the snapshot-consistent group.

Response parameters

Parameter

Type

Example

Description

NextToken String caeba0bbb2be03f84eb48b699f0a4883

The pagination token. It can be used in the next request to retrieve a new page of results.

Note If this parameter is empty, no more data is returned.
RequestId String 3F9A4CC4-362F-469A-B9EF-B3204EF8AA3A

The ID of the request.

SnapshotGroups Array of SnapshotGroup

Details of the snapshot-consistent groups.

SnapshotGroup
Status String accomplished

The status of snapshot-consistent group N. Valid values:

  • progressing: The snapshot-consistent group is being created.
  • accomplished: The snapshot-consistent group is created.
  • failed: The snapshot-consistent group fails to be created.
CreationTime String 2021-03-23T10:58:48Z

The time when the snapshot-consistent group was created.

Description String This is description.

The description of the snapshot-consistent group.

ProgressStatus String null
Note This parameter is not publicly available.
SnapshotGroupId String ssg-j6ciyh3k52qp7ovm****

The snapshot-consistent group ID.

InstanceId String i-j6ca469urv8ei629****

The instance ID of the snapshot-consistent group. This parameter has a value only when all disk snapshots in the snapshot-consistent group belong to the same instance. If disk snapshots in the snapshot-consistent group belong to different instances, you can use parameters starting with Snapshots.Snapshot.Tags. in the response to view the ID of the instance to which each snapshot in the snapshot-consistent group belongs.

Name String testName

The name of the snapshot-consistent group.

ResourceGroupId String rg-bp67acfmxazb4p****

The ID of the resource group to which the snapshot-consistent group belongs.

Tags Array of Tag

The tags of the snapshot-consistent group.

Tag
Key String TestKey

The tag key of the snapshot-consistent group.

Value String TestValue

The tag value of the snapshot-consistent group.

Snapshots Array of Snapshot

Details of the snapshots in the snapshot-consistent group.

Snapshot
SourceDiskId String d-j6c3ogynmvpi6wy7****

The ID of the source disk. This parameter is retained even after the source disk of the snapshot is released.

Progress String 100%

The progress of the snapshot creation task. Unit: percent (%).

Available Boolean false

Indicates whether the snapshot can be used to create or roll back disks. Valid values:

  • true
  • false
InstantAccessRetentionDays Integer 3

The retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.

SnapshotId String s-j6cbzmrlbf09w72q****

The snapshot ID.

InstantAccess Boolean true

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.
SourceDiskType String system

The type of the source disk. Valid values:

  • system: system disk
  • data: data disk
Tags Array of Tag

The tags of the snapshots in the snapshot-consistent group. The default value contains the details of the instance to which the snapshot-consistent group belongs.

Tag
Key String acs:ecs:createFrom

The tag key of each snapshot in the snapshot-consistent group. The default values of Key and Value contain the details of the instance to which the snapshot-consistent group belongs.

Value String i-bp11qm0o3dk4iuc****

The tag value of each snapshot in the snapshot-consistent group. The default values of Key and Value contain the details of the instance to which the snapshot-consistent group belongs.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeSnapshotGroups
&RegionId=cn-hangzhou
&SnapshotGroupId.1=ssg-j6ciyh3k52qp7ovm****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeSnapshotGroupsResponse>
    <NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
    <RequestId>3F9A4CC4-362F-469A-B9EF-B3204EF8AA3A</RequestId>
    <SnapshotGroups>
        <SnapshotGroup>
            <Status>accomplished</Status>
            <Description>This is description.</Description>
            <InstanceId/>
            <CreationTime>2021-03-23T10:58:48Z</CreationTime>
            <SnapshotGroupId>ssg-j6ciyh3k52qp7ovm****</SnapshotGroupId>
            <ResourceGroupId>rg-bp67acfmxazb4p****</ResourceGroupId>
            <Name>testName</Name>
            <Tags>
                <Tag>
                    <Value>TestValue</Value>
                    <Key>TestKey</Key>
                </Tag>
            </Tags>
            <Snapshots>
                <Snapshot>
                    <SnapshotId>s-j6cbzmrlbf09w72q****</SnapshotId>
                    <Progress>100%</Progress>
                    <Available>false</Available>
                    <InstantAccessRetentionDays>3</InstantAccessRetentionDays>
                    <SourceDiskType>system</SourceDiskType>
                    <SourceDiskId>d-j6c3ogynmvpi6wy7****</SourceDiskId>
                    <Tags>
                        <Tag>
                            <Value>i-bp11qm0o3dk4iuc****</Value>
                            <Key>acs:ecs:createFrom</Key>
                        </Tag>
                    </Tags>
                </Snapshot>
                <Snapshot>
                    <SnapshotId>s-bp1fgrjucs8wr31****</SnapshotId>
                    <Progress>100%</Progress>
                    <SourceDiskType>system</SourceDiskType>
                    <SourceDiskId>d-bp1bcsu5leotddp****</SourceDiskId>
                    <Tags>
                        <Tag>
                            <Value>i-bp1emqgxsg88zdl****</Value>
                            <Key>acs:ecs:createFrom</Key>
                        </Tag>
                    </Tags>
                </Snapshot>
            </Snapshots>
        </SnapshotGroup>
    </SnapshotGroups>
</DescribeSnapshotGroupsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "NextToken" : "caeba0bbb2be03f84eb48b699f0a4883",
  "RequestId" : "3F9A4CC4-362F-469A-B9EF-B3204EF8AA3A",
  "SnapshotGroups" : {
    "SnapshotGroup" : [ {
      "Status" : "accomplished",
      "Description" : "This is description.",
      "InstanceId" : "",
      "CreationTime" : "2021-03-23T10:58:48Z",
      "SnapshotGroupId" : "ssg-j6ciyh3k52qp7ovm****",
      "ResourceGroupId" : "rg-bp67acfmxazb4p****",
      "Name" : "testName",
      "Tags" : {
        "Tag" : [ {
          "Value" : "TestValue",
          "Key" : "TestKey"
        } ]
      },
      "Snapshots" : {
        "Snapshot" : [ {
          "SnapshotId" : "s-j6cbzmrlbf09w72q****",
          "Progress" : "100%",
          "Available" : "false",
          "InstantAccessRetentionDays" : 3,
          "SourceDiskType" : "system",
          "SourceDiskId" : "d-j6c3ogynmvpi6wy7****",
          "Tags" : {
            "Tag" : [ {
              "Value" : "i-bp11qm0o3dk4iuc****",
              "Key" : "acs:ecs:createFrom"
            } ]
          }
        }, {
          "SnapshotId" : "s-bp1fgrjucs8wr31****",
          "Progress" : "100%",
          "SourceDiskType" : "system",
          "SourceDiskId" : "d-bp1bcsu5leotddp****",
          "Tags" : {
            "Tag" : [ {
              "Value" : "i-bp1emqgxsg88zdl****",
              "Key" : "acs:ecs:createFrom"
            } ]
          }
        } ]
      }
    } ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

403 InvalidStatus.ValueNotSupported %s This operation cannot be performed on the resource in the current state.

For a list of error codes, see Service error codes.