Class SqsDestination
Use a SQS queue as a Lambda destination.
Inheritance
System.Object
SqsDestination
Implements
Namespace: Amazon.CDK.AWS.Lambda.Destinations
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SqsDestination : DeputyBase, IDestination
Syntax (vb)
Public Class SqsDestination
Inherits DeputyBase
Implements IDestination
Remarks
ExampleMetadata: infused
Examples
// An sqs queue for unsuccessful invocations of a lambda function
using Amazon.CDK.AWS.SQS;
var deadLetterQueue = new Queue(this, "DeadLetterQueue");
var myFn = new Function(this, "Fn", new FunctionProps {
Runtime = Runtime.NODEJS_LATEST,
Handler = "index.handler",
Code = Code.FromInline("// your code"),
// sqs queue for unsuccessful invocations
OnFailure = new SqsDestination(deadLetterQueue)
});
Synopsis
Constructors
SqsDestination(IQueue) | |
SqsDestination(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SqsDestination(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IFunction, IDestinationOptions) | Returns a destination configuration. |
Constructors
SqsDestination(IQueue)
SqsDestination(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SqsDestination(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SqsDestination(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SqsDestination(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IFunction, IDestinationOptions)
Returns a destination configuration.
public virtual IDestinationConfig Bind(Construct scope, IFunction fn, IDestinationOptions options = null)
Parameters
- scope Constructs.Construct
- fn IFunction
- options IDestinationOptions
Returns