HealthCheck

class aws_cdk.aws_elasticloadbalancing.HealthCheck(*, port, healthy_threshold=None, interval=None, path=None, protocol=None, timeout=None, unhealthy_threshold=None)

Bases: object

Describe the health check to a load balancer.

Parameters
  • port (Union[int, float]) – What port number to health check on.

  • healthy_threshold (Union[int, float, None]) – After how many successful checks is an instance considered healthy. Default: 2

  • interval (Optional[Duration]) – Number of seconds between health checks. Default: Duration.seconds(30)

  • path (Optional[str]) – What path to use for HTTP or HTTPS health check (must return 200). For SSL and TCP health checks, accepting connections is enough to be considered healthy. Default: “/”

  • protocol (Optional[LoadBalancingProtocol]) – What protocol to use for health checking. The protocol is automatically determined from the port if it’s not supplied. Default: Automatic

  • timeout (Optional[Duration]) – Health check timeout. Default: Duration.seconds(5)

  • unhealthy_threshold (Union[int, float, None]) – After how many unsuccessful checks is an instance considered unhealthy. Default: 5

Attributes

healthy_threshold

After how many successful checks is an instance considered healthy.

Default

2

Return type

Union[int, float, None]

interval

Number of seconds between health checks.

Default

Duration.seconds(30)

Return type

Optional[Duration]

path

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

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

Default

“/”

Return type

Optional[str]

port

What port number to health check on.

Return type

Union[int, float]

protocol

What protocol to use for health checking.

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

Default

Automatic

Return type

Optional[LoadBalancingProtocol]

timeout

Health check timeout.

Default

Duration.seconds(5)

Return type

Optional[Duration]

unhealthy_threshold

After how many unsuccessful checks is an instance considered unhealthy.

Default

5

Return type

Union[int, float, None]