Edit

Share via


New-AzFrontDoorRulesEngineRuleObject

Create an in-memory object for RulesEngineRule.

Syntax

Default (Default)

New-AzFrontDoorRulesEngineRuleObject
    -Action <IRulesEngineAction>
    -Name <String>
    -Priority <Int32>
    [-MatchCondition <IRulesEngineMatchCondition[]>]
    [-MatchProcessingBehavior <String>]
    [<CommonParameters>]

Description

Create an in-memory object for RulesEngineRule.

Examples

Example 1: Create new PSRulesEngineRule object and demonstrate how to see the subfields.

New-AzFrontDoorRulesEngineRuleObject -Name rules1 -Priority 0 -Action $rulesEngineAction -MatchProcessingBehavior Stop -MatchCondition $rulesEngineMatchCondition
Action                  : {
                            "requestHeaderActions": [
                              {
                                "headerActionType": "Append",
                                "headerName": "X-Content-Type-Options",
                                "value": "nosniff"
                              }
                            ],
                            "routeConfigurationOverride": {
                              "@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration",
                              "backendPool": {
                                "id": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/Jessicl-Test-RG/providers/Microsoft.Network/frontDoors/jessicl-test-myappfrontend/BackendPools/mybackendpool"
                              },
                              "forwardingProtocol": "HttpsOnly",
                              "cacheConfiguration": {
                                "queryParameterStripDirective": "StripNone",
                                "dynamicCompression": "Disabled"
                              }
                            }
                          }
MatchCondition          :
MatchProcessingBehavior : Stop
Name                    : rules1
Priority                : 0

Create new PSRulesEngineRule object and demonstrate how to see the subfields.

Parameters

-Action

Actions to perform on the request and response if all of the match conditions are met.

Parameter properties

Type:IRulesEngineAction
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

-MatchCondition

A list of match conditions that must meet in order for the actions of this rule to run. Having no match conditions means the actions will always run.

Parameter properties

Type:

IRulesEngineMatchCondition[]

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

-MatchProcessingBehavior

If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.

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

-Name

A name to refer to this specific 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

-Priority

A priority assigned to this rule. .

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

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

RulesEngineRule