Add-AzLoadBalancerInboundNatRuleConfig
Adds an inbound NAT rule configuration to a load balancer.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Add-AzLoadBalancerInboundNatRuleConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
[-Protocol <String>]
[-FrontendPort <Int32>]
[-BackendPort <Int32>]
[-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP]
[-EnableTcpReset]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzLoadBalancerInboundNatRuleConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
[-Protocol <String>]
[-FrontendPort <Int32>]
[-BackendPort <Int32>]
[-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP]
[-EnableTcpReset]
[-FrontendIpConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-AzLoadBalancerInboundNatRuleConfig cmdlet adds an inbound network address translation (NAT) rule configuration to an Azure load balancer.
Examples
Example 1: Add an inbound NAT rule configuration to a load balancer
PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
PS C:\> $slb | Add-AzLoadBalancerInboundNatRuleConfig -Name "NewNatRule" -FrontendIPConfiguration $slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP
PS C:\> $slb | Set-AzLoadBalancer
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-AzLoadBalancerInboundNatRuleConfig, which adds an inbound NAT rule configuration to the load balancer. The last command sets the configuration to the loadbalancer, if you don't perform Set-AzLoadBalancer, your changes will not be applied to the loadbalancer.
Parameters
Specifies the backend port for traffic matched by a rule configuration.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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: | True |
| Accept wildcard characters: | False |
Specifies an ID for a front-end IP address configuration.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the front-end port that is matched by a rule configuration.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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: | True |
| Accept wildcard characters: | False |
Specifies a LoadBalancer object. This cmdlet adds an inbound NAT rule configuration to the load balancer that this parameter specifies.
| Type: | PSLoadBalancer |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the name of the inbound NAT rule configuration to add.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the protocol that is matched by an inbound NAT rule. The acceptable values for this parameter are: Tcp or Udp.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |