編集

次の方法で共有


New-AzApplicationGatewayRoutingRule

Creates a routing rule for an application gateway.

Syntax

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>]

Description

The Add-AzApplicationGatewayRoutingRule cmdlet creates a routing rule for an Azure application gateway.

Examples

Example 1: Create a routing rule for an application gateway

$Rule = New-AzApplicationGatewayRoutingRule -Name "Rule01" -RuleType Basic -Priority 100 -BackendSettings $Setting -Listener $Listener -BackendAddressPool $Pool

This command creates a basic routing rule named Rule01 and stores the result in the variable named $Rule.

Parameters

-BackendAddressPool

Application gateway BackendAddressPool

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

-BackendAddressPoolId

ID of the application gateway BackendAddressPool

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

-BackendSettings

Application gateway BackendSettings

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

-BackendSettingsId

ID of the application gateway BackendSettings

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

-Listener

Application gateway Listener

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

-ListenerId

ID of the application gateway Listener

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

-Name

The name of the Routing Rule

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:True
Accept pipeline input:False
Accept wildcard characters:False

-RuleType

The type of rule

Type:String
Accepted values:Basic, PathBasedRouting
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSApplicationGatewayRoutingRule