共用方式為


New-AzApplicationGatewayFirewallPolicyManagedRuleOverride

建立 RuleGroupOverrideGroup 專案的 managedRuleOverride 專案。

語法

New-AzApplicationGatewayFirewallPolicyManagedRuleOverride
   -RuleId <String>
   [-State <String>]
   [-Action <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

New-AzApplicationGatewayFirewallPolicyManagedRuleOverride 會建立 ruleOverride 專案。

範例

範例 1

$ruleOverrideEntry = New-AzApplicationGatewayFirewallPolicyManagedRuleOverride -RuleId $ruleId -State Disabled

建立 ruleOverride 專案,並將 RuleId 設定為 $ruleId,並將 State 設定為 Disabled。

範例 2

$ruleOverrideEntry = New-AzApplicationGatewayFirewallPolicyManagedRuleOverride -RuleId $ruleId -State Enabled -Action Log

建立 ruleOverride 專案,並將 RuleId 設定為 $ruleId、狀態為 Enabled 和 Action 作為記錄檔。

參數

-Action

指定覆寫規則專案中的動作。

類型:String
接受的值:AnomalyScoring, Allow, Block, Log
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

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

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

-RuleId

在覆寫規則專案中指定 RuleId。

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

-State

在覆寫規則專案中指定 RuleId。

類型:String
接受的值:Disabled, Enabled
Position:Named
預設值:Disabled
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

PSApplicationGatewayFirewallPolicyManagedRuleOverride