次の方法で共有


Set-AzApplicationGatewayCustomError

アプリケーション ゲートウェイでカスタム エラーを更新します。

構文

Set-AzApplicationGatewayCustomError
   -ApplicationGateway <PSApplicationGateway>
   -StatusCode <String>
   -CustomErrorPageUrl <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

説明

Set-AzApplicationGatewayCustomError コマンドレットは、アプリケーション ゲートウェイのカスタム エラーを更新します。

例 1: アプリケーション ゲートウェイでカスタム エラーを更新する

$customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
$updatedgateway = Set-AzApplicationGatewayCustomError -ApplicationGateway $appgw -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url

このコマンドは、アプリケーション ゲートウェイ $appgwの http 状態コード 502 のカスタム エラーを更新し、更新されたゲートウェイを返します。

パラメーター

-ApplicationGateway

The Application Gateway

型:PSApplicationGateway
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:True
ワイルドカード文字を受け取る:False

-CustomErrorPageUrl

Application Gateway のお客様エラーのエラー ページ URL。

型:String
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-DefaultProfile

Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。

型:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-StatusCode

Application Gateway のお客様エラーの状態コード。

型:String
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

入力

PSApplicationGateway

出力

PSApplicationGatewayCustomError