All Products
Search
Document Center

Object Storage Service:get-bucket-access-monitor

Last Updated:Aug 23, 2024

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.

Note
  • 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 examplebucket
  • Run 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 json
  • Run 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