Edit

Share via


Add-AzApplicationGatewayUrlPathMapConfig

Adds an array of URL path mappings to a backend server pool.

Syntax

BackendSetByResource (Default)

Add-AzApplicationGatewayUrlPathMapConfig
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -PathRules <PSApplicationGatewayPathRule[]>
    -DefaultBackendAddressPool <PSApplicationGatewayBackendAddressPool>
    -DefaultBackendHttpSettings <PSApplicationGatewayBackendHttpSettings>
    [-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

BackendSetByResourceId

Add-AzApplicationGatewayUrlPathMapConfig
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -PathRules <PSApplicationGatewayPathRule[]>
    -DefaultBackendAddressPoolId <String>
    -DefaultBackendHttpSettingsId <String>
    [-DefaultRewriteRuleSetId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

RedirectSetByResource

Add-AzApplicationGatewayUrlPathMapConfig
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -PathRules <PSApplicationGatewayPathRule[]>
    -DefaultRedirectConfiguration <PSApplicationGatewayRedirectConfiguration>
    [-DefaultRewriteRuleSet <PSApplicationGatewayRewriteRuleSet>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

RedirectSetByResourceId

Add-AzApplicationGatewayUrlPathMapConfig
    -ApplicationGateway <PSApplicationGateway>
    -Name <String>
    -PathRules <PSApplicationGatewayPathRule[]>
    -DefaultRedirectConfigurationId <String>
    [-DefaultRewriteRuleSetId <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Add-AzApplicationGatewayUrlPathMapConfig cmdlet adds an array of URL path mappings to a back end server pool.

Examples

Example 1: Add an URL path mapping to an application gateway.

$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

The first command gets an application gateway named appGwName and stores it in $appgw variable. The second command gets backend address pool and stores it in $pool variable. The third command gets backend http settings and stores it in $poolSettings variable. The fourth command create new path rule configuration named rule01 and stores it in $pathRule variable. The fifth command adds url path mapping configuration named url01 to the application gateway. The sixth command updates the application gateway.

Parameters

-ApplicationGateway

Specifies the application gateway to which this cmdlet adds a URL path map configuration.

Parameter properties

Type:PSApplicationGateway
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultBackendAddressPool

Specifies the default backend address pool to route in case none of the rules specified in the pathRules parameter match.

Parameter properties

Type:PSApplicationGatewayBackendAddressPool
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

BackendSetByResource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultBackendAddressPoolId

Specifies the default backend address pool ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

BackendSetByResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultBackendHttpSettings

Specifies the default backend HTTP settings to use in case none of the rules specified in the pathRules parameter match.

Parameter properties

Type:PSApplicationGatewayBackendHttpSettings
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

BackendSetByResource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultBackendHttpSettingsId

Specifies the default backend HTTP settings ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

BackendSetByResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultRedirectConfiguration

Application gateway default RedirectConfiguration

Parameter properties

Type:PSApplicationGatewayRedirectConfiguration
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RedirectSetByResource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultRedirectConfigurationId

ID of the application gateway default RedirectConfiguration

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RedirectSetByResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultRewriteRuleSet

Application gateway default rewrite rule set

Parameter properties

Type:PSApplicationGatewayRewriteRuleSet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

BackendSetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RedirectSetByResource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultRewriteRuleSetId

ID of the application gateway default rewrite rule set

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

BackendSetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RedirectSetByResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the URL path map name that this cmdlet adds to the backend server pool.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PathRules

Specifies a list of path rules. The path rules are order sensitive, they are applied in order they are specified.

Parameter properties

Type:

PSApplicationGatewayPathRule[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSApplicationGateway

Outputs

PSApplicationGateway