Interface IQueue
- All Superinterfaces:
IConstruct
,software.constructs.IConstruct
,IDependable
,IResource
,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IQueue.Jsii$Default
- All Known Implementing Classes:
IQueue.Jsii$Proxy
,Queue
,QueueBase
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Internal default implementation forIQueue
.static final class
A proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionaddToResourcePolicy
(PolicyStatement statement) Adds a statement to the IAM resource policy associated with this queue.default IKey
If this queue is server-side encrypted, this is the KMS encryption 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.grant
(IGrantable grantee, @NotNull String... queueActions) Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource.grantConsumeMessages
(IGrantable grantee) Grant permissions to consume messages from a queue.grantPurge
(IGrantable grantee) Grant an IAM principal permissions to purge all messages from the queue.grantSendMessages
(IGrantable grantee) Grant access to send messages to a queue to the given identity.Return the given named metric for this Queue.metric
(String metricName, MetricOptions props) Return the given named metric for this Queue.The approximate age of the oldest non-deleted message in the queue.The approximate age of the oldest non-deleted message in the queue.The number of messages in the queue that are delayed and not available for reading immediately.The number of messages in the queue that are delayed and not available for reading immediately.The number of messages that are in flight.The number of messages that are in flight.The number of messages available for retrieval from the queue.The number of messages available for retrieval from the queue.The number of ReceiveMessage API calls that did not return a message.The number of ReceiveMessage API calls that did not return a message.The number of messages deleted from the queue.The number of messages deleted from the queue.The number of messages returned by calls to the ReceiveMessage action.The number of messages returned by calls to the ReceiveMessage action.The number of messages added to a queue.The number of messages added to a queue.The size of messages added to a queue.The size of messages added to a queue.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
-
Method Details
-
getFifo
Whether this queue is an Amazon SQS FIFO queue.If false, this is a standard queue.
-
getQueueArn
The ARN of this queue. -
getQueueName
The name of this queue. -
getQueueUrl
The URL of this queue. -
getEncryptionMasterKey
If this queue is server-side encrypted, this is the KMS encryption key. -
addToResourcePolicy
@Stability(Stable) @NotNull AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Adds a statement to the IAM resource policy associated with this queue.If this queue was created in this stack (
new Queue
), a queue policy will be automatically created upon the first call toaddToPolicy
. If the queue is imported (Queue.import
), then this is a no-op.- Parameters:
statement
- This parameter is required.
-
grant
@Stability(Stable) @NotNull Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... queueActions) Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource.- Parameters:
grantee
- Principal to grant right to. This parameter is required.queueActions
- The actions to grant. This parameter is required.
-
grantConsumeMessages
Grant permissions to consume messages from a queue.This will grant the following permissions:
- sqs:ChangeMessageVisibility
- sqs:DeleteMessage
- sqs:ReceiveMessage
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
- Parameters:
grantee
- Principal to grant consume rights to. This parameter is required.
-
grantPurge
Grant an IAM principal permissions to purge all messages from the queue.This will grant the following permissions:
- sqs:PurgeQueue
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
- Parameters:
grantee
- Principal to grant send rights to. This parameter is required.
-
grantSendMessages
Grant access to send messages to a queue to the given identity.This will grant the following permissions:
- sqs:SendMessage
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
- Parameters:
grantee
- Principal to grant send rights to. This parameter is required.
-
metric
@Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Queue.- Parameters:
metricName
- This parameter is required.props
-
-
metric
Return the given named metric for this Queue.- Parameters:
metricName
- This parameter is required.
-
metricApproximateAgeOfOldestMessage
@Stability(Stable) @NotNull Metric metricApproximateAgeOfOldestMessage(@Nullable MetricOptions props) The approximate age of the oldest non-deleted message in the queue.Maximum over 5 minutes
- Parameters:
props
-
-
metricApproximateAgeOfOldestMessage
The approximate age of the oldest non-deleted message in the queue.Maximum over 5 minutes
-
metricApproximateNumberOfMessagesDelayed
@Stability(Stable) @NotNull Metric metricApproximateNumberOfMessagesDelayed(@Nullable MetricOptions props) The number of messages in the queue that are delayed and not available for reading immediately.Maximum over 5 minutes
- Parameters:
props
-
-
metricApproximateNumberOfMessagesDelayed
The number of messages in the queue that are delayed and not available for reading immediately.Maximum over 5 minutes
-
metricApproximateNumberOfMessagesNotVisible
@Stability(Stable) @NotNull Metric metricApproximateNumberOfMessagesNotVisible(@Nullable MetricOptions props) The number of messages that are in flight.Maximum over 5 minutes
- Parameters:
props
-
-
metricApproximateNumberOfMessagesNotVisible
The number of messages that are in flight.Maximum over 5 minutes
-
metricApproximateNumberOfMessagesVisible
@Stability(Stable) @NotNull Metric metricApproximateNumberOfMessagesVisible(@Nullable MetricOptions props) The number of messages available for retrieval from the queue.Maximum over 5 minutes
- Parameters:
props
-
-
metricApproximateNumberOfMessagesVisible
The number of messages available for retrieval from the queue.Maximum over 5 minutes
-
metricNumberOfEmptyReceives
The number of ReceiveMessage API calls that did not return a message.Sum over 5 minutes
- Parameters:
props
-
-
metricNumberOfEmptyReceives
The number of ReceiveMessage API calls that did not return a message.Sum over 5 minutes
-
metricNumberOfMessagesDeleted
The number of messages deleted from the queue.Sum over 5 minutes
- Parameters:
props
-
-
metricNumberOfMessagesDeleted
The number of messages deleted from the queue.Sum over 5 minutes
-
metricNumberOfMessagesReceived
The number of messages returned by calls to the ReceiveMessage action.Sum over 5 minutes
- Parameters:
props
-
-
metricNumberOfMessagesReceived
The number of messages returned by calls to the ReceiveMessage action.Sum over 5 minutes
-
metricNumberOfMessagesSent
The number of messages added to a queue.Sum over 5 minutes
- Parameters:
props
-
-
metricNumberOfMessagesSent
The number of messages added to a queue.Sum over 5 minutes
-
metricSentMessageSize
The size of messages added to a queue.Average over 5 minutes
- Parameters:
props
-
-
metricSentMessageSize
The size of messages added to a queue.Average over 5 minutes
-