{
"smithy": "2.0",
"metadata": {
"suppressions": [
{
"id": "HttpMethodSemantics",
"namespace": "*"
},
{
"id": "HttpResponseCodeSemantics",
"namespace": "*"
},
{
"id": "PaginatedTrait",
"namespace": "*"
},
{
"id": "HttpHeaderTrait",
"namespace": "*"
},
{
"id": "HttpUriConflict",
"namespace": "*"
},
{
"id": "Service",
"namespace": "*"
}
]
},
"shapes": {
"com.amazonaws.marketplacemetering#AWSMPMeteringService": {
"type": "service",
"version": "2016-01-14",
"operations": [
{
"target": "com.amazonaws.marketplacemetering#BatchMeterUsage"
},
{
"target": "com.amazonaws.marketplacemetering#MeterUsage"
},
{
"target": "com.amazonaws.marketplacemetering#RegisterUsage"
},
{
"target": "com.amazonaws.marketplacemetering#ResolveCustomer"
}
],
"traits": {
"aws.api#service": {
"sdkId": "Marketplace Metering",
"arnNamespace": "aws-marketplace",
"cloudFormationName": "MarketplaceMetering",
"cloudTrailEventSource": "marketplacemetering.amazonaws.com",
"docId": "meteringmarketplace-2016-01-14",
"endpointPrefix": "metering.marketplace"
},
"aws.auth#sigv4": {
"name": "aws-marketplace"
},
"aws.protocols#awsJson1_1": {},
"smithy.api#documentation": "
This reference provides descriptions of the low-level Marketplace Metering Service API.
\nAmazon Web Services Marketplace sellers can use this API to submit usage data for custom usage\n dimensions.
\nFor information about the permissions that you need to use this API, see Amazon Web Services Marketplace metering and entitlement API permissions in the Amazon Web Services Marketplace\n Seller Guide.\n
\n\n Submitting metering records\n
\n\n MeterUsage\n
\nSubmits the metering record for an Amazon Web Services Marketplace product.
\nCalled from: Amazon Elastic Compute Cloud (Amazon EC2) instance or a container running on either\n Amazon Elastic Kubernetes Service (Amazon EKS) or Amazon Elastic Container Service (Amazon ECS)
\nSupported product types: Amazon Machine Images (AMIs) and containers
\nVendor-metered tagging: Supported allocation tagging
\n\n BatchMeterUsage\n
\nSubmits the metering record for a set of customers.\n BatchMeterUsage API calls are captured by CloudTrail. You can use\n CloudTrail to verify that the software as a service (SaaS) metering records that\n you sent are accurate by searching for records with the eventName\n of BatchMeterUsage. You can also use CloudTrail to audit records over\n time. For more information, see the CloudTrail User\n Guide.
Called from: SaaS applications
\nSupported product type: SaaS
\nVendor-metered tagging: Supports allocation tagging
\n\n Accepting new customers\n
\n\n ResolveCustomer\n
\nResolves the registration token that the buyer submits through the browser\n during the registration process. Obtains a CustomerIdentifier along\n with the CustomerAWSAccountId, ProductCode, and LicenseArn.
Called from: SaaS application during the registration process
\nSupported product type: SaaS
\nVendor-metered tagging: Not applicable
\n\n Entitlement and metering for paid container\n products\n
\n\n RegisterUsage\n
\nProvides software entitlement and metering. Paid container software products\n sold through Amazon Web Services Marketplace must integrate with the Marketplace Metering Service and call the\n RegisterUsage operation. Free and Bring Your Own License model\n (BYOL) products for Amazon ECS or Amazon EKS aren't required to call\n RegisterUsage. However, you can do so if you want to receive\n usage data in your seller reports. For more information about using the\n RegisterUsage operation, see Container-based products.
Called from: Paid container software products
\nSupported product type: Containers
\nVendor-metered tagging: Not applicable
\n\n Entitlement custom metering for container\n products\n
\nMeterUsage API is available in GovCloud Regions but only supports AMI\n FCP products in GovCloud Regions. Flexible Consumption Pricing (FCP) Container\n products aren\u2019t supported in GovCloud Regions: us-gov-west-1 and us-gov-east-1.\n For more information, see Container-based products.
\nCustom metering for container products are called using the\n MeterUsage API. The API is used for FCP AMI and FCP Container product\n metering.
\n\n Custom metering for Amazon EKS is available in 17\n Amazon Web Services Regions\n
\nThe metering service supports Amazon ECS and EKS for Flexible Consumption Pricing\n (FCP) products using MeterUsage API. Amazon ECS is supported in all\n Amazon Web Services Regions that MeterUsage API is available except for\n GovCloud.
\nAmazon EKS is supported in the following: us-east-1, us-east-2, us-west-1,\n us-west-2, eu-west-1, eu-central-1, eu-west-2, eu-west-3, eu-north-1, ap-east-1,\n ap-southeast-1, ap-northeast-1, ap-southeast-2, ap-northeast-2, ap-south-1,\n ca-central-1, sa-east-1.
\nFor questions about adding Amazon Web Services Regions for metering, contact Amazon Web Services\n Marketplace Seller Operations.
\nThe Amazon Web Services Marketplace AI Metering Agent Skill (aws-marketplace-metering) helps an AI\n coding agent integrate your SaaS product's usage reporting with the\n BatchMeterUsage API. The skill is a curated package of instructions and\n reference material that guides your AI coding agent through building, deploying, and\n testing the metering integration. To get the skill on demand without checking it out\n locally, install the Amazon Web Services MCP Server in your coding agent; the agent then discovers and loads\n the skill at runtime. The skill source is also available on GitHub. For more information, see Get started with the Amazon Web Services Marketplace AI Metering Agent Skill on the Amazon Web Services Marketplace blog.
Amazon Web Services Marketplace is introducing Concurrent Agreements, enabling buyers to make multiple purchases per Amazon Web Services account. Starting June 1, 2026, new SaaS products must use CustomerAWSAccountId (instead of CustomerIdentifier), LicenseArn (instead of ProductCode) to support this feature. BatchMeterUsage does not support CustomerIdentifier for new integrations. Existing integrations continue to work. Review the new integration for Concurrent Agreements here. For additional implementation details, see BatchMeterUsage code example with LicenseArn in the Amazon Web Services Marketplace Seller Guide.
To post metering records for customers, SaaS applications call\n BatchMeterUsage, which is used for metering SaaS flexible\n consumption pricing (FCP). Identical requests are idempotent and can be\n retried with the same records or a subset of records. Each\n BatchMeterUsage request is for only one product. If you\n want to meter usage for multiple products, you must make multiple\n BatchMeterUsage calls.
Usage records should be submitted in quick succession following a\n recorded event. Usage records aren't accepted 24 hours or more after an\n event. At the end of each billing cycle, a 6-hour grace period applies. We accept\n usage records for the previous billing month until 06:00 UTC on the first day of the\n next month. For example, you must submit March usage records before 06:00 UTC on\n April 1. On April 1 at 05:00 UTC, you can still submit records for March 31 (within the 6-hour grace period). After 06:00 UTC on April 1, March records are rejected regardless of the normal 24-hour submission window. After this grace period, we return a\n TimestampOutOfBoundsException error.
\n BatchMeterUsage can process up to 25\n UsageRecords at a time, and each request must be less than\n 1 MB in size.
\n Vendor-metered tagging\n
\n\n BatchMeterUsage supports vendor-metered tagging. Optionally, you can\n split the usage in a UsageRecord into buckets by including\n UsageAllocations, where each UsageAllocation has a set of\n Tags that you define. Vendor-metered tagging doesn't change the price,\n dimensions, or the total usage that you report. It gives buyers a more granular view of\n their usage of your product so they can perform cost allocation in the Amazon Web Services Billing and\n Cost Management console. For more information, see Vendor-metered tagging and BatchMeterUsage with usage allocation tagging code example in the\n Amazon Web Services Marketplace Seller Guide.
To report fractional usage, use QuantityAsDecimal instead of\n Quantity in each UsageRecord.
\n BatchMeterUsage returns a list of\n UsageRecordResult objects, which have each\n UsageRecord. It also returns a list of\n UnprocessedRecords, which indicate errors on the service\n side that should be retried.
For Amazon Web Services Regions that support BatchMeterUsage, see BatchMeterUsage Region support.\n
For an example of BatchMeterUsage, see BatchMeterUsage code example in the Amazon Web Services Marketplace Seller\n Guide.
The set of UsageRecords to submit. BatchMeterUsage accepts\n up to 25 UsageRecords at a time.
Product code is used to uniquely identify a product in Amazon Web Services Marketplace. The product code should\n be the same as the one used during the publishing of a new product.
\n\n ProductCode is required only for legacy integrations that use CustomerIdentifier. For new integrations using LicenseArn (Concurrent Agreements), do NOT include ProductCode at the request level. The LicenseArn in each UsageRecord identifies both the product and the specific agreement.
Sending metering records with both ProductCode and LicenseArn for the same customer within the same hour will result in duplicate billing. If you are migrating from product-based metering to license-based metering, stop sending ProductCode before you start sending LicenseArn.
A BatchMeterUsageRequest contains UsageRecords, which\n indicate quantities of usage within your application.
Contains all UsageRecords processed by BatchMeterUsage.\n These records were either honored by Amazon Web Services Marketplace Metering Service or were invalid. Invalid\n records should be fixed before being resubmitted.
Contains all UsageRecords that were not processed by\n BatchMeterUsage. This is a list of UsageRecords. You can\n retry the failed request by making another BatchMeterUsage call with this\n list as input in the BatchMeterUsageRequest.
Contains the UsageRecords processed by BatchMeterUsage and\n any records that have failed due to transient error.
Exception thrown when the customer does not have a valid subscription for the\n product.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#DisabledApiException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "The API is disabled in the Region.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#DuplicateRequestException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "A metering record has already been emitted by the same EC2 instance, ECS task, or EKS\n pod for the given {usageDimension, timestamp} with a different\n usageQuantity. Quantities are compared by value, so a whole-number and a\n decimal quantity with the same value (for example, 17 and\n 17.00) are not different.
The submitted registration token has expired. This can happen if the buyer's browser\n takes too long to redirect to your page, the buyer has resubmitted the registration\n token, or your application has held on to the registration token for too long. Your SaaS\n registration website should redeem this token as soon as it is submitted by the buyer's\n browser.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#IdempotencyConflictException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "The ClientToken is being used for multiple requests.
An internal error has occurred. Retry your request. If the problem persists, post a\n message with details on the Amazon Web Services forums.
", "smithy.api#error": "server" } }, "com.amazonaws.marketplacemetering#InvalidCustomerIdentifierException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "You have metered usage for a CustomerIdentifier that does not\n exist.
The endpoint being called is in a Amazon Web Services Region different from your EC2 instance, ECS\n task, or EKS pod. The Region of the Metering Service endpoint and the Amazon Web Services Region of\n the resource must match.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#InvalidLicenseException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "Ensure the LicenseArn is valid, matches the customer, and usage is within the license activation period.
The product code passed does not match the product code used for publishing the\n product.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#InvalidPublicKeyVersionException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "Public Key version is invalid.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#InvalidRegionException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "\n RegisterUsage must be called in the same Amazon Web Services Region the ECS task was\n launched in. This prevents a container from hardcoding a Region (e.g.\n withRegion(\u201cus-east-1\u201d) when calling RegisterUsage.
The tag is invalid, or the number of tags is greater than 5.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#InvalidTokenException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "Registration token is invalid.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#InvalidUsageAllocationsException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "Sum of allocated usage quantities is not equal to the usage quantity, or the\n allocations don't use the same type of quantity (whole number or decimal) as the usage\n quantity.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#InvalidUsageDimensionException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "The usage dimension does not match one of the UsageDimensions associated\n with products.
The unique identifier of the Amazon Web Services Marketplace agreement the customer accepted. Use it to\n call Amazon Web Services Marketplace Agreement APIs.
" } } }, "traits": { "smithy.api#documentation": "Metadata associated with a resolved customer. Includes the AgreementId of\n the Amazon Web Services Marketplace agreement the customer accepted.
As a seller, your software hosted in the buyer's Amazon Web Services account uses this API action to emit metering records directly to Amazon Web Services Marketplace. \n You must use the following buyer Amazon Web Services account credentials to sign the API request.
\nFor Amazon EC2 deployments, your software must use the \n IAM role for Amazon EC2 \n to sign the API call for MeterUsage API operation.
For Amazon EKS deployments, your software must use \n IAM roles for service accounts (IRSA) \n to sign the API call for the MeterUsage API operation. Using \n EKS Pod Identity, the node role, or long-term access keys is not supported.
For Amazon ECS deployments, your software must use \n Amazon ECS task IAM \n role to sign the API call for the MeterUsage API operation. Using the node role or long-term access keys are not supported.
For Amazon Bedrock AgentCore Runtime deployments, your software must use the \n AgentCore Runtime execution role \n to sign the API call for the MeterUsage API operation. Long-term access keys are not supported.
The handling of MeterUsage requests varies between Amazon Bedrock AgentCore Runtime and non-Amazon Bedrock AgentCore deployments.
For non-Amazon Bedrock AgentCore Runtime deployments, you can only report usage once per hour for each dimension. \n For AMI-based products, this is per dimension and per EC2 instance. For container products, this is per dimension and per ECS task or EKS pod. You can't modify values \n after they're recorded. If you report usage before a current hour ends, you will be unable to report additional usage until the next hour begins. \n The Timestamp request parameter is rounded down to the hour and used to enforce this once-per-hour rule for idempotency. \n For requests that are identical after the Timestamp is rounded down, the API is idempotent and returns the metering record ID.
For Amazon Bedrock AgentCore Runtime deployments, you can report usage multiple times per hour for the same dimension. \n You do not need to aggregate metering records by the hour. You must include an idempotency token in the ClientToken request parameter. If using an Amazon \n SDK or the Amazon Web Services CLI, you must use the latest version which automatically includes an idempotency token in the ClientToken request parameter so that the request is processed successfully. \n The Timestamp request parameter is not rounded down to the hour and is not used for duplicate validation. Requests with duplicate Timestamps are aggregated as long as the \n ClientToken is unique.
If you submit records more than six hours after events occur, the records won't be accepted. The timestamp in your request determines when an event is recorded.
\nTo report fractional usage, use UsageQuantityAsDecimal instead of\n UsageQuantity.
You can optionally include multiple usage allocations, to provide customers with usage data split into buckets by tags that you define or allow the customer to define.
\nFor Amazon Web Services Regions that support MeterUsage, see MeterUsage Region support for Amazon EC2 and MeterUsage Region support for Amazon ECS and Amazon EKS.
Product code is used to uniquely identify a product in Amazon Web Services Marketplace. The product code\n should be the same as the one used during the publishing of a new product.
", "smithy.api#required": {} } }, "Timestamp": { "target": "com.amazonaws.marketplacemetering#Timestamp", "traits": { "smithy.api#documentation": "Timestamp, in UTC, for which the usage is being reported. Your application can meter\n usage for up to six hours in the past. Make sure the timestamp value is not\n before the start of the software usage.
It will be one of the fcp dimension name provided during the publishing of the\n product.
", "smithy.api#required": {} } }, "UsageQuantity": { "target": "com.amazonaws.marketplacemetering#UsageQuantity", "traits": { "smithy.api#deprecated": { "since": "2026-10-20", "message": "Use UsageQuantityAsDecimal instead." }, "smithy.api#documentation": "The consumption value for the hour, as a whole number. Defaults to 0 if neither\n UsageQuantity nor UsageQuantityAsDecimal is specified.
Use UsageQuantityAsDecimal instead. You can't specify both\n UsageQuantity and UsageQuantityAsDecimal.
The consumption value for the hour, as a decimal string. Use this instead of\n UsageQuantity to report fractional usage.
A non-negative decimal number, for example 17.42.
You can't specify both UsageQuantity and\n UsageQuantityAsDecimal. If you provide UsageAllocations,\n each allocation must use AllocatedUsageQuantityAsDecimal.
Quantities are compared by value when checking for duplicate or retried requests, so\n 17, 17.0, and 17.00 are the same quantity,\n whether you send it in UsageQuantity or\n UsageQuantityAsDecimal.
Checks whether you have the permissions required for the action, but does not make the\n request. If you have the permissions, the request returns DryRunOperation;\n otherwise, it returns UnauthorizedException. Defaults to false\n if not specified.
The set of UsageAllocations to submit.
The sum of all UsageAllocation quantities must equal the usage quantity\n of the MeterUsage request (UsageQuantity or\n UsageQuantityAsDecimal), and each UsageAllocation must have a\n unique set of tags (include no tags). Allocations must use the same type of quantity as\n the request: AllocatedUsageQuantity with UsageQuantity, or\n AllocatedUsageQuantityAsDecimal with\n UsageQuantityAsDecimal.
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency\n of the request. This lets you safely retry the request without accidentally performing the\n same operation a second time. Passing the same value to a later call to an operation\n requires that you also pass the same value for all other parameters. We recommend that you\n use a UUID type of\n value.
\nIf you don't provide this value, then Amazon Web Services generates a random one for\n you.
\nIf you retry the operation with the same ClientToken, but with different\n parameters, the retry fails with an IdempotencyConflictException error.
Metering record id.
" } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.marketplacemetering#NonEmptyString": { "type": "string", "traits": { "smithy.api#pattern": "^[\\s\\S]+$" } }, "com.amazonaws.marketplacemetering#Nonce": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 255 }, "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.marketplacemetering#PlatformNotSupportedException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "Amazon Web Services Marketplace does not support metering usage from the underlying platform. Currently, Amazon ECS, Amazon EKS, and Fargate are supported.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#ProductCode": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 255 }, "smithy.api#pattern": "^[-a-zA-Z0-9/=:_.@]*$" } }, "com.amazonaws.marketplacemetering#RegisterUsage": { "type": "operation", "input": { "target": "com.amazonaws.marketplacemetering#RegisterUsageRequest" }, "output": { "target": "com.amazonaws.marketplacemetering#RegisterUsageResult" }, "errors": [ { "target": "com.amazonaws.marketplacemetering#CustomerNotEntitledException" }, { "target": "com.amazonaws.marketplacemetering#DisabledApiException" }, { "target": "com.amazonaws.marketplacemetering#InternalServiceErrorException" }, { "target": "com.amazonaws.marketplacemetering#InvalidProductCodeException" }, { "target": "com.amazonaws.marketplacemetering#InvalidPublicKeyVersionException" }, { "target": "com.amazonaws.marketplacemetering#InvalidRegionException" }, { "target": "com.amazonaws.marketplacemetering#PlatformNotSupportedException" }, { "target": "com.amazonaws.marketplacemetering#ThrottlingException" } ], "traits": { "smithy.api#documentation": "Paid container software products sold through Amazon Web Services Marketplace must integrate with the Amazon Web Services Marketplace\n Metering Service and call the RegisterUsage operation for software\n entitlement and metering. Free and BYOL products for Amazon ECS or Amazon EKS aren't required to call RegisterUsage, but you may choose to\n do so if you would like to receive usage data in your seller reports. The sections below\n explain the behavior of RegisterUsage. RegisterUsage performs\n two primary functions: metering and entitlement.
\n Entitlement: RegisterUsage allows you to\n verify that the customer running your paid software is subscribed to your\n product on Amazon Web Services Marketplace, enabling you to guard against unauthorized use. Your container\n image that integrates with RegisterUsage is only required to guard\n against unauthorized use at container startup, as such a\n CustomerNotSubscribedException or\n PlatformNotSupportedException will only be thrown on the\n initial call to RegisterUsage. Subsequent calls from the same\n Amazon ECS task instance (e.g. task-id) or Amazon EKS pod\n will not throw a CustomerNotSubscribedException, even if the\n customer unsubscribes while the Amazon ECS task or Amazon EKS\n pod is still running.
\n Metering: RegisterUsage meters software use\n per ECS task, per hour, or per pod for Amazon EKS with usage prorated to\n the second. A minimum of 1 minute of usage applies to tasks that are short\n lived. For example, if a customer has a 10 node Amazon ECS or Amazon EKS cluster and a service configured as a Daemon Set, then Amazon ECS or Amazon EKS will launch a task on all 10 cluster nodes\n and the customer will be charged for 10 tasks. Software metering\n is handled by the Amazon Web Services Marketplace metering control plane\u2014your software is\n not required to perform metering-specific actions other than to call\n RegisterUsage to commence metering.\n The Amazon Web Services Marketplace metering control plane will also bill customers for\n running ECS tasks and Amazon EKS pods, regardless of the customer's\n subscription state, which removes the need for your software to run entitlement\n checks at runtime. For containers, RegisterUsage should be called\n immediately at launch. If you don\u2019t register the container within the first 6 hours\n of the launch, Amazon Web Services Marketplace Metering Service doesn\u2019t provide any metering\n guarantees for previous months. Metering will continue, however, for the\n current month forward until the container ends. RegisterUsage is\n for metering paid hourly container products.
For Amazon Web Services Regions that support RegisterUsage, see RegisterUsage Region support.\n
Product code is used to uniquely identify a product in Amazon Web Services Marketplace. The product code should\n be the same as the one used during the publishing of a new product.
", "smithy.api#required": {} } }, "PublicKeyVersion": { "target": "com.amazonaws.marketplacemetering#VersionInteger", "traits": { "smithy.api#documentation": "Public Key Version provided by Amazon Web Services Marketplace
", "smithy.api#required": {} } }, "Nonce": { "target": "com.amazonaws.marketplacemetering#Nonce", "traits": { "smithy.api#documentation": "(Optional) To scope down the registration to a specific running software instance and\n guard against replay attacks.
" } } }, "traits": { "smithy.api#input": {} } }, "com.amazonaws.marketplacemetering#RegisterUsageResult": { "type": "structure", "members": { "PublicKeyRotationTimestamp": { "target": "com.amazonaws.marketplacemetering#Timestamp", "traits": { "smithy.api#documentation": "(Optional) Only included when public key version has expired
" } }, "Signature": { "target": "com.amazonaws.marketplacemetering#NonEmptyString", "traits": { "smithy.api#documentation": "JWT Token
" } } }, "traits": { "smithy.api#output": {} } }, "com.amazonaws.marketplacemetering#ResolveCustomer": { "type": "operation", "input": { "target": "com.amazonaws.marketplacemetering#ResolveCustomerRequest" }, "output": { "target": "com.amazonaws.marketplacemetering#ResolveCustomerResult" }, "errors": [ { "target": "com.amazonaws.marketplacemetering#DisabledApiException" }, { "target": "com.amazonaws.marketplacemetering#ExpiredTokenException" }, { "target": "com.amazonaws.marketplacemetering#InternalServiceErrorException" }, { "target": "com.amazonaws.marketplacemetering#InvalidTokenException" }, { "target": "com.amazonaws.marketplacemetering#ThrottlingException" } ], "traits": { "smithy.api#documentation": "\n ResolveCustomer is called by a SaaS application during the registration\n process. When a buyer visits your website during the registration process, the buyer\n submits a registration token through their browser. The registration token is resolved\n through this API to obtain a CustomerIdentifier along with the\n CustomerAWSAccountId, ProductCode, and LicenseArn.
For new SaaS product integrations, the CustomerIdentifier field is not populated in the ResolveCustomer API response. New integrations must use CustomerAWSAccountId and LicenseArn to identify customers. Existing integrations continue to work unchanged.
To successfully resolve the token, the API must be called from the account that was used to publish the SaaS\n application. For an example of using ResolveCustomer, see ResolveCustomer code example in the Amazon Web Services Marketplace Seller\n Guide.
Permission is required for this operation. Your IAM role or user performing this\n operation requires a policy to allow the aws-marketplace:ResolveCustomer\n action. For more information, see Actions, resources, and condition keys for Amazon Web Services Marketplace Metering Service in\n the Service Authorization Reference.
For Amazon Web Services Regions that support ResolveCustomer, see ResolveCustomer Region support.\n
When a buyer visits your website during the registration process, the buyer submits a\n registration token through the browser. The registration token is resolved to obtain a\n CustomerIdentifier along with the CustomerAWSAccountId,\n ProductCode, and LicenseArn.
For new SaaS product integrations, the CustomerIdentifier field is not populated. Use CustomerAWSAccountId and LicenseArn for customer identification.
Contains input to the ResolveCustomer operation.
The CustomerIdentifier is used to identify an individual customer in your\n application.
For new SaaS product integrations, this field is not populated. Use CustomerAWSAccountId and LicenseArn to identify customers instead.
The product code is returned to confirm that the buyer is registering for your\n product. Subsequent BatchMeterUsage calls should be made using this product\n code.
The CustomerAWSAccountId provides the Amazon Web Services account ID associated with\n the CustomerIdentifier for the individual customer. Calls to BatchMeterUsage require\n CustomerAWSAccountId for each UsageRecord.
The LicenseArn is a unique identifier for a specific granted license. These are typically used for software purchased through Amazon Web Services Marketplace. Calls to BatchMeterUsage require LicenseArn for each UsageRecord.
Once you receive the CustomerAWSAccountId and LicenseArn in the response, store that for future purposes/API calls/integrations.
The metadata associated with the resolved customer, including the\n AgreementId of the Amazon Web Services Marketplace agreement the customer accepted.
The result of the ResolveCustomer operation. Contains the\n CustomerIdentifier along with the CustomerAWSAccountId,\n ProductCode, LicenseArn, and Metadata.
One part of a key-value pair that makes up a tag. A key is a\n label that acts like a category for the specific tag values.
One part of a key-value pair that makes up a tag. A value\n acts as a descriptor within a tag category (key). The value can be empty or null.
Metadata assigned to an allocation. Each tag is made up of a key and a\n value.
The calls to the API are throttled.
", "smithy.api#error": "client" } }, "com.amazonaws.marketplacemetering#Timestamp": { "type": "timestamp" }, "com.amazonaws.marketplacemetering#TimestampOutOfBoundsException": { "type": "structure", "members": { "message": { "target": "com.amazonaws.marketplacemetering#errorMessage" } }, "traits": { "smithy.api#documentation": "The timestamp value passed in the UsageRecord is out of\n allowed range.
For BatchMeterUsage, if any of the records are outside of the allowed\n range, the entire batch is not processed. You must remove invalid records and try\n again.
The total quantity allocated to this bucket of usage, as a whole number.
\nUse AllocatedUsageQuantityAsDecimal instead. Each allocation must specify\n exactly one of AllocatedUsageQuantity or\n AllocatedUsageQuantityAsDecimal.
The total quantity allocated to this bucket of usage, as a decimal string. Use this\n when the usage quantity of the request or usage record is specified as a decimal\n (UsageQuantityAsDecimal or QuantityAsDecimal).
A non-negative decimal number, for example 17.42.
Each allocation must specify exactly one of AllocatedUsageQuantity or\n AllocatedUsageQuantityAsDecimal.
The set of tags that define the bucket of usage. For the bucket of items with no tags,\n this parameter can be left out.
" } } }, "traits": { "smithy.api#documentation": "Usage allocations allow you to split usage into buckets by tags.
\nEach UsageAllocation indicates the usage quantity for a specific set of\n tags.
Timestamp, in UTC, for which the usage is being reported.
\nYour application can meter usage for up to 24 hours in the past. Make sure the\n timestamp value 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\n records for the previous billing month before 06:00 UTC on the first day of the next month.
", "smithy.api#required": {} } }, "CustomerIdentifier": { "target": "com.amazonaws.marketplacemetering#CustomerIdentifier", "traits": { "smithy.api#addedDefault": {}, "smithy.api#default": "", "smithy.api#documentation": "The CustomerIdentifier is obtained through the\n ResolveCustomer operation and represents an individual buyer in your\n application.
\n CustomerIdentifier is not supported for new SaaS product integrations. Use CustomerAWSAccountId to identify the buyer.
During the process of registering a product on Amazon Web Services Marketplace, dimensions are specified.\n These represent different units of value in your application.
", "smithy.api#required": {} } }, "Quantity": { "target": "com.amazonaws.marketplacemetering#UsageQuantity", "traits": { "smithy.api#deprecated": { "since": "2026-10-20", "message": "Use QuantityAsDecimal instead." }, "smithy.api#documentation": "The quantity of usage consumed by the customer for the given dimension and time, as a\n whole number. Defaults to 0 if neither Quantity nor\n QuantityAsDecimal is specified.
Use QuantityAsDecimal instead. You can't specify both\n Quantity and QuantityAsDecimal in a usage record.
The quantity of usage consumed by the customer for the given dimension and time, as a\n decimal string. Use this instead of Quantity to report fractional\n usage.
A non-negative decimal number, for example 17.42.
You can't specify both Quantity and QuantityAsDecimal in a\n usage record. If you provide UsageAllocations, each allocation must use\n AllocatedUsageQuantityAsDecimal. If any usage record fails these checks,\n the entire BatchMeterUsage request fails and no records are\n processed.
Quantities are compared by value when checking for duplicate records, so\n 17, 17.0, and 17.00 are the same quantity,\n whether you send it in Quantity or QuantityAsDecimal.
The set of UsageAllocations to submit. The sum of all\n UsageAllocation quantities must equal the quantity of the\n UsageRecord (Quantity or QuantityAsDecimal).\n Allocations must use the same type of quantity as the usage record:\n AllocatedUsageQuantity with Quantity, or\n AllocatedUsageQuantityAsDecimal with\n QuantityAsDecimal.
The CustomerAWSAccountId parameter specifies the AWS account ID of the buyer.
If you have an existing integration and need the CustomerAWSAccountId that corresponds to a CustomerIdentifier, contact AWS Marketplace Seller Operations to obtain the mapping. Do not request the CustomerAWSAccountId directly from buyers. We cannot verify that a buyer-provided account ID is authentic, which can result in incorrect metering or billing.
The LicenseArn is a unique identifier for a specific granted license. These are used for software purchased through Amazon Web Services Marketplace.
To access your CustomerAWSAccountId and LicenseArn mapping, visit Agreements Feeds.
A UsageRecord indicates a quantity of usage for a given product,\n customer, dimension and time.
Multiple requests with the same UsageRecords as input will be\n de-duplicated to prevent double charges.
The UsageRecord that was part of the BatchMeterUsage\n request.
The MeteringRecordId is a unique identifier for this metering\n event.
The UsageRecordResult\n Status indicates the status of an individual UsageRecord\n processed by BatchMeterUsage.
\n Success- The UsageRecord was accepted and\n honored by BatchMeterUsage.
\n CustomerNotSubscribed- The CustomerIdentifier\n specified is not able to use your product. The UsageRecord was not\n honored. There are three causes for this result:
The customer identifier is invalid.
\nThe customer identifier provided in the metering record does not have\n an active agreement or subscription with this product. Future\n UsageRecords for this customer will fail until the\n customer subscribes to your product.
The customer's Amazon Web Services account was suspended.
\n\n DuplicateRecord- Indicates that the\n UsageRecord was invalid and not honored. A previously metered\n UsageRecord had the same customer, dimension, and time, but a\n different quantity.
A UsageRecordResult indicates the status of a given\n UsageRecord processed by BatchMeterUsage.