Upravit

Sdílet prostřednictvím


New-AzApplicationGatewayRewriteRule

Creates a rewrite rule for an application gateway.

Syntax

New-AzApplicationGatewayRewriteRule
   -Name <String>
   -ActionSet <PSApplicationGatewayRewriteRuleActionSet>
   [-RuleSequence <Int32>]
   [-Condition <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

$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:PSApplicationGatewayRewriteRuleActionSet
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Condition

Condition for the rewrite rule to execute

Type:PSApplicationGatewayRewriteRuleCondition[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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

-Name

The name of the RewriteRule

Type:String
Position:Named
Default value:None
Required:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSApplicationGatewayRewriteRule