Class: AWSCDK::LambdaEventSources::DynamoEventSource
- Inherits:
-
StreamEventSource
- Object
- StreamEventSource
- AWSCDK::LambdaEventSources::DynamoEventSource
- Defined in:
- lambda_event_sources/dynamo_event_source.rb
Overview
Use an Amazon DynamoDB stream as an event source for AWS Lambda.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(target) ⇒ void
Called by
lambda.addEventSourceto allow the event source to bind to this function. - #enrich_mapping_options(options) ⇒ AWSCDK::Lambda::EventSourceMappingOptions
-
#event_source_mapping_arn ⇒ String
The ARN for this EventSourceMapping.
-
#event_source_mapping_id ⇒ String
The identifier for this EventSourceMapping.
-
#initialize(table, props) ⇒ DynamoEventSource
constructor
A new instance of DynamoEventSource.
- #props ⇒ AWSCDK::LambdaEventSources::StreamEventSourceProps
Constructor Details
#initialize(table, props) ⇒ DynamoEventSource
Returns a new instance of DynamoEventSource.
10 11 12 13 14 15 |
# File 'lambda_event_sources/dynamo_event_source.rb', line 10 def initialize(table, props) props = props.is_a?(Hash) ? ::AWSCDK::LambdaEventSources::DynamoEventSourceProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(table, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuSVRhYmxlIn0=")), "table") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhX2V2ZW50X3NvdXJjZXMuRHluYW1vRXZlbnRTb3VyY2VQcm9wcyJ9")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(table, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lambda_event_sources/dynamo_event_source.rb', line 17 def self.jsii_overridable_methods { :props => { kind: :property, name: "props", is_optional: false }, :event_source_mapping_arn => { kind: :property, name: "eventSourceMappingArn", is_optional: false }, :event_source_mapping_id => { kind: :property, name: "eventSourceMappingId", is_optional: false }, :bind => { kind: :method, name: "bind", is_optional: false }, :enrich_mapping_options => { kind: :method, name: "enrichMappingOptions", is_optional: false }, } end |
Instance Method Details
#bind(target) ⇒ void
This method returns an undefined value.
Called by lambda.addEventSource to allow the event source to bind to this function.
50 51 52 53 |
# File 'lambda_event_sources/dynamo_event_source.rb', line 50 def bind(target) Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "target") jsii_call_method("bind", [target]) end |
#enrich_mapping_options(options) ⇒ AWSCDK::Lambda::EventSourceMappingOptions
57 58 59 60 61 |
# File 'lambda_event_sources/dynamo_event_source.rb', line 57 def () = .is_a?(Hash) ? ::AWSCDK::Lambda::EventSourceMappingOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkV2ZW50U291cmNlTWFwcGluZ09wdGlvbnMifQ==")), "options") jsii_call_method("enrichMappingOptions", []) end |
#event_source_mapping_arn ⇒ String
The ARN for this EventSourceMapping.
35 36 37 |
# File 'lambda_event_sources/dynamo_event_source.rb', line 35 def event_source_mapping_arn() jsii_get_property("eventSourceMappingArn") end |
#event_source_mapping_id ⇒ String
The identifier for this EventSourceMapping.
42 43 44 |
# File 'lambda_event_sources/dynamo_event_source.rb', line 42 def event_source_mapping_id() jsii_get_property("eventSourceMappingId") end |
#props ⇒ AWSCDK::LambdaEventSources::StreamEventSourceProps
28 29 30 |
# File 'lambda_event_sources/dynamo_event_source.rb', line 28 def props() jsii_get_property("props") end |