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

Adds a rule configuration to a load balancer.

Syntax

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

Description

The Add-AzureRmLoadBalancerRuleConfig cmdlet adds a rule configuration to an Azure load balancer.

Examples

Example 1: Add a rule configuration to a load balancer

PS C:\>$slb = Get-AzureRmLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
PS C:\> $slb | Add-AzureRmLoadBalancerRuleConfig -Name "NewRule" -FrontendIPConfiguration $slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP

The first command gets the load balancer named MyLoadBalancer, and then stores it in the variable $slb.

The second command uses the pipeline operator to pass the load balancer in $slb to Add-AzureRmLoadBalancerRuleConfig, which adds the rule configuration named NewRule.

Required Parameters

-LoadBalancer

Specifies a LoadBalancer object. This cmdlet adds a rule configuration to the load balancer that this parameter specifies.

Type:PSLoadBalancer
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of the load balancer rule configuration.

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

Optional Parameters

-BackendAddressPool

Specifies the backend address pool 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 a 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 the 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.

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

Specfies the protocol that is matched by a load balancer rule. 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