Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzLoadBalancerFrontendIpConfig

Creates a front-end IP configuration for a load balancer.

Syntax

SetByResourceSubnet (Default)

New-AzLoadBalancerFrontendIpConfig
 -Name <String>
 -Subnet <PSSubnet>
 [-PrivateIpAddress <String>]
 [-PrivateIpAddressVersion <String>]
 [-Zone <String[]>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourceIdSubnet

New-AzLoadBalancerFrontendIpConfig
 -Name <String>
 -SubnetId <String>
 [-PrivateIpAddress <String>]
 [-PrivateIpAddressVersion <String>]
 [-Zone <String[]>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourceIdPublicIpAddress

New-AzLoadBalancerFrontendIpConfig
 -Name <String>
 -PublicIpAddressId <String>
 [-Zone <String[]>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourcePublicIpAddress

New-AzLoadBalancerFrontendIpConfig
 -Name <String>
 -PublicIpAddress <PSPublicIpAddress>
 [-Zone <String[]>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourceIdPublicIpAddressPrefix

New-AzLoadBalancerFrontendIpConfig
 -Name <String>
 -PublicIpAddressPrefixId <String>
 [-Zone <String[]>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourcePublicIpAddressPrefix

New-AzLoadBalancerFrontendIpConfig
 -Name <String>
 -PublicIpAddressPrefix <PSPublicIpPrefix>
 [-Zone <String[]>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

The New-AzLoadBalancerFrontendIpConfig cmdlet creates a front-end IP configuration for an Azure load balancer.

Examples

Example 1: Create a front-end IP configuration for a load balancer

$publicip = New-AzPublicIpAddress -ResourceGroupName "MyResourceGroup" -Name "MyPublicIP" -Location "West US" -AllocationMethod "Dynamic"
New-AzLoadBalancerFrontendIpConfig -Name "FrontendIpConfig01" -PublicIpAddress $publicip

The first command creates a dynamic public IP address named MyPublicIP in the resource group named MyResourceGroup, and then stores it in the $publicip variable. The second command creates a front-end IP configuration named FrontendIpConfig01 using the public IP address in $publicip.

Example 2: Create a front-end IP configuration for a load balancer using ip prefix

$publicipprefix = New-AzPublicIpPrefix -ResourceGroupName "MyResourceGroup" -name "MyPublicIPPrefix" -location "West US" -Sku Standard -PrefixLength 28
$frontend = New-AzLoadBalancerFrontendIpConfig -Name "FrontendIpConfig01" -PublicIpAddressPrefix $publicipprefix

The first command creates a public ip prefix named MyPublicIP of length 28 in the resource group named MyResourceGroup, and then stores it in the $publicipprefix variable. The second command creates a front-end IP configuration named FrontendIpConfig01 using the public IP prefix in $publicipprefix.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

-Name

Specifies the front-end IP configuration that this cmdlet creates.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PrivateIpAddress

Specifies the private IP address of the load balancer. Specify this parameter only if you also specify the Subnet parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PrivateIpAddressVersion

The private IP address version of the IP configuration.

Parameter properties

Type:String
Default value:None
Accepted values:IPv4, IPv6
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddress

Specifies the PublicIpAddress object to associate with a front-end IP configuration.

Parameter properties

Type:PSPublicIpAddress
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddressId

Specifies the ID of the PublicIpAddress object to associate with a front-end IP configuration.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddressPrefix

Specifies the PublicIpAddressPrefix object to associate with a front-end IP configuration.

Parameter properties

Type:PSPublicIpPrefix
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicIpAddressPrefixId

Specifies the ID of the PublicIpAddressPrefix object to associate with a front-end IP configuration.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Subnet

Specifies the Subnet object in which to create a front-end IP configuration.

Parameter properties

Type:PSSubnet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SubnetId

Specifies the ID of the subnet in which to create a front-end IP configuration.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

-Zone

A list of availability zones denoting the IP allocated for the resource needs to come from.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

String

PSSubnet

PSPublicIpAddress

Outputs

PSFrontendIPConfiguration

Related Links


Feedback

Was this page helpful?