资源中心/网络资源/策略路由相关接口
POSTPolicy Routing Operations起始版本 3.6.0同步需要认证
创建策略路由规则集规则
创建策略路由规则集规则
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
paramsObject必填请求体参数结构
ruleSetUuidString必填策略路由规则集uuid
tableUuidString必填策略路由表uuid
ruleNumberint必填规则优先级
destIpString目标ip
sourceIpString源ip
destPortString目标端口
sourcePortString源端口
protocolString协议
resourceUuidString资源UUID。若指定,资源会使用该字段值作为UUID。
tagUuidsList标签UUID列表
systemTagsList系统标签。
userTagsList用户标签。
响应状态
请求地址
POST/zstack/v1/policy-routes/rules
/zstack/v1/policy-routes/rules
请求示例
curl -X POST 'http://{host}/zstack/v1/policy-routes/rules' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"ruleSetUuid":"<ruleSetUuid>","tableUuid":"<tableUuid>","ruleNumber":1,"destIp":"<destIp>","sourceIp":"<sourceIp>","destPort":"<destPort>","sourcePort":"<sourcePort>","protocol":"<protocol>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
响应示例
200{ "inventory": { "uuid": "8b14e8fd1bae3b35acb67d19b8c7580e", "ruleNumber": 1.0, "ruleSetUuid": "7cd6023e32c639169b2316ffec4c79f3", "tableUuid": "3d5c0b99cfac3654a451c854cf449091", "destIp": "192.168.1.1", "sourceIp": "80", "destPort": "22", "protocol": "tcp", "state": "enable" } }变更历史
此 API 暂无变更历史记录。
