java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.destinations.SqsDestination
All Implemented Interfaces:
IDestination, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:03.993Z") @Stability(Stable) public class SqsDestination extends software.amazon.jsii.JsiiObject implements IDestination
Use a SQS queue as a Lambda destination.

Example:

 // An sqs queue for unsuccessful invocations of a lambda function
 import software.amazon.awscdk.services.sqs.*;
 Queue deadLetterQueue = new Queue(this, "DeadLetterQueue");
 Function myFn = Function.Builder.create(this, "Fn")
         .runtime(Runtime.NODEJS_LATEST)
         .handler("index.handler")
         .code(Code.fromInline("// your code"))
         // sqs queue for unsuccessful invocations
         .onFailure(new SqsDestination(deadLetterQueue))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IDestination

    IDestination.Jsii$Default, IDestination.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    SqsDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    SqsDestination(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(software.constructs.Construct _scope, IFunction fn)
    Returns a destination configuration.
    bind(software.constructs.Construct _scope, IFunction fn, DestinationOptions _options)
    Returns a destination configuration.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • SqsDestination

      protected SqsDestination(software.amazon.jsii.JsiiObjectRef objRef)
    • SqsDestination

      protected SqsDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • SqsDestination

      @Stability(Stable) public SqsDestination(@NotNull IQueue queue)
      Parameters:
      queue - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public DestinationConfig bind(@NotNull software.constructs.Construct _scope, @NotNull IFunction fn, @Nullable DestinationOptions _options)
      Returns a destination configuration.

      Specified by:
      bind in interface IDestination
      Parameters:
      _scope - This parameter is required.
      fn - This parameter is required.
      _options -
    • bind

      @Stability(Stable) @NotNull public DestinationConfig bind(@NotNull software.constructs.Construct _scope, @NotNull IFunction fn)
      Returns a destination configuration.

      Specified by:
      bind in interface IDestination
      Parameters:
      _scope - This parameter is required.
      fn - This parameter is required.