Interface ILambdaDestinationOptions
Options for a Lambda destination.
Namespace: Amazon.CDK.AWS.Lambda.Destinations
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILambdaDestinationOptions
Syntax (vb)
Public Interface ILambdaDestinationOptions
Remarks
ExampleMetadata: infused
Examples
// Auto-extract response payload with a lambda destination
Function destinationFn;
var sourceFn = new Function(this, "Source", new FunctionProps {
Runtime = Runtime.NODEJS_LATEST,
Handler = "index.handler",
Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
// auto-extract on success
OnSuccess = new LambdaDestination(destinationFn, new LambdaDestinationOptions {
ResponseOnly = true
})
});
Synopsis
Properties
Response |
Whether the destination function receives only the |
Properties
ResponseOnly
Whether the destination function receives only the responsePayload
of the source function.
virtual Nullable<bool> ResponseOnly { get; }
Property Value
System.
Remarks
When set to true
and used as onSuccess
destination, the destination
function will be invoked with the payload returned by the source function.
When set to true
and used as onFailure
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.
Default: false The destination function receives the full invocation record.