Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Network.AWS.MarketplaceMetering.BatchMeterUsage
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.
- batchMeterUsage :: Text -> BatchMeterUsage
- data BatchMeterUsage
- bmuUsageRecords :: Lens' BatchMeterUsage [UsageRecord]
- bmuProductCode :: Lens' BatchMeterUsage Text
- batchMeterUsageResponse :: Int -> BatchMeterUsageResponse
- data BatchMeterUsageResponse
- bmursResults :: Lens' BatchMeterUsageResponse [UsageRecordResult]
- bmursUnprocessedRecords :: Lens' BatchMeterUsageResponse [UsageRecord]
- bmursResponseStatus :: Lens' BatchMeterUsageResponse Int
Creating a Request
Arguments
:: Text | |
-> 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
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
Arguments
:: Int | |
-> 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.
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.