Edit

New-AzFrontDoorWafManagedRuleSetExceptionObject

Create an in-memory object for ManagedRuleSetException.

Syntax

Default (Default)

New-AzFrontDoorWafManagedRuleSetExceptionObject
    -MatchValue <String[]>
    -MatchVariable <String>
    -Scope <IManagedRuleSetScope[]>
    -ValueMatchOperator <String>
    [-Selector <String>]
    [-SelectorMatchOperator <String>]
    [<CommonParameters>]

Description

Create an in-memory object for ManagedRuleSetException.

Examples

Example 1: Create a WAF managed rule set exception object

$ruleScope = New-AzFrontDoorWafRuleScopeObject -RuleId 942100
$ruleGroupScope = New-AzFrontDoorWafRuleGroupScopeObject -RuleGroupName SQLI -RuleScope $ruleScope
$managedRuleSetScope = New-AzFrontDoorWafManagedRuleSetScopeObject -RuleSetType DefaultRuleSet -RuleSetVersion 1.0 -RuleGroupScope $ruleGroupScope
New-AzFrontDoorWafManagedRuleSetExceptionObject -MatchVariable RequestHeaderNames -SelectorMatchOperator Equals -Selector User-Agent -ValueMatchOperator Equals -MatchValue curl -Scope $managedRuleSetScope
MatchVariable      Selector   ValueMatchOperator MatchValue Scope
-------------      --------   ------------------ ---------- -----
RequestHeaderNames User-Agent Equals             {curl}     {DefaultRuleSet}

Create a WAF managed rule set exception object for requests with a User-Agent header value of curl.

Parameters

-MatchValue

List of values to be matched with.

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

-MatchVariable

The variable to be evaluated for excluding the request.

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

-Scope

Scope(s) of the exception.

Parameter properties

Type:

IManagedRuleSetScope[]

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

-Selector

When matchVariable is a collection, operator used to specify which elements in the collection this exception applies to. Currently supported only for RequestHeaderNames.

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

-SelectorMatchOperator

Comparison operator to apply to the selector when specifying which elements in the collection this exception applies to.

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

-ValueMatchOperator

Comparison operator to apply to the value to be matched.

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

ManagedRuleSetException