Add-AzApplicationGatewayHttpListenerCustomError

Aggiunge un errore personalizzato a un listener HTTP di un gateway applicazione.

Sintassi

Add-AzApplicationGatewayHttpListenerCustomError
   -HttpListener <PSApplicationGatewayHttpListener>
   -StatusCode <String>
   -CustomErrorPageUrl <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Descrizione

Il cmdlet Add-AzApplicationGatewayCustomError aggiunge un errore personalizzato a un listener HTTP di un gateway applicazione.

Esempio

Esempio 1: Aggiunge un errore personalizzato a livello di listener HTTP

$customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm"
$updatedlistener = Add-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url

Questo comando aggiunge un errore personalizzato del codice di stato HTTP 502 al listener http $listener 01 e restituisce il listener aggiornato.

Parametri

-CustomErrorPageUrl

URL della pagina di errore dell'errore del cliente del gateway applicazione.

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

-DefaultProfile

Le credenziali, l’account, il tenant e la sottoscrizione usati per comunicare con Azure.

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

-HttpListener

Listener HTTP gateway applicazione

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

-StatusCode

Codice di stato dell'errore del cliente del gateway applicazione.

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

Input

PSApplicationGatewayHttpListener

Output

PSApplicationGatewayCustomError