New-AzApplicationGatewayRequestRoutingRule
Creates a request routing rule for an application gateway.
Syntax
SetByResourceId
New-AzApplicationGatewayRequestRoutingRule
-Name <String>
-RuleType <String>
[-Priority <Int32>]
[-BackendHttpSettingsId <String>]
[-HttpListenerId <String>]
[-BackendAddressPoolId <String>]
[-UrlPathMapId <String>]
[-RewriteRuleSetId <String>]
[-RedirectConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
SetByResource
New-AzApplicationGatewayRequestRoutingRule
-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 creates a request routing rule for an Azure application gateway.
Examples
Example 1: Create a request routing rule for an application gateway
$Rule = New-AzApplicationGatewayRequestRoutingRule -Name "Rule01" -RuleType Basic -Priority 100 -BackendHttpSettings $Setting -HttpListener $Listener -BackendAddressPool $Pool
This command creates a basic request routing rule named Rule01 and stores the result in the variable named $Rule.
Parameters
-BackendAddressPool
Specifies the back-end address pool, as an object, for the request routing rule to create.
Parameter properties
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 the back-end address pool ID of the request routing rule to create.
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 the back-end HTTP settings, as an object, for the request routing rule to create.
Parameter properties
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 the back-end HTTP settings ID of the request routing rule to create.
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 the back-end HTTP listener for the request routing rule to create.
Parameter properties
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 the backend HTTP listener ID for the request routing rule to create.
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 the request routing rule that this cmdlet creates.
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
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
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 type of the 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 creates a request routing rule for an Azure application gateway.
Parameter properties
Parameter sets
SetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UrlPathMapId
The Add-AzApplicationGatewayRequestRoutingRule cmdlet creates a request routing rule for an Azure 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
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 .
None
Outputs