Class: AWSCDK::LambdaEventSources::S3EventSourceV2

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

Overview

S3EventSourceV2 Use S3 bucket notifications as an event source for AWS Lambda.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket, props) ⇒ S3EventSourceV2

Returns a new instance of S3EventSourceV2.



11
12
13
14
15
16
# File 'lambda_event_sources/s3_event_source_v2.rb', line 11

def initialize(bucket, props)
  props = props.is_a?(Hash) ? ::AWSCDK::LambdaEventSources::S3EventSourceProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhX2V2ZW50X3NvdXJjZXMuUzNFdmVudFNvdXJjZVByb3BzIn0=")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(bucket, props)
end

Class Method Details

.jsii_overridable_methodsObject



18
19
20
21
22
# File 'lambda_event_sources/s3_event_source_v2.rb', line 18

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", 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:



28
29
30
31
# File 'lambda_event_sources/s3_event_source_v2.rb', line 28

def bind(target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "target")
  jsii_call_method("bind", [target])
end