Class: AWSCDK::LambdaEventSources::StreamEventSource

Inherits:
Jsii::Object
  • Object
show all
Includes:
AWSCDK::Lambda::IEventSource
Defined in:
lambda_event_sources/stream_event_source.rb

Overview

Use an stream as an event source for AWS Lambda.

Class Method Summary collapse

Instance Method Summary collapse

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_methodsObject



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.

Parameters:



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 enrich_mapping_options(options)
  options = options.is_a?(Hash) ? ::AWSCDK::Lambda::EventSourceMappingOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkV2ZW50U291cmNlTWFwcGluZ09wdGlvbnMifQ==")), "options")
  jsii_call_method("enrichMappingOptions", [options])
end

#propsAWSCDK::LambdaEventSources::StreamEventSourceProps



25
26
27
# File 'lambda_event_sources/stream_event_source.rb', line 25

def props()
  jsii_get_property("props")
end