你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzApplicationGatewayRoutingRule
为应用程序网关创建路由规则。
语法
New-AzApplicationGatewayRoutingRule
-Name <String>
-RuleType <String>
-Priority <Int32>
[-BackendSettings <PSApplicationGatewayBackendSettings>]
[-Listener <PSApplicationGatewayListener>]
[-BackendAddressPool <PSApplicationGatewayBackendAddressPool>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
New-AzApplicationGatewayRoutingRule
-Name <String>
-RuleType <String>
-Priority <Int32>
[-BackendSettingsId <String>]
[-ListenerId <String>]
[-BackendAddressPoolId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Add-AzApplicationGatewayRoutingRule cmdlet 为 Azure 应用程序网关创建路由规则。
示例
示例 1:为应用程序网关创建路由规则
$Rule = New-AzApplicationGatewayRoutingRule -Name "Rule01" -RuleType Basic -Priority 100 -BackendSettings $Setting -Listener $Listener -BackendAddressPool $Pool
此命令创建名为 Rule01 的基本路由规则,并将结果存储在名为 $Rule 的变量中。
参数
-BackendAddressPool
应用程序网关 BackendAddressPool
Type: | PSApplicationGatewayBackendAddressPool |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendAddressPoolId
应用程序网关 BackendAddressPool 的 ID
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendSettings
应用程序网关后端设置
Type: | PSApplicationGatewayBackendSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BackendSettingsId
应用程序网关后端的 ID设置
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Listener
应用程序网关侦听器
Type: | PSApplicationGatewayListener |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ListenerId
应用程序网关侦听器的 ID
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
路由规则的名称
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Priority
规则的优先级
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RuleType
规则的类型
Type: | String |
Accepted values: | Basic, PathBasedRouting |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输入
None
输出
PSApplicationGatewayRoutingRule
相关链接
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈