Set-AzureRmLoadBalancerRuleConfig

Sets the goal state for a load balancer rule configuration.

Syntax

Set-AzureRmLoadBalancerRuleConfig
   -Name <String>
   -LoadBalancer <PSLoadBalancer>
   [-FrontendIpConfigurationId <String>]
   [-BackendAddressPoolId <String>]
   [-ProbeId <String>]
   [-Protocol <String>]
   [-FrontendPort <Int32>]
   [-BackendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   [-LoadDistribution <String>]
   [-EnableFloatingIP]
   [-DisableOutboundSNAT]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Set-AzureRmLoadBalancerRuleConfig
   -Name <String>
   -LoadBalancer <PSLoadBalancer>
   [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
   [-BackendAddressPool <PSBackendAddressPool>]
   [-Probe <PSProbe>]
   [-Protocol <String>]
   [-FrontendPort <Int32>]
   [-BackendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   [-LoadDistribution <String>]
   [-EnableFloatingIP]
   [-DisableOutboundSNAT]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Set-AzureRmLoadBalancerRuleConfig cmdlet sets the goal state for a load balancer rule configuration.

Examples

Example 1: Modify a load balancing rule configuration

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
PS C:\> $slb | Set-AzureRmLoadBalancerRuleConfig -Name "NewRule" -FrontendIPConfiguration $slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350

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

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

The third command passes the load balancer to Set-AzureRmLoadBalancerRuleConfig, which sets the new rule configuration. Note that the configuration does not enable a floating IP address, which had been enabled by the previous command.

Required Parameters

-LoadBalancer

Specifies a load balancer. This cmdlet sets the goal state rule configuration for the load balancer that this parameter specifies.

Type:Microsoft.Azure.Commands.Network.Models.PSLoadBalancer
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of a load balancer.

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.

Type:Microsoft.Azure.Commands.Network.Models.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 rule configuration.

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

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableOutboundSNAT

Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.

Type:System.Management.Automation.SwitchParameter
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:System.Management.Automation.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:Microsoft.Azure.Commands.Network.Models.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, for which 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
-LoadDistribution

Specifies a load distribution. The acceptable values for this parameter are: SourceIP and SourceIPProtocol.

Type:String
Parameter Sets:Default, SourceIP, SourceIPProtocol
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:Microsoft.Azure.Commands.Network.Models.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. The acceptable values for this parameter are: Tcp or Udp.

Type:String
Parameter Sets:Tcp, Udp, All
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSLoadBalancer

Parameter 'LoadBalancer' accepts value of type 'PSLoadBalancer' from the pipeline

Outputs

Microsoft.Azure.Commands.Network.Models.PSLoadBalancer