Queries the information of one or more snapshot-consistent groups, such as the status of the groups, IDs of the instances associated with the groups, and snapshot creation progress.
Operation description
You can specify multiple request parameters to be queried, such as InstanceId
, SnapshotGroupId.N
, and Status.N
. Specified parameters have logical AND relations. Only the specified parameters are included in the filter conditions.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ecs:DescribeSnapshotGroups | get | *SnapshotGroup acs:ecs:{#regionId}:{#accountId}:snapshotgroup/* *SnapshotGroup acs:ecs:{#regionId}:{#accountId}:snapshotgroup/{#snapshotgroupId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the snapshot-consistent group. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
InstanceId | string | No | The ID of the instance. | i-j6ca469urv8ei629**** |
Name | string | No | The name of the snapshot-consistent group. | testName |
NextToken | string | No | The token that determines the start point of the next query. Set the value to the NextToken value that is returned from the last call. | caeba0bbb2be03f84eb48b699f0a4883 |
MaxResults | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 10. | 10 |
SnapshotGroupId | array | No | The ID of snapshot-consistent group N. Valid values of N: 1 to 10. | |
string | No | The ID of snapshot-consistent group N. Valid values of N: 1 to 10. | ssg-j6ciyh3k52qp7ovm**** | |
Status | array | No | The state of snapshot-consistent group N. Valid values of the second N: 1, 2, and 3. Valid values:
| |
string | No | The state of snapshot-consistent group N. Valid values of the second N: 1, 2, and 3. Valid values:
| accomplished | |
AdditionalAttributes | array | No | This parameter is not publicly available. | |
string | No | Note
This parameter is not publicly available.
| hide | |
Tag | array<object> | No | The tags of the snapshot-consistent group. | |
object | No | The tags of the snapshot-consistent group. | ||
Key | string | No | The key of tag N of the snapshot-consistent group. Valid values of N: 1 to 20. | TestKey |
Value | string | No | The value of tag N of the snapshot-consistent group. Valid values of N: 1 to 20. | TestValue |
ResourceGroupId | string | No | The ID of the resource group to which the snapshot-consistent group belongs. | rg-bp67acfmxazb4p**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
"RequestId": "3F9A4CC4-362F-469A-B9EF-B3204EF8AA3A",
"SnapshotGroups": {
"SnapshotGroup": [
{
"Status": "accomplished",
"CreationTime": "2021-03-23T10:58:48Z",
"Description": "This is description.",
"ProgressStatus": "null",
"SnapshotGroupId": "ssg-j6ciyh3k52qp7ovm****",
"InstanceId": "i-j6ca469urv8ei629****",
"Name": "testName",
"ResourceGroupId": "rg-bp67acfmxazb4p****",
"Tags": {
"Tag": [
{
"Key": "TestKey",
"Value": "TestValue"
}
]
},
"Snapshots": {
"Snapshot": [
{
"SourceDiskId": "d-j6c3ogynmvpi6wy7****",
"Progress": "100%",
"Available": false,
"InstantAccessRetentionDays": 3,
"SnapshotId": "s-j6cbzmrlbf09w72q****",
"InstantAccess": true,
"SourceDiskType": "system",
"Tags": {
"Tag": [
{
"Key": "acs:ecs:createFrom",
"Value": "i-bp11qm0o3dk4iuc****"
}
]
}
}
]
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | InvalidStatus.ValueNotSupported | %s | The resource is in a state that does not support the current operation. |
403 | InvalidSnapshotGroupId.MustBeOne | The size of SnapshotGroupIds must be one when AdditionalAttributes has SNAPSHOT_GROUP_PROGRESS_STATUS. | - |
404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | The RegionId provided does not exist |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-18 | The Error code has changed. The response structure of the API has changed | View Change Details |