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 using credentials from
the EC2 instance, ECS task, or EKS pod.
MeterUsage
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).
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.
For .NET Core this operation is only available in asynchronous form. Please refer to MeterUsageAsync.
Namespace: Amazon.AWSMarketplaceMetering
Assembly: AWSSDK.AWSMarketplaceMetering.dll
Version: 3.x.y.z
public abstract MeterUsageResponse MeterUsage( MeterUsageRequest request )
Container for the necessary parameters to execute the MeterUsage service method.
Exception | Condition |
---|---|
CustomerNotEntitledException | Exception thrown when the customer does not have a valid subscription for the product. |
DuplicateRequestException | A metering record has already been emitted by the same EC2 instance, ECS task, or EKS pod 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 AWS Region different from your EC2 instance, ECS task, or EKS pod. The Region of the Metering Service endpoint and the AWS Region of the resource must match. |
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 | The usage allocation objects are invalid, or the number of allocations is greater than 500 for a single usage record. |
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. |
.NET Framework:
Supported in: 4.5, 4.0, 3.5