put-bucket-transfer-acceleration
Configures transfer acceleration for a bucket. Transfer acceleration improves the speed of OSS access by users worldwide and is suitable for long-distance data transfers and upload and downloads of large objects.
Usage notes
-
After you enable transfer acceleration for a bucket, an accelerate endpoint becomes available in addition to the default endpoint. Access speed is accelerated only when you use the accelerate endpoint.
-
Transfer acceleration fees are incurred when you use the accelerate endpoint to access a bucket. For more information, see Transfer acceleration fees.
For more information about transfer acceleration, see Access OSS using transfer acceleration.
Command syntax
ossutil api put-bucket-transfer-acceleration --bucket value --transfer-acceleration-configuration value [flags]
|
Parameter |
Type |
Description |
|
--bucket |
string |
The name of the bucket. |
|
--transfer-acceleration-configuration |
string |
The container that stores the transfer acceleration configurations. |
The put-bucket-transfer-acceleration command is the equivalent of the PutBucketTransferAcceleration operation. For more information about the API operation, see PutBucketTransferAcceleration.
--transfer-acceleration-configuration
The --transfer-acceleration-configuration option supports XML and JSON formats.
-
XML format:
<TransferAccelerationConfiguration> <Enabled>boolean</Enabled> </TransferAccelerationConfiguration> -
JSON format:
{ "Enabled": boolean }
For more information, see Command-line options.
Examples
Configure transfer acceleration for a bucket named examplebucket.
-
Use an XML configuration file (transfer-acceleration-configuration.xml in this example)
<?xml version="1.0" encoding="UTF-8"?> <TransferAccelerationConfiguration> <Enabled>true</Enabled> </TransferAccelerationConfiguration>ossutil api put-bucket-transfer-acceleration --bucket examplebucket --transfer-acceleration-configuration file://transfer-acceleration-configuration.xml -
Use a JSON configuration file (transfer-acceleration-configuration.json in this example)
{ "Enabled": "true" }ossutil api put-bucket-transfer-acceleration --bucket examplebucket --transfer-acceleration-configuration file://transfer-acceleration-configuration.json -
Use JSON parameters in the command line
ossutil api put-bucket-transfer-acceleration --bucket examplebucket --transfer-acceleration-configuration "{\"Enabled\":\"true\"}"