# HttpHealthCheckOptions

Properties used to define HTTP Based healthchecks.

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

## Example

```ts
const vpc = new ec2.Vpc(this, 'vpc');
const namespace = new cloudmap.PrivateDnsNamespace(this, 'test-namespace', {
    vpc,
    name: 'domain.local',
});
const service = namespace.createService('Svc');

declare const mesh: appmesh.Mesh;
const node = mesh.addVirtualNode('virtual-node', {
  serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
  listeners: [appmesh.VirtualNodeListener.http({
    port: 8081,
    healthCheck: appmesh.HealthCheck.http({
      healthyThreshold: 3,
      interval: Duration.seconds(5), // minimum
      path: '/health-check-path',
      timeout: Duration.seconds(2), // minimum
      unhealthyThreshold: 2,
    }),
  })],
  accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
});
```

## Properties

- `healthyThreshold`: number = 2 — The number of consecutive successful health checks that must occur before declaring listener healthy.

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

- `path`: string = / — The destination path for the health check request.

- `timeout`: [Duration](/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.
