HealthCheck class final
Represents a health check resource.
Google Compute Engine has two health check resources:
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, BigInt? id, String? kind, HealthCheckLogConfig? logConfig, String? name, String? region, String? selfLink, List<
String> sourceRegions = const [], SslhealthCheck? sslHealthCheck, TcphealthCheck? tcpHealthCheck, int? timeoutSec, String? type, int? unhealthyThreshold}) - HealthCheck.fromJson(Object? j)
-
factory
Properties
- checkIntervalSec → int?
-
How often (in seconds) to send a health check. The default value is 5
seconds.
final
- creationTimestamp → String?
-
Output only.
Output OnlyCreation timestamp in3339 text format.final - description → String?
-
An optional description of this resource. Provide this property when you
create the resource.
final
- grpcHealthCheck → GrpchealthCheck?
-
final
- grpcTlsHealthCheck → GrpctlshealthCheck?
-
final
- 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. The default value is 2.
final
- http2HealthCheck → Http2HealthCheck?
-
final
- httpHealthCheck → HttphealthCheck?
-
final
- httpsHealthCheck → HttpshealthCheck?
-
final
- id → BigInt?
-
Output OnlyThe unique identifier for the resource. This identifier is defined by the server.final - kind → String?
-
Output only. Type of the resource.
final
- logConfig → HealthCheckLogConfig?
-
Configure logging on this health check.
final
- name → String?
-
Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
For example, a name that is 1-63 characters long, matches the regular
expression
[a-z]([-a-z0-9]*[a-z0-9])?, and otherwise complies with RFC1035. This regular expression describes a name where the first character is a lowercase letter, and all following characters are a dash, lowercase letter, or digit, except the last character, which isn't a dash.final - qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - region → String?
-
Output only.
Output OnlyRegion where the health check resides. Not applicable to global health checks.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selfLink → String?
-
Output OnlyServer-defined URL for the resource.final -
sourceRegions
→ List<
String> -
The list of cloud regions from which health checks are performed. If any
regions are specified, then exactly 3 regions should be specified. The
region names must be valid names of Google Cloud regions.
This can only be set for global health check.
If this list is non-empty, then there are restrictions
on what other health check fields are supported and what other resources
can use this health check:
final
- sslHealthCheck → SslhealthCheck?
-
final
- tcpHealthCheck → TcphealthCheck?
-
final
- timeoutSec → int?
-
How long (in seconds) to wait before claiming failure. The default value is
5 seconds. It is invalid for timeoutSec to have greater
value than checkIntervalSec.
final
- 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.
Check the Type enum for the list of possible values.
final
- unhealthyThreshold → int?
-
A so-far healthy instance will be marked unhealthy after this many
consecutive failures. The default value is 2.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String