Sha256: 7abec2d06fc667c293ac416492d94c4c0ebbe4022d818d1303fb0995ed995181

Contents?: true

Size: 852 Bytes

Versions: 113

Compression:

Stored size: 852 Bytes

Contents

# CloudFormation AWS::IoT::TopicRule docs: https://amzn.to/2SMBOVm
module Jets::Resource::Iot
  class TopicRule < Jets::Resource::Base
    def initialize(props={})
      @props = props # associated_properties from dsl.rb
    end

    def definition
      {
        topic_logical_id => {
          type: "AWS::IoT::TopicRule",
          properties: merged_properties,
        }
      }
    end

    # Do not name this method properties, that is a computed method of `Jets::Resource::Base`
    def merged_properties
      {
        # required properties
        topic_rule_payload: {
          actions: [{
            lambda: { function_arn: "!GetAtt {namespace}LambdaFunction.Arn" }
          }],
          rule_disabled: 'true',
        }
      }.deep_merge(@props)
    end

    def topic_logical_id
      "{namespace}_iot_topic_rule"
    end
  end
end

Version data entries

113 entries across 113 versions & 3 rubygems

Version Path
jets-4.0.12 lib/jets/resource/iot/topic_rule.rb
jets-4.0.11 lib/jets/resource/iot/topic_rule.rb
jets-4.0.10 lib/jets/resource/iot/topic_rule.rb
jets-4.0.9 lib/jets/resource/iot/topic_rule.rb
jets-4.0.8 lib/jets/resource/iot/topic_rule.rb
jets-4.0.7 lib/jets/resource/iot/topic_rule.rb
jets-4.0.6 lib/jets/resource/iot/topic_rule.rb
jets-4.0.5 lib/jets/resource/iot/topic_rule.rb
jets-4.0.4 lib/jets/resource/iot/topic_rule.rb
jets-4.0.3 lib/jets/resource/iot/topic_rule.rb
jets-4.0.2 lib/jets/resource/iot/topic_rule.rb
jets-4.0.1 lib/jets/resource/iot/topic_rule.rb
jets-4.0.0 lib/jets/resource/iot/topic_rule.rb
jets-3.2.2 lib/jets/resource/iot/topic_rule.rb
jets-3.2.1 lib/jets/resource/iot/topic_rule.rb
jets.benforeva-3.0.17.pre.mount.pre.fix lib/jets/resource/iot/topic_rule.rb
jets-3.2.0 lib/jets/resource/iot/topic_rule.rb
jets-3.1.5 lib/jets/resource/iot/topic_rule.rb
jets-3.1.4 lib/jets/resource/iot/topic_rule.rb
jets-3.1.3 lib/jets/resource/iot/topic_rule.rb