amazonka-sqs-1.4.0: Amazon Simple Queue Service SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SQS

Contents

Description

Welcome to the Amazon Simple Queue Service API Reference. This section describes who should read this guide, how the guide is organized, and other resources related to the Amazon Simple Queue Service (Amazon SQS).

Amazon SQS offers reliable and scalable hosted queues for storing messages as they travel between computers. By using Amazon SQS, you can move data between distributed components of your applications that perform different tasks without losing messages or requiring each component to be always available.

Helpful Links:

We also provide SDKs that enable you to access Amazon SQS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as:

  • Cryptographically signing your service requests
  • Retrying requests
  • Handling error responses

For a list of available SDKs, go to Tools for Amazon Web Services.

Synopsis

Service Configuration

sqs :: Service Source

API version '2012-11-05' of the Amazon Simple Queue Service SDK configuration.

Errors

Error matchers are designed for use with the functions provided by Control.Exception.Lens. This allows catching (and rethrowing) service specific errors returned by SQS.

InvalidBatchEntryId

_InvalidBatchEntryId :: AsError a => Getting (First ServiceError) a ServiceError Source

The Id of a batch entry in a batch request does not abide by the specification.

TooManyEntriesInBatchRequest

_TooManyEntriesInBatchRequest :: AsError a => Getting (First ServiceError) a ServiceError Source

Batch request contains more number of entries than permissible.

QueueDeletedRecently

_QueueDeletedRecently :: AsError a => Getting (First ServiceError) a ServiceError Source

You must wait 60 seconds after deleting a queue before you can create another with the same name.

QueueDoesNotExist

_QueueDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError Source

The queue referred to does not exist.

InvalidAttributeName

_InvalidAttributeName :: AsError a => Getting (First ServiceError) a ServiceError Source

The attribute referred to does not exist.

UnsupportedOperation

_UnsupportedOperation :: AsError a => Getting (First ServiceError) a ServiceError Source

Error code 400. Unsupported operation.

InvalidMessageContents

_InvalidMessageContents :: AsError a => Getting (First ServiceError) a ServiceError Source

The message contains characters outside the allowed set.

BatchRequestTooLong

_BatchRequestTooLong :: AsError a => Getting (First ServiceError) a ServiceError Source

The length of all the messages put together is more than the limit.

OverLimit

_OverLimit :: AsError a => Getting (First ServiceError) a ServiceError Source

The action that you requested would violate a limit. For example, ReceiveMessage returns this error if the maximum number of messages inflight has already been reached. AddPermission returns this error if the maximum number of permissions for the queue has already been reached.

QueueNameExists

_QueueNameExists :: AsError a => Getting (First ServiceError) a ServiceError Source

A queue already exists with this name. Amazon SQS returns this error only if the request includes attributes whose values differ from those of the existing queue.

PurgeQueueInProgress

_PurgeQueueInProgress :: AsError a => Getting (First ServiceError) a ServiceError Source

Indicates that the specified queue previously received a PurgeQueue request within the last 60 seconds, the time it can take to delete the messages in the queue.

InvalidIdFormat

_InvalidIdFormat :: AsError a => Getting (First ServiceError) a ServiceError Source

The receipt handle is not valid for the current version.

ReceiptHandleIsInvalid

_ReceiptHandleIsInvalid :: AsError a => Getting (First ServiceError) a ServiceError Source

The receipt handle provided is not valid.

EmptyBatchRequest

_EmptyBatchRequest :: AsError a => Getting (First ServiceError) a ServiceError Source

Batch request does not contain an entry.

BatchEntryIdsNotDistinct

_BatchEntryIdsNotDistinct :: AsError a => Getting (First ServiceError) a ServiceError Source

Two or more batch entries have the same Id in the request.

MessageNotInflight

_MessageNotInflight :: AsError a => Getting (First ServiceError) a ServiceError Source

The message referred to is not in flight.

Waiters

Waiters poll by repeatedly sending a request until some remote success condition configured by the Wait specification is fulfilled. The Wait specification determines how many attempts should be made, in addition to delay and retry strategies.

Operations

Some AWS operations return results that are incomplete and require subsequent requests in order to obtain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called pagination. For example, the ListObjects operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate Marker in order to retrieve the next page of results.

Operations that have an AWSPager instance can transparently perform subsequent requests, correctly setting Markers and other request facets to iterate through the entire result set of a truncated API operation. Operations which support this have an additional note in the documentation.

Many operations have the ability to filter results on the server side. See the individual operation parameters for details.

GetQueueURL

PurgeQueue

ChangeMessageVisibilityBatch

SendMessage

RemovePermission

GetQueueAttributes

ListQueues

ReceiveMessage

DeleteQueue

DeleteMessageBatch

SetQueueAttributes

ListDeadLetterSourceQueues

AddPermission

DeleteMessage

CreateQueue

SendMessageBatch

ChangeMessageVisibility

Types

MessageAttribute

QueueAttributeName

BatchResultErrorEntry

data BatchResultErrorEntry Source

This is used in the responses of batch API to give a detailed description of the result of an action on each entry in the request.

See: batchResultErrorEntry smart constructor.

batchResultErrorEntry Source

Creates a value of BatchResultErrorEntry with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

breeMessage :: Lens' BatchResultErrorEntry (Maybe Text) Source

A message explaining why the action failed on this entry.

breeId :: Lens' BatchResultErrorEntry Text Source

The id of an entry in a batch request.

breeSenderFault :: Lens' BatchResultErrorEntry Bool Source

Whether the error happened due to the sender's fault.

breeCode :: Lens' BatchResultErrorEntry Text Source

An error code representing why the action failed on this entry.

ChangeMessageVisibilityBatchRequestEntry

data ChangeMessageVisibilityBatchRequestEntry Source

Encloses a receipt handle and an entry id for each message in ChangeMessageVisibilityBatch.

All of the following parameters are list parameters that must be prefixed with n, where n is an integer value starting with 1. For example, a parameter list for this action might look like this:

'&ChangeMessageVisibilityBatchRequestEntry.1.Id=change_visibility_msg_2'

'&ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=Your_Receipt_Handle'

'&ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45'

See: changeMessageVisibilityBatchRequestEntry smart constructor.

changeMessageVisibilityBatchRequestEntry Source

Creates a value of ChangeMessageVisibilityBatchRequestEntry with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

cVisibilityTimeout :: Lens' ChangeMessageVisibilityBatchRequestEntry (Maybe Int) Source

The new value (in seconds) for the message's visibility timeout.

cId :: Lens' ChangeMessageVisibilityBatchRequestEntry Text Source

An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.

ChangeMessageVisibilityBatchResultEntry

changeMessageVisibilityBatchResultEntry Source

Creates a value of ChangeMessageVisibilityBatchResultEntry with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

cmvbreId :: Lens' ChangeMessageVisibilityBatchResultEntry Text Source

Represents a message whose visibility timeout has been changed successfully.

DeleteMessageBatchRequestEntry

deleteMessageBatchRequestEntry Source

Creates a value of DeleteMessageBatchRequestEntry with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

dmbreId :: Lens' DeleteMessageBatchRequestEntry Text Source

An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.

DeleteMessageBatchResultEntry

deleteMessageBatchResultEntry Source

Creates a value of DeleteMessageBatchResultEntry with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

dId :: Lens' DeleteMessageBatchResultEntry Text Source

Represents a successfully deleted message.

Message

message :: Message Source

Creates a value of Message with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

mMessageAttributes :: Lens' Message (HashMap Text MessageAttributeValue) Source

Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.

mMD5OfBody :: Lens' Message (Maybe Text) Source

An MD5 digest of the non-URL-encoded message body string.

mBody :: Lens' Message (Maybe Text) Source

The message's contents (not URL-encoded).

mReceiptHandle :: Lens' Message (Maybe Text) Source

An identifier associated with the act of receiving the message. A new receipt handle is returned every time you receive a message. When deleting a message, you provide the last received receipt handle to delete the message.

mMessageId :: Lens' Message (Maybe Text) Source

A unique identifier for the message. Message IDs are considered unique across all AWS accounts for an extended period of time.

mMD5OfMessageAttributes :: Lens' Message (Maybe Text) Source

An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.

MessageAttributeValue

data MessageAttributeValue Source

The user-specified message attribute value. For string data types, the value attribute has the same restrictions on the content as the message body. For more information, see SendMessage.

Name, type, and value must not be empty or null. In addition, the message body should not be empty or null. All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is currently 256 KB (262,144 bytes).

See: messageAttributeValue smart constructor.

messageAttributeValue Source

Creates a value of MessageAttributeValue with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

mavBinaryValue :: Lens' MessageAttributeValue (Maybe ByteString) Source

Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.

Note: This Lens automatically encodes and decodes Base64 data, despite what the AWS documentation might say. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.

mavStringListValues :: Lens' MessageAttributeValue [Text] Source

Not implemented. Reserved for future use.

mavStringValue :: Lens' MessageAttributeValue (Maybe Text) Source

Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.

mavBinaryListValues :: Lens' MessageAttributeValue [ByteString] Source

Not implemented. Reserved for future use.

mavDataType :: Lens' MessageAttributeValue Text Source

Amazon SQS supports the following logical data types: String, Number, and Binary. In addition, you can append your own custom labels. For more information, see Message Attribute Data Types.

SendMessageBatchRequestEntry

sendMessageBatchRequestEntry Source

Creates a value of SendMessageBatchRequestEntry with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

sMessageAttributes :: Lens' SendMessageBatchRequestEntry (HashMap Text MessageAttributeValue) Source

Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items.

sDelaySeconds :: Lens' SendMessageBatchRequestEntry (Maybe Int) Source

The number of seconds for which the message has to be delayed.

sId :: Lens' SendMessageBatchRequestEntry Text Source

An identifier for the message in this batch. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.

SendMessageBatchResultEntry

sendMessageBatchResultEntry Source

Creates a value of SendMessageBatchResultEntry with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

smbreMD5OfMessageAttributes :: Lens' SendMessageBatchResultEntry (Maybe Text) Source

An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message batch correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.

smbreId :: Lens' SendMessageBatchResultEntry Text Source

An identifier for the message in this batch.

smbreMD5OfMessageBody :: Lens' SendMessageBatchResultEntry Text Source

An MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.