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.101.0 (build b95fe5d)", date="2024-08-15T01:32:54.550Z") @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 = new Bucket(this, "MyBucket");
 bucket.addEventNotification(EventType.OBJECT_REMOVED, new SqsDestination(myQueue), NotificationKeyFilter.builder()
         .prefix("foo/")
         .suffix(".jpg")
         .build());
 
  • 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.