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