New-AzFrontDoorWafCustomRuleObject
Create an in-memory object for CustomRule.
Syntax
Default (Default)
New-AzFrontDoorWafCustomRuleObject
-Action <String>
-MatchCondition <IMatchCondition[]>
-Priority <Int32>
-RuleType <String>
[-EnabledState <String>]
[-GroupByCustomRule <IGroupByVariable[]>]
[-Name <String>]
[-RateLimitDurationInMinutes <Int32>]
[-RateLimitThreshold <Int32>]
[<CommonParameters>]
Description
Create an in-memory object for CustomRule.
Examples
Example 1: Create CustomRule Object for WAF policy creation
New-AzFrontDoorWafCustomRuleObject -Name "Rule1" -RuleType MatchRule -MatchCondition $matchCondition1 -Action Block -Priority 2
Action : Block
EnabledState : Enabled
GroupByCustomRule :
MatchCondition : {{
"selector": "Rules-Engine-Route-Forward",
"negateCondition": false,
"transforms": [ "LowerCase", "UpperCase" ]
}}
Name : Rule1
Priority : 2
RateLimitDurationInMinutes : 1
RateLimitThreshold :
RuleType : MatchRule
Create a CustomRule Object
Parameters
-Action
Describes what action to be applied when rule matches.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnabledState
Describes if the custom rule is in enabled or disabled state.
Defaults to Enabled if not specified.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-GroupByCustomRule
Describes the list of variables to group the rate limit requests.
Parameter properties
Type: IGroupByVariable [ ]
Default value: None
Supports wildcards: False
DontShow: False
Aliases: CustomRule
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MatchCondition
List of match conditions.
Parameter properties
Type: IMatchCondition [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Describes the name of the rule.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Priority
Describes priority of the rule.
Rules with a lower value will be evaluated before rules with a higher value.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RateLimitDurationInMinutes
Time window for resetting the rate limit count.
Default is 1 minute.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RateLimitThreshold
Number of allowed requests per client within the time window.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RuleType
Describes type of rule.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs