Class Queue
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.sqs.QueueBase
software.amazon.awscdk.services.sqs.Queue
- All Implemented Interfaces:
IConstruct,IDependable,IResource,IQueue,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:38.040Z")
@Stability(Stable)
public class Queue
extends QueueBase
A new Amazon SQS queue.
Example:
// An sqs queue for unsuccessful invocations of a lambda function
import software.amazon.awscdk.services.sqs.*;
Queue deadLetterQueue = new Queue(this, "DeadLetterQueue");
Function myFn = Function.Builder.create(this, "Fn")
.runtime(Runtime.NODEJS_14_X)
.handler("index.handler")
.code(Code.fromInline("// your code"))
// sqs queue for unsuccessful invocations
.onFailure(new SqsDestination(deadLetterQueue))
.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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested 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.core.IResource
IResource.Jsii$Default -
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.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, validateMethods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesizeMethods inherited from class software.constructs.Construct
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.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods 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:
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
-