View on GitHub

aws-sdk-swift

MarketplaceMeteringClientProtocol

AWS Marketplace Metering Service 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. For information on the permissions you need to use this API, see AWS Marketing metering and entitlement API permissions in the AWS Marketplace Seller Guide. Submitting Metering Records

public protocol MarketplaceMeteringClientProtocol 

Accepting New Customers

Entitlement and Metering for Paid Container Products

BatchMeterUsage API calls are captured by AWS CloudTrail. You can use Cloudtrail to verify that the SaaS metering records that you sent are accurate by searching for records with the eventName of BatchMeterUsage. You can also use CloudTrail to audit records over time. For more information, see the AWS CloudTrail User Guide .

Requirements

batchMeterUsage(input:completion:)

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. A UsageRecord can optionally include multiple usage allocations, to provide customers with usagedata split into buckets by tags that you define (or allow the customer to define). BatchMeterUsage requests must be less than 1MB in size.

func batchMeterUsage(input: BatchMeterUsageInput, completion: @escaping (ClientRuntime.SdkResult<BatchMeterUsageOutputResponse, BatchMeterUsageOutputError>) -> Void)

meterUsage(input:completion:)

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).

func meterUsage(input: MeterUsageInput, completion: @escaping (ClientRuntime.SdkResult<MeterUsageOutputResponse, MeterUsageOutputError>) -> Void)

registerUsage(input:completion:)

Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the RegisterUsage operation for software entitlement and metering. Free and BYOL products for Amazon ECS or Amazon EKS aren’t required to call RegisterUsage, but you may choose to do so if you would like to receive usage data in your seller reports. The sections below explain the behavior of RegisterUsage. RegisterUsage performs two primary functions: metering and entitlement.

func registerUsage(input: RegisterUsageInput, completion: @escaping (ClientRuntime.SdkResult<RegisterUsageOutputResponse, RegisterUsageOutputError>) -> Void)

resolveCustomer(input:completion:)

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.

func resolveCustomer(input: ResolveCustomerInput, completion: @escaping (ClientRuntime.SdkResult<ResolveCustomerOutputResponse, ResolveCustomerOutputError>) -> Void)