aws-cdk-lib.aws_appmesh.HttpHealthCheckOptions

interface HttpHealthCheckOptions

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.HttpHealthCheckOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#HttpHealthCheckOptions
Javasoftware.amazon.awscdk.services.appmesh.HttpHealthCheckOptions
Pythonaws_cdk.aws_appmesh.HttpHealthCheckOptions
TypeScript (source)aws-cdk-lib » aws_appmesh » HttpHealthCheckOptions

Properties used to define HTTP Based healthchecks.

Example

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

NameTypeDescription
healthyThreshold?numberThe number of consecutive successful health checks that must occur before declaring listener healthy.
interval?DurationThe time period between each health check execution.
path?stringThe destination path for the health check request.
timeout?DurationThe amount of time to wait when receiving a response from the health check.
unhealthyThreshold?numberThe number of consecutive failed health checks that must occur before declaring a listener unhealthy.

healthyThreshold?

Type: number (optional, default: 2)

The number of consecutive successful health checks that must occur before declaring listener healthy.


interval?

Type: Duration (optional, default: Duration.seconds(5))

The time period between each health check execution.


path?

Type: string (optional, default: /)

The destination path for the health check request.


timeout?

Type: Duration (optional, default: Duration.seconds(2))

The amount of time to wait when receiving a response from the health check.


unhealthyThreshold?

Type: number (optional, default: 2)

The number of consecutive failed health checks that must occur before declaring a listener unhealthy.