{-# LANGUAGE OverloadedStrings #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.Kinesis.Types -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- module Network.AWS.Kinesis.Types ( -- * Service Configuration kinesis -- * Errors , _ExpiredIteratorException , _InvalidArgumentException , _ProvisionedThroughputExceededException , _ResourceNotFoundException , _LimitExceededException , _ResourceInUseException -- * ShardIteratorType , ShardIteratorType (..) -- * StreamStatus , StreamStatus (..) -- * HashKeyRange , HashKeyRange , hashKeyRange , hkrStartingHashKey , hkrEndingHashKey -- * PutRecordsRequestEntry , PutRecordsRequestEntry , putRecordsRequestEntry , prreExplicitHashKey , prreData , prrePartitionKey -- * PutRecordsResultEntry , PutRecordsResultEntry , putRecordsResultEntry , prreSequenceNumber , prreErrorCode , prreErrorMessage , prreShardId -- * Record , Record , record , rSequenceNumber , rData , rPartitionKey -- * SequenceNumberRange , SequenceNumberRange , sequenceNumberRange , snrEndingSequenceNumber , snrStartingSequenceNumber -- * Shard , Shard , shard , sAdjacentParentShardId , sParentShardId , sShardId , sHashKeyRange , sSequenceNumberRange -- * StreamDescription , StreamDescription , streamDescription , sdStreamName , sdStreamARN , sdStreamStatus , sdShards , sdHasMoreShards -- * Tag , 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 -- | API version '2013-12-02' of the Amazon Kinesis SDK configuration. 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 -- | The provided iterator exceeds the maximum age allowed. _ExpiredIteratorException :: AsError a => Getting (First ServiceError) a ServiceError _ExpiredIteratorException = _ServiceError . hasCode "ExpiredIteratorException" -- | A specified parameter exceeds its restrictions, is not supported, or -- can\'t be used. For more information, see the returned message. _InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError _InvalidArgumentException = _ServiceError . hasCode "InvalidArgumentException" -- | The request rate is too high, or the requested data is too large for the -- available throughput. Reduce the frequency or size of your requests. For -- more information, see -- -- in the /AWS General Reference/. _ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError _ProvisionedThroughputExceededException = _ServiceError . hasCode "ProvisionedThroughputExceededException" -- | The requested resource could not be found. It might not be specified -- correctly, or it might not be in the 'ACTIVE' state. _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError _ResourceNotFoundException = _ServiceError . hasCode "ResourceNotFoundException" -- | The requested resource exceeds the maximum number allowed, or the number -- of concurrent stream requests exceeds the maximum number allowed (5). _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError _LimitExceededException = _ServiceError . hasCode "LimitExceededException" -- | The resource is not available for this operation. For example, you -- attempted to split a shard but the stream is not in the 'ACTIVE' state. _ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError _ResourceInUseException = _ServiceError . hasCode "ResourceInUseException"