AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::MarketplaceMetering::Types::UsageRecord

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing UsageRecord as input to an Aws::Client method, you can use a vanilla Hash:

{
  timestamp: Time.now, # required
  customer_identifier: "CustomerIdentifier", # required
  dimension: "UsageDimension", # required
  quantity: 1,
  usage_allocations: [
    {
      allocated_usage_quantity: 1, # required
      tags: [
        {
          key: "TagKey", # required
          value: "TagValue", # required
        },
      ],
    },
  ],
}

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.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#customer_identifierString

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

Returns:

  • (String)

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

#dimensionString

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.

Returns:

  • (String)

    During the process of registering a product on AWS Marketplace, up to eight dimensions are specified.

#quantityInteger

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

Returns:

  • (Integer)

    The quantity of usage consumed by the customer for the given dimension and time.

#timestampTime

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.

Returns:

  • (Time)

    Timestamp, in UTC, for which the usage is being reported.

#usage_allocationsArray<Types::UsageAllocation>

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

Returns: