New-AzApplicationGatewayFirewallCustomRule
Creates a new custom rule for the application gateway firewall policy.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzApplicationGatewayFirewallCustomRule
-Name <String>
-Priority <Int32>
-RuleType <String>
-MatchCondition <PSApplicationGatewayFirewallCondition[]>
-Action <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzApplicationGatewayFirewallCustomRule creates a custom rule for firewall policy.
Examples
Example 1
PS C:\> $customRule = New-AzApplicationGatewayFirewallCustomRule -Name example-rule -Priority 1 -RuleType MatchRule -MatchCondition $condtion -Action Allow
The command creates a new custom rule with name of example-rule, priority 1 and the rule type will be MatchRule with condition defined in the condition variable, the action will the allow. The new match custom rule is saved in $customRule.
Parameters
Type of Actions.
| Type: | String |
| Accepted values: | Allow, Block, Log |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
List of match conditions.
| Type: | PSApplicationGatewayFirewallCondition[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The Name of the Rule.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Describes type of rule.
| Type: | String |
| Accepted values: | MatchRule |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
None