module Network.AWS.SQS.Types
(
sQS
, _InvalidBatchEntryId
, _TooManyEntriesInBatchRequest
, _QueueDeletedRecently
, _QueueDoesNotExist
, _InvalidAttributeName
, _UnsupportedOperation
, _InvalidMessageContents
, _BatchRequestTooLong
, _OverLimit
, _QueueNameExists
, _PurgeQueueInProgress
, _InvalidIdFormat
, _ReceiptHandleIsInvalid
, _EmptyBatchRequest
, _BatchEntryIdsNotDistinct
, _MessageNotInflight
, MessageAttribute (..)
, QueueAttributeName (..)
, BatchResultErrorEntry
, batchResultErrorEntry
, breeMessage
, breeId
, breeSenderFault
, breeCode
, ChangeMessageVisibilityBatchRequestEntry
, changeMessageVisibilityBatchRequestEntry
, cVisibilityTimeout
, cId
, cReceiptHandle
, ChangeMessageVisibilityBatchResultEntry
, changeMessageVisibilityBatchResultEntry
, cmvbreId
, DeleteMessageBatchRequestEntry
, deleteMessageBatchRequestEntry
, dmbreId
, dmbreReceiptHandle
, DeleteMessageBatchResultEntry
, deleteMessageBatchResultEntry
, dId
, Message
, message
, mMessageAttributes
, mMD5OfBody
, mBody
, mAttributes
, mReceiptHandle
, mMessageId
, mMD5OfMessageAttributes
, MessageAttributeValue
, messageAttributeValue
, mavBinaryValue
, mavStringListValues
, mavStringValue
, mavBinaryListValues
, mavDataType
, SendMessageBatchRequestEntry
, sendMessageBatchRequestEntry
, sMessageAttributes
, sDelaySeconds
, sId
, sMessageBody
, SendMessageBatchResultEntry
, sendMessageBatchResultEntry
, smbreMD5OfMessageAttributes
, smbreId
, smbreMessageId
, smbreMD5OfMessageBody
) where
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.SQS.Types.Product
import Network.AWS.SQS.Types.Sum
sQS :: Service
sQS =
Service
{ _svcAbbrev = "SQS"
, _svcSigner = v4
, _svcPrefix = "sqs"
, _svcVersion = "2012-11-05"
, _svcEndpoint = defaultEndpoint sQS
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseXMLError
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "RequestThrottled" . hasStatus 403) e =
Just "request_limit_exceeded"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_InvalidBatchEntryId :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidBatchEntryId =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.InvalidBatchEntryId"
_TooManyEntriesInBatchRequest :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyEntriesInBatchRequest =
_ServiceError .
hasStatus 400 .
hasCode "AWS.SimpleQueueService.TooManyEntriesInBatchRequest"
_QueueDeletedRecently :: AsError a => Getting (First ServiceError) a ServiceError
_QueueDeletedRecently =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.QueueDeletedRecently"
_QueueDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError
_QueueDoesNotExist =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.NonExistentQueue"
_InvalidAttributeName :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidAttributeName = _ServiceError . hasCode "InvalidAttributeName"
_UnsupportedOperation :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedOperation =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.UnsupportedOperation"
_InvalidMessageContents :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidMessageContents = _ServiceError . hasCode "InvalidMessageContents"
_BatchRequestTooLong :: AsError a => Getting (First ServiceError) a ServiceError
_BatchRequestTooLong =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.BatchRequestTooLong"
_OverLimit :: AsError a => Getting (First ServiceError) a ServiceError
_OverLimit = _ServiceError . hasStatus 403 . hasCode "OverLimit"
_QueueNameExists :: AsError a => Getting (First ServiceError) a ServiceError
_QueueNameExists = _ServiceError . hasStatus 400 . hasCode "QueueAlreadyExists"
_PurgeQueueInProgress :: AsError a => Getting (First ServiceError) a ServiceError
_PurgeQueueInProgress =
_ServiceError .
hasStatus 403 . hasCode "AWS.SimpleQueueService.PurgeQueueInProgress"
_InvalidIdFormat :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidIdFormat = _ServiceError . hasCode "InvalidIdFormat"
_ReceiptHandleIsInvalid :: AsError a => Getting (First ServiceError) a ServiceError
_ReceiptHandleIsInvalid = _ServiceError . hasCode "ReceiptHandleIsInvalid"
_EmptyBatchRequest :: AsError a => Getting (First ServiceError) a ServiceError
_EmptyBatchRequest =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.EmptyBatchRequest"
_BatchEntryIdsNotDistinct :: AsError a => Getting (First ServiceError) a ServiceError
_BatchEntryIdsNotDistinct =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.BatchEntryIdsNotDistinct"
_MessageNotInflight :: AsError a => Getting (First ServiceError) a ServiceError
_MessageNotInflight =
_ServiceError .
hasStatus 400 . hasCode "AWS.SimpleQueueService.MessageNotInflight"