Edit

Share via


Set-AzApplicationGatewayHttpListener

Modifies an HTTP listener for an application gateway.

Syntax

SetByResourceId

Set-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

Set-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 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.

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 front-end IP address of the application gateway.

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 ID of the front-end IP address 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

-FrontendPort

Specifies the application gateway front-end port.

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

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 that the HTTP listener uses. The acceptable values for this parameter are:

  • Http
  • Https

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

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

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.

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 Secure Socket Layer (SSL) certificate ID of the HTTP listener.

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