Reference documentation and code samples for the Compute V1 Client class GRPCHealthCheck.
Generated from protobuf messagegoogle.cloud.compute.v1.GRPCHealthCheck
Namespace
Google \ Cloud \ Compute \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ grpc_service_name
string
The gRPC service name for the health check. This field is optional. The value of grpc_service_name has the following meanings by convention: - Empty service_name means the overall status of all services at the backend. - Non-empty service_name means the health of that gRPC service, as defined by the owner of the service. The grpc_service_name can only be ASCII.
↳ port
int
The TCP port number to which the health check prober sends packets. Valid values are 1 through 65535.
↳ port_name
string
Not supported.
↳ port_specification
string
Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports. Check the PortSpecification enum for the list of possible values.
getGrpcServiceName
The gRPC service name for the health check. This field is optional. The value of grpc_service_name has the following meanings by convention: - Empty service_name means the overall status of all services at the backend. - Non-empty service_name means the health of that gRPC service, as defined by the owner of the service. The grpc_service_name can only be ASCII.
Returns
Type
Description
string
hasGrpcServiceName
clearGrpcServiceName
setGrpcServiceName
The gRPC service name for the health check. This field is optional. The value of grpc_service_name has the following meanings by convention: - Empty service_name means the overall status of all services at the backend. - Non-empty service_name means the health of that gRPC service, as defined by the owner of the service. The grpc_service_name can only be ASCII.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPort
The TCP port number to which the health check prober sends packets. Valid values are 1 through 65535.
Returns
Type
Description
int
hasPort
clearPort
setPort
The TCP port number to which the health check prober sends packets. Valid values are 1 through 65535.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getPortName
Not supported.
Returns
Type
Description
string
hasPortName
clearPortName
setPortName
Not supported.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPortSpecification
Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.
Check the PortSpecification enum for the list of possible values.
Returns
Type
Description
string
hasPortSpecification
clearPortSpecification
setPortSpecification
Specifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.
Check the PortSpecification enum for the list of possible values.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Compute V1 Client - Class GRPCHealthCheck (1.35.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.35.0 (latest)](/php/docs/reference/cloud-compute/latest/V1.GRPCHealthCheck)\n- [1.34.0](/php/docs/reference/cloud-compute/1.34.0/V1.GRPCHealthCheck)\n- [1.33.0](/php/docs/reference/cloud-compute/1.33.0/V1.GRPCHealthCheck)\n- [1.32.0](/php/docs/reference/cloud-compute/1.32.0/V1.GRPCHealthCheck)\n- [1.31.0](/php/docs/reference/cloud-compute/1.31.0/V1.GRPCHealthCheck)\n- [1.30.0](/php/docs/reference/cloud-compute/1.30.0/V1.GRPCHealthCheck)\n- [1.29.0](/php/docs/reference/cloud-compute/1.29.0/V1.GRPCHealthCheck)\n- [1.28.0](/php/docs/reference/cloud-compute/1.28.0/V1.GRPCHealthCheck)\n- [1.27.0](/php/docs/reference/cloud-compute/1.27.0/V1.GRPCHealthCheck)\n- [1.26.0](/php/docs/reference/cloud-compute/1.26.0/V1.GRPCHealthCheck)\n- [1.25.0](/php/docs/reference/cloud-compute/1.25.0/V1.GRPCHealthCheck)\n- [1.24.0](/php/docs/reference/cloud-compute/1.24.0/V1.GRPCHealthCheck)\n- [1.23.0](/php/docs/reference/cloud-compute/1.23.0/V1.GRPCHealthCheck)\n- [1.22.1](/php/docs/reference/cloud-compute/1.22.1/V1.GRPCHealthCheck)\n- [1.21.0](/php/docs/reference/cloud-compute/1.21.0/V1.GRPCHealthCheck)\n- [1.20.0](/php/docs/reference/cloud-compute/1.20.0/V1.GRPCHealthCheck)\n- [1.19.0](/php/docs/reference/cloud-compute/1.19.0/V1.GRPCHealthCheck)\n- [1.18.1](/php/docs/reference/cloud-compute/1.18.1/V1.GRPCHealthCheck)\n- [1.17.0](/php/docs/reference/cloud-compute/1.17.0/V1.GRPCHealthCheck)\n- [1.16.2](/php/docs/reference/cloud-compute/1.16.2/V1.GRPCHealthCheck)\n- [1.14.0](/php/docs/reference/cloud-compute/1.14.0/V1.GRPCHealthCheck)\n- [1.13.0](/php/docs/reference/cloud-compute/1.13.0/V1.GRPCHealthCheck)\n- [1.12.1](/php/docs/reference/cloud-compute/1.12.1/V1.GRPCHealthCheck)\n- [1.11.1](/php/docs/reference/cloud-compute/1.11.1/V1.GRPCHealthCheck)\n- [1.10.1](/php/docs/reference/cloud-compute/1.10.1/V1.GRPCHealthCheck)\n- [1.9.1](/php/docs/reference/cloud-compute/1.9.1/V1.GRPCHealthCheck)\n- [1.8.3](/php/docs/reference/cloud-compute/1.8.3/V1.GRPCHealthCheck)\n- [1.7.1](/php/docs/reference/cloud-compute/1.7.1/V1.GRPCHealthCheck)\n- [1.6.1](/php/docs/reference/cloud-compute/1.6.1/V1.GRPCHealthCheck)\n- [1.5.0](/php/docs/reference/cloud-compute/1.5.0/V1.GRPCHealthCheck) \nReference documentation and code samples for the Compute V1 Client class GRPCHealthCheck.\n\nGenerated from protobuf message `google.cloud.compute.v1.GRPCHealthCheck`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Compute \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getGrpcServiceName\n\nThe gRPC service name for the health check. This field is optional. The value of grpc_service_name has the following meanings by convention: - Empty service_name means the overall status of all services at the backend. - Non-empty service_name means the health of that gRPC service, as defined by the owner of the service. The grpc_service_name can only be ASCII.\n\n### hasGrpcServiceName\n\n### clearGrpcServiceName\n\n### setGrpcServiceName\n\nThe gRPC service name for the health check. This field is optional. The value of grpc_service_name has the following meanings by convention: - Empty service_name means the overall status of all services at the backend. - Non-empty service_name means the health of that gRPC service, as defined by the owner of the service. The grpc_service_name can only be ASCII.\n\n### getPort\n\nThe TCP port number to which the health check prober sends packets. Valid values are 1 through 65535.\n\n### hasPort\n\n### clearPort\n\n### setPort\n\nThe TCP port number to which the health check prober sends packets. Valid values are 1 through 65535.\n\n### getPortName\n\nNot supported.\n\n### hasPortName\n\n### clearPortName\n\n### setPortName\n\nNot supported.\n\n### getPortSpecification\n\nSpecifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.\n\nCheck the PortSpecification enum for the list of possible values.\n\n### hasPortSpecification\n\n### clearPortSpecification\n\n### setPortSpecification\n\nSpecifies how a port is selected for health checking. Can be one of the following values: USE_FIXED_PORT: Specifies a port number explicitly using the port field in the health check. Supported by backend services for passthrough load balancers and backend services for proxy load balancers. Not supported by target pools. The health check supports all backends supported by the backend service provided the backend can be health checked. For example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network endpoint groups, and instance group backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides an indirect method of specifying the health check port by referring to the backend service. Only supported by backend services for proxy load balancers. Not supported by target pools. Not supported by backend services for passthrough load balancers. Supports all backends that can be health checked; for example, GCE_VM_IP_PORT network endpoint groups and instance group backends. For GCE_VM_IP_PORT network endpoint group backends, the health check uses the port number specified for each endpoint in the network endpoint group. For instance group backends, the health check uses the port number determined by looking up the backend service's named port in the instance group's list of named ports.\n\nCheck the PortSpecification enum for the list of possible values."]]