New-AzApplicationGatewayRequestRoutingRule
Creates a request routing rule for an application gateway.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzApplicationGatewayRequestRoutingRule
-Name <String>
-RuleType <String>
[-Priority <Int32>]
[-BackendHttpSettingsId <String>]
[-HttpListenerId <String>]
[-BackendAddressPoolId <String>]
[-UrlPathMapId <String>]
[-RewriteRuleSetId <String>]
[-RedirectConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
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
PS C:\>$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
Specifies the back-end address pool, as an object, for the request routing rule to create.
| Type: | PSApplicationGatewayBackendAddressPool |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the back-end address pool ID of the request routing rule to create.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the back-end HTTP settings, as an object, for the request routing rule to create.
| Type: | PSApplicationGatewayBackendHttpSettings |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the back-end HTTP settings ID of the request routing rule to create.
| 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 the back-end HTTP listener for the request routing rule to create.
| Type: | PSApplicationGatewayHttpListener |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the backend HTTP listener ID for the request routing rule to create.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the request routing rule that this cmdlet creates.
| 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 type of the 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 |
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
None
Outputs
PSApplicationGatewayRequestRoutingRule