All Products
Search
Document Center

Object Storage Service:put-bucket-qos-info

Last Updated:Feb 05, 2025

Configures the Quality of Service (QoS) information for a bucket.

Usage notes

Important

The resource pool QoS feature is in invitational preview. If the throughput of Object Storage Service (OSS) buckets in a specific region is greater than or equal to 500 Gbit/s, contact technical support to apply for the feature.

  • By default, an Alibaba Cloud account has the permissions to configure QoS information for a bucket. To configure QoS information for a bucket by using a Resource Access Management (RAM) user or Security Token Service (STS), you must have the oss:PutBucketQoSInfo permission. For more information, see Attach a custom policy to a RAM user.

  • You can configure bandwidth throttling only for buckets that are added to a resource pool. The bandwidth threshold of each configuration item for a bucket cannot exceed the bandwidth threshold of the resource pool to which the bucket belongs.

  • A value of -1 specifies that no limits are imposed on the field. If a field is not specified, the default value is -1. A value of 0 specifies that a specific type of access request is prohibited.

  • The bandwidth of a subitem cannot exceed the total bandwidth of the item. For example, if you set the total upload bandwidth to 10 Gbit/s, the upload bandwidth over internal networks cannot exceed 10 Gbit/s.

Syntax

ossutil api invoke-operation --op-name put-bucket-qos-info --method PUT --bucket <bucket-name> --parameters qosInfo --body=file://<path-to-xml-file>

Parameter

Type

Description

--bucket

string

The name of the bucket.

--parameters

stringArray

The request parameters in the k[=v] format, such as versionId=123 and delete.

--body

string

The request body. file:// specifies that configurations are read from a file, whereas -specifies that configurations are read from standard inputs.

--body

The --body parameter supports the XML format. If the value of the parameter starts with file://, the configurations are loaded from a specific file.

<QoSConfiguration>
  <TotalUploadBandwidth>integer</TotalUploadBandwidth>
  <IntranetUploadBandwidth>integer</IntranetUploadBandwidth>
  <ExtranetUploadBandwidth>integer</ExtranetUploadBandwidth>
  <TotalDownloadBandwidth>integer</TotalDownloadBandwidth>
  <IntranetDownloadBandwidth>integer</IntranetDownloadBandwidth>
  <ExtranetDownloadBandwidth>integer</ExtranetDownloadBandwidth>
</QoSConfiguration>

The following table describes the parameters required in the configuration file.

Parameter

Type

Required

Example

Unit

Description

TotalUploadBandwidth

Integer

Yes

10

Gbit/s

The total upload bandwidth.

Parent nodes: QoSConfiguration.

IntranetUploadBandwidth

Integer

Yes

-1

Gbit/s

The upload bandwidth over internal networks. The internal networks include the classic network and virtual private clouds (VPCs). Unit: Gbit/s.

Parent nodes: QoSConfiguration.

ExtranetUploadBandwidth

Integer

Yes

-1

Gbit/s

The upload bandwidth over external networks. The external networks include the Internet and Alibaba Cloud Content Delivery Network (CDN).

Parent nodes: QoSConfiguration.

TotalDownloadBandwidth

Integer

Yes

10

Gbit/s

The total download bandwidth.

Parent nodes: QoSConfiguration.

IntranetDownloadBandwidth

Integer

Yes

-1

Gbit/s

The download bandwidth over internal networks. The internal networks include the classic network and VPCs. Unit: Gbit/s.

Parent nodes: QoSConfiguration.

ExtranetDownloadBandwidth

Integer

Yes

-1

Gbit/s

The download bandwidth over external networks. The external networks include the Internet and CDN.

Parent nodes: QoSConfiguration.

Note

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

Example

Add QoS configurations to a bucket named examplebucket by creating an XML configuration file named qos.xml and adding the following sample code to the configuration file:

<QoSConfiguration>
  <TotalUploadBandwidth>10</TotalUploadBandwidth>
  <IntranetUploadBandwidth>-1</IntranetUploadBandwidth>
  <ExtranetUploadBandwidth>-1</ExtranetUploadBandwidth>
  <TotalDownloadBandwidth>10</TotalDownloadBandwidth>
  <IntranetDownloadBandwidth>-1</IntranetDownloadBandwidth>
  <ExtranetDownloadBandwidth>-1</ExtranetDownloadBandwidth>
</QoSConfiguration>

The following items describe the parameters:

  • The TotalUploadBandwidth parameter is set to 10, which specifies that the total upload bandwidth is 10 Gbit/s. The total upload bandwidth over internal networks and public networks cannot exceed 10 Gbit/s.

  • The IntranetUploadBandwidth parameter is set to -1, which specifies that no limits are imposed on the upload bandwidth over internal networks. However, the upload bandwidth over internal networks must be less than or equal to the total upload bandwidth, which is 10 Gbit/s.

  • The ExtranetUploadBandwidth parameter is set to -1, which specifies that no limits are imposed on the upload bandwidth over public networks. However, the upload bandwidth over public networks must be less than or equal to the total upload bandwidth, which is 10 Gbit/s.

  • The TotalDownloadBandwidth parameter is set to 10, which specifies that the total download bandwidth is 10 Gbit/s. The total download bandwidth over internal networks and public networks cannot exceed 10 Gbit/s.

  • The IntranetDownloadBandwidth parameter is set to -1, which specifies that no limits are imposed on the download bandwidth over internal networks. However, the download bandwidth over internal networks must be less than or equal to the total download bandwidth, which is 10 Gbit/s.

  • The ExtranetDownloadBandwidth parameter is set to -1, which specifies that no limits are imposed on the download bandwidth over public networks. However, the download bandwidth over public networks must be less than or equal to the total download bandwidth, which is 10 Gbit/s.

Sample command:

ossutil api invoke-operation --op-name put-bucket-qos-info --method PUT --bucket examplebucket --parameters qosInfo --body=file://qos.xml