UsageRecord
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.
Contents
In the following list, the required parameters are described first.
- Dimension
-
During the process of registering a product on AWS Marketplace, dimensions are specified. These represent different units of value in your application.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern:
[\s\S]+Required: Yes
- Timestamp
-
Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to 24 hours in the past. Make sure the
timestampvalue is not before the start of the software usage.At the end of each billing cycle, you have a 6-hour grace period to submit usage records for the previous billing month before 06:00 UTC on the first day of the next month.
Type: Timestamp
Required: Yes
- CustomerAWSAccountId
-
The
CustomerAWSAccountIdparameter specifies the AWS account ID of the buyer.ImportantIf you have an existing integration and need the
CustomerAWSAccountIdthat corresponds to aCustomerIdentifier, contact AWS Marketplace Seller Operationsto obtain the mapping. Do not request the CustomerAWSAccountIddirectly from buyers. We cannot verify that a buyer-provided account ID is authentic, which can result in incorrect metering or billing.Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern:
^[0-9]+$Required: No
- CustomerIdentifier
-
The
CustomerIdentifieris obtained through theResolveCustomeroperation and represents an individual buyer in your application.ImportantCustomerIdentifieris not supported for new SaaS product integrations. UseCustomerAWSAccountIdto identify the buyer.Type: String
Length Constraints: Minimum length of 0. Maximum length of 255.
Pattern:
[\s\S]*Required: No
- LicenseArn
-
The
LicenseArnis a unique identifier for a specific granted license. These are used for software purchased through AWS Marketplace.NoteTo access your
CustomerAWSAccountIdandLicenseArnmapping, visit Agreements Feeds.Type: String
Pattern:
^arn:aws[a-zA-Z-]*:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$Required: No
- Quantity
-
This member has been deprecated.
The quantity of usage consumed by the customer for the given dimension and time, as a whole number. Defaults to
0if neitherQuantitynorQuantityAsDecimalis specified.Use
QuantityAsDecimalinstead. You can't specify bothQuantityandQuantityAsDecimalin a usage record.Type: Integer
Valid Range: Minimum value of 0. Maximum value of 2147483647.
Required: No
- QuantityAsDecimal
-
The quantity of usage consumed by the customer for the given dimension and time, as a decimal string. Use this instead of
Quantityto report fractional usage.A non-negative decimal number, for example
17.42.You can't specify both
QuantityandQuantityAsDecimalin a usage record. If you provideUsageAllocations, each allocation must useAllocatedUsageQuantityAsDecimal. If any usage record fails these checks, the entireBatchMeterUsagerequest fails and no records are processed.Quantities are compared by value when checking for duplicate records, so
17,17.0, and17.00are the same quantity, whether you send it inQuantityorQuantityAsDecimal.Type: String
Length Constraints: Minimum length of 1. Maximum length of 17.
Pattern:
^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$Required: No
- UsageAllocations
-
The set of
UsageAllocationsto submit. The sum of allUsageAllocationquantities must equal the quantity of theUsageRecord(QuantityorQuantityAsDecimal). Allocations must use the same type of quantity as the usage record:AllocatedUsageQuantitywithQuantity, orAllocatedUsageQuantityAsDecimalwithQuantityAsDecimal.Type: Array of UsageAllocation objects
Array Members: Minimum number of 1 item. Maximum number of 2500 items.
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: