Creates a traffic throttling rule for a quality of service (QoS) policy.
Debugging
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-shanghai | The ID of the region to which the QoS policy belongs. You can call the DescribeRegions operation to query the most recent region list. |
| QosId | String | Yes | qos-xitd8690ucu8ro**** | The ID of the QoS policy. |
| Priority | Integer | Yes | 2 | The priority of the traffic throttling rule. Valid values: 1 to 3. A smaller value indicates a higher priority. If rules have the same priority, the one created the earliest is applied. |
| LimitType | String | Yes | Absolute | The type of the traffic throttling rule. Valid values:
|
| MinBandwidthAbs | Integer | Yes | 2 | The minimum bandwidth value. The value must be an integer. Unit: Mbit/s. This parameter is returned when LimitType is set to Absolute. |
| MaxBandwidthAbs | Integer | Yes | 6 | The maximum bandwidth value. The value must be an integer. Unit: Mbit/s. This parameter is returned when LimitType is set 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:
|
| 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 | 2 | 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:
|
| MinBandwidthPercent | Integer | 20 | The minimum bandwidth percentage. Unit: percent (%). |
| LimitType | String | Percent | The type of the traffic throttling rule. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateQosCar
&Description=Qosdesc
&RegionId=cn-shanghai
&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>2</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" : 2,
"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 ID of the region (RegionId) is not specified. |
| 400 | MissParameter.QosId | You must specify QosId. | The error message returned because the ID of the QoS policy (QosId) is not specified. |
| 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 in the QoS policy has reached the upper limit. |
| 400 | InvalidParameter.Priority | The specified Priority is invalid. | The error message returned because the specified priority (Priority) is invalid. |
| 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 specified description is invalid. |
| 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 specified name (QosName) of the QoS policy is invalid. |
| 403 | InternalError | An internal server error occurred. | The error message returned because an internal server error has occurred. |
For a list of error codes, see Service error codes.