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. To query the access tracking status using a RAM user or Security Token Service (STS), the RAM user or STS role must have the oss:GetBucketAccessMonitor permission. For more information, see Attach a custom policy to a RAM user.
Syntax
ossutil api get-bucket-access-monitor --bucket <bucket-name> [flags]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
--bucket | string | Yes | The name of the bucket. |
This command corresponds to the GetBucketAccessMonitor API operation. For parameter details, see GetBucketAccessMonitor. For supported global flags, see Global command-line options.Examples
Before running these examples, make sure ossutil is installed and configured with valid credentials.
Query the access tracking status of
examplebucket:ossutil api get-bucket-access-monitor --bucket examplebucketQuery and display the result in JSON format:
ossutil api get-bucket-access-monitor --bucket examplebucket --output-format jsonQuery and display the result in YAML format:
ossutil api get-bucket-access-monitor --bucket examplebucket --output-format yaml