Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- Service
- Errors
- InvalidBatchEntryId
- TooManyEntriesInBatchRequest
- InvalidAttributeName
- QueueDeletedRecently
- QueueDoesNotExist
- UnsupportedOperation
- InvalidMessageContents
- BatchRequestTooLong
- OverLimit
- PurgeQueueInProgress
- QueueNameExists
- InvalidIdFormat
- ReceiptHandleIsInvalid
- EmptyBatchRequest
- MessageNotInflight
- BatchEntryIdsNotDistinct
- Waiters
- Operations
- Types
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:
- Current WSDL (2012-11-05)
- Making API Requests
- Amazon SQS product page
- Using Amazon SQS Message Attributes
- Using Amazon SQS Dead Letter Queues
- Regions and Endpoints
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.
See: AWS API Reference
- data SQS
- _InvalidBatchEntryId :: AsError a => Getting (First ServiceError) a ServiceError
- _TooManyEntriesInBatchRequest :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidAttributeName :: AsError a => Getting (First ServiceError) a ServiceError
- _QueueDeletedRecently :: AsError a => Getting (First ServiceError) a ServiceError
- _QueueDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError
- _UnsupportedOperation :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidMessageContents :: AsError a => Getting (First ServiceError) a ServiceError
- _BatchRequestTooLong :: AsError a => Getting (First ServiceError) a ServiceError
- _OverLimit :: AsError a => Getting (First ServiceError) a ServiceError
- _PurgeQueueInProgress :: AsError a => Getting (First ServiceError) a ServiceError
- _QueueNameExists :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidIdFormat :: AsError a => Getting (First ServiceError) a ServiceError
- _ReceiptHandleIsInvalid :: AsError a => Getting (First ServiceError) a ServiceError
- _EmptyBatchRequest :: AsError a => Getting (First ServiceError) a ServiceError
- _MessageNotInflight :: AsError a => Getting (First ServiceError) a ServiceError
- _BatchEntryIdsNotDistinct :: AsError a => Getting (First ServiceError) a ServiceError
- module Network.AWS.SQS.GetQueueURL
- module Network.AWS.SQS.PurgeQueue
- module Network.AWS.SQS.SendMessage
- module Network.AWS.SQS.ChangeMessageVisibilityBatch
- module Network.AWS.SQS.RemovePermission
- module Network.AWS.SQS.GetQueueAttributes
- module Network.AWS.SQS.ListQueues
- module Network.AWS.SQS.ReceiveMessage
- module Network.AWS.SQS.DeleteQueue
- module Network.AWS.SQS.DeleteMessageBatch
- module Network.AWS.SQS.SetQueueAttributes
- module Network.AWS.SQS.ListDeadLetterSourceQueues
- module Network.AWS.SQS.AddPermission
- module Network.AWS.SQS.DeleteMessage
- module Network.AWS.SQS.CreateQueue
- module Network.AWS.SQS.ChangeMessageVisibility
- module Network.AWS.SQS.SendMessageBatch
- data QueueAttributeName
- data BatchResultErrorEntry
- batchResultErrorEntry :: Text -> Bool -> Text -> BatchResultErrorEntry
- breeMessage :: Lens' BatchResultErrorEntry (Maybe Text)
- breeId :: Lens' BatchResultErrorEntry Text
- breeSenderFault :: Lens' BatchResultErrorEntry Bool
- breeCode :: Lens' BatchResultErrorEntry Text
- data ChangeMessageVisibilityBatchRequestEntry
- changeMessageVisibilityBatchRequestEntry :: Text -> Text -> ChangeMessageVisibilityBatchRequestEntry
- cVisibilityTimeout :: Lens' ChangeMessageVisibilityBatchRequestEntry (Maybe Int)
- cId :: Lens' ChangeMessageVisibilityBatchRequestEntry Text
- cReceiptHandle :: Lens' ChangeMessageVisibilityBatchRequestEntry Text
- data ChangeMessageVisibilityBatchResultEntry
- changeMessageVisibilityBatchResultEntry :: Text -> ChangeMessageVisibilityBatchResultEntry
- cmvbreId :: Lens' ChangeMessageVisibilityBatchResultEntry Text
- data DeleteMessageBatchRequestEntry
- deleteMessageBatchRequestEntry :: Text -> Text -> DeleteMessageBatchRequestEntry
- dmbreId :: Lens' DeleteMessageBatchRequestEntry Text
- dmbreReceiptHandle :: Lens' DeleteMessageBatchRequestEntry Text
- data DeleteMessageBatchResultEntry
- deleteMessageBatchResultEntry :: Text -> DeleteMessageBatchResultEntry
- dId :: Lens' DeleteMessageBatchResultEntry Text
- data Message
- message :: Message
- mMessageAttributes :: Lens' Message (HashMap Text MessageAttributeValue)
- mMD5OfBody :: Lens' Message (Maybe Text)
- mBody :: Lens' Message (Maybe Text)
- mAttributes :: Lens' Message (HashMap QueueAttributeName Text)
- mMessageId :: Lens' Message (Maybe Text)
- mReceiptHandle :: Lens' Message (Maybe Text)
- mMD5OfMessageAttributes :: Lens' Message (Maybe Text)
- data MessageAttributeValue
- messageAttributeValue :: Text -> MessageAttributeValue
- mavBinaryValue :: Lens' MessageAttributeValue (Maybe ByteString)
- mavStringListValues :: Lens' MessageAttributeValue [Text]
- mavStringValue :: Lens' MessageAttributeValue (Maybe Text)
- mavBinaryListValues :: Lens' MessageAttributeValue [ByteString]
- mavDataType :: Lens' MessageAttributeValue Text
- data SendMessageBatchRequestEntry
- sendMessageBatchRequestEntry :: Text -> Text -> SendMessageBatchRequestEntry
- sMessageAttributes :: Lens' SendMessageBatchRequestEntry (HashMap Text MessageAttributeValue)
- sDelaySeconds :: Lens' SendMessageBatchRequestEntry (Maybe Int)
- sId :: Lens' SendMessageBatchRequestEntry Text
- sMessageBody :: Lens' SendMessageBatchRequestEntry Text
- data SendMessageBatchResultEntry
- sendMessageBatchResultEntry :: Text -> Text -> Text -> SendMessageBatchResultEntry
- smbreMD5OfMessageAttributes :: Lens' SendMessageBatchResultEntry (Maybe Text)
- smbreId :: Lens' SendMessageBatchResultEntry Text
- smbreMessageId :: Lens' SendMessageBatchResultEntry Text
- smbreMD5OfMessageBody :: Lens' SendMessageBatchResultEntry Text
Service
Version 2012-11-05
of the Amazon Simple Queue Service SDK.
AWSService SQS | |
type Sg SQS = V4 |
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.
InvalidAttributeName
_InvalidAttributeName :: AsError a => Getting (First ServiceError) a ServiceError Source
The attribute referred to does not exist.
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.
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.
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.
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.
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.
MessageNotInflight
_MessageNotInflight :: AsError a => Getting (First ServiceError) a ServiceError Source
The message referred to is not in flight.
BatchEntryIdsNotDistinct
_BatchEntryIdsNotDistinct :: AsError a => Getting (First ServiceError) a ServiceError Source
Two or more batch entries have the same Id
in the request.
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
module Network.AWS.SQS.GetQueueURL
PurgeQueue
module Network.AWS.SQS.PurgeQueue
SendMessage
module Network.AWS.SQS.SendMessage
ChangeMessageVisibilityBatch
RemovePermission
GetQueueAttributes
ListQueues
module Network.AWS.SQS.ListQueues
ReceiveMessage
DeleteQueue
module Network.AWS.SQS.DeleteQueue
DeleteMessageBatch
SetQueueAttributes
ListDeadLetterSourceQueues
AddPermission
DeleteMessage
CreateQueue
module Network.AWS.SQS.CreateQueue
ChangeMessageVisibility
SendMessageBatch
Types
QueueAttributeName
data QueueAttributeName Source
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.
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 Id
s of a batch request need to
be unique within the request.
cReceiptHandle :: Lens' ChangeMessageVisibilityBatchRequestEntry Text Source
A receipt handle.
ChangeMessageVisibilityBatchResultEntry
data ChangeMessageVisibilityBatchResultEntry Source
Encloses the id of an entry in ChangeMessageVisibilityBatch.
See: changeMessageVisibilityBatchResultEntry
smart constructor.
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
data DeleteMessageBatchRequestEntry Source
Encloses a receipt handle and an identifier for it.
See: deleteMessageBatchRequestEntry
smart constructor.
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 Id
s of a batch request need to
be unique within the request.
dmbreReceiptHandle :: Lens' DeleteMessageBatchRequestEntry Text Source
A receipt handle.
DeleteMessageBatchResultEntry
data DeleteMessageBatchResultEntry Source
Encloses the id an entry in DeleteMessageBatch.
See: deleteMessageBatchResultEntry
smart constructor.
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
An Amazon SQS message.
See: message
smart constructor.
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.
mAttributes :: Lens' Message (HashMap QueueAttributeName Text) Source
SenderId
, SentTimestamp
, ApproximateReceiveCount
, and/or
ApproximateFirstReceiveTimestamp
. SentTimestamp
and
ApproximateFirstReceiveTimestamp
are each returned as an integer
representing the epoch time in
milliseconds.
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.
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.
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.
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.
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
data SendMessageBatchRequestEntry Source
Contains the details of a single Amazon SQS message along with a Id
.
See: sendMessageBatchRequestEntry
smart constructor.
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 Id
s of a batch request need to be unique
within the request.
sMessageBody :: Lens' SendMessageBatchRequestEntry Text Source
Body of the message.
SendMessageBatchResultEntry
data SendMessageBatchResultEntry Source
Encloses a message ID for successfully enqueued message of a SendMessageBatch.
See: sendMessageBatchResultEntry
smart constructor.
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.
smbreMessageId :: Lens' SendMessageBatchResultEntry Text Source
An identifier for the message.
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.