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:
IResource
,IQueue
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:24.088Z")
@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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.sqs.IQueue
IQueue.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
Queue
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Queue
(software.amazon.jsii.JsiiObjectRef objRef) Queue
(software.constructs.Construct scope, String id, QueueProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IQueue
fromQueueArn
(software.constructs.Construct scope, String id, String queueArn) Import an existing SQS queue provided an ARN.static IQueue
fromQueueAttributes
(software.constructs.Construct scope, String id, QueueAttributes attrs) Import an existing queue.protected Boolean
Controls 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, metricSentMessageSize
Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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:
getAutoCreatePolicy
in 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:
getQueueArn
in interfaceIQueue
- Specified by:
getQueueArn
in classQueueBase
-
getQueueName
The name of this queue.- Specified by:
getQueueName
in interfaceIQueue
- Specified by:
getQueueName
in classQueueBase
-
getQueueUrl
The URL of this queue.- Specified by:
getQueueUrl
in interfaceIQueue
- Specified by:
getQueueUrl
in 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:
getEncryptionMasterKey
in interfaceIQueue
- Specified by:
getEncryptionMasterKey
in classQueueBase
-
getEncryptionType
Whether the contents of the queue are encrypted, and by what type of key.- Specified by:
getEncryptionType
in interfaceIQueue
- Specified by:
getEncryptionType
in classQueueBase
-