put-resource-pool-bucket-group-qos-info

更新时间:
复制 MD 格式

Sets or updates the bandwidth throttling configuration for a bucket group in a resource pool.

Prerequisites

Before you begin, ensure that you have:

  • An Alibaba Cloud account with access to a resource pool (OSS throughput >= 500 Gbit/s in the target region)

  • Invitational preview access — contact technical support to apply

  • The oss:PutResourcePoolBucketGroupQoSInfo permission if running as a RAM user or using Security Token Service (STS)

Usage notes

Important

Resource pool quality of service (QoS) is in invitational preview. To apply, your OSS throughput in a region must be 500 Gbit/s or higher. Contact technical support to request access.

By default, your Alibaba Cloud account has permission to configure throttling for a bucket group. To run this command as a RAM user or using Security Token Service (STS), the caller must have the oss:PutResourcePoolBucketGroupQoSInfo permission. For details, see Attach a custom policy to a RAM user.

Syntax

ossutil api invoke-operation --op-name put-resource-pool-bucket-group-qos-info \
  --method PUT \
  --parameters resourcePool=<resource-pool> \
  --parameters resourcePoolBucketGroup=<GroupName> \
  --parameters resourcePoolBucketGroupQosInfo \
  --body=file://<path-to-xml>
ParameterTypeRequiredDescription
--parametersstringArrayYesRequest parameters in key[=value] format. Use resourcePoolBucketGroupQosInfo without a value to include the flag.
--bodystringYesRequest body. Use file://<path> to load from a file, or - to read from standard input.

For global command-line options, see Global command-line options.

Request body

The --body parameter accepts XML. When the value starts with file://, the configuration is loaded from the specified file.

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

All six parameters are required. Two special values apply to every bandwidth field:

ValueMeaning
-1No sub-limit. Traffic is still bounded by the total bandwidth of the bucket group.
0This bandwidth type is disabled. For example, setting ExtranetUploadBandwidth to 0 blocks uploads over the Internet.
ParameterTypeUnitDescriptionConstraints
TotalUploadBandwidthIntegerGbit/sTotal upload bandwidth cap for the bucket group. Internal and external upload traffic combined cannot exceed this value.Cannot exceed the resource pool's total upload bandwidth. Must be >= 5 Gbit/s when not -1 or 0.
IntranetUploadBandwidthIntegerGbit/sUpload bandwidth over internal networks (classic network and VPC).Cannot exceed TotalUploadBandwidth. Must be >= 5 Gbit/s when not -1 or 0.
ExtranetUploadBandwidthIntegerGbit/sUpload bandwidth over external networks (Internet and CDN).Cannot exceed TotalUploadBandwidth. Must be >= 5 Gbit/s when not -1 or 0.
TotalDownloadBandwidthIntegerGbit/sTotal download bandwidth cap for the bucket group. Internal and external download traffic combined cannot exceed this value.Cannot exceed the resource pool's total download bandwidth. Must be >= 5 Gbit/s when not -1 or 0.
IntranetDownloadBandwidthIntegerGbit/sDownload bandwidth over internal networks (classic network and VPC).Cannot exceed TotalDownloadBandwidth. Must be >= 5 Gbit/s when not -1 or 0.
ExtranetDownloadBandwidthIntegerGbit/sDownload bandwidth over external networks (Internet and CDN).Cannot exceed TotalDownloadBandwidth. Must be >= 5 Gbit/s when not -1 or 0.

Example

The following example sets the QoS configuration for a bucket group named exampleGroup in a resource pool named examplePool.

Step 1. Create a file named qos.xml with the following content:

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

This configuration caps total upload and total download at 10 Gbit/s each. Setting the per-network values to -1 removes sub-limits on internal and external traffic — each network type can use up to the 10 Gbit/s total.

Step 2. Run the following command:

ossutil api invoke-operation --op-name put-resource-pool-bucket-group-qos-info --method PUT --parameters resourcePool=examplePool --parameters resourcePoolBucketGroup=exampleGroup --parameters resourcePoolBucketGroupQosInfo --body=file://qos.xml