AWSMarketplace Metering

2016/03/17 - AWSMarketplace Metering - 1 new api methods

MeterUsage (new) Link ΒΆ

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

Request Syntax

client.meter_usage(
    ProductCode='string',
    Timestamp=datetime(2015, 1, 1),
    UsageDimension='string',
    UsageQuantity=123,
    DryRun=True|False
)
type ProductCode:

string

param ProductCode:

[REQUIRED]

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.

type Timestamp:

datetime

param Timestamp:

[REQUIRED]

Timestamp of the hour, recorded in UTC. The seconds and milliseconds portions of the timestamp will be ignored.

type UsageDimension:

string

param UsageDimension:

[REQUIRED]

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

type UsageQuantity:

integer

param UsageQuantity:

[REQUIRED]

Consumption value for the hour.

type DryRun:

boolean

param DryRun:

[REQUIRED]

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.

rtype:

dict

returns:

Response Syntax

{
    'MeteringRecordId': 'string'
}

Response Structure

  • (dict) --

    • MeteringRecordId (string) --