Class: AWSCDK::ElasticLoadBalancing::CfnLoadBalancer::HealthCheckProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancing/cfn_load_balancer.rb

Overview

Specifies health check settings for your Classic Load Balancer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(healthy_threshold:, interval:, target:, timeout:, unhealthy_threshold:) ⇒ HealthCheckProperty

Returns a new instance of HealthCheckProperty.

Parameters:

  • healthy_threshold (String)

    The number of consecutive health checks successes required before moving the instance to the Healthy state.

  • interval (String)

    The approximate interval, in seconds, between health checks of an individual instance.

  • target (String)

    The instance being checked.

  • timeout (String)

    The amount of time, in seconds, during which no response means a failed health check.

  • unhealthy_threshold (String)

    The number of consecutive health check failures required before moving the instance to the Unhealthy state.



971
972
973
974
975
976
977
978
979
980
981
982
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 971

def initialize(healthy_threshold:, interval:, target:, timeout:, unhealthy_threshold:)
  @healthy_threshold = healthy_threshold
  Jsii::Type.check_type(@healthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "healthyThreshold")
  @interval = interval
  Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "interval")
  @target = target
  Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "target")
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timeout")
  @unhealthy_threshold = unhealthy_threshold
  Jsii::Type.check_type(@unhealthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unhealthyThreshold")
end

Instance Attribute Details

#healthy_thresholdString (readonly)

The number of consecutive health checks successes required before moving the instance to the Healthy state.



988
989
990
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 988

def healthy_threshold
  @healthy_threshold
end

#intervalString (readonly)

The approximate interval, in seconds, between health checks of an individual instance.



993
994
995
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 993

def interval
  @interval
end

#targetString (readonly)

The instance being checked.

The protocol is either TCP, HTTP, HTTPS, or SSL. The range of valid ports is one (1) through 65535.

TCP is the default, specified as a TCP: port pair, for example "TCP:5000". In this case, a health check simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy.

SSL is also specified as SSL: port pair, for example, SSL:5000.

For HTTP/HTTPS, you must include a ping path in the string. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than "200 OK" within the timeout period is considered unhealthy.

The total length of the HTTP ping target must be 1024 16-bit Unicode characters or less.



1008
1009
1010
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1008

def target
  @target
end

#timeoutString (readonly)

The amount of time, in seconds, during which no response means a failed health check.

This value must be less than the Interval value.



1015
1016
1017
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1015

def timeout
  @timeout
end

#unhealthy_thresholdString (readonly)

The number of consecutive health check failures required before moving the instance to the Unhealthy state.



1020
1021
1022
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1020

def unhealthy_threshold
  @unhealthy_threshold
end

Class Method Details

.jsii_propertiesObject



1022
1023
1024
1025
1026
1027
1028
1029
1030
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1022

def self.jsii_properties
  {
    :healthy_threshold => "healthyThreshold",
    :interval => "interval",
    :target => "target",
    :timeout => "timeout",
    :unhealthy_threshold => "unhealthyThreshold",
  }
end

Instance Method Details

#to_jsiiObject



1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 1032

def to_jsii
  result = {}
  result.merge!({
    "healthyThreshold" => @healthy_threshold,
    "interval" => @interval,
    "target" => @target,
    "timeout" => @timeout,
    "unhealthyThreshold" => @unhealthy_threshold,
  })
  result.compact
end