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
| Parameter | Type | Description |
|---|---|---|
--bucket | string | The 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
| Field | Type | Description | Possible values |
|---|---|---|---|
Payer | string | The entity that pays for requests and data transfer. | BucketOwner, Requester |
Examples
Retrieve the pay-by-requester configuration
ossutil api get-bucket-request-payment --bucket examplebucketOutput:
<RequestPaymentConfiguration>
<Payer>BucketOwner</Payer>
</RequestPaymentConfiguration>Retrieve the configuration in JSON format
ossutil api get-bucket-request-payment --bucket examplebucket --output-format jsonOutput:
{
"Payer": "BucketOwner"
}Retrieve the configuration in YAML format
ossutil api get-bucket-request-payment --bucket examplebucket --output-format yamlOutput:
Payer: BucketOwner