Queries the logging configuration of a bucket.
Usage notes
By default, an Alibaba Cloud account has the permissions to query the logging configuration of a bucket. If you want to query the logging configuration of a bucket by using a RAM user or Security Token Service (STS), you must have the oss:GetBucketLogging
permission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-bucket-logging --bucket value [flags]
Parameter | Required | Description |
--bucket | string | The name of the bucket. |
The get-bucket-logging command corresponds to the GetBucketLogging operation.
For more information about supported global command-line options, see Global command-line options.
Examples
Query the logging configuration of a bucket named examplebucket.
ossutil api get-bucket-logging --bucket examplebucket
Query the logging configuration of a bucket named examplebucket and display the response in JSON format.
ossutil api get-bucket-logging --bucket examplebucket --output-format json
Query the logging configuration of a bucket named examplebucket and display the response in YAML format.
ossutil api get-bucket-logging --bucket examplebucket --output-format yaml