amazonka-marketplace-metering-2.0: Amazon Marketplace Metering SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.MarketplaceMetering

Description

Derived from API version 2016-01-14 of the AWS service descriptions, licensed under Apache 2.0.

AWS Marketplace Metering Service

This reference provides descriptions of the low-level AWS Marketplace Metering Service API.

AWS Marketplace sellers can use this API to submit usage data for custom usage dimensions.

For information on the permissions you need to use this API, see AWS Marketplace metering and entitlement API permissions in the AWS Marketplace Seller Guide.

Submitting Metering Records

  • MeterUsage - Submits the metering record for an AWS Marketplace product. MeterUsage is called from an EC2 instance or a container running on EKS or ECS.
  • BatchMeterUsage - Submits the metering record for a set of customers. BatchMeterUsage is called from a software-as-a-service (SaaS) application.

Accepting New Customers

  • ResolveCustomer - Called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a Registration Token through the browser. The Registration Token is resolved through this API to obtain a CustomerIdentifier along with the CustomerAWSAccountId and ProductCode.

Entitlement and Metering for Paid Container Products

  • Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the RegisterUsage operation for software entitlement and metering. Free and BYOL products for Amazon ECS or Amazon EKS aren't required to call RegisterUsage, but you can do so if you want to receive usage data in your seller reports. For more information on using the RegisterUsage operation, see Container-Based Products.

BatchMeterUsage API calls are captured by AWS CloudTrail. You can use Cloudtrail to verify that the SaaS metering records that you sent are accurate by searching for records with the eventName of BatchMeterUsage. You can also use CloudTrail to audit records over time. For more information, see the <http:docs.aws.amazon.comawscloudtraillatestuserguidecloudtrail-concepts.html AWS CloudTrail User Guide>.

Synopsis

Service Configuration

defaultService :: Service Source #

API version 2016-01-14 of the Amazon Marketplace Metering SDK configuration.

Errors

Error matchers are designed for use with the functions provided by Control.Exception.Lens. This allows catching (and rethrowing) service specific errors returned by MarketplaceMetering.

CustomerNotEntitledException

_CustomerNotEntitledException :: AsError a => Fold a ServiceError Source #

Exception thrown when the customer does not have a valid subscription for the product.

DisabledApiException

_DisabledApiException :: AsError a => Fold a ServiceError Source #

The API is disabled in the Region.

DuplicateRequestException

_DuplicateRequestException :: AsError a => Fold a ServiceError Source #

A metering record has already been emitted by the same EC2 instance, ECS task, or EKS pod for the given {usageDimension, timestamp} with a different usageQuantity.

ExpiredTokenException

_ExpiredTokenException :: AsError a => Fold a ServiceError Source #

The submitted registration token has expired. This can happen if the buyer's browser takes too long to redirect to your page, the buyer has resubmitted the registration token, or your application has held on to the registration token for too long. Your SaaS registration website should redeem this token as soon as it is submitted by the buyer's browser.

InternalServiceErrorException

_InternalServiceErrorException :: AsError a => Fold a ServiceError Source #

An internal error has occurred. Retry your request. If the problem persists, post a message with details on the AWS forums.

InvalidCustomerIdentifierException

_InvalidCustomerIdentifierException :: AsError a => Fold a ServiceError Source #

You have metered usage for a CustomerIdentifier that does not exist.

InvalidEndpointRegionException

_InvalidEndpointRegionException :: AsError a => Fold a ServiceError Source #

The endpoint being called is in a AWS Region different from your EC2 instance, ECS task, or EKS pod. The Region of the Metering Service endpoint and the AWS Region of the resource must match.

InvalidProductCodeException

_InvalidProductCodeException :: AsError a => Fold a ServiceError Source #

The product code passed does not match the product code used for publishing the product.

InvalidPublicKeyVersionException

_InvalidPublicKeyVersionException :: AsError a => Fold a ServiceError Source #

Public Key version is invalid.

InvalidRegionException

_InvalidRegionException :: AsError a => Fold a ServiceError Source #

RegisterUsage must be called in the same AWS Region the ECS task was launched in. This prevents a container from hardcoding a Region (e.g. withRegion(“us-east-1”) when calling RegisterUsage.

InvalidTagException

_InvalidTagException :: AsError a => Fold a ServiceError Source #

The tag is invalid, or the number of tags is greater than 5.

InvalidTokenException

_InvalidTokenException :: AsError a => Fold a ServiceError Source #

Registration token is invalid.

InvalidUsageAllocationsException

_InvalidUsageAllocationsException :: AsError a => Fold a ServiceError Source #

The usage allocation objects are invalid, or the number of allocations is greater than 500 for a single usage record.

InvalidUsageDimensionException

_InvalidUsageDimensionException :: AsError a => Fold a ServiceError Source #

The usage dimension does not match one of the UsageDimensions associated with products.

PlatformNotSupportedException

_PlatformNotSupportedException :: AsError a => Fold a ServiceError Source #

AWS Marketplace does not support metering usage from the underlying platform. Currently, Amazon ECS, Amazon EKS, and AWS Fargate are supported.

ThrottlingException

_ThrottlingException :: AsError a => Fold a ServiceError Source #

The calls to the API are throttled.

TimestampOutOfBoundsException

_TimestampOutOfBoundsException :: AsError a => Fold a ServiceError Source #

The timestamp value passed in the UsageRecord is out of allowed range.

For BatchMeterUsage, if any of the records are outside of the allowed range, the entire batch is not processed. You must remove invalid records and try again.

Waiters

Waiters poll by repeatedly sending a request until some remote success condition configured by the Wait specification is fulfilled. The Wait specification determines how many attempts should be made, in addition to delay and retry strategies.

Operations

Some AWS operations return results that are incomplete and require subsequent requests in order to obtain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called pagination. For example, the ListObjects operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate Marker in order to retrieve the next page of results.

Operations that have an AWSPager instance can transparently perform subsequent requests, correctly setting Markers and other request facets to iterate through the entire result set of a truncated API operation. Operations which support this have an additional note in the documentation.

Many operations have the ability to filter results on the server side. See the individual operation parameters for details.

BatchMeterUsage

data BatchMeterUsage Source #

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

See: newBatchMeterUsage smart constructor.

Instances

Instances details
ToJSON BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

ToHeaders BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

ToPath BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

ToQuery BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

AWSRequest BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Associated Types

type AWSResponse BatchMeterUsage #

Generic BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Associated Types

type Rep BatchMeterUsage :: Type -> Type #

Read BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Show BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

NFData BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Methods

rnf :: BatchMeterUsage -> () #

Eq BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Hashable BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

type AWSResponse BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

type Rep BatchMeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

type Rep BatchMeterUsage = D1 ('MetaData "BatchMeterUsage" "Amazonka.MarketplaceMetering.BatchMeterUsage" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "BatchMeterUsage'" 'PrefixI 'True) (S1 ('MetaSel ('Just "usageRecords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [UsageRecord]) :*: S1 ('MetaSel ('Just "productCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newBatchMeterUsage Source #

Create a value of BatchMeterUsage 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:usageRecords:BatchMeterUsage', batchMeterUsage_usageRecords - The set of UsageRecords to submit. BatchMeterUsage accepts up to 25 UsageRecords at a time.

$sel:productCode:BatchMeterUsage', batchMeterUsage_productCode - 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 BatchMeterUsageResponse Source #

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

See: newBatchMeterUsageResponse smart constructor.

Instances

Instances details
Generic BatchMeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Associated Types

type Rep BatchMeterUsageResponse :: Type -> Type #

Read BatchMeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Show BatchMeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

NFData BatchMeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

Methods

rnf :: BatchMeterUsageResponse -> () #

Eq BatchMeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

type Rep BatchMeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.BatchMeterUsage

type Rep BatchMeterUsageResponse = D1 ('MetaData "BatchMeterUsageResponse" "Amazonka.MarketplaceMetering.BatchMeterUsage" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "BatchMeterUsageResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "results") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [UsageRecordResult])) :*: (S1 ('MetaSel ('Just "unprocessedRecords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [UsageRecord])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newBatchMeterUsageResponse Source #

Create a value of BatchMeterUsageResponse 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:results:BatchMeterUsageResponse', batchMeterUsageResponse_results - Contains all UsageRecords processed by BatchMeterUsage. These records were either honored by AWS Marketplace Metering Service or were invalid. Invalid records should be fixed before being resubmitted.

$sel:unprocessedRecords:BatchMeterUsageResponse', batchMeterUsageResponse_unprocessedRecords - 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.

$sel:httpStatus:BatchMeterUsageResponse', batchMeterUsageResponse_httpStatus - The response's http status code.

MeterUsage

data MeterUsage Source #

See: newMeterUsage smart constructor.

Instances

Instances details
ToJSON MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

ToHeaders MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Methods

toHeaders :: MeterUsage -> [Header] #

ToPath MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

ToQuery MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

AWSRequest MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Associated Types

type AWSResponse MeterUsage #

Generic MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Associated Types

type Rep MeterUsage :: Type -> Type #

Read MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Show MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

NFData MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Methods

rnf :: MeterUsage -> () #

Eq MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Hashable MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

type AWSResponse MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

type Rep MeterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

type Rep MeterUsage = D1 ('MetaData "MeterUsage" "Amazonka.MarketplaceMetering.MeterUsage" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "MeterUsage'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "usageAllocations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty UsageAllocation))) :*: S1 ('MetaSel ('Just "usageQuantity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)))) :*: (S1 ('MetaSel ('Just "productCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "timestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 POSIX) :*: S1 ('MetaSel ('Just "usageDimension") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newMeterUsage Source #

Create a value of MeterUsage 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:dryRun:MeterUsage', meterUsage_dryRun - 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, meterUsage_usageAllocations - 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).

$sel:usageQuantity:MeterUsage', meterUsage_usageQuantity - Consumption value for the hour. Defaults to 0 if not specified.

$sel:productCode:MeterUsage', meterUsage_productCode - 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, meterUsage_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:usageDimension:MeterUsage', meterUsage_usageDimension - It will be one of the fcp dimension name provided during the publishing of the product.

data MeterUsageResponse Source #

See: newMeterUsageResponse smart constructor.

Instances

Instances details
Generic MeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Associated Types

type Rep MeterUsageResponse :: Type -> Type #

Read MeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Show MeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

NFData MeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

Methods

rnf :: MeterUsageResponse -> () #

Eq MeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

type Rep MeterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.MeterUsage

type Rep MeterUsageResponse = D1 ('MetaData "MeterUsageResponse" "Amazonka.MarketplaceMetering.MeterUsage" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "MeterUsageResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "meteringRecordId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newMeterUsageResponse Source #

Create a value of MeterUsageResponse 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:

MeterUsageResponse, meterUsageResponse_meteringRecordId - Metering record id.

$sel:httpStatus:MeterUsageResponse', meterUsageResponse_httpStatus - The response's http status code.

RegisterUsage

data RegisterUsage Source #

See: newRegisterUsage smart constructor.

Instances

Instances details
ToJSON RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

ToHeaders RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

ToPath RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

ToQuery RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

AWSRequest RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Associated Types

type AWSResponse RegisterUsage #

Generic RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Associated Types

type Rep RegisterUsage :: Type -> Type #

Read RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Show RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

NFData RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Methods

rnf :: RegisterUsage -> () #

Eq RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Hashable RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

type AWSResponse RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

type Rep RegisterUsage Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

type Rep RegisterUsage = D1 ('MetaData "RegisterUsage" "Amazonka.MarketplaceMetering.RegisterUsage" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "RegisterUsage'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "productCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "publicKeyVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural))))

newRegisterUsage Source #

Create a value of RegisterUsage 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:nonce:RegisterUsage', registerUsage_nonce - (Optional) To scope down the registration to a specific running software instance and guard against replay attacks.

$sel:productCode:RegisterUsage', registerUsage_productCode - 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.

$sel:publicKeyVersion:RegisterUsage', registerUsage_publicKeyVersion - Public Key Version provided by AWS Marketplace

data RegisterUsageResponse Source #

See: newRegisterUsageResponse smart constructor.

Instances

Instances details
Generic RegisterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Associated Types

type Rep RegisterUsageResponse :: Type -> Type #

Read RegisterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Show RegisterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

NFData RegisterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

Methods

rnf :: RegisterUsageResponse -> () #

Eq RegisterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

type Rep RegisterUsageResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.RegisterUsage

type Rep RegisterUsageResponse = D1 ('MetaData "RegisterUsageResponse" "Amazonka.MarketplaceMetering.RegisterUsage" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "RegisterUsageResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "publicKeyRotationTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newRegisterUsageResponse Source #

Create a value of RegisterUsageResponse 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:publicKeyRotationTimestamp:RegisterUsageResponse', registerUsageResponse_publicKeyRotationTimestamp - (Optional) Only included when public key version has expired

$sel:signature:RegisterUsageResponse', registerUsageResponse_signature - JWT Token

$sel:httpStatus:RegisterUsageResponse', registerUsageResponse_httpStatus - The response's http status code.

ResolveCustomer

data ResolveCustomer Source #

Contains input to the ResolveCustomer operation.

See: newResolveCustomer smart constructor.

Constructors

ResolveCustomer' Text 

Instances

Instances details
ToJSON ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

ToHeaders ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

ToPath ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

ToQuery ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

AWSRequest ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Associated Types

type AWSResponse ResolveCustomer #

Generic ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Associated Types

type Rep ResolveCustomer :: Type -> Type #

Read ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Show ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

NFData ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Methods

rnf :: ResolveCustomer -> () #

Eq ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Hashable ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

type AWSResponse ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

type Rep ResolveCustomer Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

type Rep ResolveCustomer = D1 ('MetaData "ResolveCustomer" "Amazonka.MarketplaceMetering.ResolveCustomer" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "ResolveCustomer'" 'PrefixI 'True) (S1 ('MetaSel ('Just "registrationToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newResolveCustomer Source #

Create a value of ResolveCustomer 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:registrationToken:ResolveCustomer', resolveCustomer_registrationToken - 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 along with the CustomerAWSAccountId and ProductCode.

data ResolveCustomerResponse Source #

The result of the ResolveCustomer operation. Contains the CustomerIdentifier along with the CustomerAWSAccountId and ProductCode.

See: newResolveCustomerResponse smart constructor.

Instances

Instances details
Generic ResolveCustomerResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Associated Types

type Rep ResolveCustomerResponse :: Type -> Type #

Read ResolveCustomerResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Show ResolveCustomerResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

NFData ResolveCustomerResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

Methods

rnf :: ResolveCustomerResponse -> () #

Eq ResolveCustomerResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

type Rep ResolveCustomerResponse Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.ResolveCustomer

type Rep ResolveCustomerResponse = D1 ('MetaData "ResolveCustomerResponse" "Amazonka.MarketplaceMetering.ResolveCustomer" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "ResolveCustomerResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "customerAWSAccountId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "customerIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "productCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newResolveCustomerResponse Source #

Create a value of ResolveCustomerResponse 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:customerAWSAccountId:ResolveCustomerResponse', resolveCustomerResponse_customerAWSAccountId - The CustomerAWSAccountId provides the AWS account ID associated with the CustomerIdentifier for the individual customer.

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

$sel:productCode:ResolveCustomerResponse', resolveCustomerResponse_productCode - 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.

$sel:httpStatus:ResolveCustomerResponse', resolveCustomerResponse_httpStatus - The response's http status code.

Types

UsageRecordResultStatus

newtype UsageRecordResultStatus Source #

Instances

Instances details
FromJSON UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

FromJSONKey UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToJSON UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToJSONKey UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToByteString UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToHeader UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToLog UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToQuery UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

FromText UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToText UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

FromXML UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

ToXML UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

Generic UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

Associated Types

type Rep UsageRecordResultStatus :: Type -> Type #

Read UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

Show UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

NFData UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

Methods

rnf :: UsageRecordResultStatus -> () #

Eq UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

Ord UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

Hashable UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

type Rep UsageRecordResultStatus Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus

type Rep UsageRecordResultStatus = D1 ('MetaData "UsageRecordResultStatus" "Amazonka.MarketplaceMetering.Types.UsageRecordResultStatus" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'True) (C1 ('MetaCons "UsageRecordResultStatus'" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromUsageRecordResultStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

Tag

data Tag Source #

Metadata assigned to an allocation. Each tag is made up of a key and a value.

See: newTag smart constructor.

Constructors

Tag' Text Text 

Instances

Instances details
FromJSON Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

ToJSON Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

Generic Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

Associated Types

type Rep Tag :: Type -> Type #

Methods

from :: Tag -> Rep Tag x #

to :: Rep Tag x -> Tag #

Read Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

Show Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

Methods

showsPrec :: Int -> Tag -> ShowS #

show :: Tag -> String #

showList :: [Tag] -> ShowS #

NFData Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

Methods

rnf :: Tag -> () #

Eq Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

Methods

(==) :: Tag -> Tag -> Bool #

(/=) :: Tag -> Tag -> Bool #

Hashable Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

Methods

hashWithSalt :: Int -> Tag -> Int #

hash :: Tag -> Int #

type Rep Tag Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.Tag

type Rep Tag = D1 ('MetaData "Tag" "Amazonka.MarketplaceMetering.Types.Tag" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "Tag'" 'PrefixI 'True) (S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newTag Source #

Create a value of Tag 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:key:Tag', tag_key - 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.

$sel:value:Tag', tag_value - 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

data UsageAllocation Source #

Usage allocations allow you to split usage into buckets by tags.

Each UsageAllocation indicates the usage quantity for a specific set of tags.

See: newUsageAllocation smart constructor.

Instances

Instances details
FromJSON UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

ToJSON UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

Generic UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

Associated Types

type Rep UsageAllocation :: Type -> Type #

Read UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

Show UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

NFData UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

Methods

rnf :: UsageAllocation -> () #

Eq UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

Hashable UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

type Rep UsageAllocation Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageAllocation

type Rep UsageAllocation = D1 ('MetaData "UsageAllocation" "Amazonka.MarketplaceMetering.Types.UsageAllocation" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "UsageAllocation'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Tag))) :*: S1 ('MetaSel ('Just "allocatedUsageQuantity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural)))

newUsageAllocation Source #

Create a value of UsageAllocation 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:tags:UsageAllocation', usageAllocation_tags - The set of tags that define the bucket of usage. For the bucket of items with no tags, this parameter can be left out.

$sel:allocatedUsageQuantity:UsageAllocation', usageAllocation_allocatedUsageQuantity - The total quantity allocated to this bucket of usage.

UsageRecord

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.

Instances

Instances details
FromJSON UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

ToJSON 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 #

Read UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Show UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

NFData UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Methods

rnf :: UsageRecord -> () #

Eq UsageRecord Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecord

Hashable 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" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" '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, dimensions are specified. These represent different units of value in your application.

UsageRecordResult

data UsageRecordResult Source #

A UsageRecordResult indicates the status of a given UsageRecord processed by BatchMeterUsage.

See: newUsageRecordResult smart constructor.

Instances

Instances details
FromJSON UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

Generic UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

Associated Types

type Rep UsageRecordResult :: Type -> Type #

Read UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

Show UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

NFData UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

Methods

rnf :: UsageRecordResult -> () #

Eq UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

Hashable UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

type Rep UsageRecordResult Source # 
Instance details

Defined in Amazonka.MarketplaceMetering.Types.UsageRecordResult

type Rep UsageRecordResult = D1 ('MetaData "UsageRecordResult" "Amazonka.MarketplaceMetering.Types.UsageRecordResult" "amazonka-marketplace-metering-2.0-8iXXI93nW7fIf59koqHJQ" 'False) (C1 ('MetaCons "UsageRecordResult'" 'PrefixI 'True) (S1 ('MetaSel ('Just "meteringRecordId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UsageRecordResultStatus)) :*: S1 ('MetaSel ('Just "usageRecord") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UsageRecord)))))

newUsageRecordResult :: UsageRecordResult Source #

Create a value of UsageRecordResult 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:meteringRecordId:UsageRecordResult', usageRecordResult_meteringRecordId - The MeteringRecordId is a unique identifier for this metering event.

$sel:status:UsageRecordResult', usageRecordResult_status - 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 able to use your product. The UsageRecord was not honored. There are three causes for this result:

    • The customer identifier is invalid.
    • The customer identifier provided in the metering record does not have an active agreement or subscription with this product. Future UsageRecords for this customer will fail until the customer subscribes to your product.
    • The customer's AWS account was suspended.
  • 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.

$sel:usageRecord:UsageRecordResult', usageRecordResult_usageRecord - The UsageRecord that was part of the BatchMeterUsage request.