Creates a traffic throttling rule for a quality of service (QoS) policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateQosCar

The operation that you want to perform. Set the value to CreateQosCar.

Description String No Qosdesc

The description of the traffic throttling rule.

RegionId String Yes cn-hangzhou

The ID of the region to which the QoS policy belongs.

QosId String Yes qos-xitd8690ucu8ro****

The ID of the QoS policy.

Priority Integer Yes 2

The priority value of the traffic throttling rule. A smaller value specifies a higher priority. If multiple rules have the same priority, the rule that is applied first takes effect. Valid values: 1 to 7.

LimitType String Yes Absolute

The type of the traffic throttling rule. Valid values:

  • Absolute: throttles traffic based on a specific range of bandwidth.
  • Percent: throttles traffic based on a specific range of bandwidth percentage.
MinBandwidthAbs Integer Yes 2

The minimum bandwidth value. The value must be an integer. Unit: Mbit/s.

This parameter is required when you set LimitType to Absolute.

MaxBandwidthAbs Integer Yes 6

The maximum bandwidth value. The value must be an integer. Unit: Mbit/s.

This parameter is required when you set LimitType to Absolute.

Note The maximum bandwidth value must be greater than the minimum bandwidth value.
MinBandwidthPercent Integer Yes 20

The minimum bandwidth percentage. Unit: percent (%). Valid values: 1 to 100.

This parameter is required when you set LimitType to Percent.

MaxBandwidthPercent Integer Yes 90

The maximum bandwidth percentage. Unit: percent (%). Valid values: 1 to 100.

This parameter is required when you set LimitType to Percent.

Note The maximum bandwidth percentage must be greater than the minimum bandwidth percentage.
PercentSourceType String No CcnBandwidth

The type of bandwidth when traffic is throttled based on bandwidth percentage. Valid values:

  • CcnBandwidth: Cloud Connect Network (CCN) bandwidth
  • InternetUpBandwidth: total Internet bandwidth
Name String No nametest

The name of the traffic throttling rule.

The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

Response parameters

Parameter Type Example Description
MinBandwidthAbs Integer 2

The minimum bandwidth value. Unit: Mbit/s.

This parameter is returned when LimitType is set to Absolute.

Description String Qosdesc

The description of the traffic throttling rule.

RequestId String AC13E8FF-4D61-40AD-868E-817F2D3AC86A

The ID of the request.

QosCarId String qoscar-n5k8g97lihlph****

The ID of the traffic throttling rule.

MaxBandwidthAbs Integer 6

The maximum bandwidth value. Unit: Mbit/s.

This parameter is returned when LimitType is set to Absolute.

MaxBandwidthPercent Integer 90

The maximum bandwidth percentage. Unit: percent (%).

Priority Integer 3

The priority value of the traffic throttling rule.

QosId String qos-xitd8690ucu8ro****

The ID of the QoS policy.

PercentSourceType String CcnBandwidth

The type of bandwidth when traffic is throttled based on bandwidth percentage. Valid values:

  • CcnBandwidth: CCN bandwidth
  • InternetUpBandwidth: total Internet bandwidth
MinBandwidthPercent Integer 20

The minimum bandwidth percentage. Unit: percent (%).

LimitType String Percent

The type of the traffic throttling rule. Valid values:

  • Absolute: throttles traffic based on a specific range of bandwidth.
  • Percent: throttles traffic based on a specific range of bandwidth percentage.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateQosCar
&Description=Qosdesc
&RegionId=cn-hangzhou
&QosId=qos-xitd8690ucu8ro****
&Priority=2
&LimitType=Absolute
&MinBandwidthAbs=2
&MaxBandwidthAbs=6
&MinBandwidthPercent=20
&MaxBandwidthPercent=90
&PercentSourceType=CcnBandwidth
&Name=nametest
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateQosCarResponse>
    <MinBandwidthAbs>2</MinBandwidthAbs>
    <Description>Qosdesc</Description>
    <RequestId>AC13E8FF-4D61-40AD-868E-817F2D3AC86A</RequestId>
    <QosCarId>qoscar-n5k8g97lihlph****</QosCarId>
    <MaxBandwidthAbs>6</MaxBandwidthAbs>
    <MaxBandwidthPercent>90</MaxBandwidthPercent>
    <Priority>3</Priority>
    <QosId>qos-xitd8690ucu8ro****</QosId>
    <PercentSourceType>CcnBandwidth</PercentSourceType>
    <MinBandwidthPercent>20</MinBandwidthPercent>
    <LimitType>Percent</LimitType>
</CreateQosCarResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "MinBandwidthAbs" : 2,
  "Description" : "Qosdesc",
  "RequestId" : "AC13E8FF-4D61-40AD-868E-817F2D3AC86A",
  "QosCarId" : "qoscar-n5k8g97lihlph****",
  "MaxBandwidthAbs" : 6,
  "MaxBandwidthPercent" : 90,
  "Priority" : 3,
  "QosId" : "qos-xitd8690ucu8ro****",
  "PercentSourceType" : "CcnBandwidth",
  "MinBandwidthPercent" : 20,
  "LimitType" : "Percent"
}

Error codes

HttpCode Error code Error message Description
400 MissParameter.RegionId You must specify RegionId. The error message returned because the RegionId parameter is not set.
400 MissParameter.QosId You must specify QosId. The error message returned because the QosId parameter is not set.
400 MissParameter.LimitType You must specify LimitType. The error message returned because the LimitType parameter is not set.
400 MissParameter.Priority You must specify Priority. The error message returned because the Priority parameter is not set.
400 InvalidParameter.LimitType You must specify LimitType. The error message returned because the LimitType parameter is not set.
400 MissParameter.MaxBandwidthAbs You must specify MaxBandwidthAbs. The error message returned because the MaxBandwidthAbs parameter is not set.
400 MissParameter.MaxBandwidthPercent You must specify MaxBandwidthPercent. The error message returned because the MaxBandwidthPercent parameter is not set.
400 MissParameter.MinBandwidthAbs You must specify MinBandwidthAbs. The error message returned because the MinBandwidthAbs parameter is not set.
400 MissParameter.MinBandwidthPercent You must specify MinBandwidthPercent. The error message returned because the MinBandwidthPercent parameter is not set.
400 InvalidBandwidthCompare The specified maximum bandwidth is smaller than the minimum bandwidth. Please check your input. The error message returned because the maximum bandwidth is smaller than the minimum bandwidth. Check whether the parameters are correctly set.
400 MissParameter.PercentSourceType You must specify PercentSourceType. The error message returned because the PercentSourceType parameter is not set.
400 InvalidId.Qos The specified QosId is invalid. The error message returned because the QosId parameter is set to an invalid value.
400 Invalid.QosCar.Priority The specified priority of QosCarId is invalid. The error message returned because the Priority parameter is set to an invalid value.
400 QosCarPerQosAmountLimit The maximum number of QosCar in a QoS is exceeded. You can submit a ticket to increase the quota. The error message returned because the number of traffic throttling rules that you have added to the QoS policy has reached the upper limit. Submit a ticket to request a quota increase.
400 InvalidParameter.Priority The specified Priority is invalid. The error message returned because the Priority parameter is set to an invalid value.
400 InvalidParameter.PercentSourceType The specified PercentSourceType is invalid. The error message returned because the PercentSourceType parameter is set to an invalid value.
400 InvalidParameter.Description The specified Description is invalid. The error message returned because the Description parameter is set to an invalid value.
400 InvalidParameter.LimitType The specified LimitType is invalid. The error message returned because the LimitType parameter is set to an invalid value.
400 InvalidParameter.Name The specified Name is invalid. The error message returned because the Name parameter is set to an invalid value.
403 InternalError An internal server error occurred. The error message returned because an internal server error occurred.

For a list of error codes, visit the API Error Center.