aws-cdk-lib.aws_autoscaling.HealthCheck

class HealthCheck

LanguageType name
.NETAmazon.CDK.AWS.AutoScaling.HealthCheck
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#HealthCheck
Javasoftware.amazon.awscdk.services.autoscaling.HealthCheck
Pythonaws_cdk.aws_autoscaling.HealthCheck
TypeScript (source)aws-cdk-lib » aws_autoscaling » HealthCheck

Health check settings.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
const healthCheck = autoscaling.HealthCheck.ec2(/* all optional props */ {
  grace: cdk.Duration.minutes(30),
});

Properties

NameTypeDescription
typestring
gracePeriod?Duration

type

Type: string


gracePeriod?

Type: Duration (optional)

Methods

NameDescription
static ec2(options?)Use EC2 for health checks.
static elb(options)Use ELB for health checks.

static ec2(options?)

public static ec2(options?: Ec2HealthCheckOptions): HealthCheck

Parameters

  • options Ec2HealthCheckOptions — EC2 health check options.

Returns

  • HealthCheck

Use EC2 for health checks.


static elb(options)

public static elb(options: ElbHealthCheckOptions): HealthCheck

Parameters

  • options ElbHealthCheckOptions — ELB health check options.

Returns

  • HealthCheck

Use ELB for health checks.

It considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks.