转发规则接口¶
POST 更新转发规则¶
POST /cdn/layer4/rules/updateRule
Body 请求参数
{
"limitConn": "",
"ruleId": 81,
"types": "off",
"protocolType": "udp",
"node": "line_1",
"proxyProtocol": "off",
"hyPort": "133",
"listenPort": "1333",
"originAddress": "12.12.12.2"
}
请求参数¶
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» hyPort | body | string | 是 | 转发端口 | none |
» limitConn | body | integer(int32) | 否 | 频率限速 | none |
» listenPort | body | string | 是 | 源站端口 | none |
» node | body | string | 是 | 实例 | none |
» originAddress | body | string | 是 | 源站地址 | 多个地址用英文逗号(;) 分隔 |
» protocolType | body | string | 是 | 转发协议 | tcp:表示 TCP |
» proxyProtocol | body | string | 是 | proxy_protocl 协议 | off:表示禁用 |
» remark | body | string | 否 | none | |
» ruleId | body | integer(int64) | 是 | 规则 id | none |
» types | body | string | 是 | 会话保持 | off:表示否:表示是 |
详细说明¶
» protocolType: tcp:表示 TCP udp:表示 UDP
» proxyProtocol: off:表示禁用 on:表示启用
返回示例
200 Response
201 Response
返回结果¶
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | none | Inline |
201 | Created | none | Inline |
401 | Unauthorized | none | Inline |
403 | Forbidden | none | Inline |
404 | Not Found | none | Inline |
返回数据结构¶
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» msg | string | true | none | none | |
» code | integer | true | none | none |
数据模型¶
Layer4RuleVO
{
"hyPort": "string",
"limitConn": 0,
"listenPort": "string",
"node": "string",
"originAddress": "string",
"protocolType": "string",
"proxyProtocol": "string",
"remark": "string",
"ruleId": 0,
"types": "string"
}
Layer4RuleVO
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
hyPort | string | true | none | 转发端口 | none |
limitConn | integer(int32) | false | none | 频率限速 | none |
listenPort | string | true | none | 源站端口 | none |
node | string | true | none | 实例 | none |
originAddress | string | true | none | 源站地址 | 多个地址用英文逗号(;) 分隔 |
protocolType | string | true | none | 转发协议 | tcp:表示 TCP udp:表示 UDP |
proxyProtocol | string | true | none | proxy_protocl 协议 | off:表示禁用 on:表示启用 |
remark | string | false | none | none | |
ruleId | integer(int64) | false | none | 规则 ID | none |
types | string | true | none | 会话保持 | off:表示否:表示是 |