Add-AzApplicationGatewayBackendHttpSetting
语法
Default (默认值)
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>]
说明
Add-AzApplicationGatewayBackendHttpSetting cmdlet 将后端 HTTP 设置添加到应用程序网关。
后端 HTTP 设置将应用于池中的所有后端服务器。
示例
示例 1:将后端 HTTP 设置添加到应用程序网关
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $AppGw -Name "Setting02" -Port 88 -Protocol "HTTP" -CookieBasedAffinity "Disabled"
第一个命令获取名为 ApplicationGateway01 的应用程序网关,该网关属于名为 ResourceGroup01 的资源组,并将其存储在$AppGw变量中。第二个命令将后端 HTTP 设置添加到应用程序网关,将端口设置为 88,并将协议设置为 HTTP,并将设置命名为 Setting02。
示例 2
将后端 HTTP 设置添加到应用程序网关。 (autogenerated)
Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway <PSApplicationGateway> -CookieBasedAffinity Enabled -Name 'Setting02' -PickHostNameFromBackendAddress -Port 88 -Probe <PSApplicationGatewayProbe> -Protocol http -RequestTimeout <Int32>
参数
-AffinityCookieName
要用于关联 Cookie 的 Cookie 名称
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-ApplicationGateway
指定此 cmdlet 为其添加设置的应用程序网关的名称。
参数属性
参数集
(All)
Position: | Named |
必需: | True |
来自管道的值: | True |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-AuthenticationCertificates
指定应用程序网关的身份验证证书。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-ConnectionDraining
后端 http 设置资源的连接耗尽。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-CookieBasedAffinity
指定是应为后端服务器池启用或禁用基于 Cookie 的相关性。
此参数的可接受值为:Disabled、Enabled。
参数属性
类型: | String
|
默认值: | None |
接受的值: | Enabled, Disabled |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-HostName
设置要发送到后端服务器的主机标头。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Name
指定此 cmdlet 添加的后端 HTTP 设置的名称。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Path
应用作所有 HTTP 请求前缀的路径。
如果未为此参数提供任何值,则不会为路径添加前缀。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-PickHostNameFromBackendAddress
如果应从后端服务器的主机名中选取主机标头,则标记。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Port
指定后端服务器池的端口。
参数属性
类型: | Int32
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Probe
指定要与后端服务器关联的探测。
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-ProbeId
指定要与后端服务器关联的探测的 ID。
参数属性
类型: | String
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Protocol
指定应用程序网关和后端服务器之间的通信协议。
此参数的可接受值为:Http 和 Https。
参数属性
类型: | String
|
默认值: | None |
接受的值: | Http, Https |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-RequestTimeout
指定请求超时值。
参数属性
类型: | Int32
|
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-TrustedRootCertificate
应用程序网关受信任的根证书
参数属性
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出