class SqsOperator extends AnyRef
- Source
- SqsOperator.scala
- Alphabetic
- By Inheritance
- SqsOperator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addPermission(queueUrl: QueueUrl, actions: List[String], awsAccountIds: List[String], label: String): Task[Unit]
Adds a permission to a queue for a specific principal.
Adds a permission to a queue for a specific principal. This allows sharing access to the queue. When you create a queue, you have full control access rights for the queue. Only you, the owner of the queue, can grant or deny permissions to the queue. For more information about these permissions, see Allow Developers to Write Messages to a Shared Queue
Add permission generates a default policy for you. You can also use setQueueAttributes to upload your policy. For more information, see
Using Custom Policies with the Amazon SQS Access Policy Language
.Some actions take lists of parameters. These lists are specified using the
param.n
notation. Values ofn
are integers starting from 1. For example, a parameter list with two elements looks like this:&AttributeName.1=first
&AttributeName.2=second
- queueUrl
the url of the queue, it could be obtained with getQueueUrl.
- actions
The action the client wants to allow for the specified principal. Valid values: the name of any action or *. I.e: SendMessage, DeleteMessage, ChangeMessageVisibility... See Overview of Managing Access Permissions
- awsAccountIds
The AWS account number of the principal who is given permission. The principal must have an AWS account, but does not need to be signed up for Amazon SQS. For information about locating the AWS account identification, see Your AWS Identifiers
- label
The unique identification of the permission to be set (for example, AliceSendMessage). Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (-), and underscores (_).
- See also
also the aws sqs api docs, https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_AddPermission.html where the above come from ;)
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createQueue(queueName: QueueName, tags: Map[String, String] = Map.empty, attributes: Map[QueueAttributeName, String] = Map.empty): Task[QueueUrl]
Creates a new standard or FIFO queue.
Creates a new standard or FIFO queue. You can pass one or more attributes in the request.
If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue.
import software.amazon.awssdk.services.sqs.model.QueueAttributeName // it would be the same as not specifying at all the `FIFO_QUEUE` attribute. val standardAttributes = Map(QueueAttributeName.FIFO_QUEUE -> "false") val fifoAttributes = Map(QueueAttributeName.FIFO_QUEUE -> "true")
It is not possible to change the queue type after it is created. You must either create a new FIFO queue for your application or delete your existing standard queue and recreate it as a FIFO queue. For more information, see Moving From a Standard Queue to a FIFO Queue in the Amazon Simple Queue Service Developer Guide.
The queue name has to adhere to the limits related to queues and it is unique within the scope of the queue. After a queue is created, it is necessary to wait at least one second after the queue is created to be able to use the queue.
- queueName
the queueName to be created. fifo queues have to be suffixed with
.fifo
- tags
map of cost allocation tags to the specified to the Amazon SQS queue. For an overview, see Tagging Your Amazon SQS Queues in the Amazon Simple Queue Service Developer Guide. Tags are case-sensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag. For a full list of tag restrictions, see Limits Related to Queues in the Developer Guide. It requires sqs:CreateQueue and sqs:TagQueue permissions.
- attributes
A map of QueueAttributeNames with their corresponding values. The
FIFO_QUEUE
andCONTENT_BASED_DEDUPLICATION
attributes only apply to Fifo queues. See the Amazon Single Queue Service Developer Guide for more details.
- def deleteQueue(queueUrl: QueueUrl): Task[Unit]
Deletes a queue.
Deletes a queue.
If queue does not exists it fails with QueueDoesNotExistException.
- queueUrl
the url of the queue to be deleted.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def existsQueue(queueName: QueueName, queueOwnerAWSAccountId: Option[String] = None): Task[Boolean]
Checks whether the queue exists or not.
Checks whether the queue exists or not.
It might be useful to verify before creating or trying to get the url.
- queueName
the name of the queue.
- queueOwnerAWSAccountId
the AWS account ID of the account that created the queue.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getQueueAttributes(queueUrl: QueueUrl): Task[Map[QueueAttributeName, String]]
Gets attributes for the specified queue.
Gets attributes for the specified queue. To determine whether a queue is FIFO , you can check whether QueueName ends with the .fifo suffix.
- def getQueueUrl(queueName: QueueName, queueOwnerAWSAccountId: Option[String] = None): Task[QueueUrl]
Get the QueueUrl of an existing Amazon SQS queue.
Get the QueueUrl of an existing Amazon SQS queue.
Fails with QueueDoesNotExistException when the queue does not exist.
To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to access the queue.
- queueName
the name of the queue.
- queueOwnerAWSAccountId
the AWS account ID of the account that created the queue.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listQueueTags(queueUrl: QueueUrl): Task[Map[String, String]]
List all cost allocation tags added to the specified Amazon SQS queue.
List all cost allocation tags added to the specified Amazon SQS queue.
- queueUrl
the url of the queue, obtained with getQueueUrl.
- See also
Tagging Your Amazon SQS Queues. Cross-account permissions don't apply to this action. For more information, see the Grant cross-account permissions to a role and a user name in the Amazon Simple Queue Service Developer Guide.
- def listQueueUrls(queuePrefix: Option[String] = None, maxResults: Int = 1000): Observable[QueueUrl]
Lists all the existing queue urls from your current region.
Lists all the existing queue urls from your current region.
- queuePrefix
optional parameter that adds a request filter to only return QueueUrls that begins with the specified value.
- maxResults
specify the maximum number of queueUrls to be listed.
- returns
a stream of QueueUrls from the current region.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def purgeQueue(queueUrl: QueueUrl): Task[Unit]
Deletes the messages in a queue specified by the QueueUrl.
Deletes the messages in a queue specified by the QueueUrl.
After performing a purge action, it is not possible to retrieve any messages from the queue. The message deletion process takes up to 60 seconds. We recommend waiting for 60 seconds regardless of your queue's size.
Messages sent to the queue after this call might be deleted while the queue is being purged.
It can return a failed task due with the following exceptions: PurgeQueueInProgressException,QueueDeletedRecentlyException, QueueDoesNotExistException.
- queueUrl
the url of the queue to be purged, can be obtained with getQueueUrl.
- def removePermission(queueUrl: QueueUrl, label: String): Task[Unit]
Removes a permissions in the queue policy that matches the specified label.
Removes a permissions in the queue policy that matches the specified label.
- queueUrl
the url of the queue. It can be obtained with getQueueUrl.
- label
The unique identification of the permission to be removed. Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (-), and underscores (_).
- def setQueueAttributes(queueUrl: QueueUrl, attributes: Map[QueueAttributeName, String]): Task[Unit]
Sets the value of one or more queue attributes.
Sets the value of one or more queue attributes. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute can take up to 15 minutes.
- queueUrl
the url of the queue whose attributes are set, can be obtained with getQueueUrl.
- attributes
the map of attributes to be set.
- See also
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tagQueue(queueUrl: QueueUrl, tags: Map[String, String]): Task[Unit]
Add cost allocation tags to the specified Amazon SQS queue.
Add cost allocation tags to the specified Amazon SQS queue.
- queueUrl
the url of the queue whose tags are added to, it can be obtained with getQueueUrl.
- tags
list of tags to be added to the specified queue.
- See also
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transformer[In <: SqsRequest, Out <: SqsResponse](implicit sqsOp: SqsOp[In, Out]): Transformer[In, Out]
- def untagQueue(queueUrl: QueueUrl, tagKeys: List[String]): Task[Unit]
Remove the specified tags from an Amazon SQS queue.
Remove the specified tags from an Amazon SQS queue.
- queueUrl
the url of the queue whose tags are added to, it can be obtained with getQueueUrl.
- tagKeys
list of tags to be removed from the specified queue.
- See also
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()