{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Budgets.Types
(
defaultService,
_AccessDeniedException,
_CreationLimitExceededException,
_DuplicateRecordException,
_ExpiredNextTokenException,
_InternalErrorException,
_InvalidNextTokenException,
_InvalidParameterException,
_NotFoundException,
_ResourceLockedException,
_ThrottlingException,
ActionStatus (..),
ActionSubType (..),
ActionType (..),
ApprovalModel (..),
AutoAdjustType (..),
BudgetType (..),
ComparisonOperator (..),
EventType (..),
ExecutionType (..),
NotificationState (..),
NotificationType (..),
SubscriptionType (..),
ThresholdType (..),
TimeUnit (..),
Action (..),
newAction,
action_actionId,
action_budgetName,
action_notificationType,
action_actionType,
action_actionThreshold,
action_definition,
action_executionRoleArn,
action_approvalModel,
action_status,
action_subscribers,
ActionHistory (..),
newActionHistory,
actionHistory_timestamp,
actionHistory_status,
actionHistory_eventType,
actionHistory_actionHistoryDetails,
ActionHistoryDetails (..),
newActionHistoryDetails,
actionHistoryDetails_message,
actionHistoryDetails_action,
ActionThreshold (..),
newActionThreshold,
actionThreshold_actionThresholdValue,
actionThreshold_actionThresholdType,
AutoAdjustData (..),
newAutoAdjustData,
autoAdjustData_historicalOptions,
autoAdjustData_lastAutoAdjustTime,
autoAdjustData_autoAdjustType,
Budget (..),
newBudget,
budget_autoAdjustData,
budget_budgetLimit,
budget_calculatedSpend,
budget_costFilters,
budget_costTypes,
budget_lastUpdatedTime,
budget_plannedBudgetLimits,
budget_timePeriod,
budget_budgetName,
budget_timeUnit,
budget_budgetType,
BudgetNotificationsForAccount (..),
newBudgetNotificationsForAccount,
budgetNotificationsForAccount_budgetName,
budgetNotificationsForAccount_notifications,
BudgetPerformanceHistory (..),
newBudgetPerformanceHistory,
budgetPerformanceHistory_budgetName,
budgetPerformanceHistory_budgetType,
budgetPerformanceHistory_budgetedAndActualAmountsList,
budgetPerformanceHistory_costFilters,
budgetPerformanceHistory_costTypes,
budgetPerformanceHistory_timeUnit,
BudgetedAndActualAmounts (..),
newBudgetedAndActualAmounts,
budgetedAndActualAmounts_actualAmount,
budgetedAndActualAmounts_budgetedAmount,
budgetedAndActualAmounts_timePeriod,
CalculatedSpend (..),
newCalculatedSpend,
calculatedSpend_forecastedSpend,
calculatedSpend_actualSpend,
CostTypes (..),
newCostTypes,
costTypes_includeCredit,
costTypes_includeDiscount,
costTypes_includeOtherSubscription,
costTypes_includeRecurring,
costTypes_includeRefund,
costTypes_includeSubscription,
costTypes_includeSupport,
costTypes_includeTax,
costTypes_includeUpfront,
costTypes_useAmortized,
costTypes_useBlended,
Definition (..),
newDefinition,
definition_iamActionDefinition,
definition_scpActionDefinition,
definition_ssmActionDefinition,
HistoricalOptions (..),
newHistoricalOptions,
historicalOptions_lookBackAvailablePeriods,
historicalOptions_budgetAdjustmentPeriod,
IamActionDefinition (..),
newIamActionDefinition,
iamActionDefinition_groups,
iamActionDefinition_roles,
iamActionDefinition_users,
iamActionDefinition_policyArn,
Notification (..),
newNotification,
notification_notificationState,
notification_thresholdType,
notification_notificationType,
notification_comparisonOperator,
notification_threshold,
NotificationWithSubscribers (..),
newNotificationWithSubscribers,
notificationWithSubscribers_notification,
notificationWithSubscribers_subscribers,
ScpActionDefinition (..),
newScpActionDefinition,
scpActionDefinition_policyId,
scpActionDefinition_targetIds,
Spend (..),
newSpend,
spend_amount,
spend_unit,
SsmActionDefinition (..),
newSsmActionDefinition,
ssmActionDefinition_actionSubType,
ssmActionDefinition_region,
ssmActionDefinition_instanceIds,
Subscriber (..),
newSubscriber,
subscriber_subscriptionType,
subscriber_address,
TimePeriod (..),
newTimePeriod,
timePeriod_end,
timePeriod_start,
)
where
import Amazonka.Budgets.Types.Action
import Amazonka.Budgets.Types.ActionHistory
import Amazonka.Budgets.Types.ActionHistoryDetails
import Amazonka.Budgets.Types.ActionStatus
import Amazonka.Budgets.Types.ActionSubType
import Amazonka.Budgets.Types.ActionThreshold
import Amazonka.Budgets.Types.ActionType
import Amazonka.Budgets.Types.ApprovalModel
import Amazonka.Budgets.Types.AutoAdjustData
import Amazonka.Budgets.Types.AutoAdjustType
import Amazonka.Budgets.Types.Budget
import Amazonka.Budgets.Types.BudgetNotificationsForAccount
import Amazonka.Budgets.Types.BudgetPerformanceHistory
import Amazonka.Budgets.Types.BudgetType
import Amazonka.Budgets.Types.BudgetedAndActualAmounts
import Amazonka.Budgets.Types.CalculatedSpend
import Amazonka.Budgets.Types.ComparisonOperator
import Amazonka.Budgets.Types.CostTypes
import Amazonka.Budgets.Types.Definition
import Amazonka.Budgets.Types.EventType
import Amazonka.Budgets.Types.ExecutionType
import Amazonka.Budgets.Types.HistoricalOptions
import Amazonka.Budgets.Types.IamActionDefinition
import Amazonka.Budgets.Types.Notification
import Amazonka.Budgets.Types.NotificationState
import Amazonka.Budgets.Types.NotificationType
import Amazonka.Budgets.Types.NotificationWithSubscribers
import Amazonka.Budgets.Types.ScpActionDefinition
import Amazonka.Budgets.Types.Spend
import Amazonka.Budgets.Types.SsmActionDefinition
import Amazonka.Budgets.Types.Subscriber
import Amazonka.Budgets.Types.SubscriptionType
import Amazonka.Budgets.Types.ThresholdType
import Amazonka.Budgets.Types.TimePeriod
import Amazonka.Budgets.Types.TimeUnit
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"Budgets",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"budgets",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"budgets",
$sel:version:Service :: ByteString
Core.version = ByteString
"2016-10-20",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"Budgets",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
_CreationLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_CreationLimitExceededException :: forall a. AsError a => Fold a ServiceError
_CreationLimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"CreationLimitExceededException"
_DuplicateRecordException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DuplicateRecordException :: forall a. AsError a => Fold a ServiceError
_DuplicateRecordException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DuplicateRecordException"
_ExpiredNextTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ExpiredNextTokenException :: forall a. AsError a => Fold a ServiceError
_ExpiredNextTokenException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ExpiredNextTokenException"
_InternalErrorException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalErrorException :: forall a. AsError a => Fold a ServiceError
_InternalErrorException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalErrorException"
_InvalidNextTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidNextTokenException :: forall a. AsError a => Fold a ServiceError
_InvalidNextTokenException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidNextTokenException"
_InvalidParameterException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidParameterException :: forall a. AsError a => Fold a ServiceError
_InvalidParameterException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidParameterException"
_NotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_NotFoundException :: forall a. AsError a => Fold a ServiceError
_NotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"NotFoundException"
_ResourceLockedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceLockedException :: forall a. AsError a => Fold a ServiceError
_ResourceLockedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceLockedException"
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"