{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.BillingConductor.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_ResourceNotFoundException,
_ServiceLimitExceededException,
_ThrottlingException,
_ValidationException,
AssociateResourceErrorReason (..),
BillingGroupStatus (..),
CurrencyCode (..),
CustomLineItemRelationship (..),
CustomLineItemType (..),
PricingRuleScope (..),
PricingRuleType (..),
AccountAssociationsListElement (..),
newAccountAssociationsListElement,
accountAssociationsListElement_accountEmail,
accountAssociationsListElement_accountId,
accountAssociationsListElement_accountName,
accountAssociationsListElement_billingGroupArn,
AccountGrouping (..),
newAccountGrouping,
accountGrouping_linkedAccountIds,
AssociateResourceError (..),
newAssociateResourceError,
associateResourceError_message,
associateResourceError_reason,
AssociateResourceResponseElement (..),
newAssociateResourceResponseElement,
associateResourceResponseElement_arn,
associateResourceResponseElement_error,
BillingGroupCostReportElement (..),
newBillingGroupCostReportElement,
billingGroupCostReportElement_aWSCost,
billingGroupCostReportElement_arn,
billingGroupCostReportElement_currency,
billingGroupCostReportElement_margin,
billingGroupCostReportElement_marginPercentage,
billingGroupCostReportElement_proformaCost,
BillingGroupListElement (..),
newBillingGroupListElement,
billingGroupListElement_arn,
billingGroupListElement_computationPreference,
billingGroupListElement_creationTime,
billingGroupListElement_description,
billingGroupListElement_lastModifiedTime,
billingGroupListElement_name,
billingGroupListElement_primaryAccountId,
billingGroupListElement_size,
billingGroupListElement_status,
billingGroupListElement_statusReason,
ComputationPreference (..),
newComputationPreference,
computationPreference_pricingPlanArn,
CreateFreeTierConfig (..),
newCreateFreeTierConfig,
createFreeTierConfig_activated,
CreateTieringInput (..),
newCreateTieringInput,
createTieringInput_freeTier,
CustomLineItemBillingPeriodRange (..),
newCustomLineItemBillingPeriodRange,
customLineItemBillingPeriodRange_exclusiveEndBillingPeriod,
customLineItemBillingPeriodRange_inclusiveStartBillingPeriod,
CustomLineItemChargeDetails (..),
newCustomLineItemChargeDetails,
customLineItemChargeDetails_flat,
customLineItemChargeDetails_percentage,
customLineItemChargeDetails_type,
CustomLineItemFlatChargeDetails (..),
newCustomLineItemFlatChargeDetails,
customLineItemFlatChargeDetails_chargeValue,
CustomLineItemListElement (..),
newCustomLineItemListElement,
customLineItemListElement_arn,
customLineItemListElement_associationSize,
customLineItemListElement_billingGroupArn,
customLineItemListElement_chargeDetails,
customLineItemListElement_creationTime,
customLineItemListElement_currencyCode,
customLineItemListElement_description,
customLineItemListElement_lastModifiedTime,
customLineItemListElement_name,
customLineItemListElement_productCode,
CustomLineItemPercentageChargeDetails (..),
newCustomLineItemPercentageChargeDetails,
customLineItemPercentageChargeDetails_associatedValues,
customLineItemPercentageChargeDetails_percentageValue,
CustomLineItemVersionListElement (..),
newCustomLineItemVersionListElement,
customLineItemVersionListElement_associationSize,
customLineItemVersionListElement_billingGroupArn,
customLineItemVersionListElement_chargeDetails,
customLineItemVersionListElement_creationTime,
customLineItemVersionListElement_currencyCode,
customLineItemVersionListElement_description,
customLineItemVersionListElement_endBillingPeriod,
customLineItemVersionListElement_lastModifiedTime,
customLineItemVersionListElement_name,
customLineItemVersionListElement_productCode,
customLineItemVersionListElement_startBillingPeriod,
DisassociateResourceResponseElement (..),
newDisassociateResourceResponseElement,
disassociateResourceResponseElement_arn,
disassociateResourceResponseElement_error,
FreeTierConfig (..),
newFreeTierConfig,
freeTierConfig_activated,
ListAccountAssociationsFilter (..),
newListAccountAssociationsFilter,
listAccountAssociationsFilter_accountId,
listAccountAssociationsFilter_association,
ListBillingGroupCostReportsFilter (..),
newListBillingGroupCostReportsFilter,
listBillingGroupCostReportsFilter_billingGroupArns,
ListBillingGroupsFilter (..),
newListBillingGroupsFilter,
listBillingGroupsFilter_arns,
listBillingGroupsFilter_pricingPlan,
ListCustomLineItemChargeDetails (..),
newListCustomLineItemChargeDetails,
listCustomLineItemChargeDetails_flat,
listCustomLineItemChargeDetails_percentage,
listCustomLineItemChargeDetails_type,
ListCustomLineItemFlatChargeDetails (..),
newListCustomLineItemFlatChargeDetails,
listCustomLineItemFlatChargeDetails_chargeValue,
ListCustomLineItemPercentageChargeDetails (..),
newListCustomLineItemPercentageChargeDetails,
listCustomLineItemPercentageChargeDetails_percentageValue,
ListCustomLineItemVersionsBillingPeriodRangeFilter (..),
newListCustomLineItemVersionsBillingPeriodRangeFilter,
listCustomLineItemVersionsBillingPeriodRangeFilter_endBillingPeriod,
listCustomLineItemVersionsBillingPeriodRangeFilter_startBillingPeriod,
ListCustomLineItemVersionsFilter (..),
newListCustomLineItemVersionsFilter,
listCustomLineItemVersionsFilter_billingPeriodRange,
ListCustomLineItemsFilter (..),
newListCustomLineItemsFilter,
listCustomLineItemsFilter_arns,
listCustomLineItemsFilter_billingGroups,
listCustomLineItemsFilter_names,
ListPricingPlansFilter (..),
newListPricingPlansFilter,
listPricingPlansFilter_arns,
ListPricingRulesFilter (..),
newListPricingRulesFilter,
listPricingRulesFilter_arns,
ListResourcesAssociatedToCustomLineItemFilter (..),
newListResourcesAssociatedToCustomLineItemFilter,
listResourcesAssociatedToCustomLineItemFilter_relationship,
ListResourcesAssociatedToCustomLineItemResponseElement (..),
newListResourcesAssociatedToCustomLineItemResponseElement,
listResourcesAssociatedToCustomLineItemResponseElement_arn,
listResourcesAssociatedToCustomLineItemResponseElement_endBillingPeriod,
listResourcesAssociatedToCustomLineItemResponseElement_relationship,
PricingPlanListElement (..),
newPricingPlanListElement,
pricingPlanListElement_arn,
pricingPlanListElement_creationTime,
pricingPlanListElement_description,
pricingPlanListElement_lastModifiedTime,
pricingPlanListElement_name,
pricingPlanListElement_size,
PricingRuleListElement (..),
newPricingRuleListElement,
pricingRuleListElement_arn,
pricingRuleListElement_associatedPricingPlanCount,
pricingRuleListElement_billingEntity,
pricingRuleListElement_creationTime,
pricingRuleListElement_description,
pricingRuleListElement_lastModifiedTime,
pricingRuleListElement_modifierPercentage,
pricingRuleListElement_name,
pricingRuleListElement_scope,
pricingRuleListElement_service,
pricingRuleListElement_tiering,
pricingRuleListElement_type,
Tiering (..),
newTiering,
tiering_freeTier,
UpdateCustomLineItemChargeDetails (..),
newUpdateCustomLineItemChargeDetails,
updateCustomLineItemChargeDetails_flat,
updateCustomLineItemChargeDetails_percentage,
UpdateCustomLineItemFlatChargeDetails (..),
newUpdateCustomLineItemFlatChargeDetails,
updateCustomLineItemFlatChargeDetails_chargeValue,
UpdateCustomLineItemPercentageChargeDetails (..),
newUpdateCustomLineItemPercentageChargeDetails,
updateCustomLineItemPercentageChargeDetails_percentageValue,
UpdateFreeTierConfig (..),
newUpdateFreeTierConfig,
updateFreeTierConfig_activated,
UpdateTieringInput (..),
newUpdateTieringInput,
updateTieringInput_freeTier,
)
where
import Amazonka.BillingConductor.Types.AccountAssociationsListElement
import Amazonka.BillingConductor.Types.AccountGrouping
import Amazonka.BillingConductor.Types.AssociateResourceError
import Amazonka.BillingConductor.Types.AssociateResourceErrorReason
import Amazonka.BillingConductor.Types.AssociateResourceResponseElement
import Amazonka.BillingConductor.Types.BillingGroupCostReportElement
import Amazonka.BillingConductor.Types.BillingGroupListElement
import Amazonka.BillingConductor.Types.BillingGroupStatus
import Amazonka.BillingConductor.Types.ComputationPreference
import Amazonka.BillingConductor.Types.CreateFreeTierConfig
import Amazonka.BillingConductor.Types.CreateTieringInput
import Amazonka.BillingConductor.Types.CurrencyCode
import Amazonka.BillingConductor.Types.CustomLineItemBillingPeriodRange
import Amazonka.BillingConductor.Types.CustomLineItemChargeDetails
import Amazonka.BillingConductor.Types.CustomLineItemFlatChargeDetails
import Amazonka.BillingConductor.Types.CustomLineItemListElement
import Amazonka.BillingConductor.Types.CustomLineItemPercentageChargeDetails
import Amazonka.BillingConductor.Types.CustomLineItemRelationship
import Amazonka.BillingConductor.Types.CustomLineItemType
import Amazonka.BillingConductor.Types.CustomLineItemVersionListElement
import Amazonka.BillingConductor.Types.DisassociateResourceResponseElement
import Amazonka.BillingConductor.Types.FreeTierConfig
import Amazonka.BillingConductor.Types.ListAccountAssociationsFilter
import Amazonka.BillingConductor.Types.ListBillingGroupCostReportsFilter
import Amazonka.BillingConductor.Types.ListBillingGroupsFilter
import Amazonka.BillingConductor.Types.ListCustomLineItemChargeDetails
import Amazonka.BillingConductor.Types.ListCustomLineItemFlatChargeDetails
import Amazonka.BillingConductor.Types.ListCustomLineItemPercentageChargeDetails
import Amazonka.BillingConductor.Types.ListCustomLineItemVersionsBillingPeriodRangeFilter
import Amazonka.BillingConductor.Types.ListCustomLineItemVersionsFilter
import Amazonka.BillingConductor.Types.ListCustomLineItemsFilter
import Amazonka.BillingConductor.Types.ListPricingPlansFilter
import Amazonka.BillingConductor.Types.ListPricingRulesFilter
import Amazonka.BillingConductor.Types.ListResourcesAssociatedToCustomLineItemFilter
import Amazonka.BillingConductor.Types.ListResourcesAssociatedToCustomLineItemResponseElement
import Amazonka.BillingConductor.Types.PricingPlanListElement
import Amazonka.BillingConductor.Types.PricingRuleListElement
import Amazonka.BillingConductor.Types.PricingRuleScope
import Amazonka.BillingConductor.Types.PricingRuleType
import Amazonka.BillingConductor.Types.Tiering
import Amazonka.BillingConductor.Types.UpdateCustomLineItemChargeDetails
import Amazonka.BillingConductor.Types.UpdateCustomLineItemFlatChargeDetails
import Amazonka.BillingConductor.Types.UpdateCustomLineItemPercentageChargeDetails
import Amazonka.BillingConductor.Types.UpdateFreeTierConfig
import Amazonka.BillingConductor.Types.UpdateTieringInput
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
"BillingConductor",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"billingconductor",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"billingconductor",
$sel:version:Service :: ByteString
Core.version = ByteString
"2021-07-30",
$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
"BillingConductor",
$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"
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
403
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
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
409
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
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
500
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
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
404
_ServiceLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceLimitExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceLimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceLimitExceededException"
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
402
_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"
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
429
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"
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