Edit

Share via


Add-AzApplicationGatewayHttpListener

Adds an HTTP listener to an application gateway.

Syntax

SetByResourceId

Add-AzApplicationGatewayHttpListener
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -Protocol <String>
    [-FrontendIPConfigurationId <String>]
    [-FrontendPortId <String>]
    [-SslCertificateId <String>]
    [-FirewallPolicyId <String>]
    [-SslProfileId <String>]
    [-HostName <String>]
    [-HostNames <String[]>]
    [-RequireServerNameIndication <String>]
    [-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SetByResource

Add-AzApplicationGatewayHttpListener
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -Protocol <String>
    [-FrontendIPConfiguration <PSApplicationGatewayFrontendIPConfiguration>]
    [-FrontendPort <PSApplicationGatewayFrontendPort>]
    [-FirewallPolicy <PSApplicationGatewayWebApplicationFirewallPolicy>]
    [-SslCertificate <PSApplicationGatewaySslCertificate>]
    [-SslProfile <PSApplicationGatewaySslProfile>]
    [-HostName <String>]
    [-HostNames <String[]>]
    [-RequireServerNameIndication <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

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$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

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$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

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$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

-ApplicationGateway

Specifies the application gateway to which this cmdlet adds an HTTP listener.

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

-CustomErrorConfiguration

Customer error of an application gateway

Parameter properties

Type:

PSApplicationGatewayCustomError[]

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

-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

-FirewallPolicy

FirewallPolicy

Parameter properties

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

-FirewallPolicyId

FirewallPolicyId

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

-FrontendIPConfiguration

Specifies the application gateway front-end IP resource object.

Parameter properties

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

-FrontendIPConfigurationId

Specifies the application gateway front-end IP ID.

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

-FrontendPort

Specifies the application gateway front-end port object.

Parameter properties

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

-FrontendPortId

Specifies the application gateway front-end port ID.

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

-HostName

Specifies the host name that this cmdlet adds a HTTP listener to.

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

-HostNames

Host names

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

-Name

Specifies the name of the front-end port that this command adds.

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

-Protocol

Specifies the protocol of the HTTP listener. Both HTTP and HTTPS are supported.

Parameter properties

Type:String
Default value:None
Accepted values:Http, Https
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

-RequireServerNameIndication

The Add-AzApplicationGatewayHttpListener cmdlet adds a HTTP listener to an application gateway.

Parameter properties

Type:String
Default value:None
Accepted values:true, false
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

-SslCertificate

Specifies the SSL certificate of the HTTP listener. Must be specified if HTTPS is chosen as listener protocol.

Parameter properties

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

-SslCertificateId

Specifies the SSL certificate ID of the HTTP listener. Must be specified if HTTPS is chosen as listener protocol.

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

-SslProfile

SslProfile

Parameter properties

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

-SslProfileId

SslProfileId

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