Set-AzLoadBalancerProbeConfig
Updates a probe configuration for a load balancer.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Set-AzLoadBalancerProbeConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
[-Protocol <String>]
-Port <Int32>
-IntervalInSeconds <Int32>
-ProbeCount <Int32>
[-RequestPath <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzLoadBalancerProbeConfig cmdlet updates a probe configuration for a load balancer.
Examples
Example 1: Modify the probe configuration on a load balancer
PS C:\>$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
PS C:\> $slb | Add-AzLoadBalancerProbeConfig -Name "NewProbe" -Protocol "http" -Port 80 -IntervalInSeconds 15 -ProbeCount 2 -RequestPath "healthcheck.aspx"
PS C:\> $slb | Set-AzLoadBalancerProbeConfig -Name "NewProbe" -Port 80 -IntervalInSeconds 15 -ProbeCount 2
The first command gets the loadbalancer 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-AzLoadBalancerProbeConfig, which adds a new probe configuration to it. The third command passes the load balancer to Set-AzLoadBalancerProbeConfig, which sets the new configuration. Note that it is necessary to specify several of the same parameters that were specified in the previous command because they are required by the current cmdlet.
Example 2
Updates a probe configuration for a load balancer. (autogenerated)
Set-AzLoadBalancerProbeConfig -IntervalInSeconds 15 -Name 'NewProbe' -Port 443 -ProbeCount 2 -Protocol https -LoadBalancer <PSLoadBalancer>
Parameters
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 |
Specifies the interval, in seconds, between probes to each instance of the load-balanced service.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies a load balancer. This cmdlet updates a probe configuration for 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 probe configuration that this cmdlet sets.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the port on which probes should connect to a load-balanced service.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the number of per-instance consecutive failures for an instance to be considered unhealthy.
| Type: | Int32 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the protocol to use for the probing. The acceptable values for this parameter are: Tcp or Http.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the path in the load-balanced service to probe to determine health.
| 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 |