调用CreateQosCar创建Qos的限速规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 否 | CreateQosCar |
要执行的操作。 取值:CreateQosCar。 |
LimitType | String | 是 | Absolute |
限速类型,包含以下选项:
|
MaxBandwidthAbs | Integer | 是 | 6 |
最大带宽,LimitType是Absolute时必填。 |
MaxBandwidthPercent | Integer | 是 | 90 |
最大带宽百分比,基于用户给智能接入网关实例设置的最大上行带宽。 LimitType是Percent时必填。 |
MinBandwidthAbs | Integer | 是 | 2 |
最小带宽,LimitType是Absolute时必填。 |
MinBandwidthPercent | Integer | 是 | 20 |
最小带宽百分比,基于用户给智能接入网关实例设置的最大上行带宽。 LimitType是Percent时必填。 |
Priority | Integer | 是 | 2 |
设置限速规则的优先级,数值越小,优先级越高,同优先级时先下发的规则优先生效。 优先级范围:1~7。 |
QosId | String | 是 | qos-hdg*************** |
Qos策略的实例ID。 |
RegionId | String | 是 | cn-hangzhou |
Qos策略实例所在的地域ID。 |
Description | String | 否 | Qosdesc |
Qos限速规则描述。 |
PercentSourceType | String | 否 | CcnBandwidth |
按百分比限速时的带宽类型,包含以下选项:
|
Name | String | 否 | nametest |
Qos限速规则名称。长度为2-128,以字母或中文开头,且只包含中文、字母、数字、点号(.),下划线(_)和短横线(-)。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | AC13E8FF-4D61-40AD-868E-817F2D3AC86A |
请求ID。 |
QosId | String | qos-awfxl1adxeqyk****** |
Qos策略的实例ID。 |
QosCarId | String | qoscar-n5k8g97lihlph***** |
Qos限速规则的实例ID。 |
Description | String | Qosdesc |
Qos限速规则描述。 |
Priority | Integer | 3 |
规则的优先级。 |
LimitType | String | Percent |
限速类型,包含以下选项:
|
MinBandwidthAbs | Integer | 2 |
最小带宽。LimitType是Absolute时必填。 |
MaxBandwidthAbs | Integer | 6 |
最大带宽。LimitType是Absolute时必填。 |
MinBandwidthPercent | Integer | 20 |
最小带宽百分比,基于用户给智能接入网关实例设置的最大上行带宽。 |
MaxBandwidthPercent | Integer | 90 |
最大带宽百分比,基于用户给智能接入网关实例设置的最大上行带宽。 |
PercentSourceType | String | CcnBandwidth |
按百分比限速时的带宽类型,包含以下选项:
|
示例
请求示例
http(s)://[Endpoint]/?Action=CreateQosCar
&LimitType=Absolute
&MaxBandwidthAbs=6
&MaxBandwidthPercent=90
&MinBandwidthAbs=2
&MinBandwidthPercent=20
&Priority=2
&QosId=qos-hdg***************
&RegionId=cn-hangzhou
&<公共请求参数>
正常返回示例
XML
格式
<CreateQosCarResponse>
<LimitType>Percent</LimitType>
<MaxBandwidthPercent>20</MaxBandwidthPercent>
<MinBandwidthPercent>10</MinBandwidthPercent>
<PercentSourceType>CcnBandwidth</PercentSourceType>
<Priority>3</Priority>
<QosCarId>qoscar-n5k8g97lihlph*****</QosCarId>
<QosId>qos-awfxl1adxeqyk*****</QosId>
<RequestId>AC13E8FF-4D61-40AD-868E-817F2D3AC86A</RequestId>
</CreateQosCarResponse>
JSON
格式
{
"LimitType":"Percent",
"MaxBandwidthPercent":20,
"MinBandwidthPercent":10,
"PercentSourceType":"CcnBandwidth",
"Priority":3,
"QosCarId":"qoscar-n5k8g97lihlph*****",
"QosId":"qos-awfxl1adxeqyk*****",
"RequestId":"AC13E8FF-4D61-40AD-868E-817F2D3AC86A"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
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策略中的QosCar达到上限,您可以提交工单申请提高配额。 |
403 | InternalError | An internal server error occurred. | 内部服务错误 |
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.LimitType | The specified LimitType is invalid. | 您输入的参数"LimitType"不合法。 |
400 | InvalidParameter.Name | The specified Name is invalid. | 您输入的参数"Name"不合法。 |
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交