module Network.AWS.Budgets.Types
(
budgets
, _InvalidParameterException
, _InternalErrorException
, _ExpiredNextTokenException
, _NotFoundException
, _InvalidNextTokenException
, _DuplicateRecordException
, _CreationLimitExceededException
, BudgetType (..)
, ComparisonOperator (..)
, NotificationType (..)
, SubscriptionType (..)
, ThresholdType (..)
, TimeUnit (..)
, Budget
, budget
, bCalculatedSpend
, bCostFilters
, bBudgetName
, bBudgetLimit
, bCostTypes
, bTimeUnit
, bTimePeriod
, bBudgetType
, CalculatedSpend
, calculatedSpend
, csForecastedSpend
, csActualSpend
, CostTypes
, costTypes
, ctIncludeTax
, ctIncludeSubscription
, ctUseBlended
, Notification
, notification
, nThresholdType
, nNotificationType
, nComparisonOperator
, nThreshold
, NotificationWithSubscribers
, notificationWithSubscribers
, nwsNotification
, nwsSubscribers
, Spend
, spend
, sAmount
, sUnit
, Subscriber
, subscriber
, sSubscriptionType
, sAddress
, TimePeriod
, timePeriod
, tpStart
, tpEnd
) where
import Network.AWS.Budgets.Types.Product
import Network.AWS.Budgets.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
budgets :: Service
budgets =
Service
{ _svcAbbrev = "Budgets"
, _svcSigner = v4
, _svcPrefix = "budgets"
, _svcVersion = "2016-10-20"
, _svcEndpoint = defaultEndpoint budgets
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Budgets"
, _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 (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
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_MatchServiceError budgets "InvalidParameterException"
_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalErrorException = _MatchServiceError budgets "InternalErrorException"
_ExpiredNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_ExpiredNextTokenException =
_MatchServiceError budgets "ExpiredNextTokenException"
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_NotFoundException = _MatchServiceError budgets "NotFoundException"
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
_MatchServiceError budgets "InvalidNextTokenException"
_DuplicateRecordException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateRecordException =
_MatchServiceError budgets "DuplicateRecordException"
_CreationLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_CreationLimitExceededException =
_MatchServiceError budgets "CreationLimitExceededException"