共用方式為


Get-AzApplicationGatewayHttpListenerCustomError

從應用程式閘道的 HTTP 接聽程式取得自定義錯誤。

語法

Get-AzApplicationGatewayHttpListenerCustomError
   [-StatusCode <String>]
   -HttpListener <PSApplicationGatewayHttpListener>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzApplicationGatewayCustomError Cmdlet 會從應用程式網關的 HTTP 接聽程式取得自定義錯誤。。

範例

範例 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
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-HttpListener

應用程式閘道 Http 接聽程式

類型:PSApplicationGatewayHttpListener
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-StatusCode

應用程式閘道客戶錯誤的狀態代碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

PSApplicationGatewayHttpListener

輸出

PSApplicationGatewayCustomError