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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
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
-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
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
-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 .
Outputs