New-AzureRmFrontDoorCustomRuleObject
Create CustomRule Object for WAF policy creation
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
New-AzureRmFrontDoorCustomRuleObject
-Name <String>
-RuleType <PSCustomRuleType>
-MatchCondition <PSMatchCondition[]>
-Action <PSAction>
-Priority <Int32>
[-RateLimitDurationInMinutes <Int32>]
[-RateLimitThreshold <Int32>]
[-Transform <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Create CustomRule Object for WAF policy creation
Examples
Example 1
PS C:\> New-AzureRmFrontDoorCustomRuleObject -Name "Rule1" -RuleType MatchRule -MatchCondition $matchCondition1 -Action Block -Priority 2
RuleType : MatchRule
Action : Block
MatchConditions : {Microsoft.Azure.Commands.FrontDoor.Models.PSMatchCondition}
Priority : 2
RateLimitDurationInMinutes : 1
RateLimitThreshold :
Name : Rule1
Etag :
Transforms :
Create a CustomRule Object
Parameters
-Action
Type of Actions. Possible values include: 'Allow', 'Block', 'Log'
Type: | PSAction |
Accepted values: | Allow, Block, Log |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MatchCondition
List of match conditions.
Type: | PSMatchCondition[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Name of the rule
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Priority
Describes priority of the rule.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RateLimitDurationInMinutes
Rate limit duration. Default - 1 minute
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RateLimitThreshold
Rate limit thresold
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RuleType
Type of the rule. Possible values include: 'MatchRule', 'RateLimitRule'
Type: | PSCustomRuleType |
Accepted values: | RateLimitRule, MatchRule |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Transform
List of transforms
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None