java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IResource, IQueue, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-15T10:25:07.710Z") @Stability(Stable) public class Queue extends QueueBase
A new Amazon SQS queue.

Example:

 import software.amazon.awscdk.services.redshiftserverless.*;
 CfnWorkgroup workgroup;
 Rule rule = Rule.Builder.create(this, "Rule")
         .schedule(Schedule.rate(Duration.hours(1)))
         .build();
 Queue dlq = new Queue(this, "DeadLetterQueue");
 rule.addTarget(RedshiftQuery.Builder.create(workgroup.getAttrWorkgroupWorkgroupArn())
         .database("dev")
         .deadLetterQueue(dlq)
         .sql(List.of("SELECT * FROM foo", "SELECT * FROM baz"))
         .build());
 
  • Constructor Details

    • Queue

      protected Queue(software.amazon.jsii.JsiiObjectRef objRef)
    • Queue

      protected Queue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Queue

      @Stability(Stable) public Queue(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable QueueProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • Queue

      @Stability(Stable) public Queue(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromQueueArn

      @Stability(Stable) @NotNull public static IQueue fromQueueArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String queueArn)
      Import an existing SQS queue provided an ARN.

      Parameters:
      scope - The parent creating construct. This parameter is required.
      id - The construct's name. This parameter is required.
      queueArn - queue ARN (i.e. arn:aws:sqs:us-east-2:444455556666:queue1). This parameter is required.
    • fromQueueAttributes

      @Stability(Stable) @NotNull public static IQueue fromQueueAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull QueueAttributes attrs)
      Import an existing queue.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • getAutoCreatePolicy

      @Stability(Stable) @NotNull protected Boolean getAutoCreatePolicy()
      Controls automatic creation of policy objects.

      Set by subclasses.

      Specified by:
      getAutoCreatePolicy in class QueueBase
    • getFifo

      @Stability(Stable) @NotNull public Boolean getFifo()
      Whether this queue is an Amazon SQS FIFO queue.

      If false, this is a standard queue.

      Specified by:
      getFifo in interface IQueue
      Specified by:
      getFifo in class QueueBase
    • getQueueArn

      @Stability(Stable) @NotNull public String getQueueArn()
      The ARN of this queue.
      Specified by:
      getQueueArn in interface IQueue
      Specified by:
      getQueueArn in class QueueBase
    • getQueueName

      @Stability(Stable) @NotNull public String getQueueName()
      The name of this queue.
      Specified by:
      getQueueName in interface IQueue
      Specified by:
      getQueueName in class QueueBase
    • getQueueUrl

      @Stability(Stable) @NotNull public String getQueueUrl()
      The URL of this queue.
      Specified by:
      getQueueUrl in interface IQueue
      Specified by:
      getQueueUrl in class QueueBase
    • getDeadLetterQueue

      @Stability(Stable) @Nullable public DeadLetterQueue getDeadLetterQueue()
      If this queue is configured with a dead-letter queue, this is the dead-letter queue settings.
    • getEncryptionMasterKey

      @Stability(Stable) @Nullable public IKey getEncryptionMasterKey()
      If this queue is encrypted, this is the KMS key.
      Specified by:
      getEncryptionMasterKey in interface IQueue
      Specified by:
      getEncryptionMasterKey in class QueueBase
    • getEncryptionType

      @Stability(Stable) @Nullable public QueueEncryption getEncryptionType()
      Whether the contents of the queue are encrypted, and by what type of key.
      Specified by:
      getEncryptionType in interface IQueue
      Specified by:
      getEncryptionType in class QueueBase