Class: AWSCDK::LambdaEventSources::StreamEventSource
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::LambdaEventSources::StreamEventSource
- Includes:
- AWSCDK::Lambda::IEventSource
- Defined in:
- lambda_event_sources/stream_event_source.rb
Overview
Use an stream as an event source for AWS Lambda.
Direct Known Subclasses
DynamoEventSource, KinesisConsumerEventSource, KinesisEventSource, ManagedKafkaEventSource, SelfManagedKafkaEventSource
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
-
#initialize(props) ⇒ StreamEventSource
constructor
A new instance of StreamEventSource.
- #props ⇒ AWSCDK::LambdaEventSources::StreamEventSourceProps
Constructor Details
#initialize(props) ⇒ StreamEventSource
Returns a new instance of StreamEventSource.
10 11 12 13 14 |
# File 'lambda_event_sources/stream_event_source.rb', line 10 def initialize(props) props = props.is_a?(Hash) ? ::AWSCDK::LambdaEventSources::StreamEventSourceProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhX2V2ZW50X3NvdXJjZXMuU3RyZWFtRXZlbnRTb3VyY2VQcm9wcyJ9")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
16 17 18 19 20 21 22 |
# File 'lambda_event_sources/stream_event_source.rb', line 16 def self.jsii_overridable_methods { :props => { kind: :property, name: "props", 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.
33 34 35 36 |
# File 'lambda_event_sources/stream_event_source.rb', line 33 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
40 41 42 43 44 |
# File 'lambda_event_sources/stream_event_source.rb', line 40 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 |
#props ⇒ AWSCDK::LambdaEventSources::StreamEventSourceProps
25 26 27 |
# File 'lambda_event_sources/stream_event_source.rb', line 25 def props() jsii_get_property("props") end |