Set-AzureRmApplicationGatewayProbeConfig

Sets the health probe configuration on an existing Application Gateway.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Set-AzureRmApplicationGatewayProbeConfig
   -ApplicationGateway <PSApplicationGateway>
   -Name <String>
   -Protocol <String>
   [-HostName <String>]
   -Path <String>
   -Interval <Int32>
   -Timeout <Int32>
   -UnhealthyThreshold <Int32>
   [-PickHostNameFromBackendHttpSettings]
   [-MinServers <Int32>]
   [-Match <PSApplicationGatewayProbeHealthResponseMatch>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Set-AzureRmApplicationGatewayProbeConfig cmdlet sets the health probe configuration on an existing Application Gateway.

Examples

Example 1: Set the configuration for a health probe on an application gateway

PS C:\>Set-AzureRmApplicationGatewayProbeConfig -ApplicationGateway Gateway -Name "Probe05" -Protocol Http -HostName "contoso.com" -Path "/path/custompath.htm" -Interval 30 -Timeout 120 -UnhealthyThreshold 8

This command sets the configuration for a health probe named Probe05 for the application gateway named Gateway. The command also sets the unhealthy threshold to 8 retries and times out after 120 seconds.

Parameters

-ApplicationGateway

Specifies the application gateway to which this cmdlet sends a probe.

Type:PSApplicationGateway
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostName

Specifies the host name that this cmdlet sends the probe to.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Interval

Specifies the probe interval in seconds. This is the time interval between two consecutive probes. This value is between 1 second and 86400 seconds.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Match

Body that must be contained in the health response. Default value is empty

Type:PSApplicationGatewayProbeHealthResponseMatch
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MinServers

Minimum number of servers that are always marked healthy. Default value is 0

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the probe.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the relative path of probe. Valid paths start with the slash character (/). The probe is sent to <Protocol>://<host>:<port><path>.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PickHostNameFromBackendHttpSettings

Whether the host header should be picked from the backend http settings. Default value is false

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Protocol

Specifies the protocol used to send probe.

Type:String
Accepted values:Http, Https
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Timeout

Specifies the probe timeout in seconds. This cmdlet marks the probe as failed if a valid response is not received with this timeout period. Valid values are between 1 second and 86400 seconds.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-UnhealthyThreshold

Specifies the probe retry count. The backend server is marked down after consecutive probe failure count reaches the unhealthy threshold. Valid values are between 1 second and 20 seconds.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSApplicationGateway

Parameters: ApplicationGateway (ByValue)

Outputs

PSApplicationGateway