你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzApplicationGatewayUrlPathMapConfig

创建到后端服务器池的 URL 路径映射数组。

语法

New-AzApplicationGatewayUrlPathMapConfig
   -Name <String>
   -PathRules <PSApplicationGatewayPathRule[]>
   -DefaultBackendAddressPool <PSApplicationGatewayBackendAddressPool>
   -DefaultBackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
   [-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzApplicationGatewayUrlPathMapConfig
   -Name <String>
   -PathRules <PSApplicationGatewayPathRule[]>
   -DefaultBackendAddressPoolId <String>
   -DefaultBackendHttpSettingsId <String>
   [-DefaultRewriteRuleSetId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzApplicationGatewayUrlPathMapConfig
   -Name <String>
   -PathRules <PSApplicationGatewayPathRule[]>
   [-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
   -DefaultRedirectConfiguration <PSApplicationGatewayRedirectConfiguration>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzApplicationGatewayUrlPathMapConfig
   -Name <String>
   -PathRules <PSApplicationGatewayPathRule[]>
   [-DefaultRewriteRuleSetId <String>]
   -DefaultRedirectConfigurationId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

说明

New-AzApplicationGatewayUrlPathMapConfig cmdlet 创建到后端服务器池的 URL 路径映射数组。

示例

示例 1:创建到后端服务器池的 URL 路径映射数组

New-AzApplicationGatewayUrlPathMapConfig -Name $UrlPathMapName -PathRules $VideoPathRule, $ImagePathRule -DefaultBackendAddressPool $Pool -DefaultBackendHttpSettings $PoolSetting02

此命令创建到后端服务器池的 URL 路径映射数组。

参数

-DefaultBackendAddressPool

指定要路由的默认后端地址池,以防 pathRules 参数匹配中指定的任何规则。

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

-DefaultBackendAddressPoolId

指定默认后端地址池 ID。

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

-DefaultBackendHttpSettings

指定要使用的默认后端 HTTP 设置,以防 pathRules 参数匹配中指定的任何规则。

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

-DefaultBackendHttpSettingsId

指定默认后端 HTTP 设置 ID。

Type:String
Position:Named
Default value:None
Required:True
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

-DefaultRedirectConfiguration

应用程序网关默认 RedirectConfiguration

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

-DefaultRedirectConfigurationId

应用程序网关默认 RedirectConfiguration 的 ID

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

-DefaultRewriteRuleSet

应用程序网关默认重写规则集

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

-DefaultRewriteRuleSetId

应用程序网关默认重写规则集的 ID

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

-Name

指定此 cmdlet 创建的 URL 路径映射名称。

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

-PathRules

指定路径规则的列表。 请注意,路径规则区分顺序,它们按指定的顺序应用。

Type:PSApplicationGatewayPathRule[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

输入

None

输出

PSApplicationGatewayUrlPathMap