# HealthCheckType

The type of health check to be associated with the record.

- Source: [`aws-route53/lib/health-check.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-route53/lib/health-check.ts#L24)
- Type last changed: v2.173.0 · 12 Dec 2024

## Example

```ts
declare const myZone: route53.HostedZone;

const healthCheck = new route53.HealthCheck(this, 'HealthCheck', {
  type: route53.HealthCheckType.HTTP,
  fqdn: 'example.com',
  port: 80,
  resourcePath: '/health',
  failureThreshold: 3,
  requestInterval: Duration.seconds(30),
});

new route53.ARecord(this, 'ARecordFailoverPrimary', {
  zone: myZone,
  target: route53.RecordTarget.fromIpAddresses('1.2.3.4'),
  failover: route53.Failover.PRIMARY,
  healthCheck,
  setIdentifier: 'failover-primary',
});

new route53.ARecord(this, 'ARecordFailoverSecondary', {
  zone: myZone,
  target: route53.RecordTarget.fromIpAddresses('5.6.7.8'),
  failover: route53.Failover.SECONDARY,
  setIdentifier: 'failover-secondary',
});
```

## Members

| Member | Description |
| --- | --- |
| `HTTP` | HTTP health check. |
| `HTTPS` | HTTPS health check. |
| `HTTP_STR_MATCH` | HTTP health check with string matching. |
| `HTTPS_STR_MATCH` | HTTPS health check with string matching. |
| `TCP` | TCP health check. |
| `CLOUDWATCH_METRIC` | CloudWatch metric health check. |
| `CALCULATED` | Calculated health check. |
| `RECOVERY_CONTROL` | Recovery control health check. |

## Referenced by

- [`HealthCheckProps`](/v2/docs/aws-cdk-lib.aws_route53.HealthCheckProps).type
