Set-AzApplicationGatewayHttpListener

Modifies an HTTP listener for an application gateway.

Syntax

Set-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>]
Set-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 Set-AzApplicationGatewayHttpListener cmdlet modifies an HTTP listener for an Azure application gateway.

Examples

Example 1: Set an HTTP listener

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Set-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener01" -Protocol Http -FrontendIpConfiguration $FIP01 -FrontendPort 80

The first command gets the application gateway named ApplicationGateway01 that belongs to the resource group named ResourceGroup01 and stores it in the $AppGw variable. The second command sets the HTTP listener for the gateway to use the front-end configuration stored in $FIP01 with the HTTP protocol on port 80.

Example 2: Add a HTTPS listener with SSL and HostNames

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Set-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 with which this cmdlet associates the HTTP listener.

Type:PSApplicationGateway
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-CustomErrorConfiguration

Customer error of an application gateway

Type:PSApplicationGatewayCustomError[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FirewallPolicy

FirewallPolicy

Type:PSApplicationGatewayWebApplicationFirewallPolicy
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FirewallPolicyId

FirewallPolicyId

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FrontendIPConfiguration

Specifies the front-end IP address of the application gateway.

Type:PSApplicationGatewayFrontendIPConfiguration
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FrontendIPConfigurationId

Specifies the ID of the front-end IP address of the application gateway.

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.

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 sends the HTTP listener to.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostNames

Host names

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the HTTP listener.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Protocol

Specifies the protocol that the HTTP listener uses. The acceptable values for this parameter are:

  • Http
  • Https
Type:String
Accepted values:Http, Https
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RequireServerNameIndication

Specifies whether the cmdlet requires a server name indication. The acceptable values for this parameter are: true or false.

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.

Type:PSApplicationGatewaySslCertificate
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SslCertificateId

Specifies the Secure Socket Layer (SSL) certificate ID of the HTTP listener.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SslProfile

SslProfile

Type:PSApplicationGatewaySslProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SslProfileId

SslProfileId

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSApplicationGateway

Outputs

PSApplicationGateway