次の方法で共有


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
Position:Named
既定値:None
必須:True
Accept pipeline input:True
Accept wildcard characters:False

-CustomErrorPageUrl

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

型:String
Position:Named
既定値:None
必須:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

型:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
既定値:None
必須:False
Accept pipeline input:False
Accept wildcard characters:False

-StatusCode

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

型:String
Position:Named
既定値:None
必須:True
Accept pipeline input:False
Accept wildcard characters:False

入力

PSApplicationGateway

出力

PSApplicationGatewayCustomError