Add-AzApplicationGatewayHttpListener
Adds an HTTP listener to an application gateway.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Add-AzApplicationGatewayHttpListener
-ApplicationGateway <PSApplicationGateway>
-Name <String>
[-FrontendIPConfigurationId <String>]
[-FrontendPortId <String>]
[-SslCertificateId <String>]
[-FirewallPolicyId <String>]
[-SslProfileId <String>]
[-HostName <String>]
[-HostNames <String[]>]
[-RequireServerNameIndication <String>]
-Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Add-AzApplicationGatewayHttpListener
-ApplicationGateway <PSApplicationGateway>
-Name <String>
[-FrontendIPConfiguration <PSApplicationGatewayFrontendIPConfiguration>]
[-FrontendPort <PSApplicationGatewayFrontendPort>]
[-FirewallPolicy <PSApplicationGatewayWebApplicationFirewallPolicy>]
[-SslCertificate <PSApplicationGatewaySslCertificate>]
[-SslProfile <PSApplicationGatewaySslProfile>]
[-HostName <String>]
[-HostNames <String[]>]
[-RequireServerNameIndication <String>]
-Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Add-AzApplicationGatewayHttpListener cmdlet adds a HTTP listener to an application gateway.
Examples
Example 1: Add a HTTP listener
PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Appgw = Add-AzApplicationGatewayHttpListener -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-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzApplicationGatewayHttpListener -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.
Example 3: Add a HTTPS listener with SSL and HostNames
PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $AppGw = Add-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener01" -Protocol "Https" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01 -SslCertificate $SSLCert01 -HostNames "*.contoso.com","www.microsoft.com"
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, with SSL Certificates and HostNames, to the application gateway.
Parameters
Specifies the application gateway to which this cmdlet adds an HTTP listener.
| Type: | PSApplicationGateway |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Customer error of an application gateway
| Type: | PSApplicationGatewayCustomError[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
FirewallPolicy
| Type: | PSApplicationGatewayWebApplicationFirewallPolicy |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
FirewallPolicyId
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the application gateway front-end IP resource object.
| Type: | PSApplicationGatewayFrontendIPConfiguration |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the application gateway front-end IP ID.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the application gateway front-end port object.
| Type: | PSApplicationGatewayFrontendPort |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the application gateway front-end port ID.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the host name that this cmdlet adds a HTTP listener to.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Host names
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the front-end port that this command adds.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the protocol of the HTTP listener. Both HTTP and HTTPS are supported.
| Type: | String |
| Accepted values: | Http, Https |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
| Type: | String |
| Accepted values: | true, false |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
SslProfile
| Type: | PSApplicationGatewaySslProfile |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
SslProfileId
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |