AWS SDK Version 3 for .NET
API Reference

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.

The CustomerIdentifier parameter is scheduled for deprecation. Use CustomerAWSAccountID instead.

These parameters are mutually exclusive. You can't specify both CustomerIdentifier and CustomerAWSAccountID in the same request.

To post metering records for customers, SaaS applications call BatchMeterUsage, which is used for metering SaaS flexible consumption pricing (FCP). Identical requests are idempotent and can be retried with the same records or a subset of records. Each BatchMeterUsage request is for only one product. If you want to meter usage for multiple products, you must make multiple BatchMeterUsage calls.

Usage records should be submitted in quick succession following a recorded event. Usage records aren't accepted 6 hours or more after an event.

BatchMeterUsage can process up to 25 UsageRecords at a time, and each request must be less than 1 MB in size. Optionally, you can have multiple usage allocations for usage data that's split into buckets according to predefined tags.

BatchMeterUsage returns a list of UsageRecordResult objects, which have each UsageRecord. It also returns a list of UnprocessedRecords, which indicate errors on the service side that should be retried.

For Amazon Web Services Regions that support BatchMeterUsage, see BatchMeterUsage Region support.

For an example of BatchMeterUsage, see BatchMeterUsage code example in the Amazon Web Services Marketplace Seller Guide.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to BatchMeterUsageAsync.

Namespace: Amazon.AWSMarketplaceMetering
Assembly: AWSSDK.AWSMarketplaceMetering.dll
Version: 3.x.y.z

Syntax

C#
public abstract BatchMeterUsageResponse BatchMeterUsage(
         BatchMeterUsageRequest request
)

Parameters

request
Type: Amazon.AWSMarketplaceMetering.Model.BatchMeterUsageRequest

Container for the necessary parameters to execute the BatchMeterUsage service method.

Return Value


The response from the BatchMeterUsage service method, as returned by AWSMarketplaceMetering.

Exceptions

ExceptionCondition
DisabledApiException The API is disabled in the Region.
InternalServiceErrorException An internal error has occurred. Retry your request. If the problem persists, post a message with details on the Amazon Web Services forums.
InvalidCustomerIdentifierException You have metered usage for a CustomerIdentifier that does not exist.
InvalidProductCodeException The product code passed does not match the product code used for publishing the product.
InvalidTagException The tag is invalid, or the number of tags is greater than 5.
InvalidUsageAllocationsException Sum of allocated usage quantities is not equal to the usage quantity.
InvalidUsageDimensionException The usage dimension does not match one of the UsageDimensions associated with products.
ThrottlingException The calls to the API are throttled.
TimestampOutOfBoundsException The timestamp value passed in the UsageRecord is out of allowed range. For BatchMeterUsage, if any of the records are outside of the allowed range, the entire batch is not processed. You must remove invalid records and try again.

Version Information

.NET Framework:
Supported in: 4.5 and newer, 3.5

See Also