addRouteTableRules
描述
添加路由表规则
请求方式
POST
请求地址
https://vpc.jdcloud-api.com/v1/regions/{regionId}/routeTables/{routeTableId}:addRouteTableRules
名称 |
类型 |
是否必需 |
默认值 |
描述 |
regionId |
String |
True |
|
Region ID |
routeTableId |
String |
True |
|
RouteTable ID |
请求参数
名称 |
类型 |
是否必需 |
默认值 |
描述 |
routeTableRuleSpecs |
AddRouteTableRules[ ] |
True |
|
安全组规则信息 |
AddRouteTableRules
名称 |
类型 |
是否必需 |
默认值 |
描述 |
nextHopType |
String |
True |
|
下一跳类型, 取值范围:instance:云主机, internet:公网, vpc_peering:vpc对等连接, bgw:边界网关 |
nextHopId |
String |
True |
|
下一跳id |
addressPrefix |
String |
True |
|
匹配地址前缀, internet类型路由跟其他类型的路由,addressPrefix不允许重复 |
priority |
Number |
False |
|
规则匹配优先级,取值范围[1,255],默认为100。当路由规则子网掩码不同时,路由最长匹配优先;当路由规则子网掩码相同时, 按照优先级匹配转发, 优先级数字越小优先级越高,路由规则子网掩码相同、优先级相同、下一跳不同时,形成等价路由,不同下一跳负载均担。 |
返回参数
名称 |
类型 |
描述 |
requestId |
String |
请求ID |
返回码
返回码 |
描述 |
200 |
Successful operation |
400 |
Request parameter x.y.z is 'xxx', expected one of [yyy,zzz] |
404 |
Resource not found |
409 |
RouteTable rules not in the same vpc |
500 |
Internal server error |