# HealthCheckConfigProperty

Describes the health check configuration of a target group.

Health check configurations aren't used for target groups of type `LAMBDA` or `ALB` .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_vpclattice as vpclattice } from 'aws-cdk-lib';
const healthCheckConfigProperty: vpclattice.CfnTargetGroup.HealthCheckConfigProperty = {
  enabled: false,
  healthCheckIntervalSeconds: 123,
  healthCheckTimeoutSeconds: 123,
  healthyThresholdCount: 123,
  matcher: {
    httpCode: 'httpCode',
  },
  path: 'path',
  port: 123,
  protocol: 'protocol',
  protocolVersion: 'protocolVersion',
  unhealthyThresholdCount: 123,
};
```

Python:

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

health_check_config_property = vpclattice.CfnTargetGroup.HealthCheckConfigProperty(
    enabled=False,
    health_check_interval_seconds=123,
    health_check_timeout_seconds=123,
    healthy_threshold_count=123,
    matcher=vpclattice.CfnTargetGroup.MatcherProperty(
        http_code="httpCode"
    ),
    path="path",
    port=123,
    protocol="protocol",
    protocol_version="protocolVersion",
    unhealthy_threshold_count=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.vpclattice.*;

HealthCheckConfigProperty healthCheckConfigProperty = HealthCheckConfigProperty.builder()
        .enabled(false)
        .healthCheckIntervalSeconds(123)
        .healthCheckTimeoutSeconds(123)
        .healthyThresholdCount(123)
        .matcher(MatcherProperty.builder()
                .httpCode("httpCode")
                .build())
        .path("path")
        .port(123)
        .protocol("protocol")
        .protocolVersion("protocolVersion")
        .unhealthyThresholdCount(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.AWS.VpcLattice;

var healthCheckConfigProperty = new HealthCheckConfigProperty {
    Enabled = false,
    HealthCheckIntervalSeconds = 123,
    HealthCheckTimeoutSeconds = 123,
    HealthyThresholdCount = 123,
    Matcher = new MatcherProperty {
        HttpCode = "httpCode"
    },
    Path = "path",
    Port = 123,
    Protocol = "protocol",
    ProtocolVersion = "protocolVersion",
    UnhealthyThresholdCount = 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"

healthCheckConfigProperty := &HealthCheckConfigProperty{
	Enabled: jsii.Boolean(false),
	HealthCheckIntervalSeconds: jsii.Number(123),
	HealthCheckTimeoutSeconds: jsii.Number(123),
	HealthyThresholdCount: jsii.Number(123),
	Matcher: &MatcherProperty{
		HttpCode: jsii.String("httpCode"),
	},
	Path: jsii.String("path"),
	Port: jsii.Number(123),
	Protocol: jsii.String("protocol"),
	ProtocolVersion: jsii.String("protocolVersion"),
	UnhealthyThresholdCount: jsii.Number(123),
}
```

## Properties

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether health checking is enabled.

- `healthCheckIntervalSeconds`: number — The approximate amount of time, in seconds, between health checks of an individual target.

  The range is 5–300 seconds. The default is 30 seconds.

- `healthCheckTimeoutSeconds`: number — The amount of time, in seconds, to wait before reporting a target as unhealthy.

  The range is 1–120 seconds. The default is 5 seconds.

- `healthyThresholdCount`: number — The number of consecutive successful health checks required before considering an unhealthy target healthy.

  The range is 2–10. The default is 5.

- `matcher`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTargetGroup.MatcherProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_vpclattice.CfnTargetGroup.MatcherProperty.html) — The codes to use when checking for a successful response from a target.

- `path`: string — The destination for health checks on the targets.

  If the protocol version is `HTTP/1.1` or `HTTP/2` , specify a valid URI (for example, `/path?query` ). The default path is `/` . Health checks are not supported if the protocol version is `gRPC` , however, you can choose `HTTP/1.1` or `HTTP/2` and specify a valid URI.

- `port`: number — The port used when performing health checks on targets.

  The default setting is the port that a target receives traffic on.

- `protocol`: string — The protocol used when performing health checks on targets.

  The possible protocols are `HTTP` and `HTTPS` . The default is `HTTP` .

- `protocolVersion`: string — The protocol version used when performing health checks on targets.

  The possible protocol versions are `HTTP1` and `HTTP2` .

- `unhealthyThresholdCount`: number — The number of consecutive failed health checks required before considering a target unhealthy.

  The range is 2–10. The default is 2.
