Class SnsDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.s3.notifications.SnsDestination
- All Implemented Interfaces:
IBucketNotificationDestination
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:08.959Z")
@Stability(Stable)
public class SnsDestination
extends software.amazon.jsii.JsiiObject
implements IBucketNotificationDestination
Use an SNS topic as a bucket notification destination.
Example:
Bucket bucket = new Bucket(this, "MyBucket"); Topic topic = new Topic(this, "MyTopic"); bucket.addEventNotification(EventType.OBJECT_CREATED, new SnsDestination(topic));
-
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.s3.IBucketNotificationDestination
IBucketNotificationDestination.Jsii$Default, IBucketNotificationDestination.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionSnsDestination
(ITopic topic) protected
SnsDestination
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
SnsDestination
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionRegisters this resource to receive notifications for the specified bucket.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
-
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 BucketNotificationDestinationConfig bind(@NotNull software.constructs.Construct _scope, @NotNull IBucket bucket) Registers this resource to receive notifications for the specified bucket.This method will only be called once for each destination/bucket pair and the result will be cached, so there is no need to implement idempotency in each destination.
- Specified by:
bind
in interfaceIBucketNotificationDestination
- Parameters:
_scope
- This parameter is required.bucket
- This parameter is required.
-