Class: AWSCDK::Route53RecoveryControl::CfnSafetyRule::AssertionRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Route53RecoveryControl::CfnSafetyRule::AssertionRuleProperty
- Defined in:
- route53_recovery_control/cfn_safety_rule.rb
Overview
An assertion rule enforces that, when you change a routing control state, that the criteria that you set in the rule configuration is met.
Otherwise, the change to the routing control is not accepted. For example, the criteria might be that at least one routing control state is On after the transaction so that traffic continues to flow to at least one cell for the application. This ensures that you avoid a fail-open scenario.
Instance Attribute Summary collapse
-
#asserted_controls ⇒ Array<String>
readonly
The routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed.
-
#wait_period_ms ⇒ Numeric
readonly
An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(asserted_controls:, wait_period_ms:) ⇒ AssertionRuleProperty
constructor
A new instance of AssertionRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(asserted_controls:, wait_period_ms:) ⇒ AssertionRuleProperty
Returns a new instance of AssertionRuleProperty.
608 609 610 611 612 613 |
# File 'route53_recovery_control/cfn_safety_rule.rb', line 608 def initialize(asserted_controls:, wait_period_ms:) @asserted_controls = asserted_controls Jsii::Type.check_type(@asserted_controls, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "assertedControls") @wait_period_ms = wait_period_ms Jsii::Type.check_type(@wait_period_ms, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "waitPeriodMs") end |
Instance Attribute Details
#asserted_controls ⇒ Array<String> (readonly)
The routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed.
For example, you might include three routing controls, one for each of three AWS Regions.
621 622 623 |
# File 'route53_recovery_control/cfn_safety_rule.rb', line 621 def asserted_controls @asserted_controls end |
#wait_period_ms ⇒ Numeric (readonly)
An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail.
This helps prevent flapping of state. The wait period is 5000 ms by default, but you can choose a custom value.
628 629 630 |
# File 'route53_recovery_control/cfn_safety_rule.rb', line 628 def wait_period_ms @wait_period_ms end |
Class Method Details
.jsii_properties ⇒ Object
630 631 632 633 634 635 |
# File 'route53_recovery_control/cfn_safety_rule.rb', line 630 def self.jsii_properties { :asserted_controls => "assertedControls", :wait_period_ms => "waitPeriodMs", } end |
Instance Method Details
#to_jsii ⇒ Object
637 638 639 640 641 642 643 644 |
# File 'route53_recovery_control/cfn_safety_rule.rb', line 637 def to_jsii result = {} result.merge!({ "assertedControls" => @asserted_controls, "waitPeriodMs" => @wait_period_ms, }) result.compact end |