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:ListBucketInventorypermission. 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-tokenparameter for the next request.
Command syntax
ossutil api list-bucket-inventory --bucket <value> [--continuation-token <value>] [flags]| Parameter | Required | Type | Description |
|---|---|---|---|
--bucket | Yes | string | The name of the bucket to query. |
--continuation-token | No | string | The 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 examplebucketList inventories in JSON format:
ossutil api list-bucket-inventory --bucket examplebucket --output-format jsonList inventories in YAML format:
ossutil api list-bucket-inventory --bucket examplebucket --output-format yamlList inventories alphabetically after a given token:
ossutil api list-bucket-inventory --bucket examplebucket --continuation-token CgJiYw123