Add-AzApplicationGatewayCustomError
Menambahkan kesalahan kustom ke gateway aplikasi.
Sintaks
Add-AzApplicationGatewayCustomError
-ApplicationGateway <PSApplicationGateway>
-StatusCode <String>
-CustomErrorPageUrl <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Deskripsi
Cmdlet Add-AzApplicationGatewayCustomError menambahkan kesalahan kustom ke gateway aplikasi.
Contoh
Contoh 1: Menambahkan kesalahan kustom ke tingkat gateway aplikasi
$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
Perintah ini menambahkan kesalahan kustom kode status http 502 ke gateway aplikasi $appgw, dan mengembalikan gateway yang diperbarui.
Contoh 2: Menambahkan kesalahan kustom ke tingkat pendengar gateway aplikasi
$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
Perintah ini menambahkan kesalahan kustom kode status http 502 ke gateway aplikasi $appgw di tingkat pendengar, dan mengembalikan gateway yang diperbarui.
Parameter
Application Gateway
| Type: | PSApplicationGateway |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
URL halaman kesalahan kesalahan pelanggan gateway aplikasi.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Kode status kesalahan pelanggan gateway aplikasi.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Input
Output
PSApplicationGatewayCustomError
Link Terkait
Saran dan Komentar
Kirim dan lihat umpan balik untuk