Class: AWSCDK::SESActions::LambdaProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ses_actions/lambda_props.rb

Overview

Construction properties for a Lambda action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function:, invocation_type: nil, topic: nil) ⇒ LambdaProps

Returns a new instance of LambdaProps.

Parameters:



10
11
12
13
14
15
16
17
# File 'ses_actions/lambda_props.rb', line 10

def initialize(function:, invocation_type: nil, topic: nil)
  @function = function
  Jsii::Type.check_type(@function, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "function")
  @invocation_type = invocation_type
  Jsii::Type.check_type(@invocation_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VzX2FjdGlvbnMuTGFtYmRhSW52b2NhdGlvblR5cGUifQ==")), "invocationType") unless @invocation_type.nil?
  @topic = topic
  Jsii::Type.check_type(@topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "topic") unless @topic.nil?
end

Instance Attribute Details

#functionAWSCDK::Lambda::IFunction (readonly)

The Lambda function to invoke.



22
23
24
# File 'ses_actions/lambda_props.rb', line 22

def function
  @function
end

#invocation_typeAWSCDK::SESActions::LambdaInvocationType? (readonly)

Note:

Default: Event

The invocation type of the Lambda function.



27
28
29
# File 'ses_actions/lambda_props.rb', line 27

def invocation_type
  @invocation_type
end

#topicAWSCDK::SNS::ITopic? (readonly)

Note:

Default: no notification

The SNS topic to notify when the Lambda action is taken.

Returns:



32
33
34
# File 'ses_actions/lambda_props.rb', line 32

def topic
  @topic
end

Class Method Details

.jsii_propertiesObject



34
35
36
37
38
39
40
# File 'ses_actions/lambda_props.rb', line 34

def self.jsii_properties
  {
    :function => "function",
    :invocation_type => "invocationType",
    :topic => "topic",
  }
end

Instance Method Details

#to_jsiiObject



42
43
44
45
46
47
48
49
50
# File 'ses_actions/lambda_props.rb', line 42

def to_jsii
  result = {}
  result.merge!({
    "function" => @function,
    "invocationType" => @invocation_type,
    "topic" => @topic,
  })
  result.compact
end