Class SqsDestination

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.s3.notifications.SqsDestination
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 SqsDestination extends software.amazon.jsii.JsiiObject implements IBucketNotificationDestination
Use an SQS queue as a bucket notification destination.

Example:

 Queue myQueue;
 Bucket bucket = Bucket.Builder.create(this, "MyBucket")
         .notificationsSkipDestinationValidation(true)
         .build();
 bucket.addEventNotification(EventType.OBJECT_REMOVED, new SqsDestination(myQueue));
 
  • 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 BucketNotificationDestinationConfig bind(@NotNull software.constructs.Construct _scope, @NotNull IBucket bucket)
      Allows using SQS queues as destinations for bucket notifications.

      Use bucket.onEvent(event, queue) to subscribe.

      Specified by:
      bind in interface IBucketNotificationDestination
      Parameters:
      _scope - This parameter is required.
      bucket - This parameter is required.