New-AzureRmApplicationGatewayRequestRoutingRule

Creates a request routing rule for 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

New-AzureRmApplicationGatewayRequestRoutingRule
   -Name <String>
   -RuleType <String>
   [-BackendHttpSettingsId <String>]
   [-HttpListenerId <String>]
   [-BackendAddressPoolId <String>]
   [-UrlPathMapId <String>]
   [-RedirectConfigurationId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzureRmApplicationGatewayRequestRoutingRule
   -Name <String>
   -RuleType <String>
   [-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
   [-HttpListener <PSApplicationGatewayHttpListener>]
   [-BackendAddressPool <PSApplicationGatewayBackendAddressPool>]
   [-UrlPathMap <PSApplicationGatewayUrlPathMap>]
   [-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Add-AzureRmApplicationGatewayRequestRoutingRule 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-AzureRmApplicationGatewayRequestRoutingRule -Name "Rule01" -RuleType Basic -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

-BackendAddressPool

Specifies the back-end address pool, as an object, for the request routing rule to create.

Type:PSApplicationGatewayBackendAddressPool
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BackendAddressPoolId

Specifies the back-end address pool ID of the request routing rule to create.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BackendHttpSettings

Specifies the back-end HTTP settings, as an object, for the request routing rule to create.

Type:PSApplicationGatewayBackendHttpSettings
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BackendHttpSettingsId

Specifies the back-end HTTP settings ID of the request routing rule to create.

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 the back-end HTTP listener for the request routing rule to create.

Type:PSApplicationGatewayHttpListener
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpListenerId

Specifies the backend HTTP listener ID for the request routing rule to create.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the request routing rule that this cmdlet creates.

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 type of the 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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSApplicationGatewayRequestRoutingRule