libZSservicesZSamazonka-marketplace-meteringZSamazonka-marketplace-metering
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.MarketplaceMetering.Types.UsageRecord

Description

 
Synopsis

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 deduplicated to prevent double charges.

See: newUsageRecord smart constructor.

Constructors

UsageRecord' 

Fields

  • quantity :: Maybe Natural

    The quantity of usage consumed by the customer for the given dimension and time. Defaults to 0 if not specified.

  • usageAllocations :: Maybe (NonEmpty UsageAllocation)

    The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.

  • timestamp :: POSIX

    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.

  • customerIdentifier :: Text

    The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in your application.

  • dimension :: Text

    During the process of registering a product on AWS Marketplace, up to eight dimensions are specified. These represent different units of value in your application.

Instances

Instances details
Eq UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Read UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Show UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Generic UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Associated Types

type Rep UsageRecord :: Type -> Type #

NFData UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Methods

rnf :: UsageRecord -> () #

Hashable UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

ToJSON UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

FromJSON UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

type Rep UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

type Rep UsageRecord = D1 ('MetaData "UsageRecord" "Amazonka.MarketplaceMetering.Types.UsageRecord" "libZSservicesZSamazonka-marketplace-meteringZSamazonka-marketplace-metering" 'False) (C1 ('MetaCons "UsageRecord'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "quantity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "usageAllocations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty UsageAllocation)))) :*: (S1 ('MetaSel ('Just "timestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 POSIX) :*: (S1 ('MetaSel ('Just "customerIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "dimension") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newUsageRecord Source #

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, up to eight 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, up to eight dimensions are specified. These represent different units of value in your application.