View on GitHub

aws-sdk-swift

MarketplaceMeteringClient

public class MarketplaceMeteringClient 

Inheritance

MarketplaceMeteringClientProtocol

Initializers

init(config:)

public init(config: AWSClientRuntime.AWSClientConfiguration) 

init(region:)

public convenience init(region: Swift.String? = nil) throws 

Properties

clientName

public static let clientName = "MarketplaceMeteringClient"

Methods

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.

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

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

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

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