This topic describes how to call the DescribeSnapshotsUsage operation by using Alibaba Cloud CLI to query the number and the total size of snapshots in a region.

Background information

We recommend that you read the description of the operation before you call the operation. For more information, see DescribeSnapshotsUsage.

When you call an API operation through Alibaba Cloud CLI, make sure that request parameter values of different data types are in required formats. For more information, see Parameter format overview.

Request examples

Query the number and the total size of snapshots in the China (Hangzhou) region.

aliyun ecs DescribeSnapshotsUsage --RegionId cn-hangzhou --output cols=SnapshotSize,SnapshotCount

Result

SnapshotSize | SnapshotCount
------------ | -------------
360215216128 | 72