Class: AWSCDK::CloudWatch::AlarmRule
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudWatch::AlarmRule
- Defined in:
- cloud_watch/alarm_rule.rb
Overview
Class with static functions to build AlarmRule for Composite Alarms.
Class Method Summary collapse
-
._not(operand) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to wrap provided AlarmRule in NOT operator.
-
.all_of(*operands) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to join all provided AlarmRules with AND operator.
-
.any_of(*operands) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to join all provided AlarmRules with OR operator.
-
.from_alarm(alarm, alarm_state) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to build Rule Expression for given IAlarm and AlarmState.
-
.from_boolean(value) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to build TRUE/FALSE intent for Rule Expression.
-
.from_string(alarm_rule) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to build Rule Expression for given Alarm Rule string.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ AlarmRule
constructor
A new instance of AlarmRule.
Constructor Details
#initialize ⇒ AlarmRule
Returns a new instance of AlarmRule.
8 9 10 |
# File 'cloud_watch/alarm_rule.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
._not(operand) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to wrap provided AlarmRule in NOT operator.
72 73 74 75 |
# File 'cloud_watch/alarm_rule.rb', line 72 def self._not(operand) Jsii::Type.check_type(operand, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JQWxhcm1SdWxlIn0=")), "operand") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.AlarmRule", "not", [operand]) end |
.all_of(*operands) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to join all provided AlarmRules with AND operator.
21 22 23 24 25 26 |
# File 'cloud_watch/alarm_rule.rb', line 21 def self.all_of(*operands) operands.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JQWxhcm1SdWxlIn0=")), "operands[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.AlarmRule", "allOf", [*operands]) end |
.any_of(*operands) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to join all provided AlarmRules with OR operator.
32 33 34 35 36 37 |
# File 'cloud_watch/alarm_rule.rb', line 32 def self.any_of(*operands) operands.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JQWxhcm1SdWxlIn0=")), "operands[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.AlarmRule", "anyOf", [*operands]) end |
.from_alarm(alarm, alarm_state) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to build Rule Expression for given IAlarm and AlarmState.
44 45 46 47 48 |
# File 'cloud_watch/alarm_rule.rb', line 44 def self.from_alarm(alarm, alarm_state) Jsii::Type.check_type(alarm, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jbG91ZHdhdGNoLklBbGFybVJlZiJ9")), "alarm") Jsii::Type.check_type(alarm_state, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5BbGFybVN0YXRlIn0=")), "alarmState") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.AlarmRule", "fromAlarm", [alarm, alarm_state]) end |
.from_boolean(value) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to build TRUE/FALSE intent for Rule Expression.
54 55 56 57 |
# File 'cloud_watch/alarm_rule.rb', line 54 def self.from_boolean(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.AlarmRule", "fromBoolean", [value]) end |
.from_string(alarm_rule) ⇒ AWSCDK::CloudWatch::IAlarmRule
function to build Rule Expression for given Alarm Rule string.
63 64 65 66 |
# File 'cloud_watch/alarm_rule.rb', line 63 def self.from_string(alarm_rule) Jsii::Type.check_type(alarm_rule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmRule") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.AlarmRule", "fromString", [alarm_rule]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 |
# File 'cloud_watch/alarm_rule.rb', line 12 def self.jsii_overridable_methods { } end |