查询路由表列表
GET
https://cocvpc.jdcloud-api.com/v1/regions/{regionId}/routeTables/
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
regionId | String | True | Region ID |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
pageNumber | Integer | False | 1 | 页码, 默认为1, 取值范围:[1,∞), 页码超过总页数时, 显示最后一页 |
pageSize | Integer | False | 20 | 分页大小,默认为20,取值范围:[10,100] |
filters | Filter[] | False | routeTableId - 路由表ID列表,支持单个 vpcId - 路由表所属vpc Id,支持单个 |
名称 | 类型 | 是否必需 | 默认值 | 描述 |
---|---|---|---|---|
name | String | True | 过滤条件的名称 | |
operator | String | False | 过滤条件的操作符,默认eq | |
values | String[] | True | 过滤条件的值 |
名称 | 类型 | 描述 |
---|---|---|
result | Result | 返回结果 |
requestId | String | 请求ID |
名称 | 类型 | 描述 |
---|---|---|
routeTables | RouteTable[] | 路由表资源信息列表 |
totalCount | Number | 总数量 |
名称 | 类型 | 描述 |
---|---|---|
routeTableId | String | 路由表ID |
routeTableName | String | 路由表名称,只允许输入中文、数字、大小写字母、英文下划线“_”及中划线“-”,不允许为空且不超过32字符。 |
routeTableType | String | 路由表类型,DEFAULT:默认路由表,CUSTOM:自定义路由表 |
vpcId | String | 私有网络ID |
routeTableRules | RouteTableRule[] | 路由表规则信息 |
subnetIds | String[] | 路由表绑定的子网列表 |
createdTime | String | 路由表创建时间 |
名称 | 类型 | 描述 |
---|---|---|
ruleId | String | 路由表规则ID |
nextHopType | String | 下一跳类型。LOCAL:本地路由;INTERNET:公网路由;INSTANCE:云主机。 |
nextHopId | String | 下一跳id,LOCAL和INTERNET类型的值分别为Local和Internet。 |
addressPrefix | String | 匹配地址前缀, internet类型路由跟其他类型的路由,addressPrefix不允许重复,LOCAL和INTERNET类型的值分别为Local和Internet。 |
description | String | 路由描述,允许输入UTF-8编码下的全部字符,不超过255字符。 |
createdTime | String | 创建时间 |
HTTP状态码 | 错误码 | 描述 |
---|---|---|
200 | OK |
GET
调用方法、签名算法及公共请求参数请参考[京东云OpenAPI公共说明](https://docs.jdcloud.com/common-declaration/api/introduction)。
- 请求示例: 查询路由表列表
/v1/regions/af-south-1/routeTables?pageNumber=1&pageSize=10
{
"requestId": "c45ov53gt952dre94co7bpei31egwvm7",
"result": {
"routeTables": [
{
"createdTime": "2021-07-30T06:38:08Z",
"routeTableId": "rtb-olajkrx4xr",
"routeTableName": "自建路由表",
"routeTableRules": [
{
"addressPrefix": "local",
"createdTime": "2021-07-30T06:38:08Z",
"description": "",
"nextHopId": "local",
"nextHopType": "local",
"ruleId": "rt-sg73xd72d2"
},
{
"addressPrefix": "0.0.0.0/0",
"createdTime": "2021-07-30T06:38:08Z",
"description": "",
"nextHopId": "vpn-socgtm8lu7",
"nextHopType": "vpn",
"ruleId": "rt-ghf3dw7ieo"
}
],
"routeTableType": "custom",
"subnetIds": null,
"vpcId": "vpc-2wzrfdesf"
}
],
"totalCount": 1
}
}
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通