你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzNetworkManagerRoutingRule
获取网络管理器中的路由规则。
语法
Get-AzNetworkManagerRoutingRule
-RuleCollectionName <String>
-RoutingConfigurationName <String>
-NetworkManagerName <String>
-ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNetworkManagerRoutingRule
-Name <String>
-RuleCollectionName <String>
-RoutingConfigurationName <String>
-NetworkManagerName <String>
-ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNetworkManagerRoutingRule
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzNetworkManagerRoutingRule cmdlet 获取网络管理器中的路由规则。
示例
示例 1
Get-AzNetworkManagerRoutingRule -Name "testRule" -RuleCollectionName "TestRC" -RoutingConfigurationName "TestRoutingConfig" -NetworkManagerName "TestNMName" -ResourceGroupName "TestRG"
Name : testRule
Description : Description
Type : Microsoft.Network/networkManagers/routingConfigurations/ruleCollections/rules
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/routingConfigurations/TestRoutingConfig/ruleCollections/TestRC/rules/testRule
Etag : "00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
NextHop : {
"NextHopAddress": "ApiManagement",
"NextHopType": "ServiceTag"
}
Destination : {
"DestinationAddress": "10.0.0.1",
"Type": "AddressPrefix"
}
SystemData : {
"CreatedBy": "00000000-0000-0000-0000-000000000000",
"CreatedByType": "Application",
"CreatedAt": "2021-10-18T04:06:05",
"LastModifiedBy": "00000000-0000-0000-0000-000000000000",
"LastModifiedByType": "Application",
"LastModifiedAt": "2021-10-18T04:06:06"
}
获取规则滚动条中的路由规则。
示例 2
Get-AzNetworkManagerRoutingRule -RuleCollectionName "TestRC" -RoutingConfigurationName "TestRoutingConfig" -NetworkManagerName "TestNMName" -ResourceGroupName "TestRG"
Name : testRule
Description : Description
Type : Microsoft.Network/networkManagers/routingConfigurations/ruleCollections/rules
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/routingConfigurations/TestRoutingConfig/ruleCollections/TestRC/rules/testRule
Etag : "00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
NextHop : {
"NextHopAddress": "ApiManagement",
"NextHopType": "ServiceTag"
}
Destination : {
"DestinationAddress": "10.0.0.1",
"Type": "AddressPrefix"
}
SystemData : {
"CreatedBy": "00000000-0000-0000-0000-000000000000",
"CreatedByType": "Application",
"CreatedAt": "2021-10-18T04:06:05",
"LastModifiedBy": "00000000-0000-0000-0000-000000000000",
"LastModifiedByType": "Application",
"LastModifiedAt": "2021-10-18T04:06:06"
}
Name : testRule2
Description : Description
Type : Microsoft.Network/networkManagers/routingConfigurations/ruleCollections/rules
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestRG/providers/Microsoft.Network/networkManagers/TestNMName/routingConfigurations/TestRoutingConfig/ruleCollections/TestRC/rules/testRule2
Etag : "00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
NextHop : {
"NextHopAddress": "ApiManagement",
"NextHopType": "ServiceTag"
}
Destination : {
"DestinationAddress": "20.0.0.1",
"Type": "AddressPrefix"
}
SystemData : {
"CreatedBy": "00000000-0000-0000-0000-000000000000",
"CreatedByType": "Application",
"CreatedAt": "2021-10-18T04:06:05",
"LastModifiedBy": "00000000-0000-0000-0000-000000000000",
"LastModifiedByType": "Application",
"LastModifiedAt": "2021-10-18T04:06:06"
}
获取路由规则集合中的所有规则。
参数
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
资源名称。
类型: | String |
别名: | ResourceName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | True |
-NetworkManagerName
网络管理器名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | True |
-ResourceGroupName
资源组名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceId
NetworkManager RoutingRule Id
类型: | String |
别名: | RoutingRuleId |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-RoutingConfigurationName
网络管理器路由配置名称。
类型: | String |
别名: | ConfigName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | True |
-RuleCollectionName
网络管理器路由规则集合名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | True |