HealthCheck

class aws_cdk.aws_autoscaling.HealthCheck(*args: Any, **kwargs)

Bases: object

Health check settings.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_autoscaling as autoscaling

health_check = autoscaling.HealthCheck.ec2(
    grace=cdk.Duration.minutes(30)
)

Attributes

grace_period
type

Static Methods

classmethod ec2(*, grace=None)

Use EC2 for health checks.

Parameters:

grace (Optional[Duration]) – Specified the time Auto Scaling waits before checking the health status of an EC2 instance that has come into service. Default: Duration.seconds(0)

Return type:

HealthCheck

classmethod elb(*, grace)

Use ELB for health checks.

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

Parameters:

grace (Duration) – Specified the time Auto Scaling waits before checking the health status of an EC2 instance that has come into service. This option is required for ELB health checks.

Return type:

HealthCheck