All Products
Search
Document Center

Object Storage Service:get-bucket-access-monitor

Last Updated:Mar 20, 2026

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

ParameterTypeRequiredDescription
--bucketstringYesThe 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 examplebucket
  • Query and display the result in JSON format:

      ossutil api get-bucket-access-monitor --bucket examplebucket --output-format json
  • Query and display the result in YAML format:

      ossutil api get-bucket-access-monitor --bucket examplebucket --output-format yaml