你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzApplicationGatewayRequestRoutingRule
Modifies a request routing rule for an application gateway.
Syntax
Set-AzApplicationGatewayRequestRoutingRule
-ApplicationGateway <PSApplicationGateway>
-Name <String>
-RuleType <String>
[-Priority <Int32>]
[-BackendHttpSettingsId <String>]
[-HttpListenerId <String>]
[-BackendAddressPoolId <String>]
[-UrlPathMapId <String>]
[-RewriteRuleSetId <String>]
[-RedirectConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Set-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 Set-AzApplicationGatewayRequestRoutingRule cmdlet modifies a request routing rule.
Examples
Example 1: Update a request routing rule
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Set-AzApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGw -Name "Rule01" -RuleType Basic -Priority 100 -BackendHttpSettings $Setting -HttpListener $Listener -BackendAddressPool $Pool
The first command gets the application gateway named ApplicationGateway01 and stores it in the $AppGw variable. The second command modifies the request routing rule for the application gateway to use back-end HTTP settings specified in the $Setting variable, an HTTP listener specified in the $Listener variable, and a back-end address pool specified in the $Pool variable.
Parameters
-ApplicationGateway
Specifies the application gateway object with which this cmdlet associates a request routing rule.
Type: | PSApplicationGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BackendAddressPool
Specifies the application gateway back-end address pool.
Type: | PSApplicationGatewayBackendAddressPool |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendAddressPoolId
Specifies the 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 the application gateway backend HTTP settings.
Type: | PSApplicationGatewayBackendHttpSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendHttpSettingsId
Specifies the application gateway back-end HTTP settings ID.
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 the application gateway HTTP listener.
Type: | PSApplicationGatewayHttpListener |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HttpListenerId
Specifies the 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 the request routing rule that this cmdlet modifies.
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
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |