Edit

Share via


Add-AzApplicationGatewayRequestRoutingRule

Adds a request routing rule to an application gateway.

Syntax

SetByResourceId

Add-AzApplicationGatewayRequestRoutingRule
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -RuleType <String>
    [-Priority <Int32>]
    [-BackendHttpSettingsId <String>]
    [-HttpListenerId <String>]
    [-BackendAddressPoolId <String>]
    [-UrlPathMapId <String>]
    [-RewriteRuleSetId <String>]
    [-RedirectConfigurationId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SetByResource

Add-AzApplicationGatewayRequestRoutingRule
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -RuleType <String>
    [-Priority <Int32>]
    [-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
    [-HttpListener <PSApplicationGatewayHttpListener>]
    [-BackendAddressPool <PSApplicationGatewayBackendAddressPool>]
    [-UrlPathMap <PSApplicationGatewayUrlPathMap>]
    [-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
    [-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Add-AzApplicationGatewayRequestRoutingRule cmdlet adds a request routing rule to an application gateway.

Examples

Example 1: Add a request routing rule to an application gateway

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$Appgw = Add-AzApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGw -Name "Rule01" -RuleType Basic -Priority 100 -BackendHttpSettings $Setting -HttpListener $Listener -BackendAddressPool $Pool

The first command gets the application gateway and stores it in the $AppGw variable. The second command adds the request routing rule to the application gateway.

Parameters

-ApplicationGateway

Specifies an application gateway to which this cmdlet adds a request routing rule.

Parameter properties

Type:PSApplicationGateway
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-BackendAddressPool

Specifies an application gateway back-end address pool object.

Parameter properties

Type:PSApplicationGatewayBackendAddressPool
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BackendAddressPoolId

Specifies an application gateway back-end address pool ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BackendHttpSettings

Specifies a back-end HTTP settings object for an application gateway.

Parameter properties

Type:PSApplicationGatewayBackendHttpSettings
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BackendHttpSettingsId

Specifies a backend HTTP settings ID for an application gateway.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

-HttpListener

Specifies application gateway HTTP listener object.

Parameter properties

Type:PSApplicationGatewayHttpListener
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpListenerId

Specifies application gateway HTTP listener ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of request routing rule this cmdlet adds.

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

-Priority

The priority of the rule

Parameter properties

Type:

Nullable<T>[Int32]

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

-RedirectConfiguration

Application gateway RedirectConfiguration

Parameter properties

Type:PSApplicationGatewayRedirectConfiguration
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RedirectConfigurationId

ID of the application gateway RedirectConfiguration

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RewriteRuleSet

Application gateway RewriteRuleSet

Parameter properties

Type:PSApplicationGatewayRewriteRuleSet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RewriteRuleSetId

ID of the application gateway RewriteRuleSet

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RuleType

Specifies the type of request routing rule.

Parameter properties

Type:String
Default value:None
Accepted values:Basic, PathBasedRouting
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

-UrlPathMap

The Add-AzApplicationGatewayRequestRoutingRule cmdlet adds a request routing rule to an application gateway.

Parameter properties

Type:PSApplicationGatewayUrlPathMap
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UrlPathMapId

Specifies the URL path map ID for the routing rule.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResourceId
Position:Named
Mandatory:False
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

PSApplicationGateway

Outputs

PSApplicationGateway