All Products
Search
Document Center

Object Storage Service:list-bucket-inventory

Last Updated:Mar 20, 2026

Lists all inventory configurations for a bucket.

Usage notes

  • By default, an Alibaba Cloud account has permission to list inventories of a bucket. To use a RAM user or Security Token Service (STS) to call this command, grant the oss:ListBucketInventory permission. For more information, see Attach a custom policy to a RAM user.

  • This command returns up to 100 inventory configurations per request. To query more than 100 inventories, send multiple requests and use the token returned from each request as the --continuation-token parameter for the next request.

Command syntax

ossutil api list-bucket-inventory --bucket <value> [--continuation-token <value>] [flags]
ParameterRequiredTypeDescription
--bucketYesstringThe name of the bucket to query.
--continuation-tokenNostringThe token from which the list operation starts.
The list-bucket-inventory command corresponds to the ListBucketInventory API operation. For supported global flags, see Global command-line options.

Examples

List all inventories in a bucket:

ossutil api list-bucket-inventory --bucket examplebucket

List inventories in JSON format:

ossutil api list-bucket-inventory --bucket examplebucket --output-format json

List inventories in YAML format:

ossutil api list-bucket-inventory --bucket examplebucket --output-format yaml

List inventories alphabetically after a given token:

ossutil api list-bucket-inventory --bucket examplebucket --continuation-token CgJiYw123