Add-AzLoadBalancerFrontendIpConfig
Adds a front-end IP configuration to a load balancer.
Syntax
SetByResourceSubnet (Default)
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-Subnet <PSSubnet>
[-PrivateIpAddress <String>]
[-PrivateIpAddressVersion <String>]
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DdosCustomPolicyId <String>]
[-EnableConnectionTracking]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
SetByResourceIdSubnet
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-SubnetId <String>
[-PrivateIpAddress <String>]
[-PrivateIpAddressVersion <String>]
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DdosCustomPolicyId <String>]
[-EnableConnectionTracking]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
SetByResourceIdPublicIpAddress
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddressId <String>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DdosCustomPolicyId <String>]
[-EnableConnectionTracking]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
SetByResourcePublicIpAddress
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddress <PSPublicIpAddress>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DdosCustomPolicyId <String>]
[-EnableConnectionTracking]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
SetByResourceIdPublicIpAddressPrefix
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddressPrefixId <String>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DdosCustomPolicyId <String>]
[-EnableConnectionTracking]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
SetByResourcePublicIpAddressPrefix
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddressPrefix <PSPublicIpPrefix>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DdosCustomPolicyId <String>]
[-EnableConnectionTracking]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Description
The Add-AzLoadBalancerFrontendIpConfig cmdlet adds a front-end IP configuration to an Azure load balancer.
Examples
Example 1 Add a front-end IP configuration with a dynamic IP address
$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "MyRg" | Get-AzVirtualNetworkSubnetConfig -Name "MySubnet"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -Subnet $Subnet | Set-AzLoadBalancer
The first command gets the Azure virtual network named MyVnet and passes the result using the pipeline to the Get-AzVirtualNetworkSubnetConfig cmdlet to get the subnet named MySubnet.
The command then stores the result in the variable named $Subnet.
The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with a dynamic private IP address from the subnet stored in the variable named $MySubnet.
Example 2 Add a front-end IP configuration with a static IP address
$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "RG001" | Get-AzVirtualNetworkSubnetConfig -Name "MySubnet"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -Subnet $Subnet -PrivateIpAddress "10.0.1.6" | Set-AzLoadBalancer
The first command gets the Azure virtual network named MyVnet and passes the result using the pipeline to the Get-AzVirtualNetworkSubnetConfig cmdlet to get the subnet named MySubnet.
The command then stores the result in the variable named $Subnet.
The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with a static private IP address from the subnet stored in the variable named $Subnet.
Example 3 Add a front-end IP configuration with a public IP address
$PublicIp = Get-AzPublicIpAddress -ResourceGroupName "myRG" -Name "MyPub"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -PublicIpAddress $PublicIp | Set-AzLoadBalancer
The first command gets the Azure public IP address named MyPub and stores the result in the variable named $PublicIp.
The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with public IP address stored in the variable named $PublicIp.
Example 4 Add a front-end IP configuration with a public IP prefix
$PublicIpPrefix = Get-AzPublicIpPrefix -ResourceGroupName "myRG" -Name "MyPubPrefix"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -PublicIpAddressPrefix $PublicIpPrefix | Set-AzLoadBalancer
The first command gets the Azure public IP prefix named MyPubPrefix and stores the result in the variable named $PublicIpPrefix.
The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with public IP prefix stored in the variable named $PublicIpPrefix.
Parameters
-AcquirePolicyToken
Acquire an Azure Policy token automatically for this resource operation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ChangeReference
The change reference resource ID for this resource operation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DdosCustomPolicyId
The DDoS custom policy resource ID to associate with the frontend IP configuration.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableConnectionTracking
Enables UDP flow tracking for traffic associated with the frontend IP configuration. When enabled, packets belonging to the same UDP flow are consistently directed to the same backend instance. This setting applies to all associated load balancing rules and takes precedence over rule-level connection tracking settings.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-GatewayLoadBalancerId
The reference of Gateway LoadBalancer Provider resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-LoadBalancer
Specifies a LoadBalancer object.
This cmdlet adds a front-end IP configuration to the load balancer that this parameter specifies.
Parameter properties
Type: PSLoadBalancer
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
Specifies the name of the front-end IP configuration to add.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PrivateIpAddress
Specifies the private IP address to associate with a front-end IP configuration.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceSubnet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
SetByResourceIdSubnet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-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
SetByResourceSubnet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
SetByResourceIdSubnet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PublicIpAddress
Specifies the public IP address to associate with a front-end IP configuration.
Parameter properties
Parameter sets
SetByResourcePublicIpAddress
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PublicIpAddressId
Specifies the ID of the public IP address in which to add a front-end IP configuration.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceIdPublicIpAddress
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PublicIpAddressPrefix
Specifies the public ip address prefix object to associate with a front-end IP configuration.
Parameter properties
Type: PSPublicIpPrefix
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourcePublicIpAddressPrefix
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-PublicIpAddressPrefixId
Specifies the ID of the public ip address prefix object to associate with a front-end IP configuration.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceIdPublicIpAddressPrefix
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Subnet
Specifies the subnet object in which to add a front-end IP configuration.
Parameter properties
Type: PSSubnet
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceSubnet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-SubnetId
Specifies the ID of the subnet in which to add a front-end IP configuration.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceIdSubnet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
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 .
Outputs