Class SnsDestination

All Implemented Interfaces:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.193Z") @Stability(Stable) public class SnsDestination extends implements IBucketNotificationDestination
Use an SNS topic as a bucket notification destination.


 Bucket bucket = new Bucket(this, "MyBucket");
 Topic topic = new Topic(this, "MyTopic");
 bucket.addEventNotification(EventType.OBJECT_CREATED, new SnsDestination(topic));
  • Constructor Details

    • SnsDestination

      protected SnsDestination( objRef)
    • SnsDestination

      protected SnsDestination( initializationMode)
    • SnsDestination

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

    • bind

      @Stability(Stable) @NotNull public BucketNotificationDestinationConfig bind(@NotNull 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 interface IBucketNotificationDestination
      _scope - This parameter is required.
      bucket - This parameter is required.