Add-AzureRmApplicationGatewayRequestRoutingRule
Adds a request routing rule to an application gateway.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Add-AzureRmApplicationGatewayRequestRoutingRule
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-RuleType <String>
[-BackendHttpSettingsId <String>]
[-HttpListenerId <String>]
[-BackendAddressPoolId <String>]
[-UrlPathMapId <String>]
[-RedirectConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Add-AzureRmApplicationGatewayRequestRoutingRule
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-RuleType <String>
[-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
[-HttpListener <PSApplicationGatewayHttpListener>]
[-BackendAddressPool <PSApplicationGatewayBackendAddressPool>]
[-UrlPathMap <PSApplicationGatewayUrlPathMap>]
[-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Add-AzureRmApplicationGatewayRequestRoutingRule 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-AzureRmApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Appgw = Add-AzureRmApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGw -Name "Rule01" -RuleType Basic -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
-ApplicationGateway
Specifies an application gateway to which this cmdlet adds a request routing rule.
Type: | PSApplicationGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BackendAddressPool
Specifies an application gateway back-end address pool object.
Type: | PSApplicationGatewayBackendAddressPool |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendAddressPoolId
Specifies an application gateway back-end address pool ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendHttpSettings
Specifies a back-end HTTP settings object for an application gateway.
Type: | PSApplicationGatewayBackendHttpSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendHttpSettingsId
Specifies a backend HTTP settings ID for an application gateway.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HttpListener
Specifies application gateway HTTP listener object.
Type: | PSApplicationGatewayHttpListener |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HttpListenerId
Specifies application gateway HTTP listener ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of request routing rule this cmdlet adds.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RedirectConfiguration
Application gateway RedirectConfiguration
Type: | PSApplicationGatewayRedirectConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RedirectConfigurationId
ID of the application gateway RedirectConfiguration
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RuleType
Specifies the type of request routing rule.
Type: | String |
Accepted values: | Basic, PathBasedRouting |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UrlPathMap
Type: | PSApplicationGatewayUrlPathMap |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UrlPathMapId
Specifies the URL path map ID for the routing rule.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Parameters: ApplicationGateway (ByValue)