Class: AWSCDK::Lightsail::CfnContainer::HealthCheckConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_container.rb

Overview

HealthCheckConfig is a property of the PublicEndpoint property. It describes the healthcheck configuration of a container deployment on a container service.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(healthy_threshold: nil, interval_seconds: nil, path: nil, success_codes: nil, timeout_seconds: nil, unhealthy_threshold: nil) ⇒ HealthCheckConfigProperty

Returns a new instance of HealthCheckConfigProperty.

Parameters:

  • healthy_threshold (Numeric, nil) (defaults to: nil)

    The number of consecutive health check successes required before moving the container to the Healthy state.

  • interval_seconds (Numeric, nil) (defaults to: nil)

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

  • path (String, nil) (defaults to: nil)

    The path on the container on which to perform the health check.

  • success_codes (String, nil) (defaults to: nil)

    The HTTP codes to use when checking for a successful response from a container.

  • timeout_seconds (Numeric, nil) (defaults to: nil)

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

  • unhealthy_threshold (Numeric, nil) (defaults to: nil)

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



853
854
855
856
857
858
859
860
861
862
863
864
865
866
# File 'lightsail/cfn_container.rb', line 853

def initialize(healthy_threshold: nil, interval_seconds: nil, path: nil, success_codes: nil, timeout_seconds: nil, unhealthy_threshold: nil)
  @healthy_threshold = healthy_threshold
  Jsii::Type.check_type(@healthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthyThreshold") unless @healthy_threshold.nil?
  @interval_seconds = interval_seconds
  Jsii::Type.check_type(@interval_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "intervalSeconds") unless @interval_seconds.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @success_codes = success_codes
  Jsii::Type.check_type(@success_codes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "successCodes") unless @success_codes.nil?
  @timeout_seconds = timeout_seconds
  Jsii::Type.check_type(@timeout_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutSeconds") unless @timeout_seconds.nil?
  @unhealthy_threshold = unhealthy_threshold
  Jsii::Type.check_type(@unhealthy_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unhealthyThreshold") unless @unhealthy_threshold.nil?
end

Instance Attribute Details

#healthy_thresholdNumeric? (readonly)

The number of consecutive health check successes required before moving the container to the Healthy state.

The default value is 2 .



874
875
876
# File 'lightsail/cfn_container.rb', line 874

def healthy_threshold
  @healthy_threshold
end

#interval_secondsNumeric? (readonly)

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

You can specify between 5 and 300 seconds. The default value is 5 .



881
882
883
# File 'lightsail/cfn_container.rb', line 881

def interval_seconds
  @interval_seconds
end

#pathString? (readonly)

The path on the container on which to perform the health check.

The default value is / .



888
889
890
# File 'lightsail/cfn_container.rb', line 888

def path
  @path
end

#success_codesString? (readonly)

The HTTP codes to use when checking for a successful response from a container.

You can specify values between 200 and 499 . You can specify multiple values (for example, 200,202 ) or a range of values (for example, 200-299 ).



895
896
897
# File 'lightsail/cfn_container.rb', line 895

def success_codes
  @success_codes
end

#timeout_secondsNumeric? (readonly)

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

You can specify between 2 and 60 seconds. The default value is 2 .



902
903
904
# File 'lightsail/cfn_container.rb', line 902

def timeout_seconds
  @timeout_seconds
end

#unhealthy_thresholdNumeric? (readonly)

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

The default value is 2 .



909
910
911
# File 'lightsail/cfn_container.rb', line 909

def unhealthy_threshold
  @unhealthy_threshold
end

Class Method Details

.jsii_propertiesObject



911
912
913
914
915
916
917
918
919
920
# File 'lightsail/cfn_container.rb', line 911

def self.jsii_properties
  {
    :healthy_threshold => "healthyThreshold",
    :interval_seconds => "intervalSeconds",
    :path => "path",
    :success_codes => "successCodes",
    :timeout_seconds => "timeoutSeconds",
    :unhealthy_threshold => "unhealthyThreshold",
  }
end

Instance Method Details

#to_jsiiObject



922
923
924
925
926
927
928
929
930
931
932
933
# File 'lightsail/cfn_container.rb', line 922

def to_jsii
  result = {}
  result.merge!({
    "healthyThreshold" => @healthy_threshold,
    "intervalSeconds" => @interval_seconds,
    "path" => @path,
    "successCodes" => @success_codes,
    "timeoutSeconds" => @timeout_seconds,
    "unhealthyThreshold" => @unhealthy_threshold,
  })
  result.compact
end