Class: AWSCDK::CloudWatch::CompositeAlarmProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CompositeAlarmProps
- Defined in:
- cloud_watch/composite_alarm_props.rb
Overview
Properties for creating a Composite Alarm.
Instance Attribute Summary collapse
-
#actions_enabled ⇒ Boolean?
readonly
Whether the actions for this alarm are enabled.
-
#actions_suppressor ⇒ AWSCDK::Interfaces::AWSCloudwatch::IAlarmRef?
readonly
Actions will be suppressed if the suppressor alarm is in the ALARM state.
-
#actions_suppressor_extension_period ⇒ AWSCDK::Duration?
readonly
The maximum duration that the composite alarm waits after suppressor alarm goes out of the ALARM state.
-
#actions_suppressor_wait_period ⇒ AWSCDK::Duration?
readonly
The maximum duration that the composite alarm waits for the suppressor alarm to go into the ALARM state.
-
#alarm_description ⇒ String?
readonly
Description for the alarm.
-
#alarm_rule ⇒ AWSCDK::CloudWatch::IAlarmRule
readonly
Expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
-
#composite_alarm_name ⇒ String?
readonly
Name of the alarm.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alarm_rule:, actions_enabled: nil, actions_suppressor: nil, actions_suppressor_extension_period: nil, actions_suppressor_wait_period: nil, alarm_description: nil, composite_alarm_name: nil) ⇒ CompositeAlarmProps
constructor
A new instance of CompositeAlarmProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(alarm_rule:, actions_enabled: nil, actions_suppressor: nil, actions_suppressor_extension_period: nil, actions_suppressor_wait_period: nil, alarm_description: nil, composite_alarm_name: nil) ⇒ CompositeAlarmProps
Returns a new instance of CompositeAlarmProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'cloud_watch/composite_alarm_props.rb', line 14 def initialize(alarm_rule:, actions_enabled: nil, actions_suppressor: nil, actions_suppressor_extension_period: nil, actions_suppressor_wait_period: nil, alarm_description: nil, composite_alarm_name: nil) @alarm_rule = alarm_rule Jsii::Type.check_type(@alarm_rule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JQWxhcm1SdWxlIn0=")), "alarmRule") @actions_enabled = actions_enabled Jsii::Type.check_type(@actions_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "actionsEnabled") unless @actions_enabled.nil? @actions_suppressor = actions_suppressor Jsii::Type.check_type(@actions_suppressor, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jbG91ZHdhdGNoLklBbGFybVJlZiJ9")), "actionsSuppressor") unless @actions_suppressor.nil? @actions_suppressor_extension_period = actions_suppressor_extension_period Jsii::Type.check_type(@actions_suppressor_extension_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "actionsSuppressorExtensionPeriod") unless @actions_suppressor_extension_period.nil? @actions_suppressor_wait_period = actions_suppressor_wait_period Jsii::Type.check_type(@actions_suppressor_wait_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "actionsSuppressorWaitPeriod") unless @actions_suppressor_wait_period.nil? @alarm_description = alarm_description Jsii::Type.check_type(@alarm_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmDescription") unless @alarm_description.nil? @composite_alarm_name = composite_alarm_name Jsii::Type.check_type(@composite_alarm_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "compositeAlarmName") unless @composite_alarm_name.nil? end |
Instance Attribute Details
#actions_enabled ⇒ Boolean? (readonly)
Default: true
Whether the actions for this alarm are enabled.
39 40 41 |
# File 'cloud_watch/composite_alarm_props.rb', line 39 def actions_enabled @actions_enabled end |
#actions_suppressor ⇒ AWSCDK::Interfaces::AWSCloudwatch::IAlarmRef? (readonly)
Default: - alarm will not be suppressed.
Actions will be suppressed if the suppressor alarm is in the ALARM state.
44 45 46 |
# File 'cloud_watch/composite_alarm_props.rb', line 44 def actions_suppressor @actions_suppressor end |
#actions_suppressor_extension_period ⇒ AWSCDK::Duration? (readonly)
Default: - 1 minute extension period will be set.
The maximum duration that the composite alarm waits after suppressor alarm goes out of the ALARM state.
After this time, the composite alarm performs its actions.
51 52 53 |
# File 'cloud_watch/composite_alarm_props.rb', line 51 def actions_suppressor_extension_period @actions_suppressor_extension_period end |
#actions_suppressor_wait_period ⇒ AWSCDK::Duration? (readonly)
Default: - 1 minute wait period will be set.
The maximum duration that the composite alarm waits for the suppressor alarm to go into the ALARM state.
After this time, the composite alarm performs its actions.
58 59 60 |
# File 'cloud_watch/composite_alarm_props.rb', line 58 def actions_suppressor_wait_period @actions_suppressor_wait_period end |
#alarm_description ⇒ String? (readonly)
Default: - No description.
Description for the alarm.
63 64 65 |
# File 'cloud_watch/composite_alarm_props.rb', line 63 def alarm_description @alarm_description end |
#alarm_rule ⇒ AWSCDK::CloudWatch::IAlarmRule (readonly)
Expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
34 35 36 |
# File 'cloud_watch/composite_alarm_props.rb', line 34 def alarm_rule @alarm_rule end |
#composite_alarm_name ⇒ String? (readonly)
Default: - Automatically generated name.
Name of the alarm.
68 69 70 |
# File 'cloud_watch/composite_alarm_props.rb', line 68 def composite_alarm_name @composite_alarm_name end |
Class Method Details
.jsii_properties ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 |
# File 'cloud_watch/composite_alarm_props.rb', line 70 def self.jsii_properties { :alarm_rule => "alarmRule", :actions_enabled => "actionsEnabled", :actions_suppressor => "actionsSuppressor", :actions_suppressor_extension_period => "actionsSuppressorExtensionPeriod", :actions_suppressor_wait_period => "actionsSuppressorWaitPeriod", :alarm_description => "alarmDescription", :composite_alarm_name => "compositeAlarmName", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'cloud_watch/composite_alarm_props.rb', line 82 def to_jsii result = {} result.merge!({ "alarmRule" => @alarm_rule, "actionsEnabled" => @actions_enabled, "actionsSuppressor" => @actions_suppressor, "actionsSuppressorExtensionPeriod" => @actions_suppressor_extension_period, "actionsSuppressorWaitPeriod" => @actions_suppressor_wait_period, "alarmDescription" => @alarm_description, "compositeAlarmName" => @composite_alarm_name, }) result.compact end |