java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.eventsources.SnsEventSource
All Implemented Interfaces:
IEventSource, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:17.774Z") @Stability(Stable) public class SnsEventSource extends software.amazon.jsii.JsiiObject implements IEventSource
Use an Amazon SNS topic as an event source for AWS Lambda.

Example:

 import software.amazon.awscdk.services.sns.*;
 import software.amazon.awscdk.services.lambda.eventsources.SnsEventSource;
 Topic topic;
 Function fn;
 Queue deadLetterQueue = new Queue(this, "deadLetterQueue");
 fn.addEventSource(SnsEventSource.Builder.create(topic)
         .filterPolicy(Map.of())
         .deadLetterQueue(deadLetterQueue)
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for SnsEventSource.

    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.IEventSource

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

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

    Modifier and Type
    Method
    Description
    void
    bind(IFunction target)
    Called by lambda.addEventSource to allow the event source to bind to this function.
     

    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

    • SnsEventSource

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

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

      @Stability(Stable) public SnsEventSource(@NotNull ITopic topic, @Nullable SnsEventSourceProps props)
      Parameters:
      topic - This parameter is required.
      props -
    • SnsEventSource

      @Stability(Stable) public SnsEventSource(@NotNull ITopic topic)
      Parameters:
      topic - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) public void bind(@NotNull IFunction target)
      Called by lambda.addEventSource to allow the event source to bind to this function.

      Specified by:
      bind in interface IEventSource
      Parameters:
      target - This parameter is required.
    • getTopic

      @Stability(Stable) @NotNull public ITopic getTopic()