You need to enable JavaScript to run this app.
导航

查询路由条目列表

最近更新时间2023.07.03 17:00:56

首次发布时间2023.02.08 11:43:01

本接口用于查询路由条目列表。

请求方法

GET

请求参数

下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数

名称

类型

是否必选

示例值

描述

Action

String

ListRouteEntries

公共参数。该参数表示接口名称。取值:ListRouteEntries。

Version

String

2021-04-30

公共参数。该参数表示接口版本。取值:2021-04-30。

route_table_identity

String

route-table-7fs74n****

路由表 ID。您可以通过 ListRouteTables 接口获取路由表 ID。

route_entry_type_list

String

custom

路由条目类型。取值范围:

  • system:系统路由。
  • custom:自定义路由。

route_entry_next_hop_list

String

172.**.**.3,172.**.**.2

路由条目的下一跳列表。下一跳之间用半角逗号(,)分隔。
如果不指定该参数,系统将查询所有相关的路由条目。

page

Int

1

路由条目列表的页码。如果不指定该参数,系统将返回第 1 页的数据。

limit

Int

10

分页查询时设置的每页行数。
默认值:10

order_by

Int

1

查询出来的路由条目的排列顺序,按照创建时间排序。取值范围:

  • 1(默认值):按照降序排列。
  • 2:按照升序排列。

返回数据

名称

类型

示例值

描述

route_entry_instances

[]RouteEntry

请参见返回示例

路由条目列表。

count

Integer

1

路由条目个数。

请求示例

GET https://veenedge.volcengineapi.com/?Action=ListRouteEntries&Version=2021-04-30
&route_table_identity=route-table-29gwx9****
&route_entry_type_list=system
&<其他公共参数>

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202305221843358B651210E53CED92****",
        "Action": "ListRouteEntries",
        "Version": "2021-04-30",
        "Service": "veenedge",
        "Region": "cn-north-1"
    },
    "Result": {
        "route_entry_instances": [
            {
                "account_identity": 210000****,
                "user_identity": 0,
                "route_identity": "",
                "type": "system",
                "dest_cidr": "172.**.**.128/26",
                "next_hop_type": "LOCAL",
                "next_hop": "LOCAL",
                "desc": "VPC子网系统路由",
                "is_enable": true,
                "next_hop_instance_id": "",
                "create_time": 1684752215,
                "update_time": 1684752215
            }
        ],
        "count": 1
    }
}

错误码

如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码