All Products
Search
Document Center

:DescribeSnapshotsUsage

更新時間:Dec 11, 2023

Queries the number of snapshots that are stored in a region and the total size of the snapshots.

Usage notes

If you want to view the snapshot usage of each disk in the current region, we recommend that you call the DescribeSnapshotLinks operation to query snapshot chain information.

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 DescribeSnapshotsUsage

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

RegionId String Yes cn-hangzhou

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

Response parameters

Parameter

Type

Example

Description

SnapshotSize Long 122

The total size of snapshots stored in the current region. Unit: bytes.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

SnapshotCount Integer 5

The number of snapshots stored in the current region.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeSnapshotsUsage
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

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

<DescribeSnapshotsUsageResponse>
	<SnapshotCount>5</SnapshotCount>
	<SnapshotSize>122</SnapshotSize>    
    <RequestId>ED5CF6DD-71CA-462C-9C94-A61A78A01479</RequestId>
</DescribeSnapshotsUsageResponse>

JSON format

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

{
  "SnapshotCount" : "5",
  "SnapshotSize" : "122",
  "RequestId" : "ACD9BBB0-A9D1-46D7-9630-B7A69889E110"
}

Error codes

HTTP status code

Error code

Error message

Description

403 InvalidParam.RegionId The specified region is not exist. The specified region does not exist.

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