Returns the specified HealthCheck resource. Gets a list of available health checks by making a list()
request.
HTTP request
GET https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/healthChecks/{resourceId}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
region |
Name of the region scoping this request. |
resourceId |
Name of the HealthCheck resource to return. |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
JSON representation | |
---|---|
{ "id": string, "creationTimestamp": string, "name": string, "description": string, "checkIntervalSec": number, "timeoutSec": number, "unhealthyThreshold": number, "healthyThreshold": number, "type": enum, "tcpHealthCheck": { "port": number, "portName": string, "portSpecification": enum, "request": string, "response": string, "proxyHeader": enum }, "sslHealthCheck": { "port": number, "portName": string, "portSpecification": enum, "request": string, "response": string, "proxyHeader": enum }, "httpHealthCheck": { "port": number, "portName": string, "portSpecification": enum, "host": string, "requestPath": string, "proxyHeader": enum, "response": string }, "httpsHealthCheck": { "port": number, "portName": string, "portSpecification": enum, "host": string, "requestPath": string, "proxyHeader": enum, "response": string }, "http2HealthCheck": { "port": number, "portName": string, "portSpecification": enum, "host": string, "requestPath": string, "proxyHeader": enum, "response": string }, "selfLink": string, "region": string, "kind": string } |
Fields | |
---|---|
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creationTimestamp |
[Output Only] Creation timestamp in 3339 text format. |
name |
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
description |
An optional description of this resource. Provide this property when you create the resource. |
checkIntervalSec |
How often (in seconds) to send a health check. The default value is 5 seconds. |
timeoutSec |
How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for |
unhealthyThreshold |
A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
healthyThreshold |
A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
type |
Specifies the type of the healthCheck, either |
tcpHealthCheck |
|
tcpHealthCheck.port |
The TCP port number for the health check request. The default value is |
tcpHealthCheck.portName |
Port name as defined in |
tcpHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: portis used for health checking. USE_NAMED_PORT : The portNameis used for health checking. USE_SERVING_PORT : For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in portand portNamefields. |
tcpHealthCheck.request |
The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
tcpHealthCheck.response |
The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
tcpHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
sslHealthCheck |
|
sslHealthCheck.port |
The TCP port number for the health check request. The default value is |
sslHealthCheck.portName |
Port name as defined in |
sslHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: portis used for health checking. USE_NAMED_PORT : The portNameis used for health checking. USE_SERVING_PORT : For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in portand portNamefields. |
sslHealthCheck.request |
The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
sslHealthCheck.response |
The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
sslHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
httpHealthCheck |
|
httpHealthCheck.port |
The TCP port number for the health check request. The default value is |
httpHealthCheck.portName |
Port name as defined in |
httpHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: portis used for health checking. USE_NAMED_PORT : The portNameis used for health checking. USE_SERVING_PORT : For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in portand portNamefields. |
httpHealthCheck.host |
The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used. |
httpHealthCheck.requestPath |
The request path of the HTTP health check request. The default value is |
httpHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
httpHealthCheck.response |
The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. |
httpsHealthCheck |
|
httpsHealthCheck.port |
The TCP port number for the health check request. The default value is |
httpsHealthCheck.portName |
Port name as defined in InstanceGroup#NamedPort#name. If both port and portName are defined, port takes precedence. |
httpsHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: portis used for health checking. USE_NAMED_PORT : The portNameis used for health checking. USE_SERVING_PORT : For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in portand portNamefields. |
httpsHealthCheck.host |
The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used. |
httpsHealthCheck.requestPath |
The request path of the HTTPS health check request. The default value is |
httpsHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
httpsHealthCheck.response |
The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. |
http2HealthCheck |
|
http2HealthCheck.port |
The TCP port number for the health check request. The default value is |
http2HealthCheck.portName |
Port name as defined in |
http2HealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: portis used for health checking. USE_NAMED_PORT : The portNameis used for health checking. USE_SERVING_PORT : For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in portand portNamefields. |
http2HealthCheck.host |
The value of the host header in the HTTP/2 health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used. |
http2HealthCheck.requestPath |
The request path of the HTTP/2 health check request. The default value is |
http2HealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
http2HealthCheck.response |
The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. |
selfLink |
[Output Only] Server-defined URL for the resource. |
region |
[Output Only] Region where the health check resides. Not applicable to global health checks. |
kind |
Type of the resource. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/compute
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.