Interface IQueue

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IQueue.Jsii$Default
All Known Implementing Classes:
IQueue.Jsii$Proxy, Queue, QueueBase

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:09.941Z") @Stability(Stable) public interface IQueue extends software.amazon.jsii.JsiiSerializable, IResource
Represents an SQS queue.
  • Method Details

    • getFifo

      @Stability(Stable) @NotNull Boolean getFifo()
      Whether this queue is an Amazon SQS FIFO queue.

      If false, this is a standard queue.

    • getQueueArn

      @Stability(Stable) @NotNull String getQueueArn()
      The ARN of this queue.
    • getQueueName

      @Stability(Stable) @NotNull String getQueueName()
      The name of this queue.
    • getQueueUrl

      @Stability(Stable) @NotNull String getQueueUrl()
      The URL of this queue.
    • getEncryptionMasterKey

      @Stability(Stable) @Nullable default IKey getEncryptionMasterKey()
      If this queue is server-side encrypted, this is the KMS encryption key.
    • getEncryptionType

      @Stability(Stable) @Nullable default QueueEncryption getEncryptionType()
      Whether the contents of the queue are encrypted, and by what type of 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 to addToPolicy. 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

      @Stability(Stable) @NotNull Grant grantConsumeMessages(@NotNull IGrantable grantee)
      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

      @Stability(Stable) @NotNull Grant grantPurge(@NotNull IGrantable grantee)
      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

      @Stability(Stable) @NotNull Grant grantSendMessages(@NotNull IGrantable grantee)
      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

      @Stability(Stable) @NotNull Metric metric(@NotNull String metricName)
      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

      @Stability(Stable) @NotNull Metric 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

      @Stability(Stable) @NotNull Metric 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

      @Stability(Stable) @NotNull Metric 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

      @Stability(Stable) @NotNull Metric metricApproximateNumberOfMessagesVisible()
      The number of messages available for retrieval from the queue.

      Maximum over 5 minutes

    • metricNumberOfEmptyReceives

      @Stability(Stable) @NotNull Metric metricNumberOfEmptyReceives(@Nullable MetricOptions props)
      The number of ReceiveMessage API calls that did not return a message.

      Sum over 5 minutes

      Parameters:
      props -
    • metricNumberOfEmptyReceives

      @Stability(Stable) @NotNull Metric metricNumberOfEmptyReceives()
      The number of ReceiveMessage API calls that did not return a message.

      Sum over 5 minutes

    • metricNumberOfMessagesDeleted

      @Stability(Stable) @NotNull Metric metricNumberOfMessagesDeleted(@Nullable MetricOptions props)
      The number of messages deleted from the queue.

      Sum over 5 minutes

      Parameters:
      props -
    • metricNumberOfMessagesDeleted

      @Stability(Stable) @NotNull Metric metricNumberOfMessagesDeleted()
      The number of messages deleted from the queue.

      Sum over 5 minutes

    • metricNumberOfMessagesReceived

      @Stability(Stable) @NotNull Metric metricNumberOfMessagesReceived(@Nullable MetricOptions props)
      The number of messages returned by calls to the ReceiveMessage action.

      Sum over 5 minutes

      Parameters:
      props -
    • metricNumberOfMessagesReceived

      @Stability(Stable) @NotNull Metric metricNumberOfMessagesReceived()
      The number of messages returned by calls to the ReceiveMessage action.

      Sum over 5 minutes

    • metricNumberOfMessagesSent

      @Stability(Stable) @NotNull Metric metricNumberOfMessagesSent(@Nullable MetricOptions props)
      The number of messages added to a queue.

      Sum over 5 minutes

      Parameters:
      props -
    • metricNumberOfMessagesSent

      @Stability(Stable) @NotNull Metric metricNumberOfMessagesSent()
      The number of messages added to a queue.

      Sum over 5 minutes

    • metricSentMessageSize

      @Stability(Stable) @NotNull Metric metricSentMessageSize(@Nullable MetricOptions props)
      The size of messages added to a queue.

      Average over 5 minutes

      Parameters:
      props -
    • metricSentMessageSize

      @Stability(Stable) @NotNull Metric metricSentMessageSize()
      The size of messages added to a queue.

      Average over 5 minutes