Add-AzureRmApplicationGatewayHttpListener
Adds an HTTP listener to an application gateway.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Add-AzureRmApplicationGatewayHttpListener
-ApplicationGateway <PSApplicationGateway>
-Name <String>
[-FrontendIPConfigurationId <String>]
[-FrontendPortId <String>]
[-SslCertificateId <String>]
[-HostName <String>]
[-RequireServerNameIndication <String>]
-Protocol <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Add-AzureRmApplicationGatewayHttpListener
-ApplicationGateway <PSApplicationGateway>
-Name <String>
[-FrontendIPConfiguration <PSApplicationGatewayFrontendIPConfiguration>]
[-FrontendPort <PSApplicationGatewayFrontendPort>]
[-SslCertificate <PSApplicationGatewaySslCertificate>]
[-HostName <String>]
[-RequireServerNameIndication <String>]
-Protocol <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Add-AzureRmApplicationGatewayHttpListener cmdlet adds a HTTP listener to an application gateway.
Examples
Example 1: Add a HTTP listener
PS C:\>$AppGw = Get-AzureRmApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Appgw = Add-AzureRmApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "listener01" -Protocol "Http" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01
The first command gets the application gateway and stores it in the $AppGw variable.The second command adds the HTTP listener to the application gateway.
Example 2: Add a HTTPS listener with SSL
PS C:\>$AppGw = Get-AzureRmApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzureRmApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener01" -Protocol "Https" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01 -SslCertificate $SSLCert01
The first command gets the application gateway and stores it in the $AppGw variable. The second command adds the listener, which uses the HTTPS protocol, to the application gateway.
Parameters
-ApplicationGateway
Specifies the application gateway to which this cmdlet adds an HTTP listener.
Type: | PSApplicationGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendIPConfiguration
Specifies the application gateway front-end IP resource object.
Type: | PSApplicationGatewayFrontendIPConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendIPConfigurationId
Specifies the application gateway front-end IP ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendPort
Specifies the application gateway front-end port object.
Type: | PSApplicationGatewayFrontendPort |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendPortId
Specifies the application gateway front-end port ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostName
Specifies the host name that this cmdlet adds a HTTP listener to.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the front-end port that this command adds.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Protocol
Specifies the protocol of the HTTP listener. Both HTTP and HTTPS are supported.
Type: | String |
Accepted values: | Http, Https |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RequireServerNameIndication
Type: | String |
Accepted values: | true, false |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SslCertificate
Specifies the SSL certificate of the HTTP listener. Must be specified if HTTPS is chosen as listener protocol.
Type: | PSApplicationGatewaySslCertificate |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SslCertificateId
Specifies the SSL certificate ID of the HTTP listener. Must be specified if HTTPS is chosen as listener protocol.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Parameters: ApplicationGateway (ByValue)