Class: AWSCDK::ARCZonalShift::CfnZonalAutoshiftConfiguration::PracticeRunConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ARCZonalShift::CfnZonalAutoshiftConfiguration::PracticeRunConfigurationProperty
- Defined in:
- arc_zonal_shift/cfn_zonal_autoshift_configuration.rb
Overview
A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice run, as well as any blocked dates or blocked windows for the practice run.
When a resource has a practice run configuation, ARC starts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice runs help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.
You can update or delete a practice run configuration. When you delete a practice run configuration, zonal autoshift is disabled for the resource. A practice run configuration is required when zonal autoshift is enabled.
Instance Attribute Summary collapse
-
#blocked_dates ⇒ Array<String>?
readonly
An array of one or more dates that you can specify when AWS does not start practice runs for a resource.
-
#blocked_windows ⇒ Array<String>?
readonly
An array of one or more days and times that you can specify when ARC does not start practice runs for a resource.
-
#blocking_alarms ⇒ AWSCDK::IResolvable, ...
readonly
An optional alarm that you can specify that blocks practice runs when the alarm is in an
ALARMstate. -
#outcome_alarms ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ARCZonalShift::CfnZonalAutoshiftConfiguration::ControlConditionProperty>
readonly
The alarm that you specify to monitor the health of your application during practice runs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(outcome_alarms:, blocked_dates: nil, blocked_windows: nil, blocking_alarms: nil) ⇒ PracticeRunConfigurationProperty
constructor
A new instance of PracticeRunConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(outcome_alarms:, blocked_dates: nil, blocked_windows: nil, blocking_alarms: nil) ⇒ PracticeRunConfigurationProperty
Returns a new instance of PracticeRunConfigurationProperty.
581 582 583 584 585 586 587 588 589 590 |
# File 'arc_zonal_shift/cfn_zonal_autoshift_configuration.rb', line 581 def initialize(outcome_alarms:, blocked_dates: nil, blocked_windows: nil, blocking_alarms: nil) @outcome_alarms = outcome_alarms Jsii::Type.check_type(@outcome_alarms, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXJjem9uYWxzaGlmdC5DZm5ab25hbEF1dG9zaGlmdENvbmZpZ3VyYXRpb24uQ29udHJvbENvbmRpdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "outcomeAlarms") @blocked_dates = blocked_dates Jsii::Type.check_type(@blocked_dates, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "blockedDates") unless @blocked_dates.nil? @blocked_windows = blocked_windows Jsii::Type.check_type(@blocked_windows, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "blockedWindows") unless @blocked_windows.nil? @blocking_alarms = blocking_alarms Jsii::Type.check_type(@blocking_alarms, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXJjem9uYWxzaGlmdC5DZm5ab25hbEF1dG9zaGlmdENvbmZpZ3VyYXRpb24uQ29udHJvbENvbmRpdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "blockingAlarms") unless @blocking_alarms.nil? end |
Instance Attribute Details
#blocked_dates ⇒ Array<String>? (readonly)
An array of one or more dates that you can specify when AWS does not start practice runs for a resource.
Dates are in UTC.
Specify blocked dates in the format YYYY-MM-DD , separated by spaces.
607 608 609 |
# File 'arc_zonal_shift/cfn_zonal_autoshift_configuration.rb', line 607 def blocked_dates @blocked_dates end |
#blocked_windows ⇒ Array<String>? (readonly)
An array of one or more days and times that you can specify when ARC does not start practice runs for a resource.
Days and times are in UTC.
Specify blocked windows in the format DAY:HH:MM-DAY:HH:MM , separated by spaces. For example, MON:18:30-MON:19:30 TUE:18:30-TUE:19:30 .
Blocked windows have to start and end on the same day. Windows that span multiple days aren't supported.
618 619 620 |
# File 'arc_zonal_shift/cfn_zonal_autoshift_configuration.rb', line 618 def blocked_windows @blocked_windows end |
#blocking_alarms ⇒ AWSCDK::IResolvable, ... (readonly)
An optional alarm that you can specify that blocks practice runs when the alarm is in an ALARM state.
When a blocking alarm goes into an ALARM state, it prevents practice runs from being started, and ends practice runs that are in progress.
625 626 627 |
# File 'arc_zonal_shift/cfn_zonal_autoshift_configuration.rb', line 625 def blocking_alarms @blocking_alarms end |
#outcome_alarms ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ARCZonalShift::CfnZonalAutoshiftConfiguration::ControlConditionProperty> (readonly)
The alarm that you specify to monitor the health of your application during practice runs.
When the outcome alarm goes into an ALARM state, the practice run is ended and the outcome is set to FAILED .
598 599 600 |
# File 'arc_zonal_shift/cfn_zonal_autoshift_configuration.rb', line 598 def outcome_alarms @outcome_alarms end |
Class Method Details
.jsii_properties ⇒ Object
627 628 629 630 631 632 633 634 |
# File 'arc_zonal_shift/cfn_zonal_autoshift_configuration.rb', line 627 def self.jsii_properties { :outcome_alarms => "outcomeAlarms", :blocked_dates => "blockedDates", :blocked_windows => "blockedWindows", :blocking_alarms => "blockingAlarms", } end |
Instance Method Details
#to_jsii ⇒ Object
636 637 638 639 640 641 642 643 644 645 |
# File 'arc_zonal_shift/cfn_zonal_autoshift_configuration.rb', line 636 def to_jsii result = {} result.merge!({ "outcomeAlarms" => @outcome_alarms, "blockedDates" => @blocked_dates, "blockedWindows" => @blocked_windows, "blockingAlarms" => @blocking_alarms, }) result.compact end |