Add-AzureRmApplicationGatewayHttpListenerCustomError
アプリケーション ゲートウェイの http リスナーにカスタム エラーを追加します。
警告
AzureRM PowerShell モジュールは、2024 年 2 月 29 日の時点で正式に非推奨になりました。 引き続きサポートを受け、更新を受け取れるようにするために、AzureRM から Az PowerShell モジュールに移行することをお勧めします。
AzureRM モジュールは引き続き機能する可能性がありますが、メインが維持またはサポートされなくなり、ユーザーの判断とリスクで引き続き使用できます。 Az モジュールへの移行に関するガイダンスについては、移行リソースを参照してください。
構文
Add-AzureRmApplicationGatewayHttpListenerCustomError
-HttpListener <PSApplicationGatewayHttpListener>
-StatusCode <String>
-CustomErrorPageUrl <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
説明
Add-AzureRmApplicationGatewayCustomError コマンドレットは、アプリケーション ゲートウェイの http リスナーにカスタム エラーを追加します。
例
例 1: http リスナー レベルにカスタム エラーを追加する
PS C:\> $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
PS C:\> $updatedlistener = Add-AzureRmApplicationGatewayCustomError -HttpListener $listener01 -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url
このコマンドは、http 状態コード 502 のカスタム エラーを http リスナー $listener 01 に追加し、更新されたリスナーを返します。
パラメーター
-CustomErrorPageUrl
Application Gateway のお客様エラーのエラー ページ URL。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HttpListener
Application Gateway Http リスナー
Type: | PSApplicationGatewayHttpListener |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StatusCode
Application Gateway のお客様エラーの状態コード。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
入力
PSApplicationGatewayHttpListener