{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.CloudWatchEvents.Types
(
cloudWatchEvents
, _PolicyLengthExceededException
, _ConcurrentModificationException
, _InvalidEventPatternException
, _InternalException
, _ResourceNotFoundException
, _LimitExceededException
, RuleState (..)
, BatchArrayProperties
, batchArrayProperties
, bapSize
, BatchParameters
, batchParameters
, bpRetryStrategy
, bpArrayProperties
, bpJobDefinition
, bpJobName
, BatchRetryStrategy
, batchRetryStrategy
, brsAttempts
, EcsParameters
, ecsParameters
, epTaskCount
, epTaskDefinitionARN
, InputTransformer
, inputTransformer
, itInputPathsMap
, itInputTemplate
, KinesisParameters
, kinesisParameters
, kpPartitionKeyPath
, PutEventsRequestEntry
, putEventsRequestEntry
, pereTime
, pereDetailType
, pereResources
, pereSource
, pereDetail
, PutEventsResultEntry
, putEventsResultEntry
, pereErrorCode
, pereErrorMessage
, pereEventId
, PutTargetsResultEntry
, putTargetsResultEntry
, ptreTargetId
, ptreErrorCode
, ptreErrorMessage
, RemoveTargetsResultEntry
, removeTargetsResultEntry
, rtreTargetId
, rtreErrorCode
, rtreErrorMessage
, Rule
, rule
, rEventPattern
, rState
, rARN
, rScheduleExpression
, rName
, rDescription
, rRoleARN
, RunCommandParameters
, runCommandParameters
, rcpRunCommandTargets
, RunCommandTarget
, runCommandTarget
, rctKey
, rctValues
, SqsParameters
, sqsParameters
, spMessageGroupId
, Target
, target
, tRunCommandParameters
, tKinesisParameters
, tInputTransformer
, tSqsParameters
, tInput
, tBatchParameters
, tEcsParameters
, tInputPath
, tRoleARN
, tId
, tARN
) where
import Network.AWS.CloudWatchEvents.Types.Product
import Network.AWS.CloudWatchEvents.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
cloudWatchEvents :: Service
cloudWatchEvents =
Service
{ _svcAbbrev = "CloudWatchEvents"
, _svcSigner = v4
, _svcPrefix = "events"
, _svcVersion = "2015-10-07"
, _svcEndpoint = defaultEndpoint cloudWatchEvents
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "CloudWatchEvents"
, _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
_PolicyLengthExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_PolicyLengthExceededException =
_MatchServiceError cloudWatchEvents "PolicyLengthExceededException"
_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError
_ConcurrentModificationException =
_MatchServiceError cloudWatchEvents "ConcurrentModificationException"
_InvalidEventPatternException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidEventPatternException =
_MatchServiceError cloudWatchEvents "InvalidEventPatternException"
_InternalException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalException = _MatchServiceError cloudWatchEvents "InternalException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError cloudWatchEvents "ResourceNotFoundException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_MatchServiceError cloudWatchEvents "LimitExceededException"