你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzApplicationGatewayHttpListenerCustomError
汇报应用程序网关的 http 侦听器中的自定义错误。
语法
Set-AzApplicationGatewayHttpListenerCustomError
-HttpListener <PSApplicationGatewayHttpListener>
-StatusCode <String>
-CustomErrorPageUrl <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Set-AzApplicationGatewayHttpListenerCustomError cmdlet 更新应用程序网关的 http 侦听器中的自定义错误。
示例
示例 1:从 http 侦听器汇报自定义错误
$customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
$updatedlistener = Set-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url
此命令更新 http 侦听器中 http 状态代码 502 $listener 01 中的自定义错误,并返回更新的侦听器。
参数
-CustomErrorPageUrl
应用程序网关客户错误的错误页 URL。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HttpListener
应用程序网关 Http 侦听器
Type: | PSApplicationGatewayHttpListener |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StatusCode
应用程序网关客户错误的状态代码。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输入
PSApplicationGatewayHttpListener
输出
PSApplicationGatewayCustomError