public static interface IQueue.Jsii$Default extends IQueue, IResource.Jsii$Default
IQueue
.IQueue.Jsii$Default, IQueue.Jsii$Proxy
Modifier and Type | Method and Description |
---|---|
default AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement)
Adds a statement to the IAM resource policy associated with this queue.
|
default void |
applyRemovalPolicy(RemovalPolicy policy)
Apply the given removal policy to this resource.
|
default IKey |
getEncryptionMasterKey()
If this queue is server-side encrypted, this is the KMS encryption key.
|
default ResourceEnvironment |
getEnv()
The environment this resource belongs to.
|
default java.lang.Boolean |
getFifo()
Whether this queue is an Amazon SQS FIFO queue.
|
default ConstructNode |
getNode()
The construct tree node for this construct.
|
default java.lang.String |
getQueueArn()
The ARN of this queue.
|
default java.lang.String |
getQueueName()
The name of this queue.
|
default java.lang.String |
getQueueUrl()
The URL of this queue.
|
default Stack |
getStack()
The stack in which this resource is defined.
|
default Grant |
grant(IGrantable grantee,
java.lang.String... queueActions)
Grant the actions defined in queueActions to the identity Principal given on this SQS queue resource.
|
default Grant |
grantConsumeMessages(IGrantable grantee)
Grant permissions to consume messages from a queue.
|
default Grant |
grantPurge(IGrantable grantee)
Grant an IAM principal permissions to purge all messages from the queue.
|
default Grant |
grantSendMessages(IGrantable grantee)
Grant access to send messages to a queue to the given identity.
|
default Metric |
metric(java.lang.String metricName,
MetricOptions props)
Return the given named metric for this Queue.
|
default Metric |
metricApproximateAgeOfOldestMessage(MetricOptions props)
The approximate age of the oldest non-deleted message in the queue.
|
default Metric |
metricApproximateNumberOfMessagesDelayed(MetricOptions props)
The number of messages in the queue that are delayed and not available for reading immediately.
|
default Metric |
metricApproximateNumberOfMessagesNotVisible(MetricOptions props)
The number of messages that are in flight.
|
default Metric |
metricApproximateNumberOfMessagesVisible(MetricOptions props)
The number of messages available for retrieval from the queue.
|
default Metric |
metricNumberOfEmptyReceives(MetricOptions props)
The number of ReceiveMessage API calls that did not return a message.
|
default Metric |
metricNumberOfMessagesDeleted(MetricOptions props)
The number of messages deleted from the queue.
|
default Metric |
metricNumberOfMessagesReceived(MetricOptions props)
The number of messages returned by calls to the ReceiveMessage action.
|
default Metric |
metricNumberOfMessagesSent(MetricOptions props)
The number of messages added to a queue.
|
default Metric |
metricSentMessageSize(MetricOptions props)
The size of messages added to a queue.
|
metric, metricApproximateAgeOfOldestMessage, metricApproximateNumberOfMessagesDelayed, metricApproximateNumberOfMessagesNotVisible, metricApproximateNumberOfMessagesVisible, metricNumberOfEmptyReceives, metricNumberOfMessagesDeleted, metricNumberOfMessagesReceived, metricNumberOfMessagesSent, metricSentMessageSize
default ConstructNode getNode()
getNode
in interface IConstruct
getNode
in interface IConstruct.Jsii$Default
getNode
in interface IResource.Jsii$Default
default ResourceEnvironment getEnv()
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
getEnv
in interface IResource
getEnv
in interface IResource.Jsii$Default
default Stack getStack()
getStack
in interface IResource
getStack
in interface IResource.Jsii$Default
default java.lang.Boolean getFifo()
If false, this is a standard queue.
default java.lang.String getQueueArn()
getQueueArn
in interface IQueue
default java.lang.String getQueueName()
getQueueName
in interface IQueue
default java.lang.String getQueueUrl()
getQueueUrl
in interface IQueue
default IKey getEncryptionMasterKey()
getEncryptionMasterKey
in interface IQueue
default void applyRemovalPolicy(RemovalPolicy policy)
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
applyRemovalPolicy
in interface IResource
applyRemovalPolicy
in interface IResource.Jsii$Default
policy
- This parameter is required.default AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement)
If this queue was created in this stack (new Queue
), a queue policy
will be automatically created upon the first call to addToPolicy
. If
the queue is imported (Queue.import
), then this is a no-op.
addToResourcePolicy
in interface IQueue
statement
- This parameter is required.default Grant grant(IGrantable grantee, java.lang.String... queueActions)
default Grant grantConsumeMessages(IGrantable grantee)
This will grant the following permissions:
grantConsumeMessages
in interface IQueue
grantee
- Principal to grant consume rights to. This parameter is required.default Grant grantPurge(IGrantable grantee)
This will grant the following permissions:
grantPurge
in interface IQueue
grantee
- Principal to grant send rights to. This parameter is required.default Grant grantSendMessages(IGrantable grantee)
This will grant the following permissions:
grantSendMessages
in interface IQueue
grantee
- Principal to grant send rights to. This parameter is required.default Metric metric(java.lang.String metricName, MetricOptions props)
default Metric metricApproximateAgeOfOldestMessage(MetricOptions props)
Maximum over 5 minutes
metricApproximateAgeOfOldestMessage
in interface IQueue
props
- default Metric metricApproximateNumberOfMessagesDelayed(MetricOptions props)
Maximum over 5 minutes
metricApproximateNumberOfMessagesDelayed
in interface IQueue
props
- default Metric metricApproximateNumberOfMessagesNotVisible(MetricOptions props)
Maximum over 5 minutes
metricApproximateNumberOfMessagesNotVisible
in interface IQueue
props
- default Metric metricApproximateNumberOfMessagesVisible(MetricOptions props)
Maximum over 5 minutes
metricApproximateNumberOfMessagesVisible
in interface IQueue
props
- default Metric metricNumberOfEmptyReceives(MetricOptions props)
Sum over 5 minutes
metricNumberOfEmptyReceives
in interface IQueue
props
- default Metric metricNumberOfMessagesDeleted(MetricOptions props)
Sum over 5 minutes
metricNumberOfMessagesDeleted
in interface IQueue
props
- default Metric metricNumberOfMessagesReceived(MetricOptions props)
Sum over 5 minutes
metricNumberOfMessagesReceived
in interface IQueue
props
- default Metric metricNumberOfMessagesSent(MetricOptions props)
Sum over 5 minutes
metricNumberOfMessagesSent
in interface IQueue
props
- default Metric metricSentMessageSize(MetricOptions props)
Average over 5 minutes
metricSentMessageSize
in interface IQueue
props
-