{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Kinesis.Types
(
kinesis
, _KMSInvalidStateException
, _KMSThrottlingException
, _ExpiredIteratorException
, _InvalidArgumentException
, _KMSOptInRequired
, _ProvisionedThroughputExceededException
, _KMSNotFoundException
, _ExpiredNextTokenException
, _KMSDisabledException
, _ResourceNotFoundException
, _KMSAccessDeniedException
, _LimitExceededException
, _ResourceInUseException
, EncryptionType (..)
, MetricsName (..)
, ScalingType (..)
, ShardIteratorType (..)
, StreamStatus (..)
, EnhancedMetrics
, enhancedMetrics
, emShardLevelMetrics
, EnhancedMonitoringOutput
, enhancedMonitoringOutput
, emoDesiredShardLevelMetrics
, emoCurrentShardLevelMetrics
, emoStreamName
, HashKeyRange
, hashKeyRange
, hkrStartingHashKey
, hkrEndingHashKey
, PutRecordsRequestEntry
, putRecordsRequestEntry
, prreExplicitHashKey
, prreData
, prrePartitionKey
, PutRecordsResultEntry
, putRecordsResultEntry
, prreSequenceNumber
, prreErrorCode
, prreErrorMessage
, prreShardId
, Record
, record
, rEncryptionType
, rApproximateArrivalTimestamp
, rSequenceNumber
, rData
, rPartitionKey
, SequenceNumberRange
, sequenceNumberRange
, snrEndingSequenceNumber
, snrStartingSequenceNumber
, Shard
, shard
, sAdjacentParentShardId
, sParentShardId
, sShardId
, sHashKeyRange
, sSequenceNumberRange
, StreamDescription
, streamDescription
, sdEncryptionType
, sdKeyId
, sdStreamName
, sdStreamARN
, sdStreamStatus
, sdShards
, sdHasMoreShards
, sdRetentionPeriodHours
, sdStreamCreationTimestamp
, sdEnhancedMonitoring
, StreamDescriptionSummary
, streamDescriptionSummary
, sdsEncryptionType
, sdsKeyId
, sdsStreamName
, sdsStreamARN
, sdsStreamStatus
, sdsRetentionPeriodHours
, sdsStreamCreationTimestamp
, sdsEnhancedMonitoring
, sdsOpenShardCount
, Tag
, tag
, tagValue
, tagKey
) where
import Network.AWS.Kinesis.Types.Product
import Network.AWS.Kinesis.Types.Sum
import Network.AWS.Lens
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 "Kinesis"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_KMSInvalidStateException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSInvalidStateException =
_MatchServiceError kinesis "KMSInvalidStateException"
_KMSThrottlingException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSThrottlingException = _MatchServiceError kinesis "KMSThrottlingException"
_ExpiredIteratorException :: AsError a => Getting (First ServiceError) a ServiceError
_ExpiredIteratorException =
_MatchServiceError kinesis "ExpiredIteratorException"
_InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidArgumentException =
_MatchServiceError kinesis "InvalidArgumentException"
_KMSOptInRequired :: AsError a => Getting (First ServiceError) a ServiceError
_KMSOptInRequired = _MatchServiceError kinesis "KMSOptInRequired"
_ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_ProvisionedThroughputExceededException =
_MatchServiceError kinesis "ProvisionedThroughputExceededException"
_KMSNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSNotFoundException = _MatchServiceError kinesis "KMSNotFoundException"
_ExpiredNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_ExpiredNextTokenException =
_MatchServiceError kinesis "ExpiredNextTokenException"
_KMSDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSDisabledException = _MatchServiceError kinesis "KMSDisabledException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError kinesis "ResourceNotFoundException"
_KMSAccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSAccessDeniedException =
_MatchServiceError kinesis "KMSAccessDeniedException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _MatchServiceError kinesis "LimitExceededException"
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException = _MatchServiceError kinesis "ResourceInUseException"