调用CreateQosCar接口创建QoS的限速规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
smartag:CreateQosCar |
create |
*Qos
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Description |
string |
否 |
QoS 限速规则的描述信息。 |
Qosdesc |
| RegionId |
string |
是 |
QoS 策略实例所在的地域 ID。 您可以调用 DescribeRegions 接口查询地域 ID。 |
cn-shanghai |
| QosId |
string |
是 |
QoS 策略的实例 ID。 |
qos-xitd8690ucu8ro**** |
| Priority |
integer |
是 |
设置限速规则的优先级。 取值范围:1~3。数值越小,优先级越高。同优先级时先下发的规则优先生效。 |
2 |
| LimitType |
string |
是 |
限速类型,取值:
|
Absolute |
| MinBandwidthAbs |
integer |
否 |
最小带宽值,带宽值需要输入整数,单位:Mbps。 LimitType 是 Absolute 时必填。 |
2 |
| MaxBandwidthAbs |
integer |
否 |
最大带宽值,带宽值需要输入整数,单位:Mbps。 LimitType 是 Absolute 时必填。 说明
输入的最大带宽值必须大于最小带宽值。 |
6 |
| MinBandwidthPercent |
integer |
否 |
最小带宽百分比,单位:百分比(%),取值范围:1~100。 LimitType 是 Percent 时必填。 |
20 |
| MaxBandwidthPercent |
integer |
否 |
最大带宽百分比,单位:百分比(%),取值范围:1~100。 LimitType 是 Percent 时必填。 说明
输入的最大带宽百分比必须大于最小带宽百分比。 |
90 |
| PercentSourceType |
string |
否 |
百分比限速时的带宽类型,取值:
|
CcnBandwidth |
| Name |
string |
否 |
QoS 限速规则名称。 长度为 2~128,以字母或中文开头,且只包含中文、字母、数字、半角句号(.)、下划线(_)和短划线(-)。 |
nametest |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| MinBandwidthAbs |
integer |
最小带宽值,单位:Mbps。 LimitType 是 Absolute 时必填。 |
2 |
| Description |
string |
QoS 限速规则描述。 |
Qosdesc |
| RequestId |
string |
请求 ID。 |
AC13E8FF-4D61-40AD-868E-817F2D3AC86A |
| QosCarId |
string |
QoS 限速规则的实例 ID。 |
qoscar-n5k8g97lihlph**** |
| MaxBandwidthAbs |
integer |
最大带宽值,单位:Mbps。 LimitType 是 Absolute 时必填。 |
6 |
| MaxBandwidthPercent |
integer |
最大带宽百分比,单位:百分比(%)。 |
90 |
| Priority |
integer |
规则的优先级。 |
2 |
| QosId |
string |
QoS 策略的实例 ID。 |
qos-xitd8690ucu8ro**** |
| PercentSourceType |
string |
按百分比限速时的带宽类型,取值:
|
CcnBandwidth |
| MinBandwidthPercent |
integer |
最小带宽百分比,单位:百分比(%)。 |
20 |
| LimitType |
string |
限速类型,取值:
|
Percent |
示例
正常返回示例
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"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissParameter.RegionId | You must specify RegionId. | 您的输入中缺少必填参数RegionId。 |
| 400 | MissParameter.QosId | You must specify QosId. | 您的输入中缺少必填参数QosId。 |
| 400 | MissParameter.LimitType | You must specify LimitType. | 您的输入中缺少必填参数"LimitType"。 |
| 400 | MissParameter.Priority | You must specify Priority. | 您的输入中缺少必填参数"Priority"。 |
| 400 | InvalidParameter.LimitType | You must specify LimitType. | 您的输入中缺少必填参数"LimitType"。 |
| 400 | MissParameter.MaxBandwidthAbs | You must specify MaxBandwidthAbs. | 您的输入中缺少必填参数"MaxBandwidthAbs"。 |
| 400 | MissParameter.MaxBandwidthPercent | You must specify MaxBandwidthPercent. | 您的输入中缺少必填参数"MaxBandwidthPercent"。 |
| 400 | MissParameter.MinBandwidthAbs | You must specify MinBandwidthAbs. | 您的输入中缺少必填参数"MinBandwidthAbs"。 |
| 400 | MissParameter.MinBandwidthPercent | You must specify MinBandwidthPercent. | 您的输入中缺少必填参数"MinBandwidthPercent"。 |
| 400 | InvalidBandwidthCompare | The specified maximum bandwidth is smaller than the minimum bandwidth. Please check your input. | 您输入的参数中最大带宽值小于最小带宽值,请检查您的输入。 |
| 400 | MissParameter.PercentSourceType | You must specify PercentSourceType. | 您的输入中缺少必填参数"PercentSourceType"。 |
| 400 | InvalidId.Qos | The specified QosId is invalid. | 您输入的参数QosId不合法。 |
| 400 | Invalid.QosCar.Priority | The specified priority of QosCarId is invalid. | 指定的QosCar的优先级priority参数不合法。 |
| 400 | QosCarPerQosAmountLimit | The maximum number of QosCar in a QoS is exceeded. You can submit a ticket to increase the quota. | 单个QoS策略中的限速规则数量已达上限。 |
| 400 | InvalidParameter.Priority | The specified Priority is invalid. | 您输入的参数Priority不合法。 |
| 400 | InvalidParameter.PercentSourceType | The specified PercentSourceType is invalid. | 您输入的参数"PercentSourceType"不合法。 |
| 400 | InvalidParameter.Description | The specified Description is invalid. | 您输入的参数Description不合法。 |
| 400 | InvalidParameter.Name | The specified Name is invalid. | 您输入的参数Name不合法。 |
| 403 | InternalError | An internal server error occurred. | 内部服务错误。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。