All Products
Search
Document Center

Object Storage Service:get-bucket-request-payment

Last Updated:Aug 22, 2024

Queries the pay-by-requester configurations of a bucket.

Usage notes

By default, an Alibaba Cloud account has the permissions to query the pay-by-requester configurations of a bucket. If you want to use a RAM user or Security Token Service (STS) to query the pay-by-requester configurations of a bucket, you must have the oss:GetBucketRequestPayment permission. For more information, see Attach a custom policy to a RAM user.

Command syntax

ossutil api get-bucket-request-payment --bucket value [flags]

Parameter

Type

Description

--bucket

string

The name of the bucket.

Note
  • The get-bucket-request-payment command corresponds to the GetBucketRequestPayment operation. For more information about the parameters in the GetBucketRequestPayment operation, see GetBucketRequestPayment.

  • For more information about supported global command-line options, see Global command-line options.

Examples

  • Run the following command to query the pay-by-requester configurations of a bucket named examplebucket:

    ossutil api get-bucket-request-payment --bucket examplebucket
  • Run the following command to query the pay-by-requester configurations of a bucket named examplebucket and display the configurations in the JSON format:

    ossutil api get-bucket-request-payment --bucket examplebucket --output-format json
  • Run the following command to query the pay-by-requester configurations of a bucket named examplebucket and display the configurations in the YAML format:

    ossutil api get-bucket-request-payment --bucket examplebucket --output-format yaml