Set-AzLoadBalancerBackendAddressPool
语法
SetByNameParameterSet (默认值)
Set-AzLoadBalancerBackendAddressPool
-ResourceGroupName <String>
-LoadBalancerName <String>
-Name <String>
-LoadBalancerBackendAddress <PSLoadBalancerBackendAddress[]>
[-TunnelInterface <PSTunnelInterface[]>]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByParentObjectParameterSet
Set-AzLoadBalancerBackendAddressPool
-Name <String>
-LoadBalancer <PSLoadBalancer>
-LoadBalancerBackendAddress <PSLoadBalancerBackendAddress[]>
[-TunnelInterface <PSTunnelInterface[]>]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzLoadBalancerBackendAddressPool
-InputObject <PSBackendAddressPool>
[-TunnelInterface <PSTunnelInterface[]>]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceIdParameterSet
Set-AzLoadBalancerBackendAddressPool
-LoadBalancerBackendAddress <PSLoadBalancerBackendAddress[]>
-ResourceId <String>
[-TunnelInterface <PSTunnelInterface[]>]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
示例
示例 1
# Set by name and modified input object
$virtualNetwork = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup
$lb = Get-AzLoadBalancer -ResourceGroupName $resourceGroup -Name $loadBalancerName
$ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetworkId $virtualNetwork.Id
$ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetworkId $virtualNetwork.Id
$ip3 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.7" -Name "TestVNetRef3" -VirtualNetworkId $virtualNetwork.id
$tunnelInterface1 = New-AzLoadBalancerBackendAddressPoolTunnelInterfaceConfig -Protocol "Vxlan" -Type "Internal" -Port 2000 -Identifier 800
$tunnelInterface2 = New-AzLoadBalancerBackendAddressPoolTunnelInterfaceConfig -Protocol "Vxlan" -Type "External" -Port 2001 -Identifier 801
New-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool3 -TunnelInterface $tunnelInterface1, $tunnelInterface2
$ips = @($ip1, $ip2)
$b2 = Get-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool1
$b2.LoadBalancerBackendAddresses.Add($ip3)
Set-AzLoadBalancerBackendAddressPool -InputObject $b2
示例 2
# Set by specific backend from piped loadbalancer and set two IP's
$lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ips -Name $backendPool1
示例 3
# Set by ResourceId
Set-AzLoadBalancerBackendAddressPool -ResourceId $b2.Id -LoadBalancerBackendAddress $b2.LoadBalancerBackendAddresses
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Force
不要要求确认。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
要设置的后端地址池
SetByInputObjectParameterSet
Position: Named
必需: True
来自管道的值: True
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancer
负载均衡器资源。
参数属性
参数集
SetByParentObjectParameterSet
Position: Named
必需: True
来自管道的值: True
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancerBackendAddress
后端地址。
参数属性
参数集
SetByNameParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetByParentObjectParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetByResourceIdParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-LoadBalancerName
负载均衡器的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
SetByNameParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Name
后端池的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
SetByNameParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
SetByParentObjectParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-PassThru
{{ 填写 PassThru 描述 }}
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ResourceGroupName
负载均衡器的资源组名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
SetByNameParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ResourceId
在负载均衡器上更新后端池
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
SetByResourceIdParameterSet
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-TunnelInterface
网关负载均衡器提供程序配置。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters 。
输出