New-AzFrontDoorRulesEngineRuleObject
Create a PSRulesEngineRule object for Rules Engine creation.
Sintaxis
Default (Es el valor predeterminado).
New-AzFrontDoorRulesEngineRuleObject
-Name <String>
-Priority <Int32>
-Action <PSRulesEngineAction>
[-MatchProcessingBehavior <PSMatchProcessingBehavior>]
[-MatchCondition <PSRulesEngineMatchCondition[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Create a PSRulesEngineRule object for Rules Engine creation.
Use cmdlet "New-AzFrontDoorRulesEngineActionObject" to create PSRulesEngineAction object to pass into the "-Action" parameter. Use cmdlet "New-AzFrontDoorRulesEngineMatchConditionObject" to create PSRulesEngineMatchCondition object to pass into the "-MatchCondition" parameter.
Ejemplos
Example 1
New-AzFrontDoorRulesEngineRuleObject -Name rules1 -Priority 0 -Action $rulesEngineAction -MatchProcessingBehavior Stop -MatchCondition $rulesEngineMatchCondition
Name : rules1
Priority : 0
MatchProcessingBehavior : Stop
MatchCondition : {Microsoft.Azure.Commands.FrontDoor.Models.PSRulesEngineMatchCondition}
Action : Microsoft.Azure.Commands.FrontDoor.Models.PSRulesEngineAction
$rulesEngineRule1.Action
RequestHeaderActions ResponseHeaderActions RouteConfigurationOverride
-------------------- --------------------- --------------------------
{headeraction1, headeraction2} {} Microsoft.Azure.Commands.FrontDoor.Models.PSForwardingConfiguration
$rulesEngineRule1.MatchCondition[0]
RulesEngineMatchVariable : RequestHeader
RulesEngineMatchValue : {allowoverride}
Selector : Rules-Engine-Route-Forward
RulesEngineOperator : Equal
NegateCondition : False
Transforms : {Lowercase, Uppercase}
Create new PSRulesEngineRule object and demonstrate how to see the subfields.
Example 2
New-AzFrontDoorRulesEngineRuleObject -Name rules1 -Priority -1
New-AzFrontDoorRulesEngineRuleObject : Cannot validate argument on parameter 'Priority'. The -1 argument is less than the minimum allowed range of 0. Supply an argument that is greater than or equal to 0 and then try the command again.
At line:1 char:81
+ ... ule1 = New-AzFrontDoorRulesEngineRuleObject -Name rules1 -Priority -1
+ ~~
+ CategoryInfo : InvalidData: (:) [New-AzFrontDoorRulesEngineRuleObject], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.FrontDoor.Cmdlets.NewFrontDoorRulesEngineRuleObject
Expect output when passing in invalid priority value.
Parámetros
-Action
Actions to perform on the request and response if all of the match conditions are met.
Propiedades del parámetro
Tipo: | PSRulesEngineAction |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | True |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Propiedades del parámetro
Tipo: | IAzureContextContainer |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Alias: | AzContext, AzureRmContext, AzureCredential |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | 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.
Propiedades del parámetro
Tipo: | |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-MatchProcessingBehavior
If this rule is a match should the rules engine continue running the remaining rules or stop. Possible values are Continue and Stop. If not present, defaults to Continue.
Propiedades del parámetro
Tipo: | PSMatchProcessingBehavior |
Valor predeterminado: | None |
Valores aceptados: | Continue, Stop |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | False |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-Name
A name to refer to this specific rule.
Propiedades del parámetro
Tipo: | String |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | True |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | False |
-Priority
A priority assigned to this rule. Cannot be negative.
Propiedades del parámetro
Tipo: | Int32 |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | Named |
Mandatory: | True |
Valor de la canalización: | False |
Valor de la canalización por nombre de propiedad: | False |
Valor de los argumentos restantes: | 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.