Class Queue
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.sqs.QueueBase
software.amazon.awscdk.services.sqs.Queue
- All Implemented Interfaces:
IEnvironmentAware,IResource,IQueue,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:14.704Z")
@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());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.sqs.IQueue
IQueue.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQueue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedQueue(software.amazon.jsii.JsiiObjectRef objRef) Queue(software.constructs.Construct scope, String id, QueueProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IQueuefromQueueArn(software.constructs.Construct scope, String id, String queueArn) Import an existing SQS queue provided an ARN.static IQueuefromQueueAttributes(software.constructs.Construct scope, String id, QueueAttributes attrs) Import an existing queue.protected BooleanControls automatic creation of policy objects.If this queue is configured with a dead-letter queue, this is the dead-letter queue settings.If this queue is encrypted, this is the KMS key.Whether the contents of the queue are encrypted, and by what type of key.getFifo()Whether this queue is an Amazon SQS FIFO queue.The ARN of this queue.The name of this queue.The URL of this queue.Methods inherited from class software.amazon.awscdk.services.sqs.QueueBase
addToResourcePolicy, grant, grantConsumeMessages, grantPurge, grantSendMessages, metric, metric, metricApproximateAgeOfOldestMessage, metricApproximateAgeOfOldestMessage, metricApproximateNumberOfMessagesDelayed, metricApproximateNumberOfMessagesDelayed, metricApproximateNumberOfMessagesNotVisible, metricApproximateNumberOfMessagesNotVisible, metricApproximateNumberOfMessagesVisible, metricApproximateNumberOfMessagesVisible, metricNumberOfEmptyReceives, metricNumberOfEmptyReceives, metricNumberOfMessagesDeleted, metricNumberOfMessagesDeleted, metricNumberOfMessagesReceived, metricNumberOfMessagesReceived, metricNumberOfMessagesSent, metricNumberOfMessagesSent, metricSentMessageSize, metricSentMessageSizeMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
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
- 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
Controls automatic creation of policy objects.Set by subclasses.
- Specified by:
getAutoCreatePolicyin classQueueBase
-
getFifo
Whether this queue is an Amazon SQS FIFO queue.If false, this is a standard queue.
-
getQueueArn
The ARN of this queue.- Specified by:
getQueueArnin interfaceIQueue- Specified by:
getQueueArnin classQueueBase
-
getQueueName
The name of this queue.- Specified by:
getQueueNamein interfaceIQueue- Specified by:
getQueueNamein classQueueBase
-
getQueueUrl
The URL of this queue.- Specified by:
getQueueUrlin interfaceIQueue- Specified by:
getQueueUrlin classQueueBase
-
getDeadLetterQueue
If this queue is configured with a dead-letter queue, this is the dead-letter queue settings. -
getEncryptionMasterKey
If this queue is encrypted, this is the KMS key.- Specified by:
getEncryptionMasterKeyin interfaceIQueue- Specified by:
getEncryptionMasterKeyin classQueueBase
-
getEncryptionType
Whether the contents of the queue are encrypted, and by what type of key.- Specified by:
getEncryptionTypein interfaceIQueue- Specified by:
getEncryptionTypein classQueueBase
-