Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data UsageRecord = UsageRecord' {}
- newUsageRecord :: UTCTime -> Text -> Text -> UsageRecord
- usageRecord_quantity :: Lens' UsageRecord (Maybe Natural)
- usageRecord_usageAllocations :: Lens' UsageRecord (Maybe (NonEmpty UsageAllocation))
- usageRecord_timestamp :: Lens' UsageRecord UTCTime
- usageRecord_customerIdentifier :: Lens' UsageRecord Text
- usageRecord_dimension :: Lens' UsageRecord Text
Documentation
data UsageRecord Source #
A UsageRecord
indicates a quantity of usage for a given product,
customer, dimension and time.
Multiple requests with the same UsageRecords
as input will be
de-duplicated to prevent double charges.
See: newUsageRecord
smart constructor.
UsageRecord' | |
|
Instances
:: UTCTime | |
-> Text | |
-> Text | |
-> UsageRecord |
Create a value of UsageRecord
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:quantity:UsageRecord'
, usageRecord_quantity
- The quantity of usage consumed by the customer for the given dimension
and time. Defaults to 0
if not specified.
$sel:usageAllocations:UsageRecord'
, usageRecord_usageAllocations
- The set of UsageAllocations
to submit. The sum of all
UsageAllocation
quantities must equal the Quantity of the
UsageRecord
.
$sel:timestamp:UsageRecord'
, usageRecord_timestamp
- Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to one hour in the past. Make
sure the timestamp
value is not before the start of the software
usage.
$sel:customerIdentifier:UsageRecord'
, usageRecord_customerIdentifier
- The CustomerIdentifier
is obtained through the ResolveCustomer
operation and represents an individual buyer in your application.
$sel:dimension:UsageRecord'
, usageRecord_dimension
- During the process of registering a product on AWS Marketplace,
dimensions are specified. These represent different units of value in
your application.
usageRecord_quantity :: Lens' UsageRecord (Maybe Natural) Source #
The quantity of usage consumed by the customer for the given dimension
and time. Defaults to 0
if not specified.
usageRecord_usageAllocations :: Lens' UsageRecord (Maybe (NonEmpty UsageAllocation)) Source #
The set of UsageAllocations
to submit. The sum of all
UsageAllocation
quantities must equal the Quantity of the
UsageRecord
.
usageRecord_timestamp :: Lens' UsageRecord UTCTime Source #
Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to one hour in the past. Make
sure the timestamp
value is not before the start of the software
usage.
usageRecord_customerIdentifier :: Lens' UsageRecord Text Source #
The CustomerIdentifier
is obtained through the ResolveCustomer
operation and represents an individual buyer in your application.
usageRecord_dimension :: Lens' UsageRecord Text Source #
During the process of registering a product on AWS Marketplace, dimensions are specified. These represent different units of value in your application.