amazonka-marketplace-metering-1.4.5: Amazon Marketplace Metering SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.MarketplaceMetering.BatchMeterUsage

Contents

Description

BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to post metering records for a set of customers.

For identical requests, the API is idempotent; requests can be retried with the same records or a subset of the input records.

Every request to BatchMeterUsage is for one product. If you need to meter usage for multiple products, you must make multiple calls to BatchMeterUsage.

BatchMeterUsage can process up to 25 UsageRecords at a time.

Synopsis

Creating a Request

batchMeterUsage #

Creates a value of BatchMeterUsage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • bmuUsageRecords - The set of UsageRecords to submit. BatchMeterUsage accepts up to 25 UsageRecords at a time.
  • bmuProductCode - Product code is used to uniquely identify a product in AWS Marketplace. The product code should be the same as the one used during the publishing of a new product.

data BatchMeterUsage #

A BatchMeterUsageRequest contains UsageRecords, which indicate quantities of usage within your application.

See: batchMeterUsage smart constructor.

Instances

Eq BatchMeterUsage # 
Data BatchMeterUsage # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BatchMeterUsage -> c BatchMeterUsage #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BatchMeterUsage #

toConstr :: BatchMeterUsage -> Constr #

dataTypeOf :: BatchMeterUsage -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c BatchMeterUsage) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BatchMeterUsage) #

gmapT :: (forall b. Data b => b -> b) -> BatchMeterUsage -> BatchMeterUsage #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BatchMeterUsage -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BatchMeterUsage -> r #

gmapQ :: (forall d. Data d => d -> u) -> BatchMeterUsage -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BatchMeterUsage -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BatchMeterUsage -> m BatchMeterUsage #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BatchMeterUsage -> m BatchMeterUsage #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BatchMeterUsage -> m BatchMeterUsage #

Read BatchMeterUsage # 
Show BatchMeterUsage # 
Generic BatchMeterUsage # 
Hashable BatchMeterUsage # 
ToJSON BatchMeterUsage # 
NFData BatchMeterUsage # 

Methods

rnf :: BatchMeterUsage -> () #

AWSRequest BatchMeterUsage # 
ToQuery BatchMeterUsage # 
ToPath BatchMeterUsage # 
ToHeaders BatchMeterUsage # 
type Rep BatchMeterUsage # 
type Rep BatchMeterUsage = D1 (MetaData "BatchMeterUsage" "Network.AWS.MarketplaceMetering.BatchMeterUsage" "amazonka-marketplace-metering-1.4.5-9px4Jx494it2K6FSd2bSk1" False) (C1 (MetaCons "BatchMeterUsage'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_bmuUsageRecords") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [UsageRecord])) (S1 (MetaSel (Just Symbol "_bmuProductCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs BatchMeterUsage # 

Request Lenses

bmuUsageRecords :: Lens' BatchMeterUsage [UsageRecord] #

The set of UsageRecords to submit. BatchMeterUsage accepts up to 25 UsageRecords at a time.

bmuProductCode :: Lens' BatchMeterUsage Text #

Product code is used to uniquely identify a product in AWS Marketplace. The product code should be the same as the one used during the publishing of a new product.

Destructuring the Response

batchMeterUsageResponse #

Creates a value of BatchMeterUsageResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • bmursResults - Contains all UsageRecords processed by BatchMeterUsage. These records were either honored by AWS Marketplace Metering Service or were invalid.
  • bmursUnprocessedRecords - Contains all UsageRecords that were not processed by BatchMeterUsage. This is a list of UsageRecords. You can retry the failed request by making another BatchMeterUsage call with this list as input in the BatchMeterUsageRequest.
  • bmursResponseStatus - -- | The response status code.

data BatchMeterUsageResponse #

Contains the UsageRecords processed by BatchMeterUsage and any records that have failed due to transient error.

See: batchMeterUsageResponse smart constructor.

Instances

Eq BatchMeterUsageResponse # 
Data BatchMeterUsageResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BatchMeterUsageResponse -> c BatchMeterUsageResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BatchMeterUsageResponse #

toConstr :: BatchMeterUsageResponse -> Constr #

dataTypeOf :: BatchMeterUsageResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c BatchMeterUsageResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BatchMeterUsageResponse) #

gmapT :: (forall b. Data b => b -> b) -> BatchMeterUsageResponse -> BatchMeterUsageResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BatchMeterUsageResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BatchMeterUsageResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> BatchMeterUsageResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BatchMeterUsageResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BatchMeterUsageResponse -> m BatchMeterUsageResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BatchMeterUsageResponse -> m BatchMeterUsageResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BatchMeterUsageResponse -> m BatchMeterUsageResponse #

Read BatchMeterUsageResponse # 
Show BatchMeterUsageResponse # 
Generic BatchMeterUsageResponse # 
NFData BatchMeterUsageResponse # 

Methods

rnf :: BatchMeterUsageResponse -> () #

type Rep BatchMeterUsageResponse # 
type Rep BatchMeterUsageResponse = D1 (MetaData "BatchMeterUsageResponse" "Network.AWS.MarketplaceMetering.BatchMeterUsage" "amazonka-marketplace-metering-1.4.5-9px4Jx494it2K6FSd2bSk1" False) (C1 (MetaCons "BatchMeterUsageResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_bmursResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [UsageRecordResult]))) ((:*:) (S1 (MetaSel (Just Symbol "_bmursUnprocessedRecords") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [UsageRecord]))) (S1 (MetaSel (Just Symbol "_bmursResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)))))

Response Lenses

bmursResults :: Lens' BatchMeterUsageResponse [UsageRecordResult] #

Contains all UsageRecords processed by BatchMeterUsage. These records were either honored by AWS Marketplace Metering Service or were invalid.

bmursUnprocessedRecords :: Lens' BatchMeterUsageResponse [UsageRecord] #

Contains all UsageRecords that were not processed by BatchMeterUsage. This is a list of UsageRecords. You can retry the failed request by making another BatchMeterUsage call with this list as input in the BatchMeterUsageRequest.

bmursResponseStatus :: Lens' BatchMeterUsageResponse Int #

  • - | The response status code.