- Navigation GuideYou are on a Client landing page. Commands (operations) are listed on this page. The Client constructor type is linked at the bottom.
MarketplaceMeteringClient
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.
For information on the permissions you need to use this API, see AWS Marketplace metering and entitlement API permissions in the AWS Marketplace Seller Guide.
Submitting Metering Records
-
MeterUsage - Submits the metering record for an AWS Marketplace product.
MeterUsage
is called from an EC2 instance or a container running on EKS or ECS. -
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
along with theCustomerAWSAccountId
andProductCode
.
Entitlement and Metering for Paid Container Products
-
Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the
RegisterUsage
operation for software entitlement and metering. Free and BYOL products for Amazon ECS or Amazon EKS aren't required to callRegisterUsage
, but you can do so if you want to receive usage data in your seller reports. For more information on using theRegisterUsage
operation, see Container-Based Products .
BatchMeterUsage
API calls are captured by AWS CloudTrail. You can use Cloudtrail to verify that the SaaS metering records that you sent are accurate by searching for records with the eventName
of BatchMeterUsage
. You can also use CloudTrail to audit records over time. For more information, see the AWS CloudTrail User Guide .
Installation
npm install @aws-sdk/client-marketplace-metering
yarn add @aws-sdk/client-marketplace-metering
pnpm add @aws-sdk/client-marketplace-metering
MarketplaceMeteringClient Operations
Command | Summary |
---|
Command | Summary |
---|---|
BatchMeterUsageCommand | For identical requests, the API is idempotent; requests can be retried with the same records or a subset of the input records. Every request to 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. A For an example of using |
MeterUsageCommand | API to emit metering records. For identical requests, the API is idempotent. It simply returns the metering record ID. 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. |
RegisterUsageCommand | Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the
|
ResolveCustomerCommand | The API needs to called from the seller account id used to publish the SaaS application to successfully resolve the token. For an example of using |
MarketplaceMeteringClient Configuration
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
defaultsMode Optional | DefaultsMode | Provider<DefaultsMode> | The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK. |
disableHostPrefix Optional | boolean | Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation. |
extensions Optional | RuntimeExtension[] | Optional extensions |
logger Optional | Logger | Optional logger for logging debug/info/warn/error. |
maxAttempts Optional | number | Provider<number> | Value for how many times a request will be made at most in case of retry. |
profile Optional | string | Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options. |
region Optional | string | Provider<string> | The AWS region to which this client will send requests |
requestHandler Optional | __HttpHandlerUserInput | The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. |
retryMode Optional | string | Provider<string> | Specifies which retry algorithm to use. |
useDualstackEndpoint Optional | boolean | Provider<boolean> | Enables IPv6/IPv4 dualstack endpoint. |
useFipsEndpoint Optional | boolean | Provider<boolean> | Enables FIPS compatible endpoints. |
Additional config fields are described in the full configuration type: MarketplaceMeteringClientConfig