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.Lens

Description

 
Synopsis

Operations

RegisterUsage

registerUsage_nonce :: Lens' RegisterUsage (Maybe Text) Source #

(Optional) To scope down the registration to a specific running software instance and guard against replay attacks.

registerUsage_productCode :: Lens' RegisterUsage Text Source #

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.

registerUsage_publicKeyVersion :: Lens' RegisterUsage Natural Source #

Public Key Version provided by AWS Marketplace

registerUsageResponse_publicKeyRotationTimestamp :: Lens' RegisterUsageResponse (Maybe UTCTime) Source #

(Optional) Only included when public key version has expired

BatchMeterUsage

batchMeterUsage_usageRecords :: Lens' BatchMeterUsage [UsageRecord] Source #

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

batchMeterUsage_productCode :: Lens' BatchMeterUsage Text Source #

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.

batchMeterUsageResponse_results :: Lens' BatchMeterUsageResponse (Maybe [UsageRecordResult]) Source #

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

batchMeterUsageResponse_unprocessedRecords :: Lens' BatchMeterUsageResponse (Maybe [UsageRecord]) Source #

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.

ResolveCustomer

resolveCustomer_registrationToken :: Lens' ResolveCustomer Text Source #

When a buyer visits your website during the registration process, the buyer submits a registration token through the browser. The registration token is resolved to obtain a CustomerIdentifier and product code.

resolveCustomerResponse_customerIdentifier :: Lens' ResolveCustomerResponse (Maybe Text) Source #

The CustomerIdentifier is used to identify an individual customer in your application. Calls to BatchMeterUsage require CustomerIdentifiers for each UsageRecord.

resolveCustomerResponse_productCode :: Lens' ResolveCustomerResponse (Maybe Text) Source #

The product code is returned to confirm that the buyer is registering for your product. Subsequent BatchMeterUsage calls should be made using this product code.

MeterUsage

meterUsage_usageQuantity :: Lens' MeterUsage (Maybe Natural) Source #

Consumption value for the hour. Defaults to 0 if not specified.

meterUsage_usageAllocations :: Lens' MeterUsage (Maybe (NonEmpty UsageAllocation)) Source #

The set of UsageAllocations to submit.

The sum of all UsageAllocation quantities must equal the UsageQuantity of the MeterUsage request, and each UsageAllocation must have a unique set of tags (include no tags).

meterUsage_dryRun :: Lens' MeterUsage (Maybe Bool) Source #

Checks whether you have the permissions required for the action, but does not make the request. If you have the permissions, the request returns DryRunOperation; otherwise, it returns UnauthorizedException. Defaults to false if not specified.

meterUsage_productCode :: Lens' MeterUsage Text Source #

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.

meterUsage_timestamp :: Lens' MeterUsage 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.

meterUsage_usageDimension :: Lens' MeterUsage Text Source #

It will be one of the fcp dimension name provided during the publishing of the product.

Types

Tag

tag_key :: Lens' Tag Text Source #

One part of a key-value pair that makes up a tag. A key is a label that acts like a category for the specific tag values.

tag_value :: Lens' Tag Text Source #

One part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key). The value can be empty or null.

UsageAllocation

usageAllocation_tags :: Lens' UsageAllocation (Maybe (NonEmpty Tag)) Source #

The set of tags that define the bucket of usage. For the bucket of items with no tags, this parameter can be left out.

usageAllocation_allocatedUsageQuantity :: Lens' UsageAllocation Natural Source #

The total quantity allocated to this bucket of usage.

UsageRecord

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.

UsageRecordResult

usageRecordResult_status :: Lens' UsageRecordResult (Maybe UsageRecordResultStatus) Source #

The UsageRecordResult Status indicates the status of an individual UsageRecord processed by BatchMeterUsage.

  • Success- The UsageRecord was accepted and honored by BatchMeterUsage.
  • CustomerNotSubscribed- The CustomerIdentifier specified is not subscribed to your product. The UsageRecord was not honored. Future UsageRecords for this customer will fail until the customer subscribes to your product.
  • DuplicateRecord- Indicates that the UsageRecord was invalid and not honored. A previously metered UsageRecord had the same customer, dimension, and time, but a different quantity.

usageRecordResult_usageRecord :: Lens' UsageRecordResult (Maybe UsageRecord) Source #

The UsageRecord that was part of the BatchMeterUsage request.

usageRecordResult_meteringRecordId :: Lens' UsageRecordResult (Maybe Text) Source #

The MeteringRecordId is a unique identifier for this metering event.