Class: AWSCDK::AppMesh::GrpcHealthCheckOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::GrpcHealthCheckOptions
- Defined in:
- app_mesh/grpc_health_check_options.rb
Overview
Properties used to define GRPC Based healthchecks.
Instance Attribute Summary collapse
-
#healthy_threshold ⇒ Numeric?
readonly
The number of consecutive successful health checks that must occur before declaring listener healthy.
-
#interval ⇒ AWSCDK::Duration?
readonly
The time period between each health check execution.
-
#timeout ⇒ AWSCDK::Duration?
readonly
The amount of time to wait when receiving a response from the health check.
-
#unhealthy_threshold ⇒ Numeric?
readonly
The number of consecutive failed health checks that must occur before declaring a listener unhealthy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(healthy_threshold: nil, interval: nil, timeout: nil, unhealthy_threshold: nil) ⇒ GrpcHealthCheckOptions
constructor
A new instance of GrpcHealthCheckOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(healthy_threshold: nil, interval: nil, timeout: nil, unhealthy_threshold: nil) ⇒ GrpcHealthCheckOptions
Returns a new instance of GrpcHealthCheckOptions.
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_threshold ⇒ Numeric? (readonly)
Default: 2
The number of consecutive successful health checks that must occur before declaring listener healthy.
26 27 28 |
# File 'app_mesh/grpc_health_check_options.rb', line 26 def healthy_threshold @healthy_threshold end |
#interval ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(5)
The time period between each health check execution.
31 32 33 |
# File 'app_mesh/grpc_health_check_options.rb', line 31 def interval @interval end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(2)
The amount of time to wait when receiving a response from the health check.
36 37 38 |
# File 'app_mesh/grpc_health_check_options.rb', line 36 def timeout @timeout end |
#unhealthy_threshold ⇒ Numeric? (readonly)
Default: - 2
The number of consecutive failed health checks that must occur before declaring a listener unhealthy.
41 42 43 |
# File 'app_mesh/grpc_health_check_options.rb', line 41 def unhealthy_threshold @unhealthy_threshold end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |