aws-cdk-lib.aws_appmesh.HealthCheck

class HealthCheck

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

Contains static factory methods for creating health checks for different protocols.

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'),
});

Initializer

new HealthCheck()

Methods

NameDescription
bind(scope, options)Called when the AccessLog type is initialized.
static grpc(options?)Construct a GRPC health check.
static http(options?)Construct a HTTP health check.
static http2(options?)Construct a HTTP2 health check.
static tcp(options?)Construct a TCP health check.

bind(scope, options)

public bind(scope: Construct, options: HealthCheckBindOptions): HealthCheckConfig

Parameters

  • scope Construct
  • options HealthCheckBindOptions

Returns

  • HealthCheckConfig

Called when the AccessLog type is initialized.

Can be used to enforce mutual exclusivity with future properties


static grpc(options?)

public static grpc(options?: GrpcHealthCheckOptions): HealthCheck

Parameters

  • options GrpcHealthCheckOptions

Returns

  • HealthCheck

Construct a GRPC health check.


static http(options?)

public static http(options?: HttpHealthCheckOptions): HealthCheck

Parameters

  • options HttpHealthCheckOptions

Returns

  • HealthCheck

Construct a HTTP health check.


static http2(options?)

public static http2(options?: HttpHealthCheckOptions): HealthCheck

Parameters

  • options HttpHealthCheckOptions

Returns

  • HealthCheck

Construct a HTTP2 health check.


static tcp(options?)

public static tcp(options?: TcpHealthCheckOptions): HealthCheck

Parameters

  • options TcpHealthCheckOptions

Returns

  • HealthCheck

Construct a TCP health check.