Edit

Set-AzLoadBalancerFrontendIpConfig

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

Syntax

SetByResourceSubnet (Default)

Set-AzLoadBalancerFrontendIpConfig
    -LoadBalancer <PSLoadBalancer>
    -Name <String>
    -Subnet <PSSubnet>
    [-PrivateIpAddress <String>]
    [-PrivateIpAddressVersion <String>]
    [-Zone <String[]>]
    [-GatewayLoadBalancerId <String>]
    [-DdosCustomPolicyId <String>]
    [-RemoveDdosCustomPolicy]
    [-EnableConnectionTracking]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

SetByResourceIdSubnet

Set-AzLoadBalancerFrontendIpConfig
    -LoadBalancer <PSLoadBalancer>
    -Name <String>
    -SubnetId <String>
    [-PrivateIpAddress <String>]
    [-PrivateIpAddressVersion <String>]
    [-Zone <String[]>]
    [-GatewayLoadBalancerId <String>]
    [-DdosCustomPolicyId <String>]
    [-RemoveDdosCustomPolicy]
    [-EnableConnectionTracking]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

SetByResourceIdPublicIpAddress

Set-AzLoadBalancerFrontendIpConfig
    -LoadBalancer <PSLoadBalancer>
    -Name <String>
    -PublicIpAddressId <String>
    [-Zone <String[]>]
    [-GatewayLoadBalancerId <String>]
    [-DdosCustomPolicyId <String>]
    [-RemoveDdosCustomPolicy]
    [-EnableConnectionTracking]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

SetByResourcePublicIpAddress

Set-AzLoadBalancerFrontendIpConfig
    -LoadBalancer <PSLoadBalancer>
    -Name <String>
    -PublicIpAddress <PSPublicIpAddress>
    [-Zone <String[]>]
    [-GatewayLoadBalancerId <String>]
    [-DdosCustomPolicyId <String>]
    [-RemoveDdosCustomPolicy]
    [-EnableConnectionTracking]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

SetByResourceIdPublicIpAddressPrefix

Set-AzLoadBalancerFrontendIpConfig
    -LoadBalancer <PSLoadBalancer>
    -Name <String>
    -PublicIpAddressPrefixId <String>
    [-Zone <String[]>]
    [-GatewayLoadBalancerId <String>]
    [-DdosCustomPolicyId <String>]
    [-RemoveDdosCustomPolicy]
    [-EnableConnectionTracking]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

SetByResourcePublicIpAddressPrefix

Set-AzLoadBalancerFrontendIpConfig
    -LoadBalancer <PSLoadBalancer>
    -Name <String>
    -PublicIpAddressPrefix <PSPublicIpPrefix>
    [-Zone <String[]>]
    [-GatewayLoadBalancerId <String>]
    [-DdosCustomPolicyId <String>]
    [-RemoveDdosCustomPolicy]
    [-EnableConnectionTracking]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

Description

The Set-AzLoadBalancerFrontendIpConfig cmdlet updates a front-end IP configuration for a load balancer.

Examples

Example 1: Modify the front-end IP configuration of a load balancer

$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "MyResourceGroup" | Get-AzVirtualNetworkSubnetConfig -Name "Subnet"
$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
$slb | Add-AzLoadBalancerFrontendIpConfig -Name "NewFrontend" -Subnet $Subnet
$slb | Set-AzLoadBalancerFrontendIpConfig -Name "NewFrontend" -Subnet $Subnet
$slb | Set-AzLoadBalancer

The first command gets the virtual subnet named Subnet, and then stores it in the $Subnet variable. The second command gets the associated load balancer named MyLoadBalancer, and then stores it in the $slb variable. The third command uses the pipeline operator to pass the load balancer in $slb to Add-AzLoadBalancerFrontendIpConfig, which creates a front-end IP configuration named NewFrontend for $slb. The fourth command passes the load balancer in $slb to Set-AzLoadBalancerFrontendIpConfig, which saves and updates the front-end IP configuration.

Example 2: Modify the front-end IP configuration of a load balancer with Gateway Load Balancer

$slb1 = Get-AzLoadBalancer -Name "MyLoadBalancer1" -ResourceGroupName "MyResourceGroup"
$feip = Get-AzLoadBalancerFrontendIpConfig -Name "MyFrontEnd" -LoadBalancer $slb1
$slb2 = Get-AzLoadBalancer -Name "MyLoadBalancer1" -ResourceGroupName "MyResourceGroup"
$slb2 | Set-AzLoadBalancerFrontendIpConfig -Name "NewFrontend" -PublicIpAddress $publicIp -GatewayLoadBalancerId $feip.Id
$slb2 | Set-AzLoadBalancer

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

Specifies the ID of the Gateway Load Balancer Provider 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

-LoadBalancer

Specifies a load balancer. This cmdlet updates a front-end configuration for 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 set.

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 of the load balancer that is associated with the front-end IP configuration to set. 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

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 PublicIpAddress object that is associated with the front-end IP configuration to set.

Parameter properties

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

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 PublicIpAddress object that is associated with the front-end IP configuration that this cmdlet sets.

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 PublicIpAddressPrefix 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 PublicIpAddressPrefix 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

-RemoveDdosCustomPolicy

Removes the DDoS custom policy association from the frontend IP configuration.

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

-Subnet

Specifies the Subnet object that contains the front-end IP configuration that this cmdlet sets.

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 that contains the front-end IP configuration that this cmdlet sets.

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.

Inputs

PSLoadBalancer

String

String

PSSubnet

PSPublicIpAddress

Outputs

PSLoadBalancer