Set-AzApplicationGatewayAdvancedRoutingMap
Modifies an advanced routing map on an application gateway.
Syntax
BackendSetByResource (Default)
Set-AzApplicationGatewayAdvancedRoutingMap
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-AdvancedRoutingRule <PSApplicationGatewayAdvancedRoutingRule[]>
-DefaultBackendAddressPool <PSApplicationGatewayBackendAddressPool>
-DefaultBackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
[-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
BackendSetByResourceId
Set-AzApplicationGatewayAdvancedRoutingMap
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-AdvancedRoutingRule <PSApplicationGatewayAdvancedRoutingRule[]>
-DefaultBackendAddressPoolId <String>
-DefaultBackendHttpSettingsId <String>
[-DefaultRewriteRuleSetId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
RedirectSetByResourceId
Set-AzApplicationGatewayAdvancedRoutingMap
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-AdvancedRoutingRule <PSApplicationGatewayAdvancedRoutingRule[]>
-DefaultRedirectConfigurationId <String>
[-DefaultRewriteRuleSetId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
RedirectSetByResource
Set-AzApplicationGatewayAdvancedRoutingMap
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-AdvancedRoutingRule <PSApplicationGatewayAdvancedRoutingRule[]>
-DefaultRedirectConfiguration <PSApplicationGatewayRedirectConfiguration>
[-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
[-DefaultProfile <IAzureContextContainer>]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Description
The Set-AzApplicationGatewayAdvancedRoutingMap cmdlet replaces an existing advanced routing map on an application gateway. The map is replaced in full, so supply every rule it should contain along with its default backend. Call Set-AzApplicationGateway to persist the change.
Examples
Example 1: Add a rule to an existing advanced routing map
$gateway = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$pool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $gateway -Name "Pool01"
$settings = Get-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $gateway -Name "Settings01"
$map = Get-AzApplicationGatewayAdvancedRoutingMap -ApplicationGateway $gateway -Name "Map01"
$gateway = Set-AzApplicationGatewayAdvancedRoutingMap -ApplicationGateway $gateway -Name "Map01" -AdvancedRoutingRule ($map.AdvancedRoutingRules + $newRule) -DefaultBackendAddressPool $pool -DefaultBackendHttpSettings $settings
$gateway = Set-AzApplicationGateway -ApplicationGateway $gateway
This command appends a rule to the existing advanced routing map and then updates the gateway.
Parameters
-AcquirePolicyToken
Acquire an Azure Policy token automatically for this resource operation.
Parameter properties
Type: SwitchParameter
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
-AdvancedRoutingRule
List of advanced routing rules
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ApplicationGateway
The applicationGateway
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: True
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
-DefaultBackendAddressPool
Application gateway default 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
-DefaultBackendAddressPoolId
ID of the application gateway default 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
-DefaultBackendHttpSettings
Application gateway default 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
-DefaultBackendHttpSettingsId
ID of the application gateway default 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
-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
-DefaultRedirectConfiguration
Application gateway default RedirectConfiguration
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
-DefaultRedirectConfigurationId
ID of the application gateway default RedirectConfiguration
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
-DefaultRewriteRuleSet
Application gateway default 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
-DefaultRewriteRuleSetId
ID of the application gateway default 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
-Name
Name of the advanced routing map
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
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 .
Outputs