Add-AzLoadBalancerRuleConfig
Adds a rule configuration to a load balancer.
Add-AzLoadBalancerRuleConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
[-Protocol <String>]
[-LoadDistribution <String>]
[-FrontendPort <Int32>]
[-BackendPort <Int32>]
[-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP]
[-EnableTcpReset]
[-DisableOutboundSNAT]
[-FrontendIpConfiguration <PSFrontendIPConfiguration>]
[-BackendAddressPool <PSBackendAddressPool[]>]
[-Probe <PSProbe>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzLoadBalancerRuleConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
[-Protocol <String>]
[-LoadDistribution <String>]
[-FrontendPort <Int32>]
[-BackendPort <Int32>]
[-IdleTimeoutInMinutes <Int32>]
[-EnableFloatingIP]
[-EnableTcpReset]
[-DisableOutboundSNAT]
[-FrontendIpConfigurationId <String>]
[-BackendAddressPoolId <String[]>]
[-ProbeId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The Add-AzLoadBalancerRuleConfig cmdlet adds a rule configuration to an Azure load balancer.
$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
$slb | Add-AzLoadBalancerRuleConfig -Name "NewRule" -FrontendIPConfiguration $slb.FrontendIpConfigurations[0] -Protocol "Tcp" -FrontendPort 3350 -BackendPort 3350 -EnableFloatingIP
$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-AzLoadBalancerRuleConfig, which adds the rule configuration named NewRule. The third command will update the load balancer in azure with the new Load Balancer Rule Config.
$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
$MyBackendPool1 = Get-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $MyLoadBalancer -Name $backendPool1Name
$MyBackendPool2 = Get-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $MyLoadBalancer -Name $backendPool2Name
$slb | Add-AzLoadBalancerRuleConfig -Name "NewRule" -FrontendIPConfiguration $slb.FrontendIpConfigurations[0] -Protocol All -FrontendPort 0 -BackendPort 0 -BackendAddressPool $MyBackendPool1, $MyBackendPool2
$slb | Set-AzLoadBalancer
This enables Gateway Load Balancer to have multiple backend pools The first command will get the load balancer named MyLoadBalancer, and then stores it in the variable $slb. The second and thrid command will get the backend address pools to be added the rule The forth command will add a new rule with configured backend pools the fifth command will update the load balancer in azure with the new Load Balancer Rule Config.
Specifies the backend address pool to associate with a load balancer rule configuration.
Type: | PSBackendAddressPool[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of a BackendAddressPool object to associate with a load balancer rule configuration.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the backend port for traffic that is matched by a load balancer rule configuration.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a list of front-end IP addresses to associate with a load balancer rule configuration.
Type: | PSFrontendIPConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID for a front-end IP address configuration.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the front-end port that is matched by a load balancer rule configuration.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the length of time, in minutes, that the state of conversations is maintained in the load balancer.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a LoadBalancer object. This cmdlet adds a rule configuration to the load balancer that this parameter specifies.
Type: | PSLoadBalancer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a load distribution.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the load balancer rule configuration.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a probe to associate with a load balancer rule configuration.
Type: | PSProbe |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the ID of the probe to associate with a load balancer rule configuration.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the protocol that is matched by a load balancer rule. The acceptable values for this parameter are: Tcp or Udp.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Feedback su Azure PowerShell
Azure PowerShell è un progetto di open source. Selezionare un collegamento per fornire feedback: