Edit

Share via


New-AzApplicationGatewayRewriteRuleCondition

Adds a condition to the RewriteRule for an application gateway.

Syntax

Default (Default)

New-AzApplicationGatewayRewriteRuleCondition
    -Variable <String>
    [-Pattern <String>]
    [-IgnoreCase]
    [-Negate]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The AzApplicationGatewayRewriteRuleCondition cmdlet creates a rewrite rule condition for an Azure application gateway.

Examples

Example 1

$condition = New-AzApplicationGatewayRewriteRuleCondition -Variable "var_request_uri" -Pattern "http" -IgnoreCase
$condition

Variable   : var_request_uri
Pattern    : http
IgnoreCase : True
Negate     : False

$condition | Format-Table

Variable        Pattern IgnoreCase Negate
--------        ------- ---------- ------
var_request_uri http          True  False

This command creates a condition in a rewrite rule and stores the result in the variable named $condition.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IgnoreCase

Set this flag to ignore case on the pattern

Parameter properties

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

-Negate

Set this flag to negate the condition validation

Parameter properties

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

-Pattern

Pattern to look for in the Variable Header

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

-Variable

Name of the Header to set condition on it

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.

Inputs

None

Outputs

PSApplicationGatewayRewriteRuleCondition