你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Set-AzNetworkManagerRoutingRuleCollection

更新网络管理器路由规则集合。

语法

Set-AzNetworkManagerRoutingRuleCollection
   -InputObject <PSNetworkManagerRoutingRuleCollection>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkManagerRoutingRuleCollection
   -Name <String>
   -ResourceGroupName <String>
   -NetworkManagerName <String>
   -RoutingConfigurationName <String>
   [-Description <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkManagerRoutingRuleCollection
   -ResourceId <String>
   [-Description <String>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

说明

Set-AzNetworkManagerRoutingRuleCollection cmdlet 更新网络管理器路由规则集合。

示例

示例 1

$NetworkManagerRoutingRuleCollection = Get-AzNetworkManagerRoutingRuleCollection -RoutingConfigurationName "psRoutingConfig" -Name "psRuleCollection" -NetworkManagerName "psNetworkManager" -ResourceGroupName "psResourceGroup"
$groupItem = New-AzNetworkManagerRoutingGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup"
$groupItem2 = New-AzNetworkManagerRoutingGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2"
[System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerRoutingGroupItem]]$configGroup  = @() 
$configGroup.Add($groupItem)
$configGroup.Add($groupItem2)
$NetworkManagerRoutingRuleCollection.AppliesTo = $configGroup
Set-AzNetworkManagerRoutingRuleCollection -InputObject $NetworkManagerRoutingRuleCollection

AppliesTo           : {/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup, /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2}
AppliesToText       : [
                        {
                          "NetworkGroupId": "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup"
                        },
                        {
                          "NetworkGroupId": "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2"
                        }
                      ]
DisplayName         :
Description         :
Type                : Microsoft.Network/networkManagers/routingConfigurations/ruleCollections
DisableBgpRoutePropagation : "False"
ProvisioningState   : Succeeded
SystemData          : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText      : {
                       "CreatedBy": "00000000-0000-0000-0000-000000000000",
                       "CreatedByType": "Application",
                       "CreatedAt": "2021-10-18T04:05:57",
                       "LastModifiedBy": "00000000-0000-0000-0000-000000000000",
                       "LastModifiedByType": "Application",
                       "LastModifiedAt": "2021-10-18T04:05:59"
                     }
Name                : psRuleCollection
Etag                :
Id                  : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/routingConfigurations/psRoutingConfig/ruleCollections/psRuleCollection

更新网络管理器路由规则集合以包含新的网络组。

参数

-AsJob

在后台运行 cmdlet

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Confirm

在运行 cmdlet 之前,提示你进行确认。

类型:SwitchParameter
别名:cf
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

类型:IAzureContextContainer
别名:AzContext, AzureRmContext, AzureCredential
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Description

描述。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:True
接受通配符:False

-InputObject

The NetworkManagerRoutingRuleCollection

类型:PSNetworkManagerRoutingRuleCollection
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-Name

资源名称。

类型:String
别名:ResourceName
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:True

-NetworkManagerName

网络管理器名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-ResourceGroupName

资源组名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-ResourceId

NetworkManager RoutingCollection Id

类型:String
别名:RoutingCollectionId
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-RoutingConfigurationName

路由配置名称。

类型:String
别名:ConfigName
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-WhatIf

显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。

类型:SwitchParameter
别名:wi
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

String

PSNetworkManagerRoutingRuleCollection

输出

PSNetworkManagerRoutingRuleCollection