# GrpcHealthCheckOptions

Properties used to define GRPC Based healthchecks.

Used as argument in: [HealthCheck.grpc](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.HealthCheck.html#grpc)

- Source: [`aws-appmesh/lib/health-checks.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-appmesh/lib/health-checks.ts#L55)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const grpcHealthCheckOptions: appmesh.GrpcHealthCheckOptions = {
  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 as cdk
from aws_cdk import aws_appmesh as appmesh

grpc_health_check_options = appmesh.GrpcHealthCheckOptions(
    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.*;
import software.amazon.awscdk.services.appmesh.*;

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

C# / .NET:

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

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

Golang:

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

grpcHealthCheckOptions := &GrpcHealthCheckOptions{
	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 = 2 — The number of consecutive successful health checks that must occur before declaring listener healthy.

- `interval`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(5) — The time period between each health check execution.

- `timeout`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(2) — The amount of time to wait when receiving a response from the health check.

- `unhealthyThreshold`: number = 2 — The number of consecutive failed health checks that must occur before declaring a listener unhealthy.
