Editar

Compartilhar via


Add-AzApplicationGatewayBackendHttpSetting

Adds back-end HTTP settings to an application gateway.

Syntax

Add-AzApplicationGatewayBackendHttpSetting
   -ApplicationGateway <PSApplicationGateway>
   -Name <String>
   -Port <Int32>
   -Protocol <String>
   -CookieBasedAffinity <String>
   [-RequestTimeout <Int32>]
   [-ConnectionDraining <PSApplicationGatewayConnectionDraining>]
   [-ProbeId <String>]
   [-Probe <PSApplicationGatewayProbe>]
   [-AuthenticationCertificates <PSApplicationGatewayAuthenticationCertificate[]>]
   [-TrustedRootCertificate <PSApplicationGatewayTrustedRootCertificate[]>]
   [-PickHostNameFromBackendAddress]
   [-HostName <String>]
   [-AffinityCookieName <String>]
   [-Path <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Add-AzApplicationGatewayBackendHttpSetting cmdlet adds back-end HTTP settings to an application gateway. Back-end HTTP settings are applied to all back-end servers in the pool.

Examples

Example 1: Add back-end HTTP settings to an application gateway

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $AppGw -Name "Setting02" -Port 88 -Protocol "HTTP" -CookieBasedAffinity "Disabled"

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 adds back-end HTTP settings to the application gateway, setting the port to 88 and the protocol to HTTP and names the settings Setting02.

Example 2

Adds back-end HTTP settings to an application gateway. (autogenerated)

Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway <PSApplicationGateway> -CookieBasedAffinity Enabled -Name 'Setting02' -PickHostNameFromBackendAddress -Port 88 -Probe <PSApplicationGatewayProbe> -Protocol http -RequestTimeout <Int32>

Parameters

-AffinityCookieName

Cookie name to use for the affinity cookie

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

-ApplicationGateway

Specifies the name of application gateway for which this cmdlet adds settings.

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

-AuthenticationCertificates

Specifies authentication certificates for the application gateway.

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

-ConnectionDraining

Connection draining of the backend http settings resource.

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

-CookieBasedAffinity

Specifies whether cookie-based affinity should be enabled or disabled for the backend server pool. The acceptable values for this parameter are: Disabled, Enabled.

Type:String
Accepted values:Enabled, Disabled
Position:Named
Default value:None
Required:True
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

-HostName

Sets host header to be sent to the backend servers.

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

-Name

Specifies the name of the back-end HTTP settings which this cmdlet adds.

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

-Path

Path which should be used as a prefix for all HTTP requests. If no value is provided for this parameter, then no path will be prefixed.

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

-PickHostNameFromBackendAddress

Flag if host header should be picked from the host name of the backend server.

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

-Port

Specifies the port of the back-end server pool.

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

-Probe

Specifies a probe to associate with a back-end server.

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

-ProbeId

Specifies the ID of the probe to associate with the back-end server.

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

-Protocol

Specifies the protocol for communication between application gateway and back-end servers. The acceptable values for this parameter are: Http and Https.

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

-RequestTimeout

Specifies the request time-out value.

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

-TrustedRootCertificate

Application gateway Trusted Root Certificates

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

Inputs

PSApplicationGateway

Outputs

PSApplicationGateway