Add-AzApplicationGatewayRequestRoutingRule
Adds a request routing rule to an application gateway.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
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>]
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
PS C:\>$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $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
Specifies an application gateway to which this cmdlet adds a request routing rule.
| Type: | PSApplicationGateway |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies an application gateway back-end address pool object.
| Type: | PSApplicationGatewayBackendAddressPool |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an application gateway back-end address pool ID.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies a back-end HTTP settings object for an application gateway.
| Type: | PSApplicationGatewayBackendHttpSettings |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies a backend HTTP settings ID for an application gateway.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies application gateway HTTP listener object.
| Type: | PSApplicationGatewayHttpListener |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies application gateway HTTP listener ID.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of request routing rule this cmdlet adds.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The priority of the rule
| Type: | Nullable<T>[Int32] |
| Accepted values: | 1-20000 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Application gateway RedirectConfiguration
| Type: | PSApplicationGatewayRedirectConfiguration |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
ID of the application gateway RedirectConfiguration
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Application gateway RewriteRuleSet
| Type: | PSApplicationGatewayRewriteRuleSet |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
ID of the application gateway RewriteRuleSet
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the type of request routing rule.
| Type: | String |
| Accepted values: | Basic, PathBasedRouting |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
| Type: | PSApplicationGatewayUrlPathMap |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the URL path map ID for the routing rule.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |