Network Interfaces - Get Effective Route Table
获取应用于网络接口的所有路由表。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable?api-version=2025-03-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
network
|
path | True |
string |
网络接口的名称。 |
|
resource
|
path | True |
string |
资源组的名称。 |
|
subscription
|
path | True |
string |
唯一标识 Azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
|
api-version
|
query | True |
string |
客户端 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
请求成功。 该作返回 EffectRoute 资源的列表。 |
|
| 202 Accepted |
已接受,作将异步完成。 |
|
| Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Show network interface effective route tables
示例请求
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1/effectiveRouteTable?api-version=2025-03-01
示例响应
{
"value": [
{
"source": "Default",
"state": "Active",
"addressPrefix": [
"172.20.2.0/24"
],
"nextHopType": "VnetLocal",
"nextHopIpAddress": []
},
{
"source": "Default",
"state": "Active",
"addressPrefix": [
"0.0.0.0/0"
],
"nextHopType": "Internet",
"nextHopIpAddress": []
},
{
"source": "Default",
"state": "Active",
"addressPrefix": [
"10.0.0.0/8"
],
"nextHopType": "None",
"nextHopIpAddress": []
},
{
"source": "Default",
"state": "Active",
"addressPrefix": [
"100.64.0.0/10"
],
"nextHopType": "None",
"nextHopIpAddress": []
},
{
"source": "Default",
"state": "Active",
"addressPrefix": [
"172.16.0.0/12"
],
"nextHopType": "None",
"nextHopIpAddress": []
},
{
"source": "Default",
"state": "Active",
"addressPrefix": [
"192.168.0.0/16"
],
"nextHopType": "None",
"nextHopIpAddress": []
}
]
}
Location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2025-03-01
定义
| 名称 | 说明 |
|---|---|
|
Cloud |
服务的错误响应。 |
|
Cloud |
服务的错误响应。 |
|
Effective |
有效路由。 |
|
Effective |
列出有效的路由 API 服务调用的响应。 |
|
Effective |
谁创建了路线。 |
|
Effective |
有效路由的值。 |
|
Route |
应将数据包发送到的 Azure 跃点的类型。 |
CloudError
服务的错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
云错误正文。 |
CloudErrorBody
服务的错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
| details |
有关错误的其他详细信息的列表。 |
|
| message |
string |
描述错误的消息,旨在适合在用户界面中显示。 |
| target |
string |
特定错误的目标。 例如,错误属性的名称。 |
EffectiveRoute
有效路由。
| 名称 | 类型 | 说明 |
|---|---|---|
| addressPrefix |
string[] |
CIDR表示法中有效路由的地址前缀。 |
| disableBgpRoutePropagation |
boolean |
如果为 true,则本地路由不会传播到子网中的网络接口。 |
| name |
string |
用户定义路由的名称。 这是可选的。 |
| nextHopIpAddress |
string[] |
有效路由下一跃点的 IP 地址。 |
| nextHopType |
应将数据包发送到的 Azure 跃点的类型。 |
|
| source |
谁创建了路线。 |
|
| state |
有效路由的值。 |
EffectiveRouteListResult
列出有效的路由 API 服务调用的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
用于获取下一组结果的 URL。 |
| value |
有效路由列表。 |
EffectiveRouteSource
谁创建了路线。
| 值 | 说明 |
|---|---|
| Unknown | |
| User | |
| VirtualNetworkGateway | |
| Default |
EffectiveRouteState
有效路由的值。
| 值 | 说明 |
|---|---|
| Active | |
| Invalid |
RouteNextHopType
应将数据包发送到的 Azure 跃点的类型。
| 值 | 说明 |
|---|---|
| VirtualNetworkGateway | |
| VnetLocal | |
| Internet | |
| VirtualAppliance | |
| None |