module Network.AWS.Kinesis.Types
(
kinesis
, _ExpiredIteratorException
, _InvalidArgumentException
, _ProvisionedThroughputExceededException
, _ResourceNotFoundException
, _ResourceInUseException
, _LimitExceededException
, ShardIteratorType (..)
, StreamStatus (..)
, HashKeyRange
, hashKeyRange
, hkrStartingHashKey
, hkrEndingHashKey
, PutRecordsRequestEntry
, putRecordsRequestEntry
, prreExplicitHashKey
, prreData
, prrePartitionKey
, PutRecordsResultEntry
, putRecordsResultEntry
, prreSequenceNumber
, prreErrorCode
, prreErrorMessage
, prreShardId
, Record
, record
, rSequenceNumber
, rData
, rPartitionKey
, SequenceNumberRange
, sequenceNumberRange
, snrEndingSequenceNumber
, snrStartingSequenceNumber
, Shard
, shard
, sAdjacentParentShardId
, sParentShardId
, sShardId
, sHashKeyRange
, sSequenceNumberRange
, StreamDescription
, streamDescription
, sdStreamName
, sdStreamARN
, sdStreamStatus
, sdShards
, sdHasMoreShards
, Tag
, tag
, tagValue
, tagKey
) where
import Network.AWS.Kinesis.Types.Product
import Network.AWS.Kinesis.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
kinesis :: Service
kinesis =
Service
{ _svcAbbrev = "Kinesis"
, _svcSigner = v4
, _svcPrefix = "kinesis"
, _svcVersion = "2013-12-02"
, _svcEndpoint = defaultEndpoint kinesis
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| 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
_ExpiredIteratorException :: AsError a => Getting (First ServiceError) a ServiceError
_ExpiredIteratorException = _ServiceError . hasCode "ExpiredIteratorException"
_InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidArgumentException = _ServiceError . hasCode "InvalidArgumentException"
_ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_ProvisionedThroughputExceededException =
_ServiceError . hasCode "ProvisionedThroughputExceededException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException = _ServiceError . hasCode "ResourceInUseException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _ServiceError . hasCode "LimitExceededException"