@aws-sdk/client-freetier 3.840.0 → 3.845.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +40 -18
  2. package/dist-cjs/index.js +347 -21
  3. package/dist-es/FreeTier.js +8 -0
  4. package/dist-es/commands/GetAccountActivityCommand.js +22 -0
  5. package/dist-es/commands/GetAccountPlanStateCommand.js +22 -0
  6. package/dist-es/commands/ListAccountActivitiesCommand.js +22 -0
  7. package/dist-es/commands/UpgradeAccountPlanCommand.js +22 -0
  8. package/dist-es/commands/index.js +4 -0
  9. package/dist-es/models/models_0.js +79 -14
  10. package/dist-es/pagination/ListAccountActivitiesPaginator.js +4 -0
  11. package/dist-es/pagination/index.js +1 -0
  12. package/dist-es/protocols/Aws_json1_0.js +162 -3
  13. package/dist-types/FreeTier.d.ts +31 -11
  14. package/dist-types/FreeTierClient.d.ts +7 -13
  15. package/dist-types/commands/GetAccountActivityCommand.d.ts +129 -0
  16. package/dist-types/commands/GetAccountPlanStateCommand.d.ts +156 -0
  17. package/dist-types/commands/GetFreeTierUsageCommand.d.ts +4 -4
  18. package/dist-types/commands/ListAccountActivitiesCommand.d.ts +131 -0
  19. package/dist-types/commands/UpgradeAccountPlanCommand.d.ts +171 -0
  20. package/dist-types/commands/index.d.ts +4 -0
  21. package/dist-types/index.d.ts +1 -11
  22. package/dist-types/models/models_0.d.ts +373 -75
  23. package/dist-types/pagination/ListAccountActivitiesPaginator.d.ts +7 -0
  24. package/dist-types/pagination/index.d.ts +1 -0
  25. package/dist-types/protocols/Aws_json1_0.d.ts +36 -0
  26. package/dist-types/ts3.4/FreeTier.d.ts +70 -0
  27. package/dist-types/ts3.4/FreeTierClient.d.ts +28 -2
  28. package/dist-types/ts3.4/commands/GetAccountActivityCommand.d.ts +51 -0
  29. package/dist-types/ts3.4/commands/GetAccountPlanStateCommand.d.ts +51 -0
  30. package/dist-types/ts3.4/commands/GetFreeTierUsageCommand.d.ts +9 -5
  31. package/dist-types/ts3.4/commands/ListAccountActivitiesCommand.d.ts +51 -0
  32. package/dist-types/ts3.4/commands/UpgradeAccountPlanCommand.d.ts +51 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  34. package/dist-types/ts3.4/models/models_0.d.ts +143 -18
  35. package/dist-types/ts3.4/pagination/ListAccountActivitiesPaginator.d.ts +11 -0
  36. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  37. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +48 -0
  38. package/package.json +14 -14
package/README.md CHANGED
@@ -6,17 +6,7 @@
6
6
 
7
7
  AWS SDK for JavaScript FreeTier Client for Node.js, Browser and React Native.
8
8
 
9
- <p>You can use the Amazon Web Services Free Tier API to query programmatically your Free Tier usage data.</p>
10
- <p>Free Tier tracks your monthly usage data for all free tier offers that are associated with your
11
- Amazon Web Services account. You can use the Free Tier API to filter and show only the data that you want.</p>
12
- <p>Service endpoint</p>
13
- <p>The Free Tier API provides the following endpoint:</p>
14
- <ul>
15
- <li>
16
- <p>https://freetier.us-east-1.api.aws</p>
17
- </li>
18
- </ul>
19
- <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html">Using the Amazon Web Services Free Tier</a> in the <i>Billing User Guide</i>.</p>
9
+ <p>You can use the Amazon Web Services Free Tier API to query programmatically your Free Tier usage data.</p> <p>Free Tier tracks your monthly usage data for all free tier offers that are associated with your Amazon Web Services account. You can use the Free Tier API to filter and show only the data that you want.</p> <p>Service endpoint</p> <p>The Free Tier API provides the following endpoint:</p> <ul/> <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html">Using the Amazon Web Services Free Tier</a> in the <i>Billing User Guide</i>.</p>
20
10
 
21
11
  ## Installing
22
12
 
@@ -33,16 +23,16 @@ using your favorite package manager:
33
23
 
34
24
  The AWS SDK is modulized by clients and commands.
35
25
  To send a request, you only need to import the `FreeTierClient` and
36
- the commands you need, for example `GetFreeTierUsageCommand`:
26
+ the commands you need, for example `ListAccountActivitiesCommand`:
37
27
 
38
28
  ```js
39
29
  // ES5 example
40
- const { FreeTierClient, GetFreeTierUsageCommand } = require("@aws-sdk/client-freetier");
30
+ const { FreeTierClient, ListAccountActivitiesCommand } = require("@aws-sdk/client-freetier");
41
31
  ```
42
32
 
43
33
  ```ts
44
34
  // ES6+ example
45
- import { FreeTierClient, GetFreeTierUsageCommand } from "@aws-sdk/client-freetier";
35
+ import { FreeTierClient, ListAccountActivitiesCommand } from "@aws-sdk/client-freetier";
46
36
  ```
47
37
 
48
38
  ### Usage
@@ -61,7 +51,7 @@ const client = new FreeTierClient({ region: "REGION" });
61
51
  const params = {
62
52
  /** input parameters */
63
53
  };
64
- const command = new GetFreeTierUsageCommand(params);
54
+ const command = new ListAccountActivitiesCommand(params);
65
55
  ```
66
56
 
67
57
  #### Async/await
@@ -140,7 +130,7 @@ const client = new AWS.FreeTier({ region: "REGION" });
140
130
 
141
131
  // async/await.
142
132
  try {
143
- const data = await client.getFreeTierUsage(params);
133
+ const data = await client.listAccountActivities(params);
144
134
  // process data.
145
135
  } catch (error) {
146
136
  // error handling.
@@ -148,7 +138,7 @@ try {
148
138
 
149
139
  // Promises.
150
140
  client
151
- .getFreeTierUsage(params)
141
+ .listAccountActivities(params)
152
142
  .then((data) => {
153
143
  // process data.
154
144
  })
@@ -157,7 +147,7 @@ client
157
147
  });
158
148
 
159
149
  // callbacks.
160
- client.getFreeTierUsage(params, (err, data) => {
150
+ client.listAccountActivities(params, (err, data) => {
161
151
  // process err and data.
162
152
  });
163
153
  ```
@@ -213,6 +203,22 @@ see LICENSE for more information.
213
203
 
214
204
  ## Client Commands (Operations List)
215
205
 
206
+ <details>
207
+ <summary>
208
+ GetAccountActivity
209
+ </summary>
210
+
211
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/freetier/command/GetAccountActivityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/GetAccountActivityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/GetAccountActivityCommandOutput/)
212
+
213
+ </details>
214
+ <details>
215
+ <summary>
216
+ GetAccountPlanState
217
+ </summary>
218
+
219
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/freetier/command/GetAccountPlanStateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/GetAccountPlanStateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/GetAccountPlanStateCommandOutput/)
220
+
221
+ </details>
216
222
  <details>
217
223
  <summary>
218
224
  GetFreeTierUsage
@@ -221,3 +227,19 @@ GetFreeTierUsage
221
227
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/freetier/command/GetFreeTierUsageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/GetFreeTierUsageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/GetFreeTierUsageCommandOutput/)
222
228
 
223
229
  </details>
230
+ <details>
231
+ <summary>
232
+ ListAccountActivities
233
+ </summary>
234
+
235
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/freetier/command/ListAccountActivitiesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/ListAccountActivitiesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/ListAccountActivitiesCommandOutput/)
236
+
237
+ </details>
238
+ <details>
239
+ <summary>
240
+ UpgradeAccountPlan
241
+ </summary>
242
+
243
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/freetier/command/UpgradeAccountPlanCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/UpgradeAccountPlanCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-freetier/Interface/UpgradeAccountPlanCommandOutput/)
244
+
245
+ </details>
package/dist-cjs/index.js CHANGED
@@ -21,18 +21,30 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/index.ts
22
22
  var index_exports = {};
23
23
  __export(index_exports, {
24
- $Command: () => import_smithy_client.Command,
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ AccountPlanStatus: () => AccountPlanStatus,
26
+ AccountPlanType: () => AccountPlanType,
27
+ ActivityReward: () => ActivityReward,
28
+ ActivityStatus: () => ActivityStatus,
29
+ CurrencyCode: () => CurrencyCode,
25
30
  Dimension: () => Dimension,
26
31
  FreeTier: () => FreeTier,
27
32
  FreeTierClient: () => FreeTierClient,
28
33
  FreeTierServiceException: () => FreeTierServiceException,
34
+ GetAccountActivityCommand: () => GetAccountActivityCommand,
35
+ GetAccountPlanStateCommand: () => GetAccountPlanStateCommand,
29
36
  GetFreeTierUsageCommand: () => GetFreeTierUsageCommand,
30
37
  InternalServerException: () => InternalServerException,
38
+ LanguageCode: () => LanguageCode,
39
+ ListAccountActivitiesCommand: () => ListAccountActivitiesCommand,
31
40
  MatchOption: () => MatchOption,
41
+ ResourceNotFoundException: () => ResourceNotFoundException,
32
42
  ThrottlingException: () => ThrottlingException,
43
+ UpgradeAccountPlanCommand: () => UpgradeAccountPlanCommand,
33
44
  ValidationException: () => ValidationException,
34
45
  __Client: () => import_smithy_client.Client,
35
- paginateGetFreeTierUsage: () => paginateGetFreeTierUsage
46
+ paginateGetFreeTierUsage: () => paginateGetFreeTierUsage,
47
+ paginateListAccountActivities: () => paginateListAccountActivities
36
48
  });
37
49
  module.exports = __toCommonJS(index_exports);
38
50
 
@@ -178,7 +190,7 @@ var FreeTierClient = class extends import_smithy_client.Client {
178
190
  // src/FreeTier.ts
179
191
 
180
192
 
181
- // src/commands/GetFreeTierUsageCommand.ts
193
+ // src/commands/GetAccountActivityCommand.ts
182
194
 
183
195
  var import_middleware_serde = require("@smithy/middleware-serde");
184
196
 
@@ -204,21 +216,63 @@ var FreeTierServiceException = class _FreeTierServiceException extends import_sm
204
216
  };
205
217
 
206
218
  // src/models/models_0.ts
207
- var Dimension = {
208
- DESCRIPTION: "DESCRIPTION",
209
- FREE_TIER_TYPE: "FREE_TIER_TYPE",
210
- OPERATION: "OPERATION",
211
- REGION: "REGION",
212
- SERVICE: "SERVICE",
213
- USAGE_PERCENTAGE: "USAGE_PERCENTAGE",
214
- USAGE_TYPE: "USAGE_TYPE"
219
+ var AccessDeniedException = class _AccessDeniedException extends FreeTierServiceException {
220
+ static {
221
+ __name(this, "AccessDeniedException");
222
+ }
223
+ name = "AccessDeniedException";
224
+ $fault = "client";
225
+ /**
226
+ * @internal
227
+ */
228
+ constructor(opts) {
229
+ super({
230
+ name: "AccessDeniedException",
231
+ $fault: "client",
232
+ ...opts
233
+ });
234
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
235
+ }
215
236
  };
216
- var MatchOption = {
217
- CONTAINS: "CONTAINS",
218
- ENDS_WITH: "ENDS_WITH",
219
- EQUALS: "EQUALS",
220
- GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL",
221
- STARTS_WITH: "STARTS_WITH"
237
+ var AccountPlanStatus = {
238
+ ACTIVE: "ACTIVE",
239
+ EXPIRED: "EXPIRED",
240
+ NOT_STARTED: "NOT_STARTED"
241
+ };
242
+ var AccountPlanType = {
243
+ FREE: "FREE",
244
+ PAID: "PAID"
245
+ };
246
+ var CurrencyCode = {
247
+ USD: "USD"
248
+ };
249
+ var ActivityReward;
250
+ ((ActivityReward3) => {
251
+ ActivityReward3.visit = /* @__PURE__ */ __name((value, visitor) => {
252
+ if (value.credit !== void 0) return visitor.credit(value.credit);
253
+ return visitor._(value.$unknown[0], value.$unknown[1]);
254
+ }, "visit");
255
+ })(ActivityReward || (ActivityReward = {}));
256
+ var ActivityStatus = {
257
+ COMPLETED: "COMPLETED",
258
+ EXPIRING: "EXPIRING",
259
+ IN_PROGRESS: "IN_PROGRESS",
260
+ NOT_STARTED: "NOT_STARTED"
261
+ };
262
+ var LanguageCode = {
263
+ DE_DE: "de-DE",
264
+ EN_GB: "en-GB",
265
+ EN_US: "en-US",
266
+ ES_ES: "es-ES",
267
+ FR_FR: "fr-FR",
268
+ ID_ID: "id-ID",
269
+ IT_IT: "it-IT",
270
+ JA_JP: "ja-JP",
271
+ KO_KR: "ko-KR",
272
+ PT_PT: "pt-PT",
273
+ TR_TR: "tr-TR",
274
+ ZH_CN: "zh-CN",
275
+ ZH_TW: "zh-TW"
222
276
  };
223
277
  var InternalServerException = class _InternalServerException extends FreeTierServiceException {
224
278
  static {
@@ -238,6 +292,24 @@ var InternalServerException = class _InternalServerException extends FreeTierSer
238
292
  Object.setPrototypeOf(this, _InternalServerException.prototype);
239
293
  }
240
294
  };
295
+ var ResourceNotFoundException = class _ResourceNotFoundException extends FreeTierServiceException {
296
+ static {
297
+ __name(this, "ResourceNotFoundException");
298
+ }
299
+ name = "ResourceNotFoundException";
300
+ $fault = "client";
301
+ /**
302
+ * @internal
303
+ */
304
+ constructor(opts) {
305
+ super({
306
+ name: "ResourceNotFoundException",
307
+ $fault: "client",
308
+ ...opts
309
+ });
310
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
311
+ }
312
+ };
241
313
  var ThrottlingException = class _ThrottlingException extends FreeTierServiceException {
242
314
  static {
243
315
  __name(this, "ThrottlingException");
@@ -274,14 +346,80 @@ var ValidationException = class _ValidationException extends FreeTierServiceExce
274
346
  Object.setPrototypeOf(this, _ValidationException.prototype);
275
347
  }
276
348
  };
349
+ var Dimension = {
350
+ DESCRIPTION: "DESCRIPTION",
351
+ FREE_TIER_TYPE: "FREE_TIER_TYPE",
352
+ OPERATION: "OPERATION",
353
+ REGION: "REGION",
354
+ SERVICE: "SERVICE",
355
+ USAGE_PERCENTAGE: "USAGE_PERCENTAGE",
356
+ USAGE_TYPE: "USAGE_TYPE"
357
+ };
358
+ var MatchOption = {
359
+ CONTAINS: "CONTAINS",
360
+ ENDS_WITH: "ENDS_WITH",
361
+ EQUALS: "EQUALS",
362
+ GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL",
363
+ STARTS_WITH: "STARTS_WITH"
364
+ };
277
365
 
278
366
  // src/protocols/Aws_json1_0.ts
367
+ var se_GetAccountActivityCommand = /* @__PURE__ */ __name(async (input, context) => {
368
+ const headers = sharedHeaders("GetAccountActivity");
369
+ let body;
370
+ body = JSON.stringify((0, import_smithy_client._json)(input));
371
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
372
+ }, "se_GetAccountActivityCommand");
373
+ var se_GetAccountPlanStateCommand = /* @__PURE__ */ __name(async (input, context) => {
374
+ const headers = sharedHeaders("GetAccountPlanState");
375
+ let body;
376
+ body = JSON.stringify((0, import_smithy_client._json)(input));
377
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
378
+ }, "se_GetAccountPlanStateCommand");
279
379
  var se_GetFreeTierUsageCommand = /* @__PURE__ */ __name(async (input, context) => {
280
380
  const headers = sharedHeaders("GetFreeTierUsage");
281
381
  let body;
282
382
  body = JSON.stringify(se_GetFreeTierUsageRequest(input, context));
283
383
  return buildHttpRpcRequest(context, headers, "/", void 0, body);
284
384
  }, "se_GetFreeTierUsageCommand");
385
+ var se_ListAccountActivitiesCommand = /* @__PURE__ */ __name(async (input, context) => {
386
+ const headers = sharedHeaders("ListAccountActivities");
387
+ let body;
388
+ body = JSON.stringify((0, import_smithy_client._json)(input));
389
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
390
+ }, "se_ListAccountActivitiesCommand");
391
+ var se_UpgradeAccountPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
392
+ const headers = sharedHeaders("UpgradeAccountPlan");
393
+ let body;
394
+ body = JSON.stringify((0, import_smithy_client._json)(input));
395
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
396
+ }, "se_UpgradeAccountPlanCommand");
397
+ var de_GetAccountActivityCommand = /* @__PURE__ */ __name(async (output, context) => {
398
+ if (output.statusCode >= 300) {
399
+ return de_CommandError(output, context);
400
+ }
401
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
402
+ let contents = {};
403
+ contents = de_GetAccountActivityResponse(data, context);
404
+ const response = {
405
+ $metadata: deserializeMetadata(output),
406
+ ...contents
407
+ };
408
+ return response;
409
+ }, "de_GetAccountActivityCommand");
410
+ var de_GetAccountPlanStateCommand = /* @__PURE__ */ __name(async (output, context) => {
411
+ if (output.statusCode >= 300) {
412
+ return de_CommandError(output, context);
413
+ }
414
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
415
+ let contents = {};
416
+ contents = de_GetAccountPlanStateResponse(data, context);
417
+ const response = {
418
+ $metadata: deserializeMetadata(output),
419
+ ...contents
420
+ };
421
+ return response;
422
+ }, "de_GetAccountPlanStateCommand");
285
423
  var de_GetFreeTierUsageCommand = /* @__PURE__ */ __name(async (output, context) => {
286
424
  if (output.statusCode >= 300) {
287
425
  return de_CommandError(output, context);
@@ -295,6 +433,32 @@ var de_GetFreeTierUsageCommand = /* @__PURE__ */ __name(async (output, context)
295
433
  };
296
434
  return response;
297
435
  }, "de_GetFreeTierUsageCommand");
436
+ var de_ListAccountActivitiesCommand = /* @__PURE__ */ __name(async (output, context) => {
437
+ if (output.statusCode >= 300) {
438
+ return de_CommandError(output, context);
439
+ }
440
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
441
+ let contents = {};
442
+ contents = de_ListAccountActivitiesResponse(data, context);
443
+ const response = {
444
+ $metadata: deserializeMetadata(output),
445
+ ...contents
446
+ };
447
+ return response;
448
+ }, "de_ListAccountActivitiesCommand");
449
+ var de_UpgradeAccountPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
450
+ if (output.statusCode >= 300) {
451
+ return de_CommandError(output, context);
452
+ }
453
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
454
+ let contents = {};
455
+ contents = (0, import_smithy_client._json)(data);
456
+ const response = {
457
+ $metadata: deserializeMetadata(output),
458
+ ...contents
459
+ };
460
+ return response;
461
+ }, "de_UpgradeAccountPlanCommand");
298
462
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
299
463
  const parsedOutput = {
300
464
  ...output,
@@ -305,12 +469,18 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
305
469
  case "InternalServerException":
306
470
  case "com.amazonaws.freetier#InternalServerException":
307
471
  throw await de_InternalServerExceptionRes(parsedOutput, context);
472
+ case "ResourceNotFoundException":
473
+ case "com.amazonaws.freetier#ResourceNotFoundException":
474
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
308
475
  case "ThrottlingException":
309
476
  case "com.amazonaws.freetier#ThrottlingException":
310
477
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
311
478
  case "ValidationException":
312
479
  case "com.amazonaws.freetier#ValidationException":
313
480
  throw await de_ValidationExceptionRes(parsedOutput, context);
481
+ case "AccessDeniedException":
482
+ case "com.amazonaws.freetier#AccessDeniedException":
483
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
314
484
  default:
315
485
  const parsedBody = parsedOutput.body;
316
486
  return throwDefaultError({
@@ -320,6 +490,15 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
320
490
  });
321
491
  }
322
492
  }, "de_CommandError");
493
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
494
+ const body = parsedOutput.body;
495
+ const deserialized = (0, import_smithy_client._json)(body);
496
+ const exception = new AccessDeniedException({
497
+ $metadata: deserializeMetadata(parsedOutput),
498
+ ...deserialized
499
+ });
500
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
501
+ }, "de_AccessDeniedExceptionRes");
323
502
  var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
324
503
  const body = parsedOutput.body;
325
504
  const deserialized = (0, import_smithy_client._json)(body);
@@ -329,6 +508,15 @@ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput,
329
508
  });
330
509
  return (0, import_smithy_client.decorateServiceException)(exception, body);
331
510
  }, "de_InternalServerExceptionRes");
511
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
512
+ const body = parsedOutput.body;
513
+ const deserialized = (0, import_smithy_client._json)(body);
514
+ const exception = new ResourceNotFoundException({
515
+ $metadata: deserializeMetadata(parsedOutput),
516
+ ...deserialized
517
+ });
518
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
519
+ }, "de_ResourceNotFoundExceptionRes");
332
520
  var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
333
521
  const body = parsedOutput.body;
334
522
  const deserialized = (0, import_smithy_client._json)(body);
@@ -367,6 +555,28 @@ var se_GetFreeTierUsageRequest = /* @__PURE__ */ __name((input, context) => {
367
555
  nextToken: []
368
556
  });
369
557
  }, "se_GetFreeTierUsageRequest");
558
+ var de_Activities = /* @__PURE__ */ __name((output, context) => {
559
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
560
+ return de_ActivitySummary(entry, context);
561
+ });
562
+ return retVal;
563
+ }, "de_Activities");
564
+ var de_ActivityReward = /* @__PURE__ */ __name((output, context) => {
565
+ if (output.credit != null) {
566
+ return {
567
+ credit: de_MonetaryAmount(output.credit, context)
568
+ };
569
+ }
570
+ return { $unknown: Object.entries(output)[0] };
571
+ }, "de_ActivityReward");
572
+ var de_ActivitySummary = /* @__PURE__ */ __name((output, context) => {
573
+ return (0, import_smithy_client.take)(output, {
574
+ activityId: import_smithy_client.expectString,
575
+ reward: /* @__PURE__ */ __name((_) => de_ActivityReward((0, import_core2.awsExpectUnion)(_), context), "reward"),
576
+ status: import_smithy_client.expectString,
577
+ title: import_smithy_client.expectString
578
+ });
579
+ }, "de_ActivitySummary");
370
580
  var de_FreeTierUsage = /* @__PURE__ */ __name((output, context) => {
371
581
  return (0, import_smithy_client.take)(output, {
372
582
  actualUsageAmount: import_smithy_client.limitedParseDouble,
@@ -387,12 +597,47 @@ var de_FreeTierUsages = /* @__PURE__ */ __name((output, context) => {
387
597
  });
388
598
  return retVal;
389
599
  }, "de_FreeTierUsages");
600
+ var de_GetAccountActivityResponse = /* @__PURE__ */ __name((output, context) => {
601
+ return (0, import_smithy_client.take)(output, {
602
+ activityId: import_smithy_client.expectString,
603
+ completedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "completedAt"),
604
+ description: import_smithy_client.expectString,
605
+ estimatedTimeToCompleteInMinutes: import_smithy_client.expectInt32,
606
+ expiresAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "expiresAt"),
607
+ instructionsUrl: import_smithy_client.expectString,
608
+ reward: /* @__PURE__ */ __name((_) => de_ActivityReward((0, import_core2.awsExpectUnion)(_), context), "reward"),
609
+ startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "startedAt"),
610
+ status: import_smithy_client.expectString,
611
+ title: import_smithy_client.expectString
612
+ });
613
+ }, "de_GetAccountActivityResponse");
614
+ var de_GetAccountPlanStateResponse = /* @__PURE__ */ __name((output, context) => {
615
+ return (0, import_smithy_client.take)(output, {
616
+ accountId: import_smithy_client.expectString,
617
+ accountPlanExpirationDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "accountPlanExpirationDate"),
618
+ accountPlanRemainingCredits: /* @__PURE__ */ __name((_) => de_MonetaryAmount(_, context), "accountPlanRemainingCredits"),
619
+ accountPlanStatus: import_smithy_client.expectString,
620
+ accountPlanType: import_smithy_client.expectString
621
+ });
622
+ }, "de_GetAccountPlanStateResponse");
390
623
  var de_GetFreeTierUsageResponse = /* @__PURE__ */ __name((output, context) => {
391
624
  return (0, import_smithy_client.take)(output, {
392
625
  freeTierUsages: /* @__PURE__ */ __name((_) => de_FreeTierUsages(_, context), "freeTierUsages"),
393
626
  nextToken: import_smithy_client.expectString
394
627
  });
395
628
  }, "de_GetFreeTierUsageResponse");
629
+ var de_ListAccountActivitiesResponse = /* @__PURE__ */ __name((output, context) => {
630
+ return (0, import_smithy_client.take)(output, {
631
+ activities: /* @__PURE__ */ __name((_) => de_Activities(_, context), "activities"),
632
+ nextToken: import_smithy_client.expectString
633
+ });
634
+ }, "de_ListAccountActivitiesResponse");
635
+ var de_MonetaryAmount = /* @__PURE__ */ __name((output, context) => {
636
+ return (0, import_smithy_client.take)(output, {
637
+ amount: import_smithy_client.limitedParseDouble,
638
+ unit: import_smithy_client.expectString
639
+ });
640
+ }, "de_MonetaryAmount");
396
641
  var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
397
642
  httpStatusCode: output.statusCode,
398
643
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -426,7 +671,37 @@ function sharedHeaders(operation) {
426
671
  }
427
672
  __name(sharedHeaders, "sharedHeaders");
428
673
 
674
+ // src/commands/GetAccountActivityCommand.ts
675
+ var GetAccountActivityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
676
+ return [
677
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
678
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
679
+ ];
680
+ }).s("AWSFreeTierService", "GetAccountActivity", {}).n("FreeTierClient", "GetAccountActivityCommand").f(void 0, void 0).ser(se_GetAccountActivityCommand).de(de_GetAccountActivityCommand).build() {
681
+ static {
682
+ __name(this, "GetAccountActivityCommand");
683
+ }
684
+ };
685
+
686
+ // src/commands/GetAccountPlanStateCommand.ts
687
+
688
+
689
+
690
+ var GetAccountPlanStateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
691
+ return [
692
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
693
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
694
+ ];
695
+ }).s("AWSFreeTierService", "GetAccountPlanState", {}).n("FreeTierClient", "GetAccountPlanStateCommand").f(void 0, void 0).ser(se_GetAccountPlanStateCommand).de(de_GetAccountPlanStateCommand).build() {
696
+ static {
697
+ __name(this, "GetAccountPlanStateCommand");
698
+ }
699
+ };
700
+
429
701
  // src/commands/GetFreeTierUsageCommand.ts
702
+
703
+
704
+
430
705
  var GetFreeTierUsageCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
431
706
  return [
432
707
  (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
@@ -438,9 +713,43 @@ var GetFreeTierUsageCommand = class extends import_smithy_client.Command.classBu
438
713
  }
439
714
  };
440
715
 
716
+ // src/commands/ListAccountActivitiesCommand.ts
717
+
718
+
719
+
720
+ var ListAccountActivitiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
721
+ return [
722
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
723
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
724
+ ];
725
+ }).s("AWSFreeTierService", "ListAccountActivities", {}).n("FreeTierClient", "ListAccountActivitiesCommand").f(void 0, void 0).ser(se_ListAccountActivitiesCommand).de(de_ListAccountActivitiesCommand).build() {
726
+ static {
727
+ __name(this, "ListAccountActivitiesCommand");
728
+ }
729
+ };
730
+
731
+ // src/commands/UpgradeAccountPlanCommand.ts
732
+
733
+
734
+
735
+ var UpgradeAccountPlanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
736
+ return [
737
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
738
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
739
+ ];
740
+ }).s("AWSFreeTierService", "UpgradeAccountPlan", {}).n("FreeTierClient", "UpgradeAccountPlanCommand").f(void 0, void 0).ser(se_UpgradeAccountPlanCommand).de(de_UpgradeAccountPlanCommand).build() {
741
+ static {
742
+ __name(this, "UpgradeAccountPlanCommand");
743
+ }
744
+ };
745
+
441
746
  // src/FreeTier.ts
442
747
  var commands = {
443
- GetFreeTierUsageCommand
748
+ GetAccountActivityCommand,
749
+ GetAccountPlanStateCommand,
750
+ GetFreeTierUsageCommand,
751
+ ListAccountActivitiesCommand,
752
+ UpgradeAccountPlanCommand
444
753
  };
445
754
  var FreeTier = class extends FreeTierClient {
446
755
  static {
@@ -452,6 +761,10 @@ var FreeTier = class extends FreeTierClient {
452
761
  // src/pagination/GetFreeTierUsagePaginator.ts
453
762
 
454
763
  var paginateGetFreeTierUsage = (0, import_core.createPaginator)(FreeTierClient, GetFreeTierUsageCommand, "nextToken", "nextToken", "maxResults");
764
+
765
+ // src/pagination/ListAccountActivitiesPaginator.ts
766
+
767
+ var paginateListAccountActivities = (0, import_core.createPaginator)(FreeTierClient, ListAccountActivitiesCommand, "nextToken", "nextToken", "maxResults");
455
768
  // Annotate the CommonJS export names for ESM import in node:
456
769
 
457
770
  0 && (module.exports = {
@@ -460,12 +773,25 @@ var paginateGetFreeTierUsage = (0, import_core.createPaginator)(FreeTierClient,
460
773
  FreeTierClient,
461
774
  FreeTier,
462
775
  $Command,
776
+ GetAccountActivityCommand,
777
+ GetAccountPlanStateCommand,
463
778
  GetFreeTierUsageCommand,
779
+ ListAccountActivitiesCommand,
780
+ UpgradeAccountPlanCommand,
464
781
  paginateGetFreeTierUsage,
465
- Dimension,
466
- MatchOption,
782
+ paginateListAccountActivities,
783
+ AccessDeniedException,
784
+ AccountPlanStatus,
785
+ AccountPlanType,
786
+ CurrencyCode,
787
+ ActivityReward,
788
+ ActivityStatus,
789
+ LanguageCode,
467
790
  InternalServerException,
791
+ ResourceNotFoundException,
468
792
  ThrottlingException,
469
- ValidationException
793
+ ValidationException,
794
+ Dimension,
795
+ MatchOption
470
796
  });
471
797
 
@@ -1,8 +1,16 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { GetAccountActivityCommand, } from "./commands/GetAccountActivityCommand";
3
+ import { GetAccountPlanStateCommand, } from "./commands/GetAccountPlanStateCommand";
2
4
  import { GetFreeTierUsageCommand, } from "./commands/GetFreeTierUsageCommand";
5
+ import { ListAccountActivitiesCommand, } from "./commands/ListAccountActivitiesCommand";
6
+ import { UpgradeAccountPlanCommand, } from "./commands/UpgradeAccountPlanCommand";
3
7
  import { FreeTierClient } from "./FreeTierClient";
4
8
  const commands = {
9
+ GetAccountActivityCommand,
10
+ GetAccountPlanStateCommand,
5
11
  GetFreeTierUsageCommand,
12
+ ListAccountActivitiesCommand,
13
+ UpgradeAccountPlanCommand,
6
14
  };
7
15
  export class FreeTier extends FreeTierClient {
8
16
  }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_GetAccountActivityCommand, se_GetAccountActivityCommand } from "../protocols/Aws_json1_0";
6
+ export { $Command };
7
+ export class GetAccountActivityCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("AWSFreeTierService", "GetAccountActivity", {})
17
+ .n("FreeTierClient", "GetAccountActivityCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_GetAccountActivityCommand)
20
+ .de(de_GetAccountActivityCommand)
21
+ .build() {
22
+ }