Class: Jets::Resource::Iot::TopicRule
- Defined in:
- lib/jets/resource/iot/topic_rule.rb
Instance Method Summary collapse
- #definition ⇒ Object
-
#initialize(props = {}) ⇒ TopicRule
constructor
A new instance of TopicRule.
-
#merged_properties ⇒ Object
Do not name this method properties, that is a computed method of ‘Jets::Resource::Base`.
- #topic_logical_id ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(props = {}) ⇒ TopicRule
Returns a new instance of TopicRule.
4 5 6 |
# File 'lib/jets/resource/iot/topic_rule.rb', line 4 def initialize(props={}) @props = props # associated_properties from dsl.rb end |
Instance Method Details
#definition ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/jets/resource/iot/topic_rule.rb', line 8 def definition { topic_logical_id => { type: "AWS::IoT::TopicRule", properties: merged_properties, } } end |
#merged_properties ⇒ Object
Do not name this method properties, that is a computed method of ‘Jets::Resource::Base`
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jets/resource/iot/topic_rule.rb', line 18 def merged_properties { # required properties topic_rule_payload: { actions: [{ lambda: { function_arn: "!GetAtt {namespace}LambdaFunction.Arn" } }], rule_disabled: 'true', } }.deep_merge(@props) end |
#topic_logical_id ⇒ Object
30 31 32 |
# File 'lib/jets/resource/iot/topic_rule.rb', line 30 def topic_logical_id "{namespace}_iot_topic_rule" end |