Class: AWSCDK::LambdaDestinations::LambdaDestinationOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda_destinations/lambda_destination_options.rb

Overview

Options for a Lambda destination.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_only: nil) ⇒ LambdaDestinationOptions

Returns a new instance of LambdaDestinationOptions.

Parameters:

  • response_only (Boolean, nil) (defaults to: nil)

    Whether the destination function receives only the responsePayload of the source function.



8
9
10
11
# File 'lambda_destinations/lambda_destination_options.rb', line 8

def initialize(response_only: nil)
  @response_only = response_only
  Jsii::Type.check_type(@response_only, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "responseOnly") unless @response_only.nil?
end

Instance Attribute Details

#response_onlyBoolean? (readonly)

Note:

Default: false The destination function receives the full invocation record.

Whether the destination function receives only the responsePayload of the source function.

When set to true and used as on_success destination, the destination function will be invoked with the payload returned by the source function.

When set to true and used as on_failure destination, the destination function will be invoked with the error object returned by source function.

See the README of this module to see a full explanation of this option.

Returns:

  • (Boolean, nil)


25
26
27
# File 'lambda_destinations/lambda_destination_options.rb', line 25

def response_only
  @response_only
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
# File 'lambda_destinations/lambda_destination_options.rb', line 27

def self.jsii_properties
  {
    :response_only => "responseOnly",
  }
end

Instance Method Details

#to_jsiiObject



33
34
35
36
37
38
39
# File 'lambda_destinations/lambda_destination_options.rb', line 33

def to_jsii
  result = {}
  result.merge!({
    "responseOnly" => @response_only,
  })
  result.compact
end