Class SnsDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.destinations.SnsDestination
- All Implemented Interfaces:
IDestination,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:08.601Z")
@Stability(Stable)
public class SnsDestination
extends software.amazon.jsii.JsiiObject
implements IDestination
Use a SNS topic as a Lambda destination.
Example:
// An sns topic for successful invocations of a lambda function
import software.amazon.awscdk.services.sns.*;
Topic myTopic = new Topic(this, "Topic");
Function myFn = Function.Builder.create(this, "Fn")
.runtime(Runtime.NODEJS_LATEST)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
// sns topic for successful invocations
.onSuccess(new SnsDestination(myTopic))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IDestination
IDestination.Jsii$Default, IDestination.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionSnsDestination(ITopic topic) protectedSnsDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedSnsDestination(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns 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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
SnsDestination
protected SnsDestination(software.amazon.jsii.JsiiObjectRef objRef) -
SnsDestination
protected SnsDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SnsDestination
- Parameters:
topic- 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:
bindin interfaceIDestination- 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:
bindin interfaceIDestination- Parameters:
_scope- This parameter is required.fn- This parameter is required.
-