New-​Azure​Rm​Load​Balancer​Rule​Config

Creates a rule configuration for a load balancer.

Syntax

New-AzureRmLoadBalancerRuleConfig
   [-BackendAddressPool <PSBackendAddressPool>]
   [-BackendPort <Int32>]
   [-EnableFloatingIP]
   [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
   [-FrontendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-LoadDistribution <String>]
   -Name <String>
   [-Probe <PSProbe>]
   [-Protocol <String>]
   [<CommonParameters>]
New-AzureRmLoadBalancerRuleConfig
   [-BackendAddressPoolId <String>]
   [-BackendPort <Int32>]
   [-EnableFloatingIP]
   [-FrontendIpConfigurationId <String>]
   [-FrontendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-LoadDistribution <String>]
   -Name <String>
   [-ProbeId <String>]
   [-Protocol <String>]
   [<CommonParameters>]

Description

The New-AzureRmLoadBalancerRuleConfig cmdlet creates a rule configuration for an Azure load balancer.

Examples

1: Creating a rule configuration for an Azure Load Balancer

PS C:\>  $publicip = New-AzureRmPublicIpAddress -ResourceGroupName "MyResourceGroup" 
    -name MyPublicIP -location 'West US' -AllocationMethod Dynamic
PS C:\>  $frontend = New-AzureRmLoadBalancerFrontendIpConfig -Name MyFrontEnd 
    -PublicIpAddress $publicip
PS C:\>  $probe = New-AzureRmLoadBalancerProbeConfig -Name MyProbe -Protocol http -Port 
    80 -IntervalInSeconds 15 -ProbeCount 2 -RequestPath healthcheck.aspx
PS C:\> New-AzureRmLoadBalancerRuleConfig -Name "MyLBrule" -FrontendIPConfiguration 
    $frontend -BackendAddressPool $backendAddressPool -Probe $probe -Protocol Tcp 
    -FrontendPort 80 -BackendPort 80 -IdleTimeoutInMinutes 15 -EnableFloatingIP 
    -LoadDistribution SourceIP

The first three commands set up a public IP, a front end, and a probe for the rule configuration in the forth command. The forth command creates a new rule called MyLBrule with certain specifications.

Required Parameters

-Name

Specifies the name of the load balancing rule that this cmdlet creates.

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

Optional Parameters

-BackendAddressPool

Specifies a BackendAddressPool object to associate with a load balancer rule configuration.

Type:PSBackendAddressPool
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-BackendAddressPoolId

Specifies the ID of a BackendAddressPool object to associate with a load balancer rule configuration.

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

Specifies the backend port for traffic that is matched by this load balancer rule configuration.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableFloatingIP

Indicates that this cmdlet enables a floating IP address for a rule configuration.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FrontendIpConfiguration

Specifies a list of front-end IP addresses to associate with a load balancer rule configuration.

Type:PSFrontendIPConfiguration
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FrontendIpConfigurationId

Specifies the ID for a front-end IP address configuration.

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

Specifies the front-end port that is matched by a load balancer rule configuration.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IdleTimeoutInMinutes

Specifies the length of time, in minutes, that the state of conversations is maintained in a load balancer.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LoadDistribution

Specifies a load distribution. The acceptable values for this parameter are:- Default

  • SourceIP
  • SourceIPProtocol
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Probe

Specifies a probe to associate with a load balancer rule configuration.

Type:PSProbe
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProbeId

Specifies the ID of the probe to associate with a load balancer rule configuration.

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

Specifies the protocol that is matched by a load balancer rule configuration. The acceptable values for this parameter are: Tcp or Udp.

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