Class HealthCheck
Describe the health check to a load balancer.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.ElasticLoadBalancing
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HealthCheck : IHealthCheckSyntax (vb)
Public Class HealthCheck Implements IHealthCheckRemarks
ExampleMetadata: infused
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
            });Synopsis
Constructors
| HealthCheck() | Describe the health check to a load balancer. | 
Properties
| HealthyThreshold | After how many successful checks is an instance considered healthy. | 
| Interval | Number of seconds between health checks. | 
| Path | What path to use for HTTP or HTTPS health check (must return 200). | 
| Port | What port number to health check on. | 
| Protocol | What protocol to use for health checking. | 
| Timeout | Health check timeout. | 
| UnhealthyThreshold | After how many unsuccessful checks is an instance considered unhealthy. | 
Constructors
HealthCheck()
Describe the health check to a load balancer.
public HealthCheck()Remarks
ExampleMetadata: infused
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
            });Properties
HealthyThreshold
After how many successful checks is an instance considered healthy.
public double? HealthyThreshold { get; set; }Property Value
Remarks
Default: 2
Interval
Number of seconds between health checks.
public Duration? Interval { get; set; }Property Value
Remarks
Default: Duration.seconds(30)
Path
What path to use for HTTP or HTTPS health check (must return 200).
public string? Path { get; set; }Property Value
Remarks
For SSL and TCP health checks, accepting connections is enough to be considered healthy.
Default: "/"
Port
What port number to health check on.
public double Port { get; set; }Property Value
Remarks
ExampleMetadata: infused
Protocol
What protocol to use for health checking.
public LoadBalancingProtocol? Protocol { get; set; }Property Value
Remarks
The protocol is automatically determined from the port if it's not supplied.
Default: Automatic
Timeout
Health check timeout.
public Duration? Timeout { get; set; }Property Value
Remarks
Default: Duration.seconds(5)
UnhealthyThreshold
After how many unsuccessful checks is an instance considered unhealthy.
public double? UnhealthyThreshold { get; set; }Property Value
Remarks
Default: 5