Editar

Partilhar via


New-AzApplicationGatewayHeaderValueMatcher

Creates a HeaderValueMatcher object configuration to use in ApplicationGatewayRewriteRuleHeaderConfiguration for an application gateway.

Syntax

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

Description

The New-AzApplicationGatewayHeaderValueMatcher cmdlet creates a Header Value Matcher object for an Azure application gateway.

Examples

Example 1

$hvm = New-AzApplicationGatewayHeaderValueMatcher -Pattern ".*" -IgnoreCase -Negate
$requestHeaderConfiguration01 = New-AzApplicationGatewayRewriteRuleHeaderConfiguration -HeaderName "Set-Cookie" -HeaderValue "val" -HeaderValueMatcher $headerValueMatcher

This command creates a HeaderValueMatcher configuration and stores the result in the variable named $hvm and then use it in a ApplicationGatewayRewriteRuleHeaderConfiguration object.

Parameters

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IgnoreCase

Set this flag to ignore during pattern matching

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Negate

Set this flag to negate the result of pattern matching against a header value

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Pattern

Pattern to look for in the header values

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSApplicationGatewayHeaderValueMatcher