Set-​Azure​Rm​Load​Balancer​Inbound​Nat​Rule​Config

Sets an inbound NAT rule configuration for a load balancer.

Syntax

Set-AzureRmLoadBalancerInboundNatRuleConfig
   [-BackendPort <Int32>]
   [-EnableFloatingIP]
   [-FrontendIpConfiguration <PSFrontendIPConfiguration>]
   [-FrontendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   -LoadBalancer <PSLoadBalancer>
   -Name <String>
   [-Protocol <String>]
   [<CommonParameters>]
Set-AzureRmLoadBalancerInboundNatRuleConfig
   [-BackendPort <Int32>]
   [-EnableFloatingIP]
   [-FrontendIpConfigurationId <String>]
   [-FrontendPort <Int32>]
   [-IdleTimeoutInMinutes <Int32>]
   -LoadBalancer <PSLoadBalancer>
   -Name <String>
   [-Protocol <String>]
   [<CommonParameters>]

Description

The Set-AzureRmLoadBalancerInboundNatRuleConfig cmdlet sets an inbound network address translation (NAT) rule configuration for an Azure load balancer.

Examples

Example 1: Modify the inbound NAT rule configuration on a load balancer

PS C:\>$slb = Get-AzureRmLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
PS C:\> $slb | Add-AzureRmLoadBalancerInboundNatRuleConfig -Name "NewNatRule" -FrontendIPConfiguration $slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP
PS C:\> $slb | Set-AzureRmLoadBalancerInboundNatRuleConfig -Name "NewNatRule" -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-AzureRmLoadBalancerInboundNatRuleConfig, which adds an inbound NAT rule configuration to it.

The third command passes the load balancer to Set-AzureRmLoadBalancerInboundNatRuleConfig, which saves and updates the inbound NAT rule configuration. Note that the rule configuration was set without enabling floating IP, which had been enabled by the previous command.

Required Parameters

-LoadBalancer

Specifies a load balancer. This cmdlet sets an inbound NAT rule configuration for 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 an inbound NAT rule configuration.

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

Optional Parameters

-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
-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 an inbound NAT 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
-Protocol

Specifies the protocol that is matched by an inbound NAT rule configuration. The acceptable values for this parameter are: Tcp or Udp.

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