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

New-AzLoadBalancerBackendAddressPool

Creates a backend address pool on a loadbalancer.

Syntax

New-AzLoadBalancerBackendAddressPool
   -ResourceGroupName <String>
   -LoadBalancerName <String>
   -Name <String>
   [-TunnelInterface <PSTunnelInterface[]>]
   [-LoadBalancerBackendAddress <PSLoadBalancerBackendAddress[]>]
   [-SyncMode <String>]
   [-VirtualNetworkId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzLoadBalancerBackendAddressPool
   -LoadBalancer <PSLoadBalancer>
   -Name <String>
   [-TunnelInterface <PSTunnelInterface[]>]
   [-LoadBalancerBackendAddress <PSLoadBalancerBackendAddress[]>]
   [-SyncMode <String>]
   [-VirtualNetworkId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Creates a backend address pool on a loadbalancer. Allows for specifiying a array of PSLoadBalancerBackendAddress.

Examples

Example 1

## create by passing loadbalancer without Ips
$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
$ips = @($ip1, $ip2)

$lb | New-AzLoadBalancerBackendAddressPool -Name $backendPool1

Example 2

## create by passing loadbalancer with ips
$lb | New-AzLoadBalancerBackendAddressPool -Name $backendPool7 -LoadBalancerBackendAddress $ips

Example 3

## create by name without ips
New-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool3

Example 4

## create by name with ips
New-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool3 -LoadBalancerBackendAddress $ips

Example 5: Create a backend address pool configuration with tunnel interface for a load balancer

## create with Gateway LoadBalancer TunnelInterface configuration
$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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LoadBalancer

The load balancer resource.

Type:PSLoadBalancer
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-LoadBalancerBackendAddress

The backend addresses.

Type:PSLoadBalancerBackendAddress[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LoadBalancerName

The name of the load balancer.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the backend pool.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name of the load balancer.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncMode

Sync mode of the backend pool.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TunnelInterface

Gateway Load Balancer provider configurations.

Type:PSTunnelInterface[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VirtualNetworkId

The virtual network associated with the backend pool.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSLoadBalancer

Outputs

PSBackendAddressPool