You need to enable JavaScript to run this app.
文档中心
中转路由器

中转路由器

复制全文
下载 pdf
流标记策略
CreateTransitRouterTrafficQosMarkingEntry-添加流标记规则
复制全文
下载 pdf
CreateTransitRouterTrafficQosMarkingEntry-添加流标记规则
调用 CreateTransitRouterTrafficQosMarkingEntry 接口,为流标记策略添加标记规则。​
使用说明​
每个流标记策略默认最多可添加100个标记规则。如配额超限,请创建配额更配申请提升配额。​
注意事项​
添加标记规则会影响流量标记,如果该流量标记匹配的调度队列带宽小于业务实际需要,则会影响正常转发。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:CreateTransitRouterTrafficQosMarkingEntry​
接口名称。当前 API 的名称为CreateTransitRouterTrafficQosMarkingEntry。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为2020-04-01。​
​
TransitRouterTrafficQosMarkingPolicyId String 必选 示例值:tr-tmp-hy13n2l4c6c0v****​
流标记策略的ID。您可以调用DescribeTransitRouterTrafficQosMarkingPolicies接口获取流标记策略的ID。​
​
TransitRouterTrafficQosMarkingEntryName String 可选 示例值:tme-02​
标记规则的名称。​
  • 必须以字母、数字或中文开头,可包含字母、数字、中文和以下特殊字符:点号(.)、下划线(_)和短横线(-)。​
  • 长度限制为1 ~ 128个字符。​
​
Priority Integer 必选 示例值:100​
标记规则的优先级,取值范围为 1~10000。​
不同标记规则的优先级不能重复。​
​
Protocol String 可选 示例值:udp​
协议类型。​
  • tcp:TCP协议。​
  • udp:UDP协议。​
  • gre:GRE协议​
  • icmp:ICMP协议。​
  • icmpv6:ICMPV6协议。​
  • all(默认):支持所有协议。​
说明​
  • 中转路由器IPv6功能正在邀测中,如需使用,请联系客户经理。​
  • 开通中转路由器IPv6功能后,才可以传入ICMPV6。​
​
SourceCidrBlock String 必选 示例值:192.168.XX.XX/24​
源地址的IP网段,支持IPv4和IPv6。​
  • Protocol 传入tcp、udp、gre或all时,该参数可传入IPv4网段或IPv6网段。​
  • Protocol 传入icmp时,该参数仅支持传入IPv4网段。​
  • Protocol传入icmpv6时,该参数仅支持传入IPv6网段。​
​
DestinationCidrBlock String 必选 示例值:192.168.XX.XX/24​
目的地址的IP网段,支持IPv4和IPv6。​
  • Protocol 传入tcp、udp、gre或all时,该参数可传入IPv4网段或IPv6网段。​
  • Protocol 传入icmp时,该参数仅支持传入IPv4网段。​
  • Protocol 传入icmpv6时,该参数仅支持传入IPv6网段。​
  • 该参数传入的IP网段类型应与SourceCidrBlock保持一致,均为IPv4网段或均为IPv6网段。​
​
SourcePortStart Integer 必选 示例值:1​
源端口范围的起始值。取值范围为-1,1~65535。​
  • -1表示不限制端口。​
  • Protocol传入icmp、icmpv6或gre时,仅支持传入-1。​
​
SourcePortEnd Integer 必选 示例值:1​
源端口范围的结束值。取值范围为-1,1~65535。​
  • -1表示不限制端口。​
  • Protocol传入icmp、icmpv6或gre时,仅支持传入-1。​
​
DestinationPortStart Integer 必选 示例值:1​
目的端口范围的起始值。取值范围为-1,1~65535。​
  • -1表示不限制端口。​
  • Protocol传入icmp、icmpv6、gre或all时,仅支持传入-1。​
​
DestinationPortEnd Integer 必选 示例值:1​
目的端口范围的结束值。取值范围为-1,1~65535。​
  • -1表示不限制端口。​
  • Protocol传入icmp、icmpv6、gre或all时,仅支持传入-1。​
​
MatchDscp Integer 可选 示例值:1​
流量报文本身的DSCP值。取值范围为-1,0~63。​
默认值为-1,表示流量报文的DSCP值为任意值均匹配该标记规则。​
​
RemarkingDscp Integer 必选 示例值:1​
为目标流量报文修改的 DSCP 值。取值范围为 0~63。​
目标流量成功匹配该标记规则后,流量报文的DSCP值替换为该参数的取值。​
​
Description String 可选 示例值:This traffic qos marking entry is used for test.​
标记规则的描述信息。​
  • 必须以字母、数字或中文开头,可包含字母、数字、中文和以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。​
  • 长度限制为0 ~ 255个字符。​
  • 不传入该参数或该参数不传入数值时,默认为空字符串。​
​
ClientToken String 可选 示例值:123e4567-e89b-12d3-a456-42665544****​
客户端Token,用于保证请求的幂等性。​
  • 该参数值由客户端自动生成,确保不同请求的取值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。​
  • 取值仅支持ASCII字符,最大不超过64个字符。​
  • 未指定该参数值时,不进行幂等校验。​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
TransitRouterTrafficQosMarkingEntryId String 示例值:tr-tme-1i5i8khf9m58gae5kcx6****​
标记规则ID。​
​
​
请求示例​
​
GET /?Action=CreateTransitRouterTrafficQosMarkingEntry&Version=2020-04-01&TransitRouterTrafficQosMarkingPolicyId=tr-tmp-hy13n2l4c6c0v****&Priority=100&SourceCidrBlock=192.168.XX.XX%2F24&DestinationCidrBlock=192.168.XX.XX%2F24&SourcePortStart=1&SourcePortEnd=1&DestinationPortStart=1&DestinationPortEnd=1&RemarkingDscp=1 HTTP/1.1​
Host: transitrouter.cn-beijing.volcengineapi.com​
X-Date: 20250731T083802Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250731/cn-beijing/transitrouter/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202507311638051041080960773AC806",​
"Action": "CreateTransitRouterTrafficQosMarkingEntry",​
"Version": "2020-04-01",​
"Service": "transitrouter",​
"Region": "cn-beijing"​
},​
"Result": {​
"TransitRouterTrafficQosMarkingEntryId": "tr-tme-1i5i8khf9m58gae5kcx6****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
IdempotentParameterMismatch​
Arguments on this idempotent request are inconsistent with arguments used in previous request(s).​
此幂等请求的参数与前一个请求中使用的参数不一致。​
400​
InvalidCidr.Malformed​
The specified cidr block is malformed.​
指定的网段格式不合法。​
400​
InvalidDescription.Malformed​
The specified description is malformed.​
指定的描述格式不合法。请修复描述格式后重试。​
400​
InvalidDescription.TooLong​
The specified description is malformed. Ensure the maximum length of description is 255.​
指定的描述格式不合法。描述长度不能超过255个字符。​
400​
InvalidName.Malformed​
The specified name is malformed.​
指定的名称格式不合法。请修复名称格式后重试。​
400​
InvalidName.TooLong​
The specified name is malformed. Ensure the maximum length of name is 128.​
指定的名称格式不合法。名称长度不能超过128个字符。​
400​
InvalidParameter.ClientTokenMalformed​
The specified parameter ClientToken is malformed.​
指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。​
400​
InvalidTransitRouter.InvalidBusinessStatus​
The request is denied because the specified Transit Router is shut down due to arrears.​
指定的中转路由器欠费关停,不支持当前操作。​
400​
InvalidTransitRouter.InvalidStatus​
The specified Transit Router is not in the correct status for the request.​
指定的中转路由器所处状态无法响应该请求。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.CidrProtocolMismatch​
The specified cidr of the Transit Router traffic qos marking entry is invalid. The IP version of the source and destination cidr must match the specified network protocol.​
指定的流标记规则网段无效,源网段和目的网段的IP版本必须与指定的网络协议一致。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.CidrVersionMismatch​
The specified cidr of the Transit Router traffic qos marking entry is invalid. The source and destination cidr must both IPv4 or IPv6.​
指定的流标记规则网段无效,源网段和目的网段必须同属于IPv4或IPv6。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.EndPortSmallerThanStart​
The specified port range of the traffic qos marking entry is invalid with end port smaller than start port.​
指定的端口范围无效,结束端口不可小于起始端口。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.InvalidMatchDscp​
The specified match dscp of the Transit Router traffic qos marking entry is invalid. Match dscp only support -1, 0~63.​
指定的流标记规则匹配DSCP值无效,仅允许-1或0-63范围内的整数。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.InvalidPriority​
The specified priority of the Transit Router traffic qos marking entry is invalid.​
指定的流标记规则优先级无效。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.InvalidProtocol​
The specified protocol of the Transit Router traffic qos marking entry is invalid.​
指定的流标记规则网络协议无效。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.InvalidProtocolPort​
The specified port range of the traffic qos marking entry is invalid with the protocol selected.​
指定的端口范围在当前流标记规则所选择的协议下无效。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.InvalidRemarkingDscp​
The specified remarking dscp of the Transit Router traffic qos marking entry is invalid. Remarking dscp only support 0~63.​
指定的流标记规则重标记DSCP值无效,仅允许0-63范围内的整数。​
400​
InvalidTransitRouterTrafficQosMarkingEntry.StartEndPortInconsistent​
The specified port range of the traffic qos marking entry is invalid with one of the start/end port is "-1", and the other is not.​
指定的端口范围无效,当起始或结束端口其中一个为“-1”时,另一个也必须为“-1”,代表端口不限。​
400​
QuotaExceeded.TransitRouterTrafficQosMarkingEntry​
You've reached the limit on the number of traffic qos marking entries that you can create on one traffic qos marking policy.​
已达到单个流标记策略的标记规则数上限。​
403​
Forbidden.TransitRouterIPv6​
You are not authorized to use ipv6 on Transit Router.​
未开通中转路由器IPv6功能,不支持该操作。​
404​
InvalidTransitRouterTrafficQosMarkingPolicy.NotFound​
The specified Transit Router traffic qos marking policy does not exist.​
指定的流标记策略不存在。​
409​
InvalidTransitRouterTrafficQosMarkingEntry.PriorityConflict​
The specified priority of the traffic qos marking entry conflicts with another entry.​
指定的流标记规则优先级和其它规则冲突。​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
幂等请求处理中。​
​
最近更新时间:2025.12.31 12:18:46
这个页面对您有帮助吗?
有用
有用
无用
无用