Skip to content

/AWS1/CL_MPM=>METERUSAGE()

About MeterUsage

API to emit metering records. For identical requests, the API is idempotent. It simply returns the metering record ID.

MeterUsage is authenticated on the buyer's AWS account using credentials from the EC2 instance, ECS task, or EKS pod.

MeterUsage can optionally include multiple usage allocations, to provide customers with usage data split into buckets by tags that you define (or allow the customer to define).

Usage records are expected to be submitted as quickly as possible after the event that is being recorded, and are not accepted more than 6 hours after the event.

Method Signature

IMPORTING

Required arguments:

IV_PRODUCTCODE TYPE /AWS1/MPMPRODUCTCODE /AWS1/MPMPRODUCTCODE

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.

IV_TIMESTAMP TYPE /AWS1/MPMTIMESTAMP /AWS1/MPMTIMESTAMP

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.

IV_USAGEDIMENSION TYPE /AWS1/MPMUSAGEDIMENSION /AWS1/MPMUSAGEDIMENSION

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

Optional arguments:

IV_USAGEQUANTITY TYPE /AWS1/MPMUSAGEQUANTITY /AWS1/MPMUSAGEQUANTITY

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

IV_DRYRUN TYPE /AWS1/MPMBOOLEAN /AWS1/MPMBOOLEAN

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.

IT_USAGEALLOCATIONS TYPE /AWS1/CL_MPMUSAGEALLOCATION=>TT_USAGEALLOCATIONS TT_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).

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_MPMMETERUSAGERESULT /AWS1/CL_MPMMETERUSAGERESULT