class HealthCheck
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AutoScaling.HealthCheck |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#HealthCheck |
Java | software.amazon.awscdk.services.autoscaling.HealthCheck |
Python | aws_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
Name | Type | Description |
---|---|---|
type | string | |
grace | Duration |
type
Type:
string
gracePeriod?
Type:
Duration
(optional)
Methods
Name | Description |
---|---|
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
Ec2
— EC2 health check options.Health Check Options
Returns
Use EC2 for health checks.
static elb(options)
public static elb(options: ElbHealthCheckOptions): HealthCheck
Parameters
- options
Elb
— ELB health check options.Health Check Options
Returns
Use ELB for health checks.
It considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks.