npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/amazonaws_metering_marketplace

v5.0.0

Published

DataFire integration for AWSMarketplace Metering

Downloads

29

Readme

@datafire/amazonaws_metering_marketplace

Client library for AWSMarketplace Metering

Installation and Usage

npm install --save @datafire/amazonaws_metering_marketplace
let amazonaws_metering_marketplace = require('@datafire/amazonaws_metering_marketplace').create({
  accessKeyId: "",
  secretAccessKey: "",
  region: ""
});

amazonaws_metering_marketplace.BatchMeterUsage({
  "UsageRecords": [],
  "ProductCode": ""
}).then(data => {
  console.log(data);
});

Description

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. Submitting Metering Records MeterUsage- Submits the metering record for a Marketplace product. MeterUsage is called from an EC2 instance. 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 and Product Code.

Actions

BatchMeterUsage

amazonaws_metering_marketplace.BatchMeterUsage({
  "UsageRecords": [],
  "ProductCode": ""
}, context)

Input

Output

MeterUsage

amazonaws_metering_marketplace.MeterUsage({
  "ProductCode": "",
  "Timestamp": "",
  "UsageDimension": "",
  "UsageQuantity": 0,
  "DryRun": true
}, context)

Input

Output

ResolveCustomer

amazonaws_metering_marketplace.ResolveCustomer({
  "RegistrationToken": ""
}, context)

Input

Output

Definitions

BatchMeterUsageRequest

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

BatchMeterUsageResult

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

Boolean

  • Boolean boolean

CustomerIdentifier

  • CustomerIdentifier string

DuplicateRequestException

  • DuplicateRequestException object: A metering record has already been emitted by the same EC2 instance for the given {usageDimension, timestamp} with a different usageQuantity.

ExpiredTokenException

  • ExpiredTokenException object: 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 object: An internal error has occurred. Retry your request. If the problem persists, post a message with details on the AWS forums.

InvalidCustomerIdentifierException

  • InvalidCustomerIdentifierException object: You have metered usage for a CustomerIdentifier that does not exist.

InvalidEndpointRegionException

  • InvalidEndpointRegionException object: The endpoint being called is in a region different from your EC2 instance. The region of the Metering service endpoint and the region of the EC2 instance must match.

InvalidProductCodeException

  • InvalidProductCodeException object: The product code passed does not match the product code used for publishing the product.

InvalidTokenException

InvalidUsageDimensionException

  • InvalidUsageDimensionException object: The usage dimension does not match one of the UsageDimensions associated with products.

MeterUsageRequest

MeterUsageResult

  • MeterUsageResult object

NonEmptyString

  • NonEmptyString string

ProductCode

  • ProductCode string

ResolveCustomerRequest

  • ResolveCustomerRequest object: Contains input to the ResolveCustomer operation.

ResolveCustomerResult

  • ResolveCustomerResult object: The result of the ResolveCustomer operation. Contains the CustomerIdentifier and product code.

String

  • String string

ThrottlingException

  • ThrottlingException object: The calls to the MeterUsage API are throttled.

Timestamp

  • Timestamp string

TimestampOutOfBoundsException

  • TimestampOutOfBoundsException object: The timestamp value passed in the meterUsage() is out of allowed range.

UsageDimension

  • UsageDimension string

UsageQuantity

  • UsageQuantity integer

UsageRecord

  • UsageRecord object: 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.

UsageRecordList

UsageRecordResult

UsageRecordResultList

UsageRecordResultStatus

  • UsageRecordResultStatus string (values: Success, CustomerNotSubscribed, DuplicateRecord)

errorMessage

  • errorMessage string