@ThreadSafe public class AWSMarketplaceMeteringClient extends AmazonWebServiceClient implements AWSMarketplaceMetering
This 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.
Submitting Metering Records
MeterUsage- Submits the metering record for a Marketplace product.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSMarketplaceMeteringClient()
Constructs a new client to invoke service methods on AWSMarketplace Metering.
|
AWSMarketplaceMeteringClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on AWSMarketplace Metering using the specified AWS account
credentials.
|
AWSMarketplaceMeteringClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWSMarketplace Metering using the specified AWS account
credentials and client configuration options.
|
AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on AWSMarketplace Metering using the specified AWS account
credentials provider.
|
AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWSMarketplace Metering using the specified AWS account
credentials provider and client configuration options.
|
AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
Constructs a new client to invoke service methods on AWSMarketplace Metering using the specified AWS account
credentials provider, client configuration options, and request metric collector.
|
AWSMarketplaceMeteringClient(ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWSMarketplace Metering.
|
Modifier and Type | Method and Description |
---|---|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful, request, typically used for debugging issues
where a service isn't acting as expected.
|
MeterUsageResult |
meterUsage(MeterUsageRequest meterUsageRequest)
API to emit metering records.
|
addRequestHandler, addRequestHandler, configureRegion, getEndpointPrefix, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion, shutdown
public AWSMarketplaceMeteringClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
public AWSMarketplaceMeteringClient(ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling how this client connects to AWSMarketplace Metering (ex:
proxy settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
public AWSMarketplaceMeteringClient(AWSCredentials awsCredentials)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.public AWSMarketplaceMeteringClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWSMarketplace Metering (ex:
proxy settings, retry counts, etc.).public AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.public AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWSMarketplace Metering (ex:
proxy settings, retry counts, etc.).public AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWSMarketplace Metering (ex:
proxy settings, retry counts, etc.).requestMetricCollector
- optional request metric collectorpublic MeterUsageResult meterUsage(MeterUsageRequest meterUsageRequest)
API to emit metering records. For identical requests, the API is idempotent. It simply returns the metering record ID.
meterUsage
in interface AWSMarketplaceMetering
meterUsageRequest
- InternalServiceErrorException
- An internal error has occurred. Retry your request. If the problem persists, post a message with details
on the AWS forums.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.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.TimestampOutOfBoundsException
- The timestamp value passed in the meterUsage() is out of allowed range.DuplicateRequestException
- A metering record has already been emitted by the same EC2 instance for the given {usageDimension,
timestamp} with a different usageQuantity.ThrottlingException
- The calls to the MeterUsage API are throttled.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata
in interface AWSMarketplaceMetering
request
- The originally executed requestCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.