The request-payment command is used to configure the pay-by-requester mode for buckets, or query the pay-by-requester configurations for buckets.
Note
- The commands described in this topic apply to Linux. To use the commands in other systems, replace ./ossutil in the command with the actual executable program name. For example, you can use the help command in 32-bit Windows systems by running ossutil32.exe help.
- For more information about the pay-by-requester mode, see Enable pay-by-requester.
Command syntax
- Configure the pay-by-requester mode
Valid values of payment_parameter are Requester and BucketOwner../ossutil request-payment --method put oss://bucket payment_parameter
- Requester: enables the pay-by-requester mode. Requesters pay the cost of requests and the data download from buckets.
- BucketOwner: disables the pay-by-requester mode. Bucket owners pay the cost of requests and the data download from their buckets.
- Query the pay-by-requester configurations
./ossutil request-payment --method get oss://bucket
Examples
- Enable the pay-by-requester mode
./ossutil request-payment --method put oss://bucket1 Requester
- Disable the pay-by-requester mode
./ossutil request-payment --method put oss://bucket1 BucketOwner
- Query the pay-by-requester configurations
./ossutil request-payment --method get oss://bucket1 BucketOwner 0.178036(s) elapsed
Common options
The following table describes the options you can add to the request-payment command.
Option | Description |
---|---|
--method | Specifies the HTTP request method. Valid values:
|
--loglevel | Specifies the log level. The default value is null, indicating that no log files are
generated. Valid values:
|
--proxy-host | Specifies the URL of the proxy server. HTTP, HTTPS, and SOCKS5 proxies are supported. An example of the URL is http://120.79. **.**:3128 or socks5://120.79. **. **:1080. |
--proxy-user | Specifies the username for the proxy server. The default value is null. |
--proxy-pwd | Specifies the password for the proxy server. The default value is null. |
Note For more information about common options, see View all supported options.