Class: AWSCDK::IoTEvents::CfnAlarmModelProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_alarm_model_props.rb

Overview

Properties for defining a CfnAlarmModel.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alarm_rule:, role_arn:, alarm_capabilities: nil, alarm_event_actions: nil, alarm_model_description: nil, alarm_model_name: nil, key: nil, severity: nil, tags: nil) ⇒ CfnAlarmModelProps

Returns a new instance of CfnAlarmModelProps.

Parameters:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'io_t_events/cfn_alarm_model_props.rb', line 18

def initialize(alarm_rule:, role_arn:, alarm_capabilities: nil, alarm_event_actions: nil, alarm_model_description: nil, alarm_model_name: nil, key: nil, severity: nil, tags: nil)
  @alarm_rule = alarm_rule.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::AlarmRuleProperty.new(**alarm_rule.transform_keys(&:to_sym)) : alarm_rule
  Jsii::Type.check_type(@alarm_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5BbGFybVJ1bGVQcm9wZXJ0eSJ9XX19")), "alarmRule")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @alarm_capabilities = alarm_capabilities.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::AlarmCapabilitiesProperty.new(**alarm_capabilities.transform_keys(&:to_sym)) : alarm_capabilities
  Jsii::Type.check_type(@alarm_capabilities, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5BbGFybUNhcGFiaWxpdGllc1Byb3BlcnR5In1dfX0=")), "alarmCapabilities") unless @alarm_capabilities.nil?
  @alarm_event_actions = alarm_event_actions.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnAlarmModel::AlarmEventActionsProperty.new(**alarm_event_actions.transform_keys(&:to_sym)) : alarm_event_actions
  Jsii::Type.check_type(@alarm_event_actions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuQWxhcm1Nb2RlbC5BbGFybUV2ZW50QWN0aW9uc1Byb3BlcnR5In1dfX0=")), "alarmEventActions") unless @alarm_event_actions.nil?
  @alarm_model_description = alarm_model_description
  Jsii::Type.check_type(@alarm_model_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmModelDescription") unless @alarm_model_description.nil?
  @alarm_model_name = alarm_model_name
  Jsii::Type.check_type(@alarm_model_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alarmModelName") unless @alarm_model_name.nil?
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") unless @key.nil?
  @severity = severity
  Jsii::Type.check_type(@severity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "severity") unless @severity.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#alarm_capabilitiesAWSCDK::IResolvable, ... (readonly)

Contains the configuration information of alarm state changes.



55
56
57
# File 'io_t_events/cfn_alarm_model_props.rb', line 55

def alarm_capabilities
  @alarm_capabilities
end

#alarm_event_actionsAWSCDK::IResolvable, ... (readonly)

Contains information about one or more alarm actions.



60
61
62
# File 'io_t_events/cfn_alarm_model_props.rb', line 60

def alarm_event_actions
  @alarm_event_actions
end

#alarm_model_descriptionString? (readonly)

The description of the alarm model.



65
66
67
# File 'io_t_events/cfn_alarm_model_props.rb', line 65

def alarm_model_description
  @alarm_model_description
end

#alarm_model_nameString? (readonly)

The name of the alarm model.



70
71
72
# File 'io_t_events/cfn_alarm_model_props.rb', line 70

def alarm_model_name
  @alarm_model_name
end

#alarm_ruleAWSCDK::IResolvable, AWSCDK::IoTEvents::CfnAlarmModel::AlarmRuleProperty (readonly)

Defines when your alarm is invoked.



43
44
45
# File 'io_t_events/cfn_alarm_model_props.rb', line 43

def alarm_rule
  @alarm_rule
end

#keyString? (readonly)

An input attribute used as a key to create an alarm.

AWS IoT Events routes inputs associated with this key to the alarm.



77
78
79
# File 'io_t_events/cfn_alarm_model_props.rb', line 77

def key
  @key
end

#role_arnString (readonly)

The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.

For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .



50
51
52
# File 'io_t_events/cfn_alarm_model_props.rb', line 50

def role_arn
  @role_arn
end

#severityNumeric? (readonly)

A non-negative integer that reflects the severity level of the alarm.



82
83
84
# File 'io_t_events/cfn_alarm_model_props.rb', line 82

def severity
  @severity
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of key-value pairs that contain metadata for the alarm model.

The tags help you manage the alarm model. For more information, see Tagging your AWS IoT Events resources in the AWS IoT Events Developer Guide .

You can create up to 50 tags for one alarm model.



91
92
93
# File 'io_t_events/cfn_alarm_model_props.rb', line 91

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'io_t_events/cfn_alarm_model_props.rb', line 93

def self.jsii_properties
  {
    :alarm_rule => "alarmRule",
    :role_arn => "roleArn",
    :alarm_capabilities => "alarmCapabilities",
    :alarm_event_actions => "alarmEventActions",
    :alarm_model_description => "alarmModelDescription",
    :alarm_model_name => "alarmModelName",
    :key => "key",
    :severity => "severity",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'io_t_events/cfn_alarm_model_props.rb', line 107

def to_jsii
  result = {}
  result.merge!({
    "alarmRule" => @alarm_rule,
    "roleArn" => @role_arn,
    "alarmCapabilities" => @alarm_capabilities,
    "alarmEventActions" => @alarm_event_actions,
    "alarmModelDescription" => @alarm_model_description,
    "alarmModelName" => @alarm_model_name,
    "key" => @key,
    "severity" => @severity,
    "tags" => @tags,
  })
  result.compact
end