Class: Jets::Resource::Lambda::EventSourceMapping
- Defined in:
- lib/jets/resource/lambda/event_source_mapping.rb
Instance Method Summary collapse
- #definition ⇒ Object
- #event_source_mapping_logical_id ⇒ Object
-
#initialize(props = {}) ⇒ EventSourceMapping
constructor
A new instance of EventSourceMapping.
Methods inherited from Base
Constructor Details
#initialize(props = {}) ⇒ EventSourceMapping
Returns a new instance of EventSourceMapping.
4 5 6 |
# File 'lib/jets/resource/lambda/event_source_mapping.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 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/jets/resource/lambda/event_source_mapping.rb', line 8 def definition # CloudFormation Docs: https://amzn.to/2WM6165 properties = { # batch_size: 10, # Defaults: Kinesis 100, DynamoDB Streams: 100, SQS: 10 # enabled: boolean, # event_source_arn: string, # required function_name: "!Ref {namespace}LambdaFunction", # starting_position: string # reqiured for Required for Amazon Kinesis and Amazon DynamoDB Streams sources } properties.merge!(@props) { event_source_mapping_logical_id => { type: "AWS::Lambda::EventSourceMapping", properties: properties } } end |
#event_source_mapping_logical_id ⇒ Object
27 28 29 |
# File 'lib/jets/resource/lambda/event_source_mapping.rb', line 27 def event_source_mapping_logical_id "{namespace}EventSourceMapping" end |