Sha256: ec72d9a734c98b454fd97404f0cc18f68f55643ccd33de88dbed7b4a879f6e19

Contents?: true

Size: 937 Bytes

Versions: 133

Compression:

Stored size: 937 Bytes

Contents

# CloudFormation Log Subscription docs: https://amzn.to/2SNiSpr
module Jets::Resource::Logs
  class SubscriptionFilter < Jets::Resource::Base
    def initialize(props={})
      @props = props # associated_properties from dsl.rb
    end

    def definition
      {
        log_logical_id => {
          type: "AWS::Logs::SubscriptionFilter",
          properties: merged_properties,
        }
      }
    end

    # Do not name this method properties, that is a computed method of `Jets::Resource::Base`
    def merged_properties
      {
        destination_arn: "!GetAtt {namespace}LambdaFunction.Arn",
        filter_pattern: "", # matches everything https://amzn.to/2N3b39I
        # log_group_name: string # will be set by log_event
        # role_arn: string # only required for kinensis, we dont use this for Lambda
      }.deep_merge(@props)
    end

    def log_logical_id
      "{namespace}_subscription_filter"
    end
  end
end

Version data entries

133 entries across 133 versions & 3 rubygems

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