Class: AWSCDK::LambdaDestinations::LambdaDestinationOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::LambdaDestinations::LambdaDestinationOptions
- Defined in:
- lambda_destinations/lambda_destination_options.rb
Overview
Options for a Lambda destination.
Instance Attribute Summary collapse
-
#response_only ⇒ Boolean?
readonly
Whether the destination function receives only the
responsePayloadof the source function.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(response_only: nil) ⇒ LambdaDestinationOptions
constructor
A new instance of LambdaDestinationOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(response_only: nil) ⇒ LambdaDestinationOptions
Returns a new instance of LambdaDestinationOptions.
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_only ⇒ Boolean? (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.
25 26 27 |
# File 'lambda_destinations/lambda_destination_options.rb', line 25 def response_only @response_only end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |