调用DescribeRouteEntryList查询路由条目列表。
接口说明
调用 DeleteRouteEntry 接口删除路由条目前,您可以调用本接口查询要删除的路由条目的下一跳信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:DescribeRouteEntryList |
get |
*RouteTable
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
路由条目所在路由表的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| RouteTableId |
string |
是 |
要查询的路由表的 ID。 |
vtb-bp1r9pvl4xen8s9ju**** |
| RouteEntryId |
string |
否 |
要查询的路由条目的 ID。 |
rte-bp1mnnr2al0naomnp**** |
| DestinationCidrBlock |
string |
否 |
路由条目的目标网段,支持 IPv4 和 IPv6 网段。 |
192.168.2.0/24 |
| RouteEntryName |
string |
否 |
路由条目的名称。 名称长度为 1~128 个字符,不能以 |
abc |
| IpVersion |
string |
否 |
IP 协议的版本。取值:
|
ipv4 |
| RouteEntryType |
string |
否 |
路由的类型。取值:
|
System |
| NextHopId |
string |
否 |
下一跳实例 ID。 |
vpn-bp10zyaph5cc8b7c7**** |
| NextHopType |
string |
否 |
下一跳类型。取值:
|
Instance |
| MaxResult |
integer |
否 |
分批次查询时每次显示的条目数。取值范围:1~100,默认值为 10。 |
10 |
| NextToken |
string |
否 |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RegionId |
string |
是 |
路由条目所在路由表的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| ServiceType |
string |
否 |
路由托管的类型。如果该字段为空,即表示该路由没有被托管。 取值:TR,表示托管类型为转发路由器类型。 |
TR |
| DestCidrBlockList |
array |
否 |
路由条目的目标网段列表。 |
|
|
string |
否 |
路由条目的目标网段列表信息。最多支持输入 20 个目标网段。 |
192.168.0.0/24 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
路由条目详细信息。 |
||
| NextToken |
string |
是否拥有下一次查询的令牌(Token)。取值:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
请求 ID。 |
14A07460-EBE7-47CA-9757-12CC4761D47A |
| RouteEntrys |
object |
||
| RouteEntry |
array<object> |
路由条目信息。 |
|
|
array<object> |
路由条目信息。 |
||
| Status |
string |
路由条目的状态。取值:
|
Available |
| Type |
string |
路由条目的类型。取值:
|
System |
| IpVersion |
string |
IP 协议的版本。取值:
|
ipv4 |
| Description |
string |
路由条目的描述信息。 |
RouteEntryDescription |
| RouteEntryName |
string |
路由条目的名称。 |
aaa |
| DestinationCidrBlock |
string |
路由条目的目标网段。 |
192.168.2.0/24 |
| RouteEntryId |
string |
路由条目的 ID。 |
rte-bp1mnnr2al0naomnp**** |
| RouteTableId |
string |
路由表 ID。 |
vtb-bp15w5q90d2rk3bww**** |
| GmtModified |
string |
路由条目的修改时间。使用 UTC 时间,格式为 |
2022-05-09T03:00:07Z |
| NextHops |
object |
||
| NextHop |
array<object> |
下一跳信息。 |
|
|
array<object> |
下一跳信息。 |
||
| NextHopRegionId |
string |
下一跳实例所在的地域 ID。 说明
下一跳类型为 RouterInterface 时返回该参数。 |
cn-hangzhou |
| Weight |
integer |
路由条目的权重。 说明
下一跳类型为 RouterInterface 时返回该参数。 |
100 |
| NextHopId |
string |
下一跳实例 ID。 |
vpn-bp10zyaph5cc8b7c7**** |
| Enabled |
integer |
路由是否可用。取值:
说明
下一跳类型为 RouterInterface 时返回该参数。 |
1 |
| NextHopType |
string |
下一跳类型。取值:
|
Instance |
| NextHopRelatedInfo |
object |
下一跳相关信息。 |
|
| InstanceId |
string |
与下一跳相关联实例的实例 ID。 |
vpc-bp1t36rn9l53iwbsf**** |
| InstanceType |
string |
与下一跳相关联实例的实例类型。取值:
|
VPC |
| RegionId |
string |
下一跳相关联实例所在的地域 ID。 |
ch-hangzhou |
| ServiceType |
string |
路由托管的类型。如果该字段为空,即表示该路由没有被托管。 取值:TR,表示托管类型为转发路由器类型。 |
TR |
| Origin |
string |
路由创建来源。取值:
|
RoutePropagation |
示例
正常返回示例
JSON格式
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
"RouteEntrys": {
"RouteEntry": [
{
"Status": "Available",
"Type": "System",
"IpVersion": "ipv4",
"Description": "RouteEntryDescription",
"RouteEntryName": "aaa",
"DestinationCidrBlock": "192.168.2.0/24",
"RouteEntryId": "rte-bp1mnnr2al0naomnp****",
"RouteTableId": "vtb-bp15w5q90d2rk3bww****",
"GmtModified": "2022-05-09T03:00:07Z",
"NextHops": {
"NextHop": [
{
"NextHopRegionId": "cn-hangzhou",
"Weight": 100,
"NextHopId": "vpn-bp10zyaph5cc8b7c7****",
"Enabled": 1,
"NextHopType": "Instance",
"NextHopRelatedInfo": {
"InstanceId": "vpc-bp1t36rn9l53iwbsf****",
"InstanceType": "VPC",
"RegionId": "ch-hangzhou"
}
}
]
},
"ServiceType": "TR",
"Origin": "RoutePropagation"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IllegalParam.NextToken | User nextToken is illegal. | |
| 400 | InvalidNextHop.NotFound | The specified route entry nexthop does not exist in our records. | |
| 400 | OperationFailed.QueryCenEntry | Operation is denied because getting CEN route entry has failed. | 由于暂时无法获取云企业网路由导致查询失败。 |
| 400 | OperationDenied.UseGatewayRouteEntryQueryInterface | Use listGatewayRouteTableEntries to describe gateway route entries. | 查询网关路由表路由条目,请使用listGatewayRouteTableEntries接口。 |
| 400 | InvalidRouteTable.NotFound | The specified RouteTable was not found. | 指定的路由表未找到。 |
| 400 | IllegalParam.RouteEntryType | The parameter of RouteEntryType is illegal. | 参数RouteEntryType非法。 |
| 400 | MissingParam.context | The param of context is missing. | 参数context缺失。 |
| 400 | MissingParam.aliUid | The param of aliUid is missing. | 参数aliUid缺失。 |
| 400 | MissingParam.bid | The param of bid is missing. | 参数bid缺失。 |
| 400 | IllegalParam.IpVersion | Param IpVersion illegal. | 非法参数:IpVersion。 |
| 400 | OperationFailed.FilterParamUnderWrongRouteType | Operation failed because only custom type support filter by routeEntryId or routeEntryName | 操作失败,只有自定义路由条目才支持通过路由条目id或路由条目名进行过滤 |
| 400 | IllegalParam.NextTokenExpired | The parameter of NextTokenExpired is illegal. | 参数NextTokenExpired非法。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。