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.
Implementation for accessing AWSMarketplaceMetering
AWS Marketplace Metering ServiceThis 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 the CustomerAWSAccountId
and ProductCode
.
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 call RegisterUsage
, but you can do so if you want to
receive usage data in your seller reports. For more information on using the RegisterUsage
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.
Namespace: Amazon.AWSMarketplaceMetering
Assembly: AWSSDK.AWSMarketplaceMetering.dll
Version: 3.x.y.z
public class AmazonAWSMarketplaceMeteringClient : AmazonServiceClient IAmazonAWSMarketplaceMetering, IAmazonService, IDisposable
The AmazonAWSMarketplaceMeteringClient type exposes the following members
Name | Description | |
---|---|---|
AmazonAWSMarketplaceMeteringClient() |
Constructs AmazonAWSMarketplaceMeteringClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonAWSMarketplaceMeteringClient(RegionEndpoint) |
Constructs AmazonAWSMarketplaceMeteringClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonAWSMarketplaceMeteringClient(AmazonAWSMarketplaceMeteringConfig) |
Constructs AmazonAWSMarketplaceMeteringClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonAWSMarketplaceMeteringClient(AWSCredentials) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Credentials |
|
AmazonAWSMarketplaceMeteringClient(AWSCredentials, RegionEndpoint) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Credentials |
|
AmazonAWSMarketplaceMeteringClient(AWSCredentials, AmazonAWSMarketplaceMeteringConfig) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Credentials and an AmazonAWSMarketplaceMeteringClient Configuration object. |
|
AmazonAWSMarketplaceMeteringClient(string, string) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Access Key ID and AWS Secret Key |
|
AmazonAWSMarketplaceMeteringClient(string, string, RegionEndpoint) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Access Key ID and AWS Secret Key |
|
AmazonAWSMarketplaceMeteringClient(string, string, AmazonAWSMarketplaceMeteringConfig) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Access Key ID, AWS Secret Key and an AmazonAWSMarketplaceMeteringClient Configuration object. |
|
AmazonAWSMarketplaceMeteringClient(string, string, string) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Access Key ID and AWS Secret Key |
|
AmazonAWSMarketplaceMeteringClient(string, string, string, RegionEndpoint) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Access Key ID and AWS Secret Key |
|
AmazonAWSMarketplaceMeteringClient(string, string, string, AmazonAWSMarketplaceMeteringConfig) |
Constructs AmazonAWSMarketplaceMeteringClient with AWS Access Key ID, AWS Secret Key and an AmazonAWSMarketplaceMeteringClient Configuration object. |
Name | Type | Description | |
---|---|---|---|
Config | Amazon.Runtime.IClientConfig | Inherited from Amazon.Runtime.AmazonServiceClient. |
Name | Description | |
---|---|---|
BatchMeterUsage(BatchMeterUsageRequest) |
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 |
|
BatchMeterUsageAsync(BatchMeterUsageRequest, CancellationToken) |
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 |
|
DetermineServiceOperationEndpoint(AmazonWebServiceRequest) |
Returns the endpoint that will be used for a particular request. |
|
Dispose() | Inherited from Amazon.Runtime.AmazonServiceClient. | |
MeterUsage(MeterUsageRequest) |
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. |
|
MeterUsageAsync(MeterUsageRequest, CancellationToken) |
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. |
|
RegisterUsage(RegisterUsageRequest) |
Paid container software products sold through AWS Marketplace must integrate with
the AWS Marketplace Metering Service and call the
|
|
RegisterUsageAsync(RegisterUsageRequest, CancellationToken) |
Paid container software products sold through AWS Marketplace must integrate with
the AWS Marketplace Metering Service and call the
|
|
ResolveCustomer(ResolveCustomerRequest) |
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 |
|
ResolveCustomerAsync(ResolveCustomerRequest, CancellationToken) |
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 |
Name | Description | |
---|---|---|
AfterResponseEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
BeforeRequestEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
ExceptionEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5