@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.274Z") @Stability(value=Stable) public class Queue extends QueueBase
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
Queue.Builder
A fluent builder for
Queue. |
software.amazon.jsii.JsiiObject.InitializationModeIQueue.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
Queue(software.constructs.Construct scope,
String id) |
|
Queue(software.constructs.Construct scope,
String id,
QueueProps props) |
protected |
Queue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Queue(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static 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 |
getAutoCreatePolicy()
Controls automatic creation of policy objects.
|
DeadLetterQueue |
getDeadLetterQueue()
If this queue is configured with a dead-letter queue, this is the dead-letter queue settings.
|
IKey |
getEncryptionMasterKey()
If this queue is encrypted, this is the KMS key.
|
Boolean |
getFifo()
Whether this queue is an Amazon SQS FIFO queue.
|
String |
getQueueArn()
The ARN of this queue.
|
String |
getQueueName()
The name of this queue.
|
String |
getQueueUrl()
The URL of this queue.
|
addToResourcePolicy, grant, grantConsumeMessages, grantPurge, grantSendMessages, metric, metric, metricApproximateAgeOfOldestMessage, metricApproximateAgeOfOldestMessage, metricApproximateNumberOfMessagesDelayed, metricApproximateNumberOfMessagesDelayed, metricApproximateNumberOfMessagesNotVisible, metricApproximateNumberOfMessagesNotVisible, metricApproximateNumberOfMessagesVisible, metricApproximateNumberOfMessagesVisible, metricNumberOfEmptyReceives, metricNumberOfEmptyReceives, metricNumberOfMessagesDeleted, metricNumberOfMessagesDeleted, metricNumberOfMessagesReceived, metricNumberOfMessagesReceived, metricNumberOfMessagesSent, metricNumberOfMessagesSent, metricSentMessageSize, metricSentMessageSizeapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected Queue(software.amazon.jsii.JsiiObjectRef objRef)
protected Queue(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Queue(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
QueueProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public Queue(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static IQueue fromQueueArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String queueArn)
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.@Stability(value=Stable) @NotNull public static IQueue fromQueueAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull QueueAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull protected Boolean getAutoCreatePolicy()
Set by subclasses.
getAutoCreatePolicy in class QueueBase@Stability(value=Stable) @NotNull public Boolean getFifo()
If false, this is a standard queue.
@Stability(value=Stable) @NotNull public String getQueueArn()
getQueueArn in interface IQueuegetQueueArn in class QueueBase@Stability(value=Stable) @NotNull public String getQueueName()
getQueueName in interface IQueuegetQueueName in class QueueBase@Stability(value=Stable) @NotNull public String getQueueUrl()
getQueueUrl in interface IQueuegetQueueUrl in class QueueBase@Stability(value=Stable) @Nullable public DeadLetterQueue getDeadLetterQueue()
@Stability(value=Stable) @Nullable public IKey getEncryptionMasterKey()
getEncryptionMasterKey in interface IQueuegetEncryptionMasterKey in class QueueBaseCopyright © 2022. All rights reserved.