你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn 。
Add-AzLoadBalancerInboundNatPoolConfig
Adds an inbound NAT pool to a load balancer.
Syntax
Add-AzLoadBalancerInboundNatPoolConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-Protocol <String>
-FrontendPortRangeStart <Int32>
-FrontendPortRangeEnd <Int32>
-BackendPort <Int32>
[-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP]
[-EnableTcpReset]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzLoadBalancerInboundNatPoolConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-Protocol <String>
-FrontendPortRangeStart <Int32>
-FrontendPortRangeEnd <Int32>
-BackendPort <Int32>
[-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP]
[-EnableTcpReset]
[-FrontendIpConfigurationId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-AzLoadBalancerInboundNatPoolConfig cmdlet adds an inbound NAT pool to a load balancer.
Examples
Example 1: Add
$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
$feIpConfig = Get-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -Loadbalancer $slb
$slb | Add-AzLoadBalancerInboundNatPoolConfig -Name "myInboundNatPool" -Protocol TCP -FrontendIPConfigurationId $feIpConfig.Id -FrontendPortRangeStart 1001 -FrontendPortRangeEnd 2000 -BackendPort 1001
$lb | Set-AzLoadBalancer
Example 2
Adds an inbound NAT pool to a load balancer. (autogenerated)
Add-AzLoadBalancerInboundNatPoolConfig -BackendPort 1001 -FrontendIpConfigurationId <String> -FrontendPortRangeEnd 2000 -FrontendPortRangeStart 1001 -Name 'myInboundNatPool' -Protocol TCP -LoadBalancer <PSLoadBalancer>
Parameters
-BackendPort
Type: Int32
Position: Named
Default value: None
Required: True
Accept pipeline input: True
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Aliases: cf
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: IAzureContextContainer
Aliases: AzContext, AzureRmContext, AzureCredential
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
-EnableFloatingIP
Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
Type: SwitchParameter
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
-EnableTcpReset
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
Required: False
Accept pipeline input: False
Accept wildcard characters: False
-FrontendIpConfiguration
Type: PSFrontendIPConfiguration
Position: Named
Default value: None
Required: False
Accept pipeline input: True
Accept wildcard characters: False
-FrontendIpConfigurationId
Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: True
Accept wildcard characters: False
-FrontendPortRangeEnd
Type: Int32
Position: Named
Default value: None
Required: True
Accept pipeline input: True
Accept wildcard characters: False
-FrontendPortRangeStart
Type: Int32
Position: Named
Default value: None
Required: True
Accept pipeline input: True
Accept wildcard characters: False
-IdleTimeoutInMinutes
The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: True
Accept wildcard characters: False
-LoadBalancer
Type: PSLoadBalancer
Position: Named
Default value: None
Required: True
Accept pipeline input: True
Accept wildcard characters: False
-Name
Type: String
Position: Named
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False
-Protocol
Type: String
Position: Named
Default value: None
Required: True
Accept pipeline input: True
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Aliases: wi
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
PSLoadBalancer
String
Int32
PSFrontendIPConfiguration
Outputs
PSLoadBalancer