DescribeSnapshots
Description
Call the DescribeSnapshots to query all snapshots of an ECS instance or a cloud disk.
Request Method
POST
Request Path
/apsara/route/Ecs/DescribeSnapshots
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
Filter. 1.Key | BODY | string | No | CreationStartTime | filter key when querying resources. The value must be CreationStartTime. |
KMSKeyId | BODY | string | No | 0e478b7a-4262-4802-b8cb-00d3fb40**** | KMS key ID corresponding to the data disk. |
PageSize | BODY | integer | No | 10 | the number of rows per page set during paging query. Maximum value: 100 default value: 10 |
ResourceGroupId | BODY | string | No | rg-bp67acfmxazb4p**** | resource group ID. |
Encrypted | BODY | boolean | No | false | whether to filter encrypted snapshots. Default value: false |
SnapshotLinkId | BODY | string | No | sp-bp67acfmxazb4p**** | snapshot chain ID. |
DryRun | BODY | boolean | No | false | whether to precheck only this request. true: sends a check request and does not query the resource status. Check items include whether the AccessKey is valid, the authorization status of RAM users, and whether required parameters are filled in. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation will be returned. false (default): sends a normal request, returns a 2XX HTTP status code after checking and directly queries the resource status. |
SnapshotName | BODY | string | No | test-SnapshotName | snapshot name. |
PageNumber | BODY | integer | No | 1 | the page number of the snapshot list. Starting value: 1 default value: 1 |
Tag.N.Value | BODY | string | No | TestValue | the label value of the snapshot. Value range of n: 1~20 |
Filter. 1.Value | BODY | string | No | 2019-12-13T17:00Z | filter value when querying resources. The value must be the value of the start time (CreationStartTime) when the resource was created. |
Status | BODY | string | No | all | snapshot status. Value range: progressing: snapshot being created accomplished: create a successful snapshot failed: create failed snapshot all (default): all snapshot status |
Usage | BODY | string | No | none | whether snapshots are used to create images or cloud disks. Value range: image: created a custom image using a snapshot disk: created a cloud disk using a snapshot image_disk: using snapshots to create data disks and custom images none: Not used yet |
Tag.N.Key | BODY | string | No | TestKey | the tag key of the snapshot. Value range of n: 1~20 |
InstanceId | BODY | string | No | i-bp67acfmxazb4p**** | the specified instance ID. |
SnapshotIds | BODY | string | No | ["s-bp67acfmxazb4ph****", "s-bp67acfmxazb4pk ****",… "s-bp67acfmxazb4pj****"] | snapshot identification code. The value can be composed of multiple snapshot IDs to form a JSON array. Up to 100 IDs are supported. The IDs are separated by commas (,). |
version | BODY | string | No | 2016-01-01 | version of api |
Filter. 2.Key | BODY | string | No | CreationEndTime | filter key when querying resources. The value must be CreationEndTime. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
Filter. 2.Value | BODY | string | No | 2019-12-13T22:00Z | filter value when querying resources. The value must be the value of the end time (CreationEndTime) of resource creation. |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region ID to which the cloud disk belongs. You can call the DescribeRegions to view the latest Alibaba Cloud region list. |
SnapshotType | BODY | string | No | all | snapshot type. Value range: auto: automatic snapshot user: manually created snapshot all (default): all snapshot types |
SourceDiskType | BODY | string | No | Data | the cloud disk type of the snapshot source cloud disk. Value range: System: system disk Data: data disk |
DiskId | BODY | string | No | d-bp67acfmxazb4p**** | the specified cloud disk device ID. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}