This topic describes how to call the DescribeSnapshotsUsage operation by using Alibaba Cloud command-line interface (CLI) to query the number of snapshots and the size of each snapshot in a region.

Background information

You can call the DescribeSnapshotsUsage operation to query the number of snapshots and the size of each snapshot in a region. 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 of snapshots and the size of each snapshot in China (Hangzhou).

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

Result

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