Class: AWSCDK::CloudWatch::CfnCompositeAlarmProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnCompositeAlarmProps
- Defined in:
- cloud_watch/cfn_composite_alarm_props.rb
Overview
Properties for defining a CfnCompositeAlarm.
Instance Attribute Summary collapse
-
#actions_enabled ⇒ Boolean, ...
readonly
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.
-
#actions_suppressor ⇒ String, ...
readonly
Actions will be suppressed if the suppressor alarm is in the
ALARMstate. -
#actions_suppressor_extension_period ⇒ Numeric?
readonly
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARMstate. -
#actions_suppressor_wait_period ⇒ Numeric?
readonly
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARMstate. -
#alarm_actions ⇒ Array<String, AWSCDK::Interfaces::AWSSNS::ITopicRef>?
readonly
The actions to execute when this alarm transitions to the ALARM state from any other state.
-
#alarm_description ⇒ String?
readonly
The description for the composite alarm.
-
#alarm_name ⇒ String?
readonly
The name for the composite alarm.
-
#alarm_rule ⇒ String
readonly
An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
-
#insufficient_data_actions ⇒ Array<String>?
readonly
The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
-
#ok_actions ⇒ Array<String, AWSCDK::Interfaces::AWSSNS::ITopicRef>?
readonly
The actions to execute when this alarm transitions to the OK state from any other state.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A list of key-value pairs to associate with 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_actions: nil, alarm_description: nil, alarm_name: nil, insufficient_data_actions: nil, ok_actions: nil, tags: nil) ⇒ CfnCompositeAlarmProps
constructor
A new instance of CfnCompositeAlarmProps.
- #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_actions: nil, alarm_description: nil, alarm_name: nil, insufficient_data_actions: nil, ok_actions: nil, tags: nil) ⇒ CfnCompositeAlarmProps
Returns a new instance of CfnCompositeAlarmProps.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 20 def initialize(alarm_rule:, actions_enabled: nil, actions_suppressor: nil, actions_suppressor_extension_period: nil, actions_suppressor_wait_period: nil, alarm_actions: nil, alarm_description: nil, alarm_name: nil, insufficient_data_actions: nil, ok_actions: nil, tags: nil) @alarm_rule = alarm_rule Jsii::Type.check_type(@alarm_rule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmRule") @actions_enabled = actions_enabled Jsii::Type.check_type(@actions_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "actionsEnabled") unless @actions_enabled.nil? @actions_suppressor = actions_suppressor Jsii::Type.check_type(@actions_suppressor, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jbG91ZHdhdGNoLklBbGFybVJlZiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuaW50ZXJmYWNlcy5hd3NfY2xvdWR3YXRjaC5JQ29tcG9zaXRlQWxhcm1SZWYifV19fQ==")), "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("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "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("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "actionsSuppressorWaitPeriod") unless @actions_suppressor_wait_period.nil? @alarm_actions = alarm_actions Jsii::Type.check_type(@alarm_actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX3Nucy5JVG9waWNSZWYifV19fSwia2luZCI6ImFycmF5In19")), "alarmActions") unless @alarm_actions.nil? @alarm_description = alarm_description Jsii::Type.check_type(@alarm_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmDescription") unless @alarm_description.nil? @alarm_name = alarm_name Jsii::Type.check_type(@alarm_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmName") unless @alarm_name.nil? @insufficient_data_actions = insufficient_data_actions Jsii::Type.check_type(@insufficient_data_actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "insufficientDataActions") unless @insufficient_data_actions.nil? @ok_actions = ok_actions Jsii::Type.check_type(@ok_actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX3Nucy5JVG9waWNSZWYifV19fSwia2luZCI6ImFycmF5In19")), "okActions") unless @ok_actions.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#actions_enabled ⇒ Boolean, ... (readonly)
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.
The default is TRUE.
72 73 74 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 72 def actions_enabled @actions_enabled end |
#actions_suppressor ⇒ String, ... (readonly)
Actions will be suppressed if the suppressor alarm is in the ALARM state.
ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
79 80 81 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 79 def actions_suppressor @actions_suppressor end |
#actions_suppressor_extension_period ⇒ Numeric? (readonly)
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the ALARM state.
After this time, the composite alarm performs its actions.
ExtensionPeriodis required only whenActionsSuppressoris specified.
88 89 90 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 88 def actions_suppressor_extension_period @actions_suppressor_extension_period end |
#actions_suppressor_wait_period ⇒ Numeric? (readonly)
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the ALARM state.
After this time, the composite alarm performs its actions.
WaitPeriodis required only whenActionsSuppressoris specified.
97 98 99 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 97 def actions_suppressor_wait_period @actions_suppressor_wait_period end |
#alarm_actions ⇒ Array<String, AWSCDK::Interfaces::AWSSNS::ITopicRef>? (readonly)
The actions to execute when this alarm transitions to the ALARM state from any other state.
Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
104 105 106 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 104 def alarm_actions @alarm_actions end |
#alarm_description ⇒ String? (readonly)
The description for the composite alarm.
109 110 111 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 109 def alarm_description @alarm_description end |
#alarm_name ⇒ String? (readonly)
The name for the composite alarm.
This name must be unique within your AWS account.
116 117 118 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 116 def alarm_name @alarm_name end |
#alarm_rule ⇒ String (readonly)
An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression.
You can use either alarm names or ARNs to reference the other alarms that are to be evaluated.
Functions can include the following:
- ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM state.
- OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state.
- INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm is in INSUFFICIENT_DATA state.
- TRUE always evaluates to TRUE.
- FALSE always evaluates to FALSE.
TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions.
For more information about AlarmRule syntax, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
65 66 67 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 65 def alarm_rule @alarm_rule end |
#insufficient_data_actions ⇒ Array<String>? (readonly)
The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
123 124 125 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 123 def insufficient_data_actions @insufficient_data_actions end |
#ok_actions ⇒ Array<String, AWSCDK::Interfaces::AWSSNS::ITopicRef>? (readonly)
The actions to execute when this alarm transitions to the OK state from any other state.
Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
130 131 132 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 130 def ok_actions @ok_actions end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A list of key-value pairs to associate with the alarm.
You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the cloudwatch:TagResource permission.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
139 140 141 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 139 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 141 def self.jsii_properties { :alarm_rule => "alarmRule", :actions_enabled => "actionsEnabled", :actions_suppressor => "actionsSuppressor", :actions_suppressor_extension_period => "actionsSuppressorExtensionPeriod", :actions_suppressor_wait_period => "actionsSuppressorWaitPeriod", :alarm_actions => "alarmActions", :alarm_description => "alarmDescription", :alarm_name => "alarmName", :insufficient_data_actions => "insufficientDataActions", :ok_actions => "okActions", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'cloud_watch/cfn_composite_alarm_props.rb', line 157 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, "alarmActions" => @alarm_actions, "alarmDescription" => @alarm_description, "alarmName" => @alarm_name, "insufficientDataActions" => @insufficient_data_actions, "okActions" => @ok_actions, "tags" => @tags, }) result.compact end |