Edit

Share via


New-AzApplicationGatewayRoutingRule

Creates a routing rule for an application gateway.

Syntax

SetByResource (Default)

New-AzApplicationGatewayRoutingRule
    -Name <String>
    -RuleType <String>
    -Priority <Int32>
    [-BackendSettings <PSApplicationGatewayBackendSettings>]
    [-Listener <PSApplicationGatewayListener>]
    [-BackendAddressPool <PSApplicationGatewayBackendAddressPool>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

SetByResourceId

New-AzApplicationGatewayRoutingRule
    -Name <String>
    -RuleType <String>
    -Priority <Int32>
    [-BackendSettingsId <String>]
    [-ListenerId <String>]
    [-BackendAddressPoolId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Add-AzApplicationGatewayRoutingRule cmdlet creates a routing rule for an Azure application gateway.

Examples

Example 1: Create a routing rule for an application gateway

$Rule = New-AzApplicationGatewayRoutingRule -Name "Rule01" -RuleType Basic -Priority 100 -BackendSettings $Setting -Listener $Listener -BackendAddressPool $Pool

This command creates a basic routing rule named Rule01 and stores the result in the variable named $Rule.

Parameters

-BackendAddressPool

Application gateway BackendAddressPool

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

ID of the application gateway BackendAddressPool

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

-BackendSettings

Application gateway BackendSettings

Parameter properties

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

-BackendSettingsId

ID of the application gateway BackendSettings

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

-Listener

Application gateway Listener

Parameter properties

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

-ListenerId

ID of the application gateway Listener

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

The name of the Routing Rule

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:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RuleType

The type of 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

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

PSApplicationGatewayRoutingRule