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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
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.core.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.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, validate
Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize
Methods inherited from class software.constructs.Construct
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.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.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
-