< Back

New-AzureRmLoadBalancerRuleConfig

Tue Jan 29, 2019 9:56 pm

NAME New-AzureRmLoadBalancerRuleConfig



SYNOPSIS

Creates a rule configuration for a load balancer.





SYNTAX

New-AzureRmLoadBalancerRuleConfig [-BackendAddressPool <PSBackendAddressPool>] [-BackendPort <Int32>] [-DefaultProfile <IAzureContextContainer>]

[-DisableOutboundSNAT] [-EnableFloatingIP] [-FrontendIpConfiguration <PSFrontendIPConfiguration>] [-FrontendPort <Int32>] [-IdleTimeoutInMinutes

<Int32>] [-LoadDistribution {Default | SourceIP | SourceIPProtocol}] -Name <String> [-Probe <PSProbe>] [-Protocol {Tcp | Udp | All}]

[<CommonParameters>]



New-AzureRmLoadBalancerRuleConfig [-BackendAddressPoolId <String>] [-BackendPort <Int32>] [-DefaultProfile <IAzureContextContainer>]

[-DisableOutboundSNAT] [-EnableFloatingIP] [-FrontendIpConfigurationId <String>] [-FrontendPort <Int32>] [-IdleTimeoutInMinutes <Int32>]

[-LoadDistribution {Default | SourceIP | SourceIPProtocol}] -Name <String> [-ProbeId <String>] [-Protocol {Tcp | Udp | All}] [<CommonParameters>]





DESCRIPTION

The New-AzureRmLoadBalancerRuleConfig cmdlet creates a rule configuration for an Azure load balancer.





PARAMETERS

-BackendAddressPool <PSBackendAddressPool>

Specifies a BackendAddressPool object to associate with a load balancer rule configuration.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-BackendAddressPoolId <String>

Specifies the ID of a BackendAddressPool object to associate with a load balancer rule configuration.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-BackendPort <Int32>

Specifies the backend port for traffic that is matched by this load balancer 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



-DisableOutboundSNAT [<SwitchParameter>]

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



Required? false

Position? named

Default value False

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 a load balancer 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



-LoadDistribution <String>

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



- Default



- SourceIP



- SourceIPProtocol



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the load balancing rule that this cmdlet creates.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Probe <PSProbe>

Specifies a probe to associate with a load balancer rule configuration.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProbeId <String>

Specifies the ID of the probe to associate with a load balancer rule configuration.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Protocol <String>

Specifies the protocol that is matched by a load balancer 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

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSLoadBalancingRule







NOTES









1: Creating a rule configuration for an Azure Load Balancer



PS C:\\> $publicip = New-AzureRmPublicIpAddress -ResourceGroupName "MyResourceGroup"

-name MyPublicIP -location 'West US' -AllocationMethod Dynamic

PS C:\\> $frontend = New-AzureRmLoadBalancerFrontendIpConfig -Name MyFrontEnd

-PublicIpAddress $publicip

PS C:\\> $probe = New-AzureRmLoadBalancerProbeConfig -Name MyProbe -Protocol http -Port

80 -IntervalInSeconds 15 -ProbeCount 2 -RequestPath healthcheck.aspx

PS C:\\> New-AzureRmLoadBalancerRuleConfig -Name "MyLBrule" -FrontendIPConfiguration

$frontend -BackendAddressPool $backendAddressPool -Probe $probe -Protocol Tcp

-FrontendPort 80 -BackendPort 80 -IdleTimeoutInMinutes 15 -EnableFloatingIP

-LoadDistribution SourceIP



The first three commands set up a public IP, a front end, and a probe for the rule configuration in the forth command. The forth command creates a

new rule called MyLBrule with certain specifications.







RELATED LINKS

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

Add-AzureRmLoadBalancerRuleConfig

Get-AzureRmLoadBalancerRuleConfig

Remove-AzureRmLoadBalancerRuleConfig

Set-AzureRmLoadBalancerRuleConfig