Add-AzApplicationGatewayUrlPathMapConfig

URL パス マッピングの配列をバックエンド サーバー プールに追加します。

構文

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

説明

Add-AzApplicationGatewayUrlPathMapConfig コマンドレットは、URL パス マッピングの配列をバックエンド サーバー プールに追加します。

例 1: アプリケーション ゲートウェイへの URL パス マッピングを追加します。

$appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName"
$pool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $appgw -Name "pool01"
$poolSettings = Get-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $appgw -Name "poolSettings01"
$pathRule = New-AzApplicationGatewayPathRuleConfig -Name "rule01" -Paths "/path" -BackendAddressPool $pool -BackendHttpSettings $poolSettings
$appgw = Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "url01" -PathRules $pathRule -DefaultBackendAddressPool $pool -DefaultBackendHttpSettings $poolSettings
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw

最初のコマンドは、appGwName という名前のアプリケーション ゲートウェイを取得し、$appgw変数に格納します。 2 番目のコマンドは、バックエンド アドレス プールを取得し、$pool変数に格納します。 3 番目のコマンドは、バックエンド http 設定を取得し、$pool設定変数に格納します。 4 番目のコマンドは、rule01 という名前の新しいパス規則構成を作成し、$pathRule変数に格納します。 5 番目のコマンドは、url01 という名前の URL パス マッピング構成をアプリケーション ゲートウェイに追加します。 6 番目のコマンドは、アプリケーション ゲートウェイを更新します。

パラメーター

-ApplicationGateway

このコマンドレットが URL パス マップ構成を追加するアプリケーション ゲートウェイを指定します。

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

-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

pathRules パラメーターで指定された規則が一致しない場合に使用する既定のバックエンド HTTP 設定を指定します。

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

Application Gateway の既定の書き換え規則セット

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

このコマンドレットがバックエンド サーバー プールに追加する 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

入力

PSApplicationGateway

出力

PSApplicationGateway