New-AzApplicationGatewayRewriteRule

Creates a rewrite rule for an application gateway.

Syntax

New-AzApplicationGatewayRewriteRule
   -Name <String>
   -ActionSet <PSApplicationGatewayRewriteRuleActionSet>
   [-RuleSequence <Int32>]
   [-Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleCondition]>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzApplicationGatewayRewriteRule cmdlet creates a rewrite rule for an Azure application gateway.

Examples

Example 1 : Create a rewrite rule for an application gateway

PS C:\> $rule = New-AzApplicationGatewayRewriteRule -Name rule1 -ActionSet $action -RuleSequence 101 -Condition $condition

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

Parameters

-ActionSet

ActionSet of the rewrite rule

Type:Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleActionSet
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Condition

Condition for the rewrite rule to execute

Type:System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRuleCondition]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

The name of the RewriteRule

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RuleSequence

The rule ordering of this rewrite rule in the rewrite rule set

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

Inputs

None

Outputs

Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRewriteRule