Class: AWSCDK::AppMesh::HttpHealthCheckOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_mesh/http_health_check_options.rb

Overview

Properties used to define HTTP Based healthchecks.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(healthy_threshold: nil, interval: nil, path: nil, timeout: nil, unhealthy_threshold: nil) ⇒ HttpHealthCheckOptions

Returns a new instance of HttpHealthCheckOptions.

Parameters:

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

    The number of consecutive successful health checks that must occur before declaring listener healthy.

  • interval (AWSCDK::Duration, nil) (defaults to: nil)

    The time period between each health check execution.

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

    The destination path for the health check request.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    The amount of time to wait when receiving a response from the health check.

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

    The number of consecutive failed health checks that must occur before declaring a listener unhealthy.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app_mesh/http_health_check_options.rb', line 12

def initialize(healthy_threshold: nil, interval: nil, path: nil, timeout: 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 = interval
  Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "interval") unless @interval.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.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)

Note:

Default: 2

The number of consecutive successful health checks that must occur before declaring listener healthy.

Returns:

  • (Numeric, nil)


29
30
31
# File 'app_mesh/http_health_check_options.rb', line 29

def healthy_threshold
  @healthy_threshold
end

#intervalAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(5)

The time period between each health check execution.

Returns:



34
35
36
# File 'app_mesh/http_health_check_options.rb', line 34

def interval
  @interval
end

#pathString? (readonly)

Note:

Default: /

The destination path for the health check request.

Returns:

  • (String, nil)


39
40
41
# File 'app_mesh/http_health_check_options.rb', line 39

def path
  @path
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(2)

The amount of time to wait when receiving a response from the health check.

Returns:



44
45
46
# File 'app_mesh/http_health_check_options.rb', line 44

def timeout
  @timeout
end

#unhealthy_thresholdNumeric? (readonly)

Note:

Default: - 2

The number of consecutive failed health checks that must occur before declaring a listener unhealthy.

Returns:

  • (Numeric, nil)


49
50
51
# File 'app_mesh/http_health_check_options.rb', line 49

def unhealthy_threshold
  @unhealthy_threshold
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
58
59
# File 'app_mesh/http_health_check_options.rb', line 51

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

Instance Method Details

#to_jsiiObject



61
62
63
64
65
66
67
68
69
70
71
# File 'app_mesh/http_health_check_options.rb', line 61

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