Note

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

Access to this page requires authorization. You can try .

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>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourceIdSubnet

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

SetByResourceIdPublicIpAddress

Set-AzLoadBalancerFrontendIpConfig
 -LoadBalancer <PSLoadBalancer>
 -Name <String>
 -PublicIpAddressId <String>
 [-Zone <String[]>]
 [-GatewayLoadBalancerId <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourcePublicIpAddress

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

SetByResourceIdPublicIpAddressPrefix

Set-AzLoadBalancerFrontendIpConfig
 -LoadBalancer <PSLoadBalancer>
 -Name <String>
 -PublicIpAddressPrefixId <String>
 [-Zone <String[]>]
 [-GatewayLoadBalancerId <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

SetByResourcePublicIpAddressPrefix

Set-AzLoadBalancerFrontendIpConfig
 -LoadBalancer <PSLoadBalancer>
 -Name <String>
 -PublicIpAddressPrefix <PSPublicIpPrefix>
 [-Zone <String[]>]
 [-GatewayLoadBalancerId <String>]
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<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

-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

-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

-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

-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

-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

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

-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

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

-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

-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

PSLoadBalancer

String

String

PSSubnet

PSPublicIpAddress

Outputs

PSLoadBalancer

Related Links


Feedback

Was this page helpful?