New-AzApplicationGatewayAdvancedRoutingRuleConfig
Creates an advanced routing rule for an application gateway advanced routing map.
Syntax
BackendSetByResource (Default)
New-AzApplicationGatewayAdvancedRoutingRuleConfig
-Name <String>
-Priority <Int32>
-BackendAddressPool <PSApplicationGatewayBackendAddressPool>
-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
[-AdvancedRoutingConditionSet <PSApplicationGatewayAdvancedRoutingConditionSet>]
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
BackendSetByResourceId
New-AzApplicationGatewayAdvancedRoutingRuleConfig
-Name <String>
-Priority <Int32>
-BackendAddressPoolId <String>
-BackendHttpSettingsId <String>
[-AdvancedRoutingConditionSetId <String>]
[-RewriteRuleSetId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
RedirectSetByResourceId
New-AzApplicationGatewayAdvancedRoutingRuleConfig
-Name <String>
-Priority <Int32>
-RedirectConfigurationId <String>
[-AdvancedRoutingConditionSetId <String>]
[-RewriteRuleSetId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
RedirectSetByResource
New-AzApplicationGatewayAdvancedRoutingRuleConfig
-Name <String>
-Priority <Int32>
-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>
[-AdvancedRoutingConditionSet <PSApplicationGatewayAdvancedRoutingConditionSet>]
[-RewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Description
The New-AzApplicationGatewayAdvancedRoutingRuleConfig cmdlet creates an advanced routing rule. A rule references an advanced routing condition set and the backend to use when that condition set matches. Rules are evaluated in ascending priority order, and each priority must be unique within the containing advanced routing map. Supply either a backend address pool and backend HTTP settings, or a redirect configuration, but not both.
Examples
Example 1: Create an advanced routing rule that targets a backend pool
$gateway = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$pool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $gateway -Name "Pool01"
$settings = Get-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $gateway -Name "Settings01"
$conditionSet = Get-AzApplicationGatewayAdvancedRoutingConditionSet -ApplicationGateway $gateway -Name "emeaConditions"
$rule = New-AzApplicationGatewayAdvancedRoutingRuleConfig -Name "emeaRule" -Priority 100 -AdvancedRoutingConditionSet $conditionSet -BackendAddressPool $pool -BackendHttpSettings $settings
This command creates an advanced routing rule that sends matching requests to Pool01.
Parameters
-AcquirePolicyToken
Acquire an Azure Policy token automatically for this resource operation.
Parameter properties
Type: SwitchParameter
Default value: False
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
-AdvancedRoutingConditionSet
Application gateway AdvancedRoutingConditionSet evaluated by this rule
Parameter properties
Parameter sets
BackendSetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RedirectSetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AdvancedRoutingConditionSetId
ID of the application gateway AdvancedRoutingConditionSet evaluated by this rule
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
BackendSetByResourceId
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RedirectSetByResourceId
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BackendAddressPool
Application gateway BackendAddressPool
Parameter properties
Parameter sets
BackendSetByResource
Position: Named
Mandatory: True
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
BackendSetByResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BackendHttpSettings
Application gateway BackendHttpSettings
Parameter properties
Parameter sets
BackendSetByResource
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BackendHttpSettingsId
ID of the application gateway BackendHttpSettings
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
BackendSetByResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ChangeReference
The change reference resource ID for this resource operation.
Parameter properties
Type: String
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
-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
-Name
Name of the advanced 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 advanced routing rule.
Must be unique within the containing advanced routing map
Parameter properties
Type: 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
-RedirectConfiguration
Application gateway RedirectConfiguration.
Cannot be combined with BackendAddressPool or BackendHttpSettings
Parameter properties
Parameter sets
RedirectSetByResource
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RedirectConfigurationId
ID of the application gateway RedirectConfiguration.
Cannot be combined with BackendAddressPoolId or BackendHttpSettingsId
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RedirectSetByResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RewriteRuleSet
Application gateway RewriteRuleSet
Parameter properties
Parameter sets
BackendSetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RedirectSetByResource
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
BackendSetByResourceId
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RedirectSetByResourceId
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