Table of Contents

Interface IHealthCheck

Namespace
Amazon.CDK.AWS.ElasticLoadBalancing
Assembly
Amazon.CDK.AWS.ElasticLoadBalancing.dll

Describe the health check to a load balancer.

public interface IHealthCheck

Examples

IVpc vpc;

            AutoScalingGroup myAutoScalingGroup;

            var lb = new LoadBalancer(this, "LB", new LoadBalancerProps {
                Vpc = vpc,
                InternetFacing = true,
                HealthCheck = new HealthCheck {
                    Port = 80
                }
            });
            lb.AddTarget(myAutoScalingGroup);
            lb.AddListener(new LoadBalancerListener {
                ExternalPort = 80
            });

Remarks

ExampleMetadata: infused

Properties

HealthyThreshold

After how many successful checks is an instance considered healthy.

double? HealthyThreshold { get; }

Property Value

double?

Remarks

Default: 2

Interval

Number of seconds between health checks.

Duration? Interval { get; }

Property Value

Duration

Remarks

Default: Duration.seconds(30)

Path

What path to use for HTTP or HTTPS health check (must return 200).

string? Path { get; }

Property Value

string

Remarks

For SSL and TCP health checks, accepting connections is enough to be considered healthy.

Default: "/"

Port

What port number to health check on.

double Port { get; }

Property Value

double

Protocol

What protocol to use for health checking.

LoadBalancingProtocol? Protocol { get; }

Property Value

LoadBalancingProtocol?

Remarks

The protocol is automatically determined from the port if it's not supplied.

Default: Automatic

Timeout

Health check timeout.

Duration? Timeout { get; }

Property Value

Duration

Remarks

Default: Duration.seconds(5)

UnhealthyThreshold

After how many unsuccessful checks is an instance considered unhealthy.

double? UnhealthyThreshold { get; }

Property Value

double?

Remarks

Default: 5