共用方式為


Add-AzApplicationGatewayRewriteRuleSet

將重寫規則集新增至應用程式閘道。

語法

Add-AzApplicationGatewayRewriteRuleSet
   -ApplicationGateway <PSApplicationGateway>
   -Name <String>
   -RewriteRule <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Add-AzApplicationGatewayRewriteRuleSet Cmdlet 會將重寫規則集新增至應用程式網關。

範例

範例 1

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayRewriteRuleSet -ApplicationGateway $AppGw -Name "ruleset1" -RewriteRule $rule

第一個命令會取得應用程式閘道,並將其儲存在$AppGw變數中。 第二個命令會將重寫規則集新增至應用程式閘道。

參數

-ApplicationGateway

applicationGateway

類型:PSApplicationGateway
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Name

RewriteRuleSet 的名稱

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-RewriteRule

重寫規則清單

類型:List<T>[PSApplicationGatewayRewriteRule]
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

輸入

PSApplicationGateway

輸出

PSApplicationGateway