HealthCheck class

Represents a health check resource.

Google Compute Engine has two health check resources:

  • [Regional](/compute/docs/reference/rest/v1/regionHealthChecks)
  • [Global](/compute/docs/reference/rest/v1/healthChecks)

These health check resources can be used for load balancing and for autohealing VMs in a managed instance group (MIG).

Load balancing

Health check requirements vary depending on the type of load balancer.

For details about the type of health check supported for each load balancer and corresponding backend type, see Health checks overview: Load balancer guide.

Autohealing in MIGs

The health checks that you use for autohealing VMs in a MIG can be either regional or global. For more information, see Set up an application health check and autohealing.

For more information, seeHealth checks overview.

Constructors

HealthCheck({int? checkIntervalSec, String? creationTimestamp, String? description, GRPCHealthCheck? grpcHealthCheck, GRPCTLSHealthCheck? grpcTlsHealthCheck, int? healthyThreshold, HTTP2HealthCheck? http2HealthCheck, HTTPHealthCheck? httpHealthCheck, HTTPSHealthCheck? httpsHealthCheck, String? id, String? kind, HealthCheckLogConfig? logConfig, String? name, String? region, String? selfLink, List<String>? sourceRegions, SSLHealthCheck? sslHealthCheck, TCPHealthCheck? tcpHealthCheck, int? timeoutSec, String? type, int? unhealthyThreshold})
HealthCheck.fromJson(Map json_)

Properties

checkIntervalSec ↔ int?
How often (in seconds) to send a health check.
getter/setter pair
creationTimestamp ↔ String?
Creation timestamp in3339 text format.
getter/setter pair
description ↔ String?
An optional description of this resource.
getter/setter pair
grpcHealthCheck ↔ GRPCHealthCheck?
getter/setter pair
grpcTlsHealthCheck ↔ GRPCTLSHealthCheck?
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
healthyThreshold ↔ int?
A so-far unhealthy instance will be marked healthy after this many consecutive successes.
getter/setter pair
http2HealthCheck ↔ HTTP2HealthCheck?
getter/setter pair
httpHealthCheck ↔ HTTPHealthCheck?
getter/setter pair
httpsHealthCheck ↔ HTTPSHealthCheck?
getter/setter pair
id ↔ String?
The unique identifier for the resource.
getter/setter pair
kind ↔ String?
Type of the resource.
getter/setter pair
logConfig ↔ HealthCheckLogConfig?
Configure logging on this health check.
getter/setter pair
name ↔ String?
Name of the resource.
getter/setter pair
region ↔ String?
Region where the health check resides.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
Server-defined URL for the resource.
getter/setter pair
sourceRegions ↔ List<String>?
The list of cloud regions from which health checks are performed.
getter/setter pair
sslHealthCheck ↔ SSLHealthCheck?
getter/setter pair
tcpHealthCheck ↔ TCPHealthCheck?
getter/setter pair
timeoutSec ↔ int?
How long (in seconds) to wait before claiming failure.
getter/setter pair
type ↔ String?
Specifies the type of the healthCheck, either TCP,SSL, HTTP, HTTPS,HTTP2, GRPC or GRPC_WITH_TLS. Exactly one of the protocol-specific health check fields must be specified, which must match type field. Possible string values are:
getter/setter pair
unhealthyThreshold ↔ int?
A so-far healthy instance will be marked unhealthy after this many consecutive failures.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited