Add-AzApplicationGatewayCustomError

Uygulama ağ geçidine özel hata ekler.

Syntax

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

Description

Add-AzApplicationGatewayCustomError cmdlet'i bir uygulama ağ geçidine özel bir hata ekler.

Örnekler

Örnek 1: Uygulama ağ geçidi düzeyine özel hata ekler

$resourceGroupName = "resourceGroupName"
$AppGWName = "applicationGatewayName"
$AppGw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroupName $resourceGroupName
$customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
$updatedgateway = Add-AzApplicationGatewayCustomError -ApplicationGateway $AppGw -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url
Set-AzApplicationGateway -ApplicationGateway $AppGw

Bu komut, uygulama ağ geçidi $appgw http durum kodu 502'nin özel hatasını ekler ve güncelleştirilmiş ağ geçidini döndürür.

Örnek 2: Uygulama ağ geçidi dinleyici düzeyine özel hata ekler

$resourceGroupName = "resourceGroupName"
 $AppGWName = "applicationGatewayName"
 $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
 $listenerName = "listenerName"
 $AppGw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroupName $resourceGroupName
 $listener = Get-AzApplicationGatewayHttpListener -ApplicationGateway $AppGW -Name $listenerName
 $updatedListener = Add-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url 
 Set-AzApplicationGateway -ApplicationGateway $AppGw

Bu komut, dinleyici düzeyinde uygulama ağ geçidi $appgw http durum kodu 502'nin özel hatasını ekler ve güncelleştirilmiş ağ geçidini döndürür.

Parametreler

-ApplicationGateway

The Application Gateway

Type:PSApplicationGateway
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-CustomErrorPageUrl

Uygulama ağ geçidi müşteri hatasının hata sayfası URL'si.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Azure ile iletişim için kullanılan kimlik bilgileri, hesap, kiracı ve abonelik.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StatusCode

Uygulama ağ geçidi müşteri hatasının durum kodu.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Girişler

PSApplicationGateway

Çıkışlar

PSApplicationGatewayCustomError