< Back

Set-AzureRmLoadBalancerInboundNatRuleConfig

Tue Jan 29, 2019 9:58 pm

NAME Set-AzureRmLoadBalancerInboundNatRuleConfig



SYNOPSIS

Sets an inbound NAT rule configuration for a load balancer.





SYNTAX

Set-AzureRmLoadBalancerInboundNatRuleConfig [-BackendPort <Int32>] [-DefaultProfile <IAzureContextContainer>] [-EnableFloatingIP]

[-FrontendIpConfiguration <PSFrontendIPConfiguration>] [-FrontendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] -LoadBalancer <PSLoadBalancer>

-Name <String> [-Protocol {Tcp | Udp}] [<CommonParameters>]



Set-AzureRmLoadBalancerInboundNatRuleConfig [-BackendPort <Int32>] [-DefaultProfile <IAzureContextContainer>] [-EnableFloatingIP]

[-FrontendIpConfigurationId <String>] [-FrontendPort <Int32>] [-IdleTimeoutInMinutes <Int32>] -LoadBalancer <PSLoadBalancer> -Name <String>

[-Protocol {Tcp | Udp}] [<CommonParameters>]





DESCRIPTION

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

balancer.





PARAMETERS

-BackendPort <Int32>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EnableFloatingIP [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-FrontendIpConfiguration <PSFrontendIPConfiguration>

Specifies a list of front-end IP addresses to associate with an inbound NAT rule configuration.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FrontendIpConfigurationId <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FrontendPort <Int32>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IdleTimeoutInMinutes <Int32>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-LoadBalancer <PSLoadBalancer>

Specifies a load balancer. This cmdlet sets an inbound NAT rule configuration for the load balancer that this parameter specifies.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Name <String>

Specifies the name of an inbound NAT rule configuration.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Protocol <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

PSLoadBalancer

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





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSLoadBalancer







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ruleconfig

Add-AzureRmLoadBalancerInboundNatRuleConfig

Get-AzureRmLoadBalancer

Get-AzureRmLoadBalancerInboundNatRuleConfig

New-AzureRmLoadBalancerInboundNatRuleConfig

Remove-AzureRmLoadBalancerInboundNatRuleConfig