# Google Cloud Run V2 Client - Class Probe (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class Probe.

Probe describes a health check to be performed against a container to
determine whether it is alive or ready to receive traffic.

Generated from protobuf message `google.cloud.run.v2.Probe`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ initial_delay_seconds` | `int` Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. |
| `↳ timeout_seconds` | `int` Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. |
| `↳ period_seconds` | `int` Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds. |
| `↳ failure_threshold` | `int` Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. |
| `↳ http_get` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.HTTPGetAction` Optional. HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified. |
| `↳ tcp_socket` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.TCPSocketAction` Optional. TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified. |
| `↳ grpc` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.GRPCAction` Optional. GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified. |

### getInitialDelaySeconds

Optional. Number of seconds after the container has started before the
probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum
value for liveness probe is 3600. Maximum value for startup probe is 240.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setInitialDelaySeconds

Optional. Number of seconds after the container has started before the
probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum
value for liveness probe is 3600. Maximum value for startup probe is 240.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTimeoutSeconds

Optional. Number of seconds after which the probe times out.

Defaults to 1 second. Minimum value is 1. Maximum value is 3600.
Must be smaller than period_seconds.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTimeoutSeconds

Optional. Number of seconds after which the probe times out.

Defaults to 1 second. Minimum value is 1. Maximum value is 3600.
Must be smaller than period_seconds.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPeriodSeconds

Optional. How often (in seconds) to perform the probe.

Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe
is 3600. Maximum value for startup probe is 240.
Must be greater or equal than timeout_seconds.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPeriodSeconds

Optional. How often (in seconds) to perform the probe.

Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe
is 3600. Maximum value for startup probe is 240.
Must be greater or equal than timeout_seconds.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFailureThreshold

Optional. Minimum consecutive failures for the probe to be considered
failed after having succeeded. Defaults to 3. Minimum value is 1.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setFailureThreshold

Optional. Minimum consecutive failures for the probe to be considered
failed after having succeeded. Defaults to 3. Minimum value is 1.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHttpGet

Optional. HTTPGet specifies the http request to perform.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.HTTPGetAction|null` |   |

### hasHttpGet

### setHttpGet

Optional. HTTPGet specifies the http request to perform.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.HTTPGetAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTcpSocket

Optional. TCPSocket specifies an action involving a TCP port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.TCPSocketAction|null` |   |

### hasTcpSocket

### setTcpSocket

Optional. TCPSocket specifies an action involving a TCP port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.TCPSocketAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGrpc

Optional. GRPC specifies an action involving a gRPC port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.GRPCAction|null` |   |

### hasGrpc

### setGrpc

Optional. GRPC specifies an action involving a gRPC port.

Exactly one of httpGet, tcpSocket, or grpc must be specified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.GRPCAction` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getProbeType

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |