Class: AWSCDK::AppMesh::OutlierDetection
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::OutlierDetection
- Defined in:
- app_mesh/outlier_detection.rb
Overview
Represents the outlier detection for a listener.
Instance Attribute Summary collapse
-
#base_ejection_duration ⇒ AWSCDK::Duration
readonly
The base amount of time for which a host is ejected.
-
#interval ⇒ AWSCDK::Duration
readonly
The time interval between ejection sweep analysis.
-
#max_ejection_percent ⇒ Numeric
readonly
Maximum percentage of hosts in load balancing pool for upstream service that can be ejected.
-
#max_server_errors ⇒ Numeric
readonly
Number of consecutive 5xx errors required for ejection.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(base_ejection_duration:, interval:, max_ejection_percent:, max_server_errors:) ⇒ OutlierDetection
constructor
A new instance of OutlierDetection.
- #to_jsii ⇒ Object
Constructor Details
#initialize(base_ejection_duration:, interval:, max_ejection_percent:, max_server_errors:) ⇒ OutlierDetection
Returns a new instance of OutlierDetection.
11 12 13 14 15 16 17 18 19 20 |
# File 'app_mesh/outlier_detection.rb', line 11 def initialize(base_ejection_duration:, interval:, max_ejection_percent:, max_server_errors:) @base_ejection_duration = base_ejection_duration Jsii::Type.check_type(@base_ejection_duration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "baseEjectionDuration") @interval = interval Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "interval") @max_ejection_percent = max_ejection_percent Jsii::Type.check_type(@max_ejection_percent, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxEjectionPercent") @max_server_errors = max_server_errors Jsii::Type.check_type(@max_server_errors, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxServerErrors") end |
Instance Attribute Details
#base_ejection_duration ⇒ AWSCDK::Duration (readonly)
The base amount of time for which a host is ejected.
25 26 27 |
# File 'app_mesh/outlier_detection.rb', line 25 def base_ejection_duration @base_ejection_duration end |
#interval ⇒ AWSCDK::Duration (readonly)
The time interval between ejection sweep analysis.
29 30 31 |
# File 'app_mesh/outlier_detection.rb', line 29 def interval @interval end |
#max_ejection_percent ⇒ Numeric (readonly)
Maximum percentage of hosts in load balancing pool for upstream service that can be ejected.
Will eject at least one host regardless of the value.
36 37 38 |
# File 'app_mesh/outlier_detection.rb', line 36 def max_ejection_percent @max_ejection_percent end |
#max_server_errors ⇒ Numeric (readonly)
Number of consecutive 5xx errors required for ejection.
40 41 42 |
# File 'app_mesh/outlier_detection.rb', line 40 def max_server_errors @max_server_errors end |
Class Method Details
.jsii_properties ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'app_mesh/outlier_detection.rb', line 42 def self.jsii_properties { :base_ejection_duration => "baseEjectionDuration", :interval => "interval", :max_ejection_percent => "maxEjectionPercent", :max_server_errors => "maxServerErrors", } end |
Instance Method Details
#to_jsii ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'app_mesh/outlier_detection.rb', line 51 def to_jsii result = {} result.merge!({ "baseEjectionDuration" => @base_ejection_duration, "interval" => @interval, "maxEjectionPercent" => @max_ejection_percent, "maxServerErrors" => @max_server_errors, }) result.compact end |