module Network.AWS.CognitoSync.Types
(
cognitoSync
, _InvalidParameterException
, _NotAuthorizedException
, _InternalErrorException
, _InvalidConfigurationException
, _DuplicateRequestException
, _LambdaThrottledException
, _AlreadyStreamedException
, _InvalidLambdaFunctionOutputException
, _TooManyRequestsException
, _ConcurrentModificationException
, _ResourceConflictException
, _ResourceNotFoundException
, _LimitExceededException
, BulkPublishStatus (..)
, Operation (..)
, Platform (..)
, StreamingStatus (..)
, CognitoStreams
, cognitoStreams
, csStreamingStatus
, csStreamName
, csRoleARN
, Dataset
, dataset
, dLastModifiedDate
, dNumRecords
, dDataStorage
, dDatasetName
, dCreationDate
, dLastModifiedBy
, dIdentityId
, IdentityPoolUsage
, identityPoolUsage
, ipuLastModifiedDate
, ipuIdentityPoolId
, ipuDataStorage
, ipuSyncSessionsCount
, IdentityUsage
, identityUsage
, iuLastModifiedDate
, iuIdentityPoolId
, iuDatasetCount
, iuDataStorage
, iuIdentityId
, PushSync
, pushSync
, psApplicationARNs
, psRoleARN
, Record
, record
, rSyncCount
, rDeviceLastModifiedDate
, rLastModifiedDate
, rValue
, rKey
, rLastModifiedBy
, RecordPatch
, recordPatch
, rpDeviceLastModifiedDate
, rpValue
, rpOp
, rpKey
, rpSyncCount
) where
import Network.AWS.CognitoSync.Types.Product
import Network.AWS.CognitoSync.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
cognitoSync :: Service
cognitoSync =
Service
{ _svcAbbrev = "CognitoSync"
, _svcSigner = v4
, _svcPrefix = "cognito-sync"
, _svcVersion = "2014-06-30"
, _svcEndpoint = defaultEndpoint cognitoSync
, _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
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_ServiceError . hasStatus 400 . hasCode "InvalidParameter"
_NotAuthorizedException :: AsError a => Getting (First ServiceError) a ServiceError
_NotAuthorizedException =
_ServiceError . hasStatus 403 . hasCode "NotAuthorizedError"
_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalErrorException =
_ServiceError . hasStatus 500 . hasCode "InternalError"
_InvalidConfigurationException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidConfigurationException =
_ServiceError . hasStatus 400 . hasCode "InvalidConfiguration"
_DuplicateRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateRequestException =
_ServiceError . hasStatus 400 . hasCode "DuplicateRequest"
_LambdaThrottledException :: AsError a => Getting (First ServiceError) a ServiceError
_LambdaThrottledException =
_ServiceError . hasStatus 429 . hasCode "LambdaThrottled"
_AlreadyStreamedException :: AsError a => Getting (First ServiceError) a ServiceError
_AlreadyStreamedException =
_ServiceError . hasStatus 400 . hasCode "AlreadyStreamed"
_InvalidLambdaFunctionOutputException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLambdaFunctionOutputException =
_ServiceError . hasStatus 400 . hasCode "InvalidLambdaFunctionOutput"
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyRequestsException =
_ServiceError . hasStatus 429 . hasCode "TooManyRequests"
_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError
_ConcurrentModificationException =
_ServiceError . hasStatus 400 . hasCode "ConcurrentModification"
_ResourceConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceConflictException =
_ServiceError . hasStatus 409 . hasCode "ResourceConflict"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasStatus 404 . hasCode "ResourceNotFound"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_ServiceError . hasStatus 400 . hasCode "LimitExceeded"