Class: Jets::Cfn::Resource::Iot::TopicRule
- Defined in:
- lib/jets/cfn/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::Cfn::Resource`.
- #topic_logical_id ⇒ Object
Methods inherited from Base
#attributes, #logical_id, #outputs, #parameters, #permission, #properties, #replacements, #replacer, #standarize, #template, truncate_id, #type
Methods included from Util::Camelize
Constructor Details
#initialize(props = {}) ⇒ TopicRule
Returns a new instance of TopicRule.
4 5 6 |
# File 'lib/jets/cfn/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/cfn/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::Cfn::Resource`
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jets/cfn/resource/iot/topic_rule.rb', line 18 def merged_properties { # required properties TopicRulePayload: { Actions: [{ Lambda: { FunctionArn: "!GetAtt {namespace}LambdaFunction.Arn" } }], RuleDisabled: 'false', } }.deep_merge(@props) end |
#topic_logical_id ⇒ Object
30 31 32 |
# File 'lib/jets/cfn/resource/iot/topic_rule.rb', line 30 def topic_logical_id "{namespace}IotTopicRule" end |