Class: AWSCDK::KinesisFirehose::LambdaFunctionProcessor

Inherits:
Jsii::Object
  • Object
show all
Includes:
IDataProcessor
Defined in:
kinesis_firehose/lambda_function_processor.rb

Overview

Use an AWS Lambda function to transform records.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lambda_function, props = nil) ⇒ LambdaFunctionProcessor

Returns a new instance of LambdaFunctionProcessor.

Parameters:



11
12
13
14
15
16
# File 'kinesis_firehose/lambda_function_processor.rb', line 11

def initialize(lambda_function, props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::KinesisFirehose::DataProcessorProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(lambda_function, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "lambdaFunction")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2ZpcmVob3NlLkRhdGFQcm9jZXNzb3JQcm9wcyJ9")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(lambda_function, props)
end

Class Method Details

.jsii_overridable_methodsObject



18
19
20
21
22
23
# File 'kinesis_firehose/lambda_function_processor.rb', line 18

def self.jsii_overridable_methods
  {
    :props => { kind: :property, name: "props", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(_scope, options) ⇒ AWSCDK::KinesisFirehose::DataProcessorConfig

Binds this processor to a destination of a delivery stream.

Implementers should use this method to grant processor invocation permissions to the provided stream and return the necessary configuration to register as a processor.

Parameters:

Returns:



40
41
42
43
44
45
# File 'kinesis_firehose/lambda_function_processor.rb', line 40

def bind(_scope, options)
  Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope")
  options = options.is_a?(Hash) ? ::AWSCDK::KinesisFirehose::DataProcessorBindOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2ZpcmVob3NlLkRhdGFQcm9jZXNzb3JCaW5kT3B0aW9ucyJ9")), "options")
  jsii_call_method("bind", [_scope, options])
end

#propsAWSCDK::KinesisFirehose::DataProcessorProps

The constructor props of the LambdaFunctionProcessor.



28
29
30
# File 'kinesis_firehose/lambda_function_processor.rb', line 28

def props()
  jsii_get_property("props")
end