你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzApplicationGatewayHttpListenerCustomError
从应用程序网关的 http 侦听器获取自定义错误。
语法
Get-AzApplicationGatewayHttpListenerCustomError
[-StatusCode <String>]
-HttpListener <PSApplicationGatewayHttpListener>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzApplicationGatewayCustomError cmdlet 从应用程序网关的 http 侦听器获取自定义错误(s)。
示例
示例 1:获取 http 侦听器中的自定义错误
$ce = Get-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus502
此命令从 http 侦听器$listener 01 获取并返回 http 状态代码 502 的自定义错误。
示例 2:获取 http 侦听器中所有自定义错误的列表
$ces = Get-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01
此命令从 http 侦听器$listener 01 获取并返回所有自定义错误的列表。
参数
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HttpListener
应用程序网关 Http 侦听器
类型: | PSApplicationGatewayHttpListener |
Position: | Named |
默认值: | None |
必需: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StatusCode
应用程序网关客户错误的状态代码。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输入
PSApplicationGatewayHttpListener
输出
PSApplicationGatewayCustomError
相关链接
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈