Queries the information about a bucket.
Usage notes
Only the owner of a bucket can query the information about the bucket. You can make a bucket information query from any Object Storage Service (OSS) endpoint.
To query the information about a bucket, you must have the
oss:GetBucketInfopermission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-bucket-info --bucket value [flags]Parameter | Type | Description |
--bucket | string | The name of the bucket. |
Note
For more information, see Command-line options.
Examples
Query the information about the examplebucket bucket.
ossutil api get-bucket-info --bucket examplebucketQuery the information about the examplebucket bucket and format the output in JSON.
ossutil api get-bucket-info --bucket examplebucket --output-format jsonQuery the information about the examplebucket bucket and format the output in YAML.
ossutil api get-bucket-info --bucket examplebucket --output-format yaml