All Products
Search
Document Center

ENS:DescribeSnapshots

Last Updated:Dec 25, 2024

Queries information about snapshots.

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
ens:DescribeSnapshotslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EnsRegionIdstringNo

The region ID of the disk. You can call the DescribeRegions operation to query the most recent list of regions.

cn-hangzhou
DiskIdstringNo

The ID of the disk.

d-bp67acfmxazb4p****
InstanceIdstringNo

The ID of the instance.

i-bp67acfmxazb4p****
SnapshotIdstringNo

The ID of the snapshot. The value can be a JSON array that consists of up to 100 snapshot IDs. Separate the snapshot IDs with commas (,).

sp-bp67acfmxazb4p****
PageNumberintegerNo

The page number of the returned page.

1
PageSizeintegerNo

The number of entries per page.

10

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

Snapshotsarray<object>

The information about the snapshots.

Snapshotsobject
SnapshotIdstring

The ID of the snapshot.

s-bp67acfmxazb4p****
CreationTimestring

The creation time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2020-08-20T14:52:28Z
Statusstring

The status of the snapshot. Valid value:

  • creating: The snapshot is being created.
  • Available: The snapshot is available.
  • deleting: The snapshot is being deleted.
  • error: An error occurred on the snapshot.
available
Sizestring

The capacity of the disk. Unit: MiB.

40
SourceDiskIdstring

The ID of the source disk. This parameter is retained even after the source disk for which the snapshot was created is released.

d-bp67acfmxazb4ph****
SourceDiskTypestring

The type of the disk. Valid value:

  • 1: system disk
  • 2: data disk
1
SourceDiskCategorystring

The type of the disk. Valid value:

  • cloud_efficiency: ultra disk
  • cloud_ssd: all-flash disk
  • local_hdd: local HDD
  • local_ssd: local SSD
cloud_efficiency
SnapshotNamestring

The name of the snapshot. This parameter is returned only if a snapshot name was specified when the snapshot was created.

testSnapshotName
Descriptionstring

The description of the snapshot.

testDescription
EnsRegionIdstring

The ID of the edge node.

cn-beijing-15
SourceSnapshotIdstring

The ID of the source snapshot.

s-bpdfer893jfkdqe****
SourceEnsRegionIdstring

The ID of the source edge node.

cn-hangzhou-27
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries per page.

10
TotalCountinteger

The total number of snapshots.

1
RequestIdstring

The request ID.

9635ED2E-3103-1606-84D4-9F8E816B19F9

Examples

Sample success responses

JSONformat

{
  "Snapshots": [
    {
      "SnapshotId": "s-bp67acfmxazb4p****",
      "CreationTime": "2020-08-20T14:52:28Z",
      "Status": "available",
      "Size": "40",
      "SourceDiskId": "d-bp67acfmxazb4ph****",
      "SourceDiskType": "1",
      "SourceDiskCategory": "cloud_efficiency",
      "SnapshotName": "testSnapshotName",
      "Description": "testDescription",
      "EnsRegionId": "cn-beijing-15",
      "SourceSnapshotId": "s-bpdfer893jfkdqe****",
      "SourceEnsRegionId": "cn-hangzhou-27"
    }
  ],
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 1,
  "RequestId": "9635ED2E-3103-1606-84D4-9F8E816B19F9"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe input parameter that is mandatory for processing this request is not supplied.-
400InstanceIdNotFoundThe input parameter instancdId that is not found.The specified instance ID does not exist.
400NoPermissionPermission denied.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-11-19The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-22The Error code has changedView Change Details
2023-12-21The Error code has changedView Change Details