Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Set-AzLoadBalancerProbeConfig
- Module:
- Az.Network Module
Updates a probe configuration for a load balancer.
Syntax
Default (Default)
Set-AzLoadBalancerProbeConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
[-Protocol <String>]
-Port <Int32>
-IntervalInSeconds <Int32>
-ProbeCount <Int32>
[-ProbeThreshold <Int32>]
[-RequestPath <String>]
[-NoHealthyBackendsBehavior <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
$slb = Get-AzLoadBalancer -Name "MyLoadBalancer" -ResourceGroupName "MyResourceGroup"
$slb | Add-AzLoadBalancerProbeConfig -Name "NewProbe" -Protocol "http" -Port 80 -IntervalInSeconds 15 -ProbeCount 2 -ProbeThreshold 2 -RequestPath "healthcheck.aspx"
$slb | Set-AzLoadBalancerProbeConfig -Name "NewProbe" -Port 80 -IntervalInSeconds 15 -ProbeCount 2 -NoHealthyBackendsBehavior "AllProbedUp"
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
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-IntervalInSeconds
Specifies the interval, in seconds, between probes to each instance of the load-balanced service.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-LoadBalancer
Specifies a load balancer. This cmdlet updates a probe configuration for the load balancer that this parameter specifies.
Parameter properties
| Type: | PSLoadBalancer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of the probe configuration that this cmdlet sets.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-NoHealthyBackendsBehavior
Determines how new connections are handled by the load balancer when all backend instances are probed down. The acceptable values for this parameter are: AllProbedDown or AllProbedUp.
Parameter properties
| Type: | String |
| Default value: | AllProbedDown |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Port
Specifies the port on which probes should connect to a load-balanced service.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ProbeCount
Specifies the number of per-instance consecutive failures for an instance to be considered unhealthy.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ProbeThreshold
Specifies the number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Protocol
Specifies the protocol to use for the probing. The acceptable values for this parameter are: Tcp or Http.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-RequestPath
Specifies the path in the load-balanced service to probe to determine health.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
PSLoadBalancer
String
Int32
Outputs
PSLoadBalancer
Related Links
Azure PowerShell
Feedback
Was this page helpful?
