aws-cdk-lib.aws_vpclattice.CfnTargetGroup.HealthCheckConfigProperty

interface HealthCheckConfigProperty

LanguageType name
.NETAmazon.CDK.AWS.VpcLattice.CfnTargetGroup.HealthCheckConfigProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsvpclattice#CfnTargetGroup_HealthCheckConfigProperty
Javasoftware.amazon.awscdk.services.vpclattice.CfnTargetGroup.HealthCheckConfigProperty
Pythonaws_cdk.aws_vpclattice.CfnTargetGroup.HealthCheckConfigProperty
TypeScript aws-cdk-lib » aws_vpclattice » CfnTargetGroup » HealthCheckConfigProperty

The health check configuration of a target group.

Health check configurations aren't used for LAMBDA and ALB target groups.

Example

// 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,
};

Properties

NameTypeDescription
enabled?boolean | IResolvableIndicates whether health checking is enabled.
healthCheckIntervalSeconds?numberThe approximate amount of time, in seconds, between health checks of an individual target.
healthCheckTimeoutSeconds?numberThe amount of time, in seconds, to wait before reporting a target as unhealthy.
healthyThresholdCount?numberThe number of consecutive successful health checks required before considering an unhealthy target healthy.
matcher?IResolvable | MatcherPropertyThe codes to use when checking for a successful response from a target.
path?stringThe destination for health checks on the targets.
port?numberThe port used when performing health checks on targets.
protocol?stringThe protocol used when performing health checks on targets.
protocolVersion?stringThe protocol version used when performing health checks on targets.
unhealthyThresholdCount?numberThe number of consecutive failed health checks required before considering a target unhealthy.

enabled?

Type: boolean | IResolvable (optional)

Indicates whether health checking is enabled.


healthCheckIntervalSeconds?

Type: number (optional)

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?

Type: number (optional)

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?

Type: number (optional)

The number of consecutive successful health checks required before considering an unhealthy target healthy.

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


matcher?

Type: IResolvable | MatcherProperty (optional)

The codes to use when checking for a successful response from a target.

These are called Success codes in the console.


path?

Type: string (optional)

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?

Type: number (optional)

The port used when performing health checks on targets.

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


protocol?

Type: string (optional)

The protocol used when performing health checks on targets.

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


protocolVersion?

Type: string (optional)

The protocol version used when performing health checks on targets.

The possible protocol versions are HTTP1 and HTTP2 .


unhealthyThresholdCount?

Type: number (optional)

The number of consecutive failed health checks required before considering a target unhealthy.

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