Class: AWSCDK::AppMesh::GrpcHealthCheckOptions

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

Overview

Properties used to define GRPC Based healthchecks.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of GrpcHealthCheckOptions.

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.

  • 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.



11
12
13
14
15
16
17
18
19
20
# File 'app_mesh/grpc_health_check_options.rb', line 11

def initialize(healthy_threshold: nil, interval: 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?
  @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)


26
27
28
# File 'app_mesh/grpc_health_check_options.rb', line 26

def healthy_threshold
  @healthy_threshold
end

#intervalAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(5)

The time period between each health check execution.

Returns:



31
32
33
# File 'app_mesh/grpc_health_check_options.rb', line 31

def interval
  @interval
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(2)

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

Returns:



36
37
38
# File 'app_mesh/grpc_health_check_options.rb', line 36

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)


41
42
43
# File 'app_mesh/grpc_health_check_options.rb', line 41

def unhealthy_threshold
  @unhealthy_threshold
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
# File 'app_mesh/grpc_health_check_options.rb', line 43

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

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
61
# File 'app_mesh/grpc_health_check_options.rb', line 52

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