Class QueueBase
- All Implemented Interfaces:
IEnvironmentAware,IResource,IQueue,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
Queue
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested 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.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQueueBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedQueueBase(software.amazon.jsii.JsiiObjectRef objRef) protectedprotectedQueueBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddToResourcePolicy(PolicyStatement statement) Adds a statement to the IAM resource policy associated with this queue.protected abstract BooleanControls automatic creation of policy objects.abstract IKeyIf this queue is server-side encrypted, this is the KMS encryption key.abstract QueueEncryptionWhether the contents of the queue are encrypted, and by what type of key.abstract BooleangetFifo()Whether this queue is an Amazon SQS FIFO queue.abstract StringThe ARN of this queue.abstract StringThe name of this queue.abstract StringThe URL of this queue.grant(IGrantable grantee, String... actions) 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 class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
QueueBase
protected QueueBase(software.amazon.jsii.JsiiObjectRef objRef) -
QueueBase
protected QueueBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
QueueBase
@Stability(Stable) protected QueueBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
QueueBase
@Stability(Stable) protected QueueBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
addToResourcePolicy
@Stability(Stable) @NotNull public 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.- Specified by:
addToResourcePolicyin interfaceIQueue- Parameters:
statement- This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource. -
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
If encryption is used, permission to use the key to decrypt the contents of the queue will also be granted to the same principal.
This will grant the following KMS permissions:
- kms:Decrypt
- Specified by:
grantConsumeMessagesin interfaceIQueue- 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
- Specified by:
grantPurgein interfaceIQueue- 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
If encryption is used, permission to use the key to encrypt/decrypt the contents of the queue will also be granted to the same principal.
This will grant the following KMS permissions:
- kms:Decrypt
- kms:Encrypt
- kms:ReEncrypt*
- kms:GenerateDataKey*
- Specified by:
grantSendMessagesin interfaceIQueue- Parameters:
grantee- Principal to grant send rights to. This parameter is required.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Queue. -
metric
Return the given named metric for this Queue. -
metricApproximateAgeOfOldestMessage
@Stability(Stable) @NotNull public Metric metricApproximateAgeOfOldestMessage(@Nullable MetricOptions props) The approximate age of the oldest non-deleted message in the queue.Maximum over 5 minutes
- Specified by:
metricApproximateAgeOfOldestMessagein interfaceIQueue- Parameters:
props-
-
metricApproximateAgeOfOldestMessage
The approximate age of the oldest non-deleted message in the queue.Maximum over 5 minutes
- Specified by:
metricApproximateAgeOfOldestMessagein interfaceIQueue
-
metricApproximateNumberOfMessagesDelayed
@Stability(Stable) @NotNull public 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
- Specified by:
metricApproximateNumberOfMessagesDelayedin interfaceIQueue- Parameters:
props-
-
metricApproximateNumberOfMessagesDelayed
The number of messages in the queue that are delayed and not available for reading immediately.Maximum over 5 minutes
- Specified by:
metricApproximateNumberOfMessagesDelayedin interfaceIQueue
-
metricApproximateNumberOfMessagesNotVisible
@Stability(Stable) @NotNull public Metric metricApproximateNumberOfMessagesNotVisible(@Nullable MetricOptions props) The number of messages that are in flight.Maximum over 5 minutes
- Specified by:
metricApproximateNumberOfMessagesNotVisiblein interfaceIQueue- Parameters:
props-
-
metricApproximateNumberOfMessagesNotVisible
The number of messages that are in flight.Maximum over 5 minutes
- Specified by:
metricApproximateNumberOfMessagesNotVisiblein interfaceIQueue
-
metricApproximateNumberOfMessagesVisible
@Stability(Stable) @NotNull public Metric metricApproximateNumberOfMessagesVisible(@Nullable MetricOptions props) The number of messages available for retrieval from the queue.Maximum over 5 minutes
- Specified by:
metricApproximateNumberOfMessagesVisiblein interfaceIQueue- Parameters:
props-
-
metricApproximateNumberOfMessagesVisible
The number of messages available for retrieval from the queue.Maximum over 5 minutes
- Specified by:
metricApproximateNumberOfMessagesVisiblein interfaceIQueue
-
metricNumberOfEmptyReceives
@Stability(Stable) @NotNull public Metric metricNumberOfEmptyReceives(@Nullable MetricOptions props) The number of ReceiveMessage API calls that did not return a message.Sum over 5 minutes
- Specified by:
metricNumberOfEmptyReceivesin interfaceIQueue- Parameters:
props-
-
metricNumberOfEmptyReceives
The number of ReceiveMessage API calls that did not return a message.Sum over 5 minutes
- Specified by:
metricNumberOfEmptyReceivesin interfaceIQueue
-
metricNumberOfMessagesDeleted
@Stability(Stable) @NotNull public Metric metricNumberOfMessagesDeleted(@Nullable MetricOptions props) The number of messages deleted from the queue.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesDeletedin interfaceIQueue- Parameters:
props-
-
metricNumberOfMessagesDeleted
The number of messages deleted from the queue.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesDeletedin interfaceIQueue
-
metricNumberOfMessagesReceived
@Stability(Stable) @NotNull public Metric metricNumberOfMessagesReceived(@Nullable MetricOptions props) The number of messages returned by calls to the ReceiveMessage action.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesReceivedin interfaceIQueue- Parameters:
props-
-
metricNumberOfMessagesReceived
The number of messages returned by calls to the ReceiveMessage action.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesReceivedin interfaceIQueue
-
metricNumberOfMessagesSent
The number of messages added to a queue.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesSentin interfaceIQueue- Parameters:
props-
-
metricNumberOfMessagesSent
The number of messages added to a queue.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesSentin interfaceIQueue
-
metricSentMessageSize
The size of messages added to a queue.Average over 5 minutes
- Specified by:
metricSentMessageSizein interfaceIQueue- Parameters:
props-
-
metricSentMessageSize
The size of messages added to a queue.Average over 5 minutes
- Specified by:
metricSentMessageSizein interfaceIQueue
-
getAutoCreatePolicy
Controls automatic creation of policy objects.Set by subclasses.
-
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
-
getQueueName
The name of this queue.- Specified by:
getQueueNamein interfaceIQueue
-
getQueueUrl
The URL of this queue.- Specified by:
getQueueUrlin interfaceIQueue
-
getEncryptionMasterKey
If this queue is server-side encrypted, this is the KMS encryption key.- Specified by:
getEncryptionMasterKeyin interfaceIQueue
-
getEncryptionType
Whether the contents of the queue are encrypted, and by what type of key.- Specified by:
getEncryptionTypein interfaceIQueue
-