@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") 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. MeterUsage is called from an EC2 instance.
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 and Product Code.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSMarketplaceMeteringClient()
Deprecated.
|
AWSMarketplaceMeteringClient(AWSCredentials awsCredentials)
Deprecated.
use
AwsClientBuilder.withCredentials(AWSCredentialsProvider) for example:
AWSMarketplaceMeteringClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build(); |
AWSMarketplaceMeteringClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
|
AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider)
Deprecated.
|
AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
|
AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
|
AWSMarketplaceMeteringClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
BatchMeterUsageResult |
batchMeterUsage(BatchMeterUsageRequest request)
BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to post metering records for a
set of customers.
|
static AWSMarketplaceMeteringClientBuilder |
builder() |
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 request)
API to emit metering records.
|
ResolveCustomerResult |
resolveCustomer(ResolveCustomerRequest request)
ResolveCustomer is called by a SaaS application during the registration process.
|
addRequestHandler, addRequestHandler, configureRegion, getEndpointPrefix, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion, shutdown
@Deprecated public AWSMarketplaceMeteringClient()
AWSMarketplaceMeteringClientBuilder.defaultClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
@Deprecated public AWSMarketplaceMeteringClient(ClientConfiguration clientConfiguration)
AwsClientBuilder.withClientConfiguration(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
@Deprecated public AWSMarketplaceMeteringClient(AWSCredentials awsCredentials)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
for example:
AWSMarketplaceMeteringClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();
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.@Deprecated public AWSMarketplaceMeteringClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(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.).@Deprecated public AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider)
AwsClientBuilder.withCredentials(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.@Deprecated public AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(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.).@Deprecated public AWSMarketplaceMeteringClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsClientBuilder.withMetricsCollector(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 static AWSMarketplaceMeteringClientBuilder builder()
public BatchMeterUsageResult batchMeterUsage(BatchMeterUsageRequest request)
BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to post metering records for a set of customers.
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 BatchMeterUsage is for one product. If you need to meter usage for multiple products, you must make multiple calls to BatchMeterUsage.
BatchMeterUsage can process up to 25 UsageRecords at a time.
batchMeterUsage
in interface AWSMarketplaceMetering
batchMeterUsageRequest
- A BatchMeterUsageRequest contains UsageRecords, which indicate quantities of usage within your
application.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.InvalidCustomerIdentifierException
- You have metered usage for a CustomerIdentifier that does not exist.TimestampOutOfBoundsException
- The timestamp value passed in the meterUsage() is out of allowed range.ThrottlingException
- The calls to the MeterUsage API are throttled.public MeterUsageResult meterUsage(MeterUsageRequest request)
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.
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 ResolveCustomerResult resolveCustomer(ResolveCustomerRequest request)
ResolveCustomer is 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 their browser. The registration token is resolved through this API to obtain a CustomerIdentifier and product code.
resolveCustomer
in interface AWSMarketplaceMetering
resolveCustomerRequest
- Contains input to the ResolveCustomer operation.InvalidTokenException
ExpiredTokenException
- The submitted registration token has expired. This can happen if the buyer's browser takes too long to
redirect to your page, the buyer has resubmitted the registration token, or your application has held on
to the registration token for too long. Your SaaS registration website should redeem this token as soon
as it is submitted by the buyer's browser.ThrottlingException
- The calls to the MeterUsage API are throttled.InternalServiceErrorException
- An internal error has occurred. Retry your request. If the problem persists, post a message with details
on the AWS forums.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.