< Back

Add-GceHealthCheck

Mon Jan 13, 2020 10:57 pm

NAME Add-GceHealthCheck



SYNOPSIS

Adds a Google Compute Engine health check.





SYNTAX

Add-GceHealthCheck [-Project <string>] [-Name] <string> [-Description <string>] [-HostHeader <string>] [-Port

<int>] [-RequestPath <string>] [-CheckInterval <TimeSpan>] [-Timeout <TimeSpan>] [-HealthyThreshold <int>]

[-UnhealthyThreshold <int>] [-Https <SwitchParameter>] [<CommonParameters>]



Add-GceHealthCheck [-Project <string>] [-HttpsObject] <HttpsHealthCheck> [<CommonParameters>]



Add-GceHealthCheck [-Project <string>] [-HttpObject] <HttpHealthCheck> [<CommonParameters>]





DESCRIPTION





PARAMETERS

-Project <string>

The project to add the health check to. Defaults to the project in the Cloud SDK config.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string>

The name of the health check to add.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <string>

Human readable description of the health check.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HostHeader <string>

The value of the host header in the health check request. If left empty, the public IP on behalf of which this

health check is performed will be used.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Port <int>

The TCP port number for the health check request. Defaults to 80 for HTTP and 443 for HTTPS.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RequestPath <string>

The request path for the health check request. Defaults to "/".



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CheckInterval <TimeSpan>

How often to send a health check request. Defaults to 5 seconds.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Timeout <TimeSpan>

How long to wait before claiming failure. Defaults to 5 seconds. May not be greater than CheckInterval.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HealthyThreshold <int>

Number of consecutive success required to mark an unhealthy instance healthy. Defaults to 2.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UnhealthyThreshold <int>

Number of consecutive failures required to mark a healthy instance unhealthy. Defaults to 2.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Https <SwitchParameter>

If set, will create an HTTPS health check. If not set, will create an HTTP health check.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-HttpsObject <HttpsHealthCheck>

Object describing a new HTTPS health check.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-HttpObject <HttpHealthCheck>

Object describing a new http health check.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Google.Apis.Compute.v1.Data.HttpsHealthCheck

Object describing a new HTTPS health check.



Google.Apis.Compute.v1.Data.HttpHealthCheck

Object describing a new http health check.





OUTPUTS

Google.Apis.Compute.v1.Data.HttpHealthCheck



Google.Apis.Compute.v1.Data.HttpsHealthCheck





---------- EXAMPLE 1 ----------



PS C:\\> Add-GceHealthCheck "my-health-check" -Project "my-project" -Http



Adds an HTTP health check to the project named "my-project".

---------- EXAMPLE 2 ----------



PS C:\\> Add-GceHealthCheck "my-health-check" -Https



Adds an HTTPS health check to the project in the Cloud SDK config.

---------- EXAMPLE 3 ----------



PS C:\\> Add-GceHealthCheck "my-health-check" -Http -Description "Description of my health check." `

-HostHeader "mydomain.com" -Port 50 -RequestPath "/some/path" -CheckInterval "0:0:2" `

-Timeout "0:0:2" -HealthyThreshold 3 -UnhealthyThreshold 3



Adds an HTTP health check with non-default values.



RELATED LINKS

[HealthCheck resource definition]

(https://cloud.google.com/compute/docs/r ... s#resource)