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.

API to emit metering records. For identical requests, the API is idempotent. It simply returns the metering record ID.

MeterUsage is authenticated on the buyer's AWS account, generally when running from an EC2 instance on the AWS Marketplace.

Note:

For PCL this operation is only available in asynchronous form. Please refer to MeterUsageAsync.

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

Syntax

C#
public virtual MeterUsageResponse MeterUsage(
         MeterUsageRequest request
)
Parameters
request
Type: Amazon.AWSMarketplaceMetering.Model.MeterUsageRequest

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

Return Value
The response from the MeterUsage service method, as returned by AWSMarketplaceMetering.

Exceptions

ExceptionCondition
DuplicateRequestException A metering record has already been emitted by the same EC2 instance for the given {usageDimension, timestamp} with a different usageQuantity.
InternalServiceErrorException An internal error has occurred. Retry your request. If the problem persists, post a message with details on the AWS forums.
InvalidEndpointRegionException 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 The product code passed does not match the product code used for publishing the product.
InvalidUsageDimensionException The usage dimension does not match one of the UsageDimensions associated with products.
ThrottlingException The calls to the MeterUsage API are throttled.
TimestampOutOfBoundsException The timestamp value passed in the meterUsage() is out of allowed range.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also