Add-​Azure​Rm​Application​Gateway​Request​Routing​Rule

Adds a request routing rule to an application gateway.

Syntax

Add-AzureRmApplicationGatewayRequestRoutingRule
   -ApplicationGateway <PSApplicationGateway>
   [-BackendAddressPool <PSApplicationGatewayBackendAddressPool>]
   [-BackendHttpSettings <PSApplicationGatewayBackendHttpSettings>]
   [-HttpListener <PSApplicationGatewayHttpListener>]
   -Name <String>
   [-RedirectConfiguration <PSApplicationGatewayRedirectConfiguration>]
   -RuleType <String>
   [-UrlPathMap <PSApplicationGatewayUrlPathMap>]
   [<CommonParameters>]
Add-AzureRmApplicationGatewayRequestRoutingRule
   -ApplicationGateway <PSApplicationGateway>
   [-BackendAddressPoolId <String>]
   [-BackendHttpSettingsId <String>]
   [-HttpListenerId <String>]
   -Name <String>
   [-RedirectConfigurationId <String>]
   -RuleType <String>
   [-UrlPathMapId <String>]
   [<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-AzureApplicationGatewayRequestRoutingRule -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.

Required Parameters

-ApplicationGateway

Specifies an application gateway to which this cmdlet adds a request routing rule.

Type:PSApplicationGateway
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

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
-RuleType

Specifies the type of request routing rule.

Type:String
Parameter Sets:Basic, PathBasedRouting
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-BackendAddressPool

Specifies an application gateway back-end address pool object.

Type:PSApplicationGatewayBackendAddressPool
Position:Named
Default value:None
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
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
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
Accept pipeline input:False
Accept wildcard characters:False
-HttpListener

Specifies application gateway HTTP listener object.

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

Specifies application gateway HTTP listener ID.

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

Application gateway RedirectConfiguration

Type:PSApplicationGatewayRedirectConfiguration
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RedirectConfigurationId

ID of the application gateway RedirectConfiguration

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UrlPathMap
Type:PSApplicationGatewayUrlPathMap
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

Outputs

Microsoft.Azure.Commands.Network.Models.PSApplicationGateway