All Products
Search
Document Center

Object Storage Service:get-bucket-request-payment

Last Updated:Mar 20, 2026

Retrieves the pay-by-requester configuration of a bucket.

Usage notes

By default, an Alibaba Cloud account has permission to retrieve the pay-by-requester configuration of a bucket. To perform this operation as a RAM user or with Security Token Service (STS) credentials, grant the oss:GetBucketRequestPayment permission. For details, see Attach a custom policy to a RAM user.

Syntax

ossutil api get-bucket-request-payment --bucket <bucket-name> [flags]

Parameters

ParameterTypeDescription
--bucketstringThe name of the bucket.

For global flags, see Global command-line options.

This command corresponds to the GetBucketRequestPayment API operation. For a full list of supported parameters, see the API reference.

Output

FieldTypeDescriptionPossible values
PayerstringThe entity that pays for requests and data transfer.BucketOwner, Requester

Examples

Retrieve the pay-by-requester configuration

ossutil api get-bucket-request-payment --bucket examplebucket

Output:

<RequestPaymentConfiguration>
  <Payer>BucketOwner</Payer>
</RequestPaymentConfiguration>

Retrieve the configuration in JSON format

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

Output:

{
  "Payer": "BucketOwner"
}

Retrieve the configuration in YAML format

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

Output:

Payer: BucketOwner