1{
2    "smithy": "1.0",
3    "metadata": {
4        "suppressions": [
5            {
6                "id": "HttpMethodSemantics",
7                "namespace": "*"
8            },
9            {
10                "id": "HttpResponseCodeSemantics",
11                "namespace": "*"
12            },
13            {
14                "id": "PaginatedTrait",
15                "namespace": "*"
16            },
17            {
18                "id": "HttpHeaderTrait",
19                "namespace": "*"
20            },
21            {
22                "id": "HttpUriConflict",
23                "namespace": "*"
24            },
25            {
26                "id": "Service",
27                "namespace": "*"
28            }
29        ]
30    },
31    "shapes": {
32        "com.amazonaws.marketplacemetering#AWSMPMeteringService": {
33            "type": "service",
34            "version": "2016-01-14",
35            "operations": [
36                {
37                    "target": "com.amazonaws.marketplacemetering#BatchMeterUsage"
38                },
39                {
40                    "target": "com.amazonaws.marketplacemetering#MeterUsage"
41                },
42                {
43                    "target": "com.amazonaws.marketplacemetering#RegisterUsage"
44                },
45                {
46                    "target": "com.amazonaws.marketplacemetering#ResolveCustomer"
47                }
48            ],
49            "traits": {
50                "aws.api#service": {
51                    "sdkId": "Marketplace Metering",
52                    "arnNamespace": "aws-marketplace",
53                    "cloudFormationName": "MarketplaceMetering",
54                    "cloudTrailEventSource": "marketplacemetering.amazonaws.com",
55                    "endpointPrefix": "metering.marketplace"
56                },
57                "aws.auth#sigv4": {
58                    "name": "aws-marketplace"
59                },
60                "aws.protocols#awsJson1_1": {},
61                "smithy.api#documentation": "<fullname>AWS Marketplace Metering Service</fullname>\n        <p>This reference provides descriptions of the low-level AWS Marketplace Metering\n            Service API.</p>\n        <p>AWS Marketplace sellers can use this API to submit usage data for custom usage\n            dimensions.</p>\n        <p>For information on the permissions you need to use this API, see\n            <a href=\"https://docs.aws.amazon.com/marketplace/latest/userguide/iam-user-policy-for-aws-marketplace-actions.html\">AWS Marketing metering and entitlement API permissions</a> in the <i>AWS Marketplace Seller Guide.</i> \n         </p>\n        <p>\n            <b>Submitting Metering Records</b>\n        </p>\n        <ul>\n            <li>\n                <p>\n                    <i>MeterUsage</i>- Submits the metering record for a Marketplace\n                    product. MeterUsage is called from an EC2 instance or a container running on EKS\n                    or ECS.</p>\n            </li>\n            <li>\n                <p>\n                    <i>BatchMeterUsage</i>- Submits the metering record for a set of\n                    customers. BatchMeterUsage is called from a software-as-a-service (SaaS)\n                    application.</p>\n            </li>\n         </ul>\n        <p>\n            <b>Accepting New Customers</b>\n        </p>\n        <ul>\n            <li>\n                <p>\n                    <i>ResolveCustomer</i>- Called by a SaaS application during the\n                    registration process. When a buyer visits your website during the registration\n                    process, the buyer submits a Registration Token through the browser. The\n                    Registration Token is resolved through this API to obtain a CustomerIdentifier\n                    and Product Code.</p>\n            </li>\n         </ul>\n        <p>\n            <b>Entitlement and Metering for Paid Container Products</b>\n        </p>\n        <ul>\n            <li>\n                <p> Paid container software products sold through AWS Marketplace must\n                    integrate with the AWS Marketplace Metering Service and call the RegisterUsage\n                    operation for software entitlement and metering. Free and BYOL products for\n                    Amazon ECS or Amazon EKS aren't required to call RegisterUsage, but you can do\n                    so if you want to receive usage data in your seller reports. For more\n                    information on using the RegisterUsage operation, see <a href=\"https://docs.aws.amazon.com/marketplace/latest/userguide/container-based-products.html\">Container-Based Products</a>. </p>\n            </li>\n         </ul>\n        <p>BatchMeterUsage API calls are captured by AWS CloudTrail. You can use Cloudtrail to\n            verify that the SaaS metering records that you sent are accurate by searching for\n            records with the eventName of BatchMeterUsage. You can also use CloudTrail to audit\n            records over time. For more information, see the <i>\n               <a href=\"http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html\">AWS CloudTrail User Guide</a>\n            </i>.</p>",
62                "smithy.api#title": "AWSMarketplace Metering"
63            }
64        },
65        "com.amazonaws.marketplacemetering#AllocatedUsageQuantity": {
66            "type": "integer",
67            "traits": {
68                "smithy.api#box": {},
69                "smithy.api#range": {
70                    "min": 0,
71                    "max": 2147483647
72                }
73            }
74        },
75        "com.amazonaws.marketplacemetering#BatchMeterUsage": {
76            "type": "operation",
77            "input": {
78                "target": "com.amazonaws.marketplacemetering#BatchMeterUsageRequest"
79            },
80            "output": {
81                "target": "com.amazonaws.marketplacemetering#BatchMeterUsageResult"
82            },
83            "errors": [
84                {
85                    "target": "com.amazonaws.marketplacemetering#DisabledApiException"
86                },
87                {
88                    "target": "com.amazonaws.marketplacemetering#InternalServiceErrorException"
89                },
90                {
91                    "target": "com.amazonaws.marketplacemetering#InvalidCustomerIdentifierException"
92                },
93                {
94                    "target": "com.amazonaws.marketplacemetering#InvalidProductCodeException"
95                },
96                {
97                    "target": "com.amazonaws.marketplacemetering#InvalidTagException"
98                },
99                {
100                    "target": "com.amazonaws.marketplacemetering#InvalidUsageAllocationsException"
101                },
102                {
103                    "target": "com.amazonaws.marketplacemetering#InvalidUsageDimensionException"
104                },
105                {
106                    "target": "com.amazonaws.marketplacemetering#ThrottlingException"
107                },
108                {
109                    "target": "com.amazonaws.marketplacemetering#TimestampOutOfBoundsException"
110                }
111            ],
112            "traits": {
113                "smithy.api#documentation": "<p>BatchMeterUsage is called from a SaaS application listed on the AWS Marketplace to\n            post metering records for a set of customers.</p>\n        <p>For identical requests, the API is idempotent; requests can be retried with the\n            same records or a subset of the input records.</p>\n        <p>Every request to BatchMeterUsage is for one product. If you need to meter usage for\n            multiple products, you must make multiple calls to BatchMeterUsage.</p>\n        <p>BatchMeterUsage can process up to 25 UsageRecords at a time.</p>\n        <p>A UsageRecord can optionally include multiple usage allocations, to provide customers\n            with usagedata split into buckets by tags that you define (or allow the customer to \n            define).</p>\n        <p>BatchMeterUsage requests must be less than 1MB in size.</p>"
114            }
115        },
116        "com.amazonaws.marketplacemetering#BatchMeterUsageRequest": {
117            "type": "structure",
118            "members": {
119                "UsageRecords": {
120                    "target": "com.amazonaws.marketplacemetering#UsageRecordList",
121                    "traits": {
122                        "smithy.api#documentation": "<p>The set of UsageRecords to submit. BatchMeterUsage accepts up to 25 UsageRecords at\n            a time.</p>",
123                        "smithy.api#required": {}
124                    }
125                },
126                "ProductCode": {
127                    "target": "com.amazonaws.marketplacemetering#ProductCode",
128                    "traits": {
129                        "smithy.api#documentation": "<p>Product code is used to uniquely identify a product in AWS Marketplace. The product\n            code should be the same as the one used during the publishing of a new\n            product.</p>",
130                        "smithy.api#required": {}
131                    }
132                }
133            },
134            "traits": {
135                "smithy.api#documentation": "<p>A BatchMeterUsageRequest contains UsageRecords, which indicate quantities of usage\n            within your application.</p>"
136            }
137        },
138        "com.amazonaws.marketplacemetering#BatchMeterUsageResult": {
139            "type": "structure",
140            "members": {
141                "Results": {
142                    "target": "com.amazonaws.marketplacemetering#UsageRecordResultList",
143                    "traits": {
144                        "smithy.api#documentation": "<p>Contains all UsageRecords processed by BatchMeterUsage. These records were either\n            honored by AWS Marketplace Metering Service or were invalid.</p>"
145                    }
146                },
147                "UnprocessedRecords": {
148                    "target": "com.amazonaws.marketplacemetering#UsageRecordList",
149                    "traits": {
150                        "smithy.api#documentation": "<p>Contains all UsageRecords that were not processed by BatchMeterUsage. This is a\n            list of UsageRecords. You can retry the failed request by making another BatchMeterUsage\n            call with this list as input in the BatchMeterUsageRequest.</p>"
151                    }
152                }
153            },
154            "traits": {
155                "smithy.api#documentation": "<p>Contains the UsageRecords processed by BatchMeterUsage and any records that have\n            failed due to transient error.</p>"
156            }
157        },
158        "com.amazonaws.marketplacemetering#Boolean": {
159            "type": "boolean",
160            "traits": {
161                "smithy.api#box": {}
162            }
163        },
164        "com.amazonaws.marketplacemetering#CustomerIdentifier": {
165            "type": "string",
166            "traits": {
167                "smithy.api#length": {
168                    "min": 1,
169                    "max": 255
170                },
171                "smithy.api#pattern": "[\\s\\S]+"
172            }
173        },
174        "com.amazonaws.marketplacemetering#CustomerNotEntitledException": {
175            "type": "structure",
176            "members": {
177                "message": {
178                    "target": "com.amazonaws.marketplacemetering#errorMessage"
179                }
180            },
181            "traits": {
182                "smithy.api#documentation": "<p>Exception thrown when the customer does not have a valid subscription for the\n            product.</p>",
183                "smithy.api#error": "client"
184            }
185        },
186        "com.amazonaws.marketplacemetering#DisabledApiException": {
187            "type": "structure",
188            "members": {
189                "message": {
190                    "target": "com.amazonaws.marketplacemetering#errorMessage"
191                }
192            },
193            "traits": {
194                "smithy.api#documentation": "<p>The API is disabled in the Region.</p>",
195                "smithy.api#error": "client"
196            }
197        },
198        "com.amazonaws.marketplacemetering#DuplicateRequestException": {
199            "type": "structure",
200            "members": {
201                "message": {
202                    "target": "com.amazonaws.marketplacemetering#errorMessage"
203                }
204            },
205            "traits": {
206                "smithy.api#documentation": "<p>A metering record has already been emitted by the same EC2 instance, ECS task, or\n            EKS pod for the given {usageDimension, timestamp} with a different\n            usageQuantity.</p>",
207                "smithy.api#error": "client"
208            }
209        },
210        "com.amazonaws.marketplacemetering#ExpiredTokenException": {
211            "type": "structure",
212            "members": {
213                "message": {
214                    "target": "com.amazonaws.marketplacemetering#errorMessage"
215                }
216            },
217            "traits": {
218                "smithy.api#documentation": "<p>The submitted registration token has expired. This can happen if the buyer's\n            browser takes too long to redirect to your page, the buyer has resubmitted the\n            registration token, or your application has held on to the registration token for too\n            long. Your SaaS registration website should redeem this token as soon as it is submitted\n            by the buyer's browser.</p>",
219                "smithy.api#error": "client"
220            }
221        },
222        "com.amazonaws.marketplacemetering#InternalServiceErrorException": {
223            "type": "structure",
224            "members": {
225                "message": {
226                    "target": "com.amazonaws.marketplacemetering#errorMessage"
227                }
228            },
229            "traits": {
230                "smithy.api#documentation": "<p>An internal error has occurred. Retry your request. If the problem persists, post a\n            message with details on the AWS forums.</p>",
231                "smithy.api#error": "server"
232            }
233        },
234        "com.amazonaws.marketplacemetering#InvalidCustomerIdentifierException": {
235            "type": "structure",
236            "members": {
237                "message": {
238                    "target": "com.amazonaws.marketplacemetering#errorMessage"
239                }
240            },
241            "traits": {
242                "smithy.api#documentation": "<p>You have metered usage for a CustomerIdentifier that does not exist.</p>",
243                "smithy.api#error": "client"
244            }
245        },
246        "com.amazonaws.marketplacemetering#InvalidEndpointRegionException": {
247            "type": "structure",
248            "members": {
249                "message": {
250                    "target": "com.amazonaws.marketplacemetering#errorMessage"
251                }
252            },
253            "traits": {
254                "smithy.api#documentation": "<p>The endpoint being called is in a AWS Region different from your EC2 instance, ECS\n            task, or EKS pod. The Region of the Metering Service endpoint and the AWS Region of the\n            resource must match.</p>",
255                "smithy.api#error": "client"
256            }
257        },
258        "com.amazonaws.marketplacemetering#InvalidProductCodeException": {
259            "type": "structure",
260            "members": {
261                "message": {
262                    "target": "com.amazonaws.marketplacemetering#errorMessage"
263                }
264            },
265            "traits": {
266                "smithy.api#documentation": "<p>The product code passed does not match the product code used for publishing the\n            product.</p>",
267                "smithy.api#error": "client"
268            }
269        },
270        "com.amazonaws.marketplacemetering#InvalidPublicKeyVersionException": {
271            "type": "structure",
272            "members": {
273                "message": {
274                    "target": "com.amazonaws.marketplacemetering#errorMessage"
275                }
276            },
277            "traits": {
278                "smithy.api#documentation": "<p>Public Key version is invalid.</p>",
279                "smithy.api#error": "client"
280            }
281        },
282        "com.amazonaws.marketplacemetering#InvalidRegionException": {
283            "type": "structure",
284            "members": {
285                "message": {
286                    "target": "com.amazonaws.marketplacemetering#errorMessage"
287                }
288            },
289            "traits": {
290                "smithy.api#documentation": "<p>RegisterUsage must be called in the same AWS Region the ECS task was launched in.\n            This prevents a container from hardcoding a Region (e.g. withRegion(“us-east-1”) when\n            calling RegisterUsage.</p>",
291                "smithy.api#error": "client"
292            }
293        },
294        "com.amazonaws.marketplacemetering#InvalidTagException": {
295            "type": "structure",
296            "members": {
297                "message": {
298                    "target": "com.amazonaws.marketplacemetering#errorMessage"
299                }
300            },
301            "traits": {
302                "smithy.api#documentation": "<p>The tag is invalid, or the number of tags is greater than 5.</p>",
303                "smithy.api#error": "client"
304            }
305        },
306        "com.amazonaws.marketplacemetering#InvalidTokenException": {
307            "type": "structure",
308            "members": {
309                "message": {
310                    "target": "com.amazonaws.marketplacemetering#errorMessage"
311                }
312            },
313            "traits": {
314                "smithy.api#documentation": "<p>Registration token is invalid.</p>",
315                "smithy.api#error": "client"
316            }
317        },
318        "com.amazonaws.marketplacemetering#InvalidUsageAllocationsException": {
319            "type": "structure",
320            "members": {
321                "message": {
322                    "target": "com.amazonaws.marketplacemetering#errorMessage"
323                }
324            },
325            "traits": {
326                "smithy.api#documentation": "<p>The usage allocation objects are invalid, or the number of allocations is greater\n            than 500 for a single usage record.</p>",
327                "smithy.api#error": "client"
328            }
329        },
330        "com.amazonaws.marketplacemetering#InvalidUsageDimensionException": {
331            "type": "structure",
332            "members": {
333                "message": {
334                    "target": "com.amazonaws.marketplacemetering#errorMessage"
335                }
336            },
337            "traits": {
338                "smithy.api#documentation": "<p>The usage dimension does not match one of the UsageDimensions associated with\n            products.</p>",
339                "smithy.api#error": "client"
340            }
341        },
342        "com.amazonaws.marketplacemetering#MeterUsage": {
343            "type": "operation",
344            "input": {
345                "target": "com.amazonaws.marketplacemetering#MeterUsageRequest"
346            },
347            "output": {
348                "target": "com.amazonaws.marketplacemetering#MeterUsageResult"
349            },
350            "errors": [
351                {
352                    "target": "com.amazonaws.marketplacemetering#CustomerNotEntitledException"
353                },
354                {
355                    "target": "com.amazonaws.marketplacemetering#DuplicateRequestException"
356                },
357                {
358                    "target": "com.amazonaws.marketplacemetering#InternalServiceErrorException"
359                },
360                {
361                    "target": "com.amazonaws.marketplacemetering#InvalidEndpointRegionException"
362                },
363                {
364                    "target": "com.amazonaws.marketplacemetering#InvalidProductCodeException"
365                },
366                {
367                    "target": "com.amazonaws.marketplacemetering#InvalidTagException"
368                },
369                {
370                    "target": "com.amazonaws.marketplacemetering#InvalidUsageAllocationsException"
371                },
372                {
373                    "target": "com.amazonaws.marketplacemetering#InvalidUsageDimensionException"
374                },
375                {
376                    "target": "com.amazonaws.marketplacemetering#ThrottlingException"
377                },
378                {
379                    "target": "com.amazonaws.marketplacemetering#TimestampOutOfBoundsException"
380                }
381            ],
382            "traits": {
383                "smithy.api#documentation": "<p>API to emit metering records. For identical requests, the API is idempotent. It\n            simply returns the metering record ID.</p>\n        <p>MeterUsage is authenticated on the buyer's AWS account using credentials from the\n            EC2 instance, ECS task, or EKS pod.</p>\n        <p>MeterUsage can optionally include multiple usage allocations, to provide customers\n            with usage data split into buckets by tags that you define (or allow the customer to\n            define).</p>"
384            }
385        },
386        "com.amazonaws.marketplacemetering#MeterUsageRequest": {
387            "type": "structure",
388            "members": {
389                "ProductCode": {
390                    "target": "com.amazonaws.marketplacemetering#ProductCode",
391                    "traits": {
392                        "smithy.api#documentation": "<p>Product code is used to uniquely identify a product in AWS Marketplace. The product\n            code should be the same as the one used during the publishing of a new\n            product.</p>",
393                        "smithy.api#required": {}
394                    }
395                },
396                "Timestamp": {
397                    "target": "com.amazonaws.marketplacemetering#Timestamp",
398                    "traits": {
399                        "smithy.api#documentation": "<p>Timestamp, in UTC, for which the usage is being reported. Your application can\n            meter usage for up to one hour in the past. Make sure the timestamp value is not before\n            the start of the software usage.</p>",
400                        "smithy.api#required": {}
401                    }
402                },
403                "UsageDimension": {
404                    "target": "com.amazonaws.marketplacemetering#UsageDimension",
405                    "traits": {
406                        "smithy.api#documentation": "<p>It will be one of the fcp dimension name provided during the publishing of the\n            product.</p>",
407                        "smithy.api#required": {}
408                    }
409                },
410                "UsageQuantity": {
411                    "target": "com.amazonaws.marketplacemetering#UsageQuantity",
412                    "traits": {
413                        "smithy.api#documentation": "<p>Consumption value for the hour. Defaults to <code>0</code> if not\n            specified.</p>"
414                    }
415                },
416                "DryRun": {
417                    "target": "com.amazonaws.marketplacemetering#Boolean",
418                    "traits": {
419                        "smithy.api#documentation": "<p>Checks whether you have the permissions required for the action, but does not make\n            the request. If you have the permissions, the request returns DryRunOperation;\n            otherwise, it returns UnauthorizedException. Defaults to <code>false</code> if not\n            specified.</p>"
420                    }
421                },
422                "UsageAllocations": {
423                    "target": "com.amazonaws.marketplacemetering#UsageAllocations",
424                    "traits": {
425                        "smithy.api#documentation": "<p>The set of UsageAllocations to submit.</p>\n        <p>The sum of all UsageAllocation quantities must equal the\n            UsageQuantity of the MeterUsage request, and each UsageAllocation must have a\n            unique set of tags (include no tags).</p>"
426                    }
427                }
428            }
429        },
430        "com.amazonaws.marketplacemetering#MeterUsageResult": {
431            "type": "structure",
432            "members": {
433                "MeteringRecordId": {
434                    "target": "com.amazonaws.marketplacemetering#String",
435                    "traits": {
436                        "smithy.api#documentation": "<p>Metering record id.</p>"
437                    }
438                }
439            }
440        },
441        "com.amazonaws.marketplacemetering#NonEmptyString": {
442            "type": "string",
443            "traits": {
444                "smithy.api#pattern": "[\\s\\S]+"
445            }
446        },
447        "com.amazonaws.marketplacemetering#Nonce": {
448            "type": "string",
449            "traits": {
450                "smithy.api#length": {
451                    "min": 0,
452                    "max": 255
453                },
454                "smithy.api#pattern": "[\\s\\S]*"
455            }
456        },
457        "com.amazonaws.marketplacemetering#PlatformNotSupportedException": {
458            "type": "structure",
459            "members": {
460                "message": {
461                    "target": "com.amazonaws.marketplacemetering#errorMessage"
462                }
463            },
464            "traits": {
465                "smithy.api#documentation": "<p>AWS Marketplace does not support metering usage from the underlying platform.\n            Currently, Amazon ECS, Amazon EKS, and AWS Fargate are supported.</p>",
466                "smithy.api#error": "client"
467            }
468        },
469        "com.amazonaws.marketplacemetering#ProductCode": {
470            "type": "string",
471            "traits": {
472                "smithy.api#length": {
473                    "min": 1,
474                    "max": 255
475                },
476                "smithy.api#pattern": "[\\s\\S]+"
477            }
478        },
479        "com.amazonaws.marketplacemetering#RegisterUsage": {
480            "type": "operation",
481            "input": {
482                "target": "com.amazonaws.marketplacemetering#RegisterUsageRequest"
483            },
484            "output": {
485                "target": "com.amazonaws.marketplacemetering#RegisterUsageResult"
486            },
487            "errors": [
488                {
489                    "target": "com.amazonaws.marketplacemetering#CustomerNotEntitledException"
490                },
491                {
492                    "target": "com.amazonaws.marketplacemetering#DisabledApiException"
493                },
494                {
495                    "target": "com.amazonaws.marketplacemetering#InternalServiceErrorException"
496                },
497                {
498                    "target": "com.amazonaws.marketplacemetering#InvalidProductCodeException"
499                },
500                {
501                    "target": "com.amazonaws.marketplacemetering#InvalidPublicKeyVersionException"
502                },
503                {
504                    "target": "com.amazonaws.marketplacemetering#InvalidRegionException"
505                },
506                {
507                    "target": "com.amazonaws.marketplacemetering#PlatformNotSupportedException"
508                },
509                {
510                    "target": "com.amazonaws.marketplacemetering#ThrottlingException"
511                }
512            ],
513            "traits": {
514                "smithy.api#documentation": "<p>Paid container software products sold through AWS Marketplace must integrate with\n            the AWS Marketplace Metering Service and call the RegisterUsage operation for software\n            entitlement and metering. Free and BYOL products for Amazon ECS or Amazon EKS aren't\n            required to call RegisterUsage, but you may choose to do so if you would like to receive\n            usage data in your seller reports. The sections below explain the behavior of\n            RegisterUsage. RegisterUsage performs two primary functions: metering and\n            entitlement.</p>\n\n        <ul>\n            <li>\n                <p>\n                    <i>Entitlement</i>: RegisterUsage allows you to verify that the\n                    customer running your paid software is subscribed to your product on AWS\n                    Marketplace, enabling you to guard against unauthorized use. Your container\n                    image that integrates with RegisterUsage is only required to guard against\n                    unauthorized use at container startup, as such a\n                    CustomerNotSubscribedException/PlatformNotSupportedException will only be thrown\n                    on the initial call to RegisterUsage. Subsequent calls from the same Amazon ECS\n                    task instance (e.g. task-id) or Amazon EKS pod will not throw a\n                    CustomerNotSubscribedException, even if the customer unsubscribes while the\n                    Amazon ECS task or Amazon EKS pod is still running.</p>\n            </li>\n            <li>\n                <p>\n                    <i>Metering</i>: RegisterUsage meters software use per ECS task,\n                    per hour, or per pod for Amazon EKS with usage prorated to the second. A minimum\n                    of 1 minute of usage applies to tasks that are short lived. For example, if a\n                    customer has a 10 node Amazon ECS or Amazon EKS cluster and a service configured\n                    as a Daemon Set, then Amazon ECS or Amazon EKS will launch a task on all 10\n                    cluster nodes and the customer will be charged: (10 * hourly_rate). Metering for\n                    software use is automatically handled by the AWS Marketplace Metering Control\n                    Plane -- your software is not required to perform any metering specific actions,\n                    other than call RegisterUsage once for metering of software use to commence. The\n                    AWS Marketplace Metering Control Plane will also continue to bill customers for\n                    running ECS tasks and Amazon EKS pods, regardless of the customers subscription\n                    state, removing the need for your software to perform entitlement checks at\n                    runtime.</p>\n            </li>\n         </ul>"
515            }
516        },
517        "com.amazonaws.marketplacemetering#RegisterUsageRequest": {
518            "type": "structure",
519            "members": {
520                "ProductCode": {
521                    "target": "com.amazonaws.marketplacemetering#ProductCode",
522                    "traits": {
523                        "smithy.api#documentation": "<p>Product code is used to uniquely identify a product in AWS Marketplace. The product\n            code should be the same as the one used during the publishing of a new\n            product.</p>",
524                        "smithy.api#required": {}
525                    }
526                },
527                "PublicKeyVersion": {
528                    "target": "com.amazonaws.marketplacemetering#VersionInteger",
529                    "traits": {
530                        "smithy.api#documentation": "<p>Public Key Version provided by AWS Marketplace</p>",
531                        "smithy.api#required": {}
532                    }
533                },
534                "Nonce": {
535                    "target": "com.amazonaws.marketplacemetering#Nonce",
536                    "traits": {
537                        "smithy.api#documentation": "<p>(Optional) To scope down the registration to a specific running software instance\n            and guard against replay attacks.</p>"
538                    }
539                }
540            }
541        },
542        "com.amazonaws.marketplacemetering#RegisterUsageResult": {
543            "type": "structure",
544            "members": {
545                "PublicKeyRotationTimestamp": {
546                    "target": "com.amazonaws.marketplacemetering#Timestamp",
547                    "traits": {
548                        "smithy.api#documentation": "<p>(Optional) Only included when public key version has expired</p>"
549                    }
550                },
551                "Signature": {
552                    "target": "com.amazonaws.marketplacemetering#NonEmptyString",
553                    "traits": {
554                        "smithy.api#documentation": "<p>JWT Token</p>"
555                    }
556                }
557            }
558        },
559        "com.amazonaws.marketplacemetering#ResolveCustomer": {
560            "type": "operation",
561            "input": {
562                "target": "com.amazonaws.marketplacemetering#ResolveCustomerRequest"
563            },
564            "output": {
565                "target": "com.amazonaws.marketplacemetering#ResolveCustomerResult"
566            },
567            "errors": [
568                {
569                    "target": "com.amazonaws.marketplacemetering#DisabledApiException"
570                },
571                {
572                    "target": "com.amazonaws.marketplacemetering#ExpiredTokenException"
573                },
574                {
575                    "target": "com.amazonaws.marketplacemetering#InternalServiceErrorException"
576                },
577                {
578                    "target": "com.amazonaws.marketplacemetering#InvalidTokenException"
579                },
580                {
581                    "target": "com.amazonaws.marketplacemetering#ThrottlingException"
582                }
583            ],
584            "traits": {
585                "smithy.api#documentation": "<p>ResolveCustomer is called by a SaaS application during the registration process.\n            When a buyer visits your website during the registration process, the buyer submits a\n            registration token through their browser. The registration token is resolved through\n            this API to obtain a CustomerIdentifier and product code.</p>"
586            }
587        },
588        "com.amazonaws.marketplacemetering#ResolveCustomerRequest": {
589            "type": "structure",
590            "members": {
591                "RegistrationToken": {
592                    "target": "com.amazonaws.marketplacemetering#NonEmptyString",
593                    "traits": {
594                        "smithy.api#documentation": "<p>When a buyer visits your website during the registration process, the buyer submits\n            a registration token through the browser. The registration token is resolved to obtain a\n            CustomerIdentifier and product code.</p>",
595                        "smithy.api#required": {}
596                    }
597                }
598            },
599            "traits": {
600                "smithy.api#documentation": "<p>Contains input to the ResolveCustomer operation.</p>"
601            }
602        },
603        "com.amazonaws.marketplacemetering#ResolveCustomerResult": {
604            "type": "structure",
605            "members": {
606                "CustomerIdentifier": {
607                    "target": "com.amazonaws.marketplacemetering#CustomerIdentifier",
608                    "traits": {
609                        "smithy.api#documentation": "<p>The CustomerIdentifier is used to identify an individual customer in your\n            application. Calls to BatchMeterUsage require CustomerIdentifiers for each\n            UsageRecord.</p>"
610                    }
611                },
612                "ProductCode": {
613                    "target": "com.amazonaws.marketplacemetering#ProductCode",
614                    "traits": {
615                        "smithy.api#documentation": "<p>The product code is returned to confirm that the buyer is registering for your\n            product. Subsequent BatchMeterUsage calls should be made using this product\n            code.</p>"
616                    }
617                }
618            },
619            "traits": {
620                "smithy.api#documentation": "<p>The result of the ResolveCustomer operation. Contains the CustomerIdentifier and\n            product code.</p>"
621            }
622        },
623        "com.amazonaws.marketplacemetering#String": {
624            "type": "string"
625        },
626        "com.amazonaws.marketplacemetering#Tag": {
627            "type": "structure",
628            "members": {
629                "Key": {
630                    "target": "com.amazonaws.marketplacemetering#TagKey",
631                    "traits": {
632                        "smithy.api#documentation": "<p>One part of a key-value pair that makes up a tag. A key is a label that acts like a\n            category for the specific tag values.</p>",
633                        "smithy.api#required": {}
634                    }
635                },
636                "Value": {
637                    "target": "com.amazonaws.marketplacemetering#TagValue",
638                    "traits": {
639                        "smithy.api#documentation": "<p>One part of a key-value pair that makes up a tag. A value acts as a descriptor within\n            a tag category (key). The value can be empty or null.</p>",
640                        "smithy.api#required": {}
641                    }
642                }
643            },
644            "traits": {
645                "smithy.api#documentation": "<p>Metadata assigned to an allocation. Each tag is made up of a key and a value.</p>"
646            }
647        },
648        "com.amazonaws.marketplacemetering#TagKey": {
649            "type": "string",
650            "traits": {
651                "smithy.api#length": {
652                    "min": 1,
653                    "max": 100
654                },
655                "smithy.api#pattern": "^[a-zA-Z0-9+ -=._:\\/@]+$"
656            }
657        },
658        "com.amazonaws.marketplacemetering#TagList": {
659            "type": "list",
660            "member": {
661                "target": "com.amazonaws.marketplacemetering#Tag"
662            },
663            "traits": {
664                "smithy.api#length": {
665                    "min": 1,
666                    "max": 5
667                }
668            }
669        },
670        "com.amazonaws.marketplacemetering#TagValue": {
671            "type": "string",
672            "traits": {
673                "smithy.api#length": {
674                    "min": 1,
675                    "max": 256
676                },
677                "smithy.api#pattern": "^[a-zA-Z0-9+ -=._:\\/@]+$"
678            }
679        },
680        "com.amazonaws.marketplacemetering#ThrottlingException": {
681            "type": "structure",
682            "members": {
683                "message": {
684                    "target": "com.amazonaws.marketplacemetering#errorMessage"
685                }
686            },
687            "traits": {
688                "smithy.api#documentation": "<p>The calls to the API are throttled.</p>",
689                "smithy.api#error": "client"
690            }
691        },
692        "com.amazonaws.marketplacemetering#Timestamp": {
693            "type": "timestamp"
694        },
695        "com.amazonaws.marketplacemetering#TimestampOutOfBoundsException": {
696            "type": "structure",
697            "members": {
698                "message": {
699                    "target": "com.amazonaws.marketplacemetering#errorMessage"
700                }
701            },
702            "traits": {
703                "smithy.api#documentation": "<p>The timestamp value passed in the meterUsage() is out of allowed range.</p>",
704                "smithy.api#error": "client"
705            }
706        },
707        "com.amazonaws.marketplacemetering#UsageAllocation": {
708            "type": "structure",
709            "members": {
710                "AllocatedUsageQuantity": {
711                    "target": "com.amazonaws.marketplacemetering#AllocatedUsageQuantity",
712                    "traits": {
713                        "smithy.api#documentation": "<p>The total quantity allocated to this bucket of usage.</p>",
714                        "smithy.api#required": {}
715                    }
716                },
717                "Tags": {
718                    "target": "com.amazonaws.marketplacemetering#TagList",
719                    "traits": {
720                        "smithy.api#documentation": "<p>The set of tags that define the bucket of usage. For the bucket of items with no\n            tags, this parameter can be left out.</p>"
721                    }
722                }
723            },
724            "traits": {
725                "smithy.api#documentation": "<p>Usage allocations allow you to split usage into buckets by tags.</p>\n        <p>Each UsageAllocation indicates the usage quantity for a specific set of tags.</p>"
726            }
727        },
728        "com.amazonaws.marketplacemetering#UsageAllocations": {
729            "type": "list",
730            "member": {
731                "target": "com.amazonaws.marketplacemetering#UsageAllocation"
732            },
733            "traits": {
734                "smithy.api#length": {
735                    "min": 1,
736                    "max": 500
737                }
738            }
739        },
740        "com.amazonaws.marketplacemetering#UsageDimension": {
741            "type": "string",
742            "traits": {
743                "smithy.api#length": {
744                    "min": 1,
745                    "max": 255
746                },
747                "smithy.api#pattern": "[\\s\\S]+"
748            }
749        },
750        "com.amazonaws.marketplacemetering#UsageQuantity": {
751            "type": "integer",
752            "traits": {
753                "smithy.api#box": {},
754                "smithy.api#range": {
755                    "min": 0,
756                    "max": 2147483647
757                }
758            }
759        },
760        "com.amazonaws.marketplacemetering#UsageRecord": {
761            "type": "structure",
762            "members": {
763                "Timestamp": {
764                    "target": "com.amazonaws.marketplacemetering#Timestamp",
765                    "traits": {
766                        "smithy.api#documentation": "<p>Timestamp, in UTC, for which the usage is being reported.</p>\n        <p>Your application can meter usage for up to one hour in the past. Make sure the\n            timestamp value is not before the start of the software usage.</p>",
767                        "smithy.api#required": {}
768                    }
769                },
770                "CustomerIdentifier": {
771                    "target": "com.amazonaws.marketplacemetering#CustomerIdentifier",
772                    "traits": {
773                        "smithy.api#documentation": "<p>The CustomerIdentifier is obtained through the ResolveCustomer operation and\n            represents an individual buyer in your application.</p>",
774                        "smithy.api#required": {}
775                    }
776                },
777                "Dimension": {
778                    "target": "com.amazonaws.marketplacemetering#UsageDimension",
779                    "traits": {
780                        "smithy.api#documentation": "<p>During the process of registering a product on AWS Marketplace, up to eight\n            dimensions are specified. These represent different units of value in your\n            application.</p>",
781                        "smithy.api#required": {}
782                    }
783                },
784                "Quantity": {
785                    "target": "com.amazonaws.marketplacemetering#UsageQuantity",
786                    "traits": {
787                        "smithy.api#documentation": "<p>The quantity of usage consumed by the customer for the given dimension and time.\n            Defaults to <code>0</code> if not specified.</p>"
788                    }
789                },
790                "UsageAllocations": {
791                    "target": "com.amazonaws.marketplacemetering#UsageAllocations",
792                    "traits": {
793                        "smithy.api#documentation": "<p>The set of UsageAllocations to submit. The sum of all UsageAllocation quantities \n            must equal the Quantity of the UsageRecord.</p>"
794                    }
795                }
796            },
797            "traits": {
798                "smithy.api#documentation": "<p>A UsageRecord indicates a quantity of usage for a given product, customer,\n            dimension and time.</p>\n        <p>Multiple requests with the same UsageRecords as input will be deduplicated to\n            prevent double charges.</p>"
799            }
800        },
801        "com.amazonaws.marketplacemetering#UsageRecordList": {
802            "type": "list",
803            "member": {
804                "target": "com.amazonaws.marketplacemetering#UsageRecord"
805            },
806            "traits": {
807                "smithy.api#length": {
808                    "min": 0,
809                    "max": 25
810                }
811            }
812        },
813        "com.amazonaws.marketplacemetering#UsageRecordResult": {
814            "type": "structure",
815            "members": {
816                "UsageRecord": {
817                    "target": "com.amazonaws.marketplacemetering#UsageRecord",
818                    "traits": {
819                        "smithy.api#documentation": "<p>The UsageRecord that was part of the BatchMeterUsage request.</p>"
820                    }
821                },
822                "MeteringRecordId": {
823                    "target": "com.amazonaws.marketplacemetering#String",
824                    "traits": {
825                        "smithy.api#documentation": "<p>The MeteringRecordId is a unique identifier for this metering event.</p>"
826                    }
827                },
828                "Status": {
829                    "target": "com.amazonaws.marketplacemetering#UsageRecordResultStatus",
830                    "traits": {
831                        "smithy.api#documentation": "<p>The UsageRecordResult Status indicates the status of an individual UsageRecord\n            processed by BatchMeterUsage.</p>\n        <ul>\n            <li>\n                <p>\n                    <i>Success</i>- The UsageRecord was accepted and honored by\n                    BatchMeterUsage.</p>\n            </li>\n            <li>\n                <p>\n                    <i>CustomerNotSubscribed</i>- The CustomerIdentifier specified is\n                    not subscribed to your product. The UsageRecord was not honored. Future\n                    UsageRecords for this customer will fail until the customer subscribes to your\n                    product.</p>\n            </li>\n            <li>\n                <p>\n                    <i>DuplicateRecord</i>- Indicates that the UsageRecord was invalid\n                    and not honored. A previously metered UsageRecord had the same customer,\n                    dimension, and time, but a different quantity.</p>\n            </li>\n         </ul>"
832                    }
833                }
834            },
835            "traits": {
836                "smithy.api#documentation": "<p>A UsageRecordResult indicates the status of a given UsageRecord processed by\n            BatchMeterUsage.</p>"
837            }
838        },
839        "com.amazonaws.marketplacemetering#UsageRecordResultList": {
840            "type": "list",
841            "member": {
842                "target": "com.amazonaws.marketplacemetering#UsageRecordResult"
843            }
844        },
845        "com.amazonaws.marketplacemetering#UsageRecordResultStatus": {
846            "type": "string",
847            "traits": {
848                "smithy.api#enum": [
849                    {
850                        "value": "Success",
851                        "name": "SUCCESS"
852                    },
853                    {
854                        "value": "CustomerNotSubscribed",
855                        "name": "CUSTOMER_NOT_SUBSCRIBED"
856                    },
857                    {
858                        "value": "DuplicateRecord",
859                        "name": "DUPLICATE_RECORD"
860                    }
861                ]
862            }
863        },
864        "com.amazonaws.marketplacemetering#VersionInteger": {
865            "type": "integer",
866            "traits": {
867                "smithy.api#box": {},
868                "smithy.api#range": {
869                    "min": 1
870                }
871            }
872        },
873        "com.amazonaws.marketplacemetering#errorMessage": {
874            "type": "string"
875        }
876    }
877}
878