> **Experimental**
>
> `@aws-cdk/aws-apprunner-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# TcpHealthCheckOptions

Properties used to define TCP Based healthchecks.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/service.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts#L986)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apprunner_alpha from '@aws-cdk/aws-apprunner-alpha';
import * as cdk from 'aws-cdk-lib';
const tcpHealthCheckOptions: apprunner_alpha.TcpHealthCheckOptions = {
  healthyThreshold: 123,
  interval: cdk.Duration.minutes(30),
  timeout: cdk.Duration.minutes(30),
  unhealthyThreshold: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner_alpha as apprunner_alpha
import aws_cdk as cdk

tcp_health_check_options = apprunner_alpha.TcpHealthCheckOptions(
    healthy_threshold=123,
    interval=cdk.Duration.minutes(30),
    timeout=cdk.Duration.minutes(30),
    unhealthy_threshold=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apprunner.alpha.*;
import software.amazon.awscdk.*;

TcpHealthCheckOptions tcpHealthCheckOptions = TcpHealthCheckOptions.builder()
        .healthyThreshold(123)
        .interval(Duration.minutes(30))
        .timeout(Duration.minutes(30))
        .unhealthyThreshold(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.AppRunner.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppRunner.Alpha;
using Amazon.CDK;

var tcpHealthCheckOptions = new TcpHealthCheckOptions {
    HealthyThreshold = 123,
    Interval = Duration.Minutes(30),
    Timeout = Duration.Minutes(30),
    UnhealthyThreshold = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import apprunner_alpha "github.com/aws/aws-cdk-go/awscdkapprunneralpha"
import "github.com/aws/aws-cdk-go/awscdk"

tcpHealthCheckOptions := &TcpHealthCheckOptions{
	HealthyThreshold: jsii.Number(123),
	Interval: cdk.Duration_Minutes(jsii.Number(30)),
	Timeout: cdk.Duration_*Minutes(jsii.Number(30)),
	UnhealthyThreshold: jsii.Number(123),
}
```

## Properties

- `healthyThreshold`: number = 1 — The number of consecutive checks that must succeed before App Runner decides that the service is healthy.

- `interval`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(5) — The time interval, in seconds, between health checks.

- `timeout`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(2) — The time, in seconds, to wait for a health check response before deciding it failed.

- `unhealthyThreshold`: number = 5 — The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.
