Set-AzApplicationGatewayHttpListenerCustomError
更新應用程式閘道 HTTP 接聽程式中的自定義錯誤。
語法
Set-AzApplicationGatewayHttpListenerCustomError
-HttpListener <PSApplicationGatewayHttpListener>
-StatusCode <String>
-CustomErrorPageUrl <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
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 接聽程式$listener 01 中 http 狀態代碼 502 的自定義錯誤,並傳回更新的接聽程式。
參數
-CustomErrorPageUrl
應用程式閘道客戶錯誤的錯誤頁面 URL。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-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 |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
PSApplicationGatewayHttpListener
輸出
PSApplicationGatewayCustomError
相關連結
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應