Edit

Share via


Add-AzApplicationGatewayFrontendIPConfig

Adds a front-end IP configuration to an application gateway.

Syntax

SetByResourceId

Add-AzApplicationGatewayFrontendIPConfig
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    [-PrivateIPAddress <String>]
    [-SubnetId <String>]
    [-PublicIPAddressId <String>]
    [-PrivateLinkConfigurationId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SetByResource

Add-AzApplicationGatewayFrontendIPConfig
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    [-PrivateIPAddress <String>]
    [-Subnet <PSSubnet>]
    [-PublicIPAddress <PSPublicIpAddress>]
    [-PrivateLinkConfiguration <PSApplicationGatewayPrivateLinkConfiguration>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Add-AzApplicationGatewayFrontendIPConfig cmdlet adds a front-end IP configuration to an application gateway. An application gateway supports two types of front-end IP configurations:

  • Public IP addresses
  • Private IP addresses using internal load-balancing (ILB) An application gateway can have at most one public IP and one private IP. Add the public IP address and private IP address as separate front-end IPs.

Examples

Example 1: Add a public IP as the front-end IP address

$PublicIp = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIp01" -location "West US" -AllocationMethod Dynamic
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontEndIp01" -PublicIPAddress $PublicIp

The first command creates a public IP address object and stores it in the $PublicIp variable. The second command gets the application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01, and stores it in the $AppGw variable. The third command adds the front-end IP configuration named FrontEndIp01, for the gateway in $AppGw, using the address stored in $PublicIp.

Example 2: Add a static private IP as the front-end IP address

$VNet = Get-AzVirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"
$Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontendIP02" -Subnet $Subnet -PrivateIPAddress 10.0.1.1

The first command gets a virtual network named VNet01 that belongs to the resource group named ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command gets the application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01, and stores it in the $AppGw variable. The fourth command adds a front-end IP configuration named FrontendIP02 using $Subnet from the second command and the private IP address 10.0.1.1.

Example 3: Add a dynamic private IP as the front-end IP address

$VNet = Get-AzVirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"
$Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayFrontendIPConfig -ApplicationGateway $AppGw -Name "FrontendIP02" -Subnet $Subnet

The first command gets a virtual network named VNet01 that belongs to the resource group named ResourceGroup01, and stores it in the $VNet variable. The second command gets a subnet configuration named Subnet01 using $VNet from the first command and stores it in the $Subnet variable. The third command gets the application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01, and stores it in the $AppGw variable. The fourth command adds a front-end IP configuration named FrontendIP02 using $Subnet from the second command.

Parameters

-ApplicationGateway

Specifies the application gateway to which this cmdlet adds a front-end IP configuration.

Parameter properties

Type:PSApplicationGateway
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: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

-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 add as a front-end IP for the application gateway. If specified, this IP is statically allocated from the subnet.

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

-PrivateLinkConfiguration

PrivateLinkConfiguration

Parameter properties

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

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrivateLinkConfigurationId

PrivateLinkConfigurationId

Parameter properties

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

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PublicIPAddress

Specifies the public IP address which this cmdlet adds as a front-end IP address for the application gateway.

Parameter properties

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

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PublicIPAddressId

Specifies the ID of the public IP address which this cmdlet adds as a front-end IP address for the application gateway.

Parameter properties

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

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Subnet

Specifies the subnet which this cmdlet adds as front-end IP configuration. If you specify this parameter, it implies that the application gateway supports a private IP based-configuration. If the PrivateIPAddress parameter is specified, it should belong to this subnet. If PrivateIPAddress is not specified, one of the IP addresses from this subnet is dynamically picked up as the front-end IP address of the application gateway.

Parameter properties

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

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubnetId

Specifies the subnet ID which this cmdlet adds as the front-end IP configuration. Passing subnet implies private IP. If the PrivateIPAddress parameter is specified, it should belong to this subnet. Otherwise, one of the IP from this subnet is dynamically picked up as the front-end IP of the application gateway.

Parameter properties

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

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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

PSApplicationGateway

Outputs

PSApplicationGateway