Redigera

Dela via


Add-AzApplicationGatewayRequestRoutingRule

Adds a request routing rule to an application gateway.

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

$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$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

-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:AzContext, 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

-Priority

The priority of the rule

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
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

-RewriteRuleSet

Application gateway RewriteRuleSet

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

-RewriteRuleSetId

ID of the application gateway RewriteRuleSet

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

PSApplicationGateway

Outputs

PSApplicationGateway