@aws-sdk/client-pi 3.391.0 → 3.395.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 (78) hide show
  1. package/README.md +63 -7
  2. package/dist-cjs/PI.js +14 -0
  3. package/dist-cjs/PIClient.js +4 -2
  4. package/dist-cjs/clientConfiguration.js +2 -0
  5. package/dist-cjs/commands/CreatePerformanceAnalysisReportCommand.js +46 -0
  6. package/dist-cjs/commands/DeletePerformanceAnalysisReportCommand.js +46 -0
  7. package/dist-cjs/commands/GetPerformanceAnalysisReportCommand.js +47 -0
  8. package/dist-cjs/commands/ListPerformanceAnalysisReportsCommand.js +46 -0
  9. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  10. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  11. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  12. package/dist-cjs/commands/index.js +7 -0
  13. package/dist-cjs/endpoint/ruleset.js +1 -1
  14. package/dist-cjs/models/models_0.js +49 -1
  15. package/dist-cjs/pagination/ListPerformanceAnalysisReportsPaginator.js +29 -0
  16. package/dist-cjs/pagination/index.js +1 -0
  17. package/dist-cjs/protocols/Aws_json1_1.js +417 -1
  18. package/dist-cjs/runtimeConfig.shared.js +1 -0
  19. package/dist-cjs/runtimeExtensions.js +16 -0
  20. package/dist-es/PI.js +14 -0
  21. package/dist-es/PIClient.js +4 -2
  22. package/dist-es/clientConfiguration.js +1 -0
  23. package/dist-es/commands/CreatePerformanceAnalysisReportCommand.js +42 -0
  24. package/dist-es/commands/DeletePerformanceAnalysisReportCommand.js +42 -0
  25. package/dist-es/commands/GetPerformanceAnalysisReportCommand.js +43 -0
  26. package/dist-es/commands/ListPerformanceAnalysisReportsCommand.js +42 -0
  27. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  28. package/dist-es/commands/TagResourceCommand.js +42 -0
  29. package/dist-es/commands/UntagResourceCommand.js +42 -0
  30. package/dist-es/commands/index.js +7 -0
  31. package/dist-es/endpoint/ruleset.js +1 -1
  32. package/dist-es/models/models_0.js +44 -0
  33. package/dist-es/pagination/ListPerformanceAnalysisReportsPaginator.js +25 -0
  34. package/dist-es/pagination/index.js +1 -0
  35. package/dist-es/protocols/Aws_json1_1.js +402 -0
  36. package/dist-es/runtimeConfig.shared.js +1 -0
  37. package/dist-es/runtimeExtensions.js +12 -0
  38. package/dist-types/PI.d.ts +49 -0
  39. package/dist-types/PIClient.d.ts +15 -3
  40. package/dist-types/clientConfiguration.d.ts +6 -0
  41. package/dist-types/commands/CreatePerformanceAnalysisReportCommand.d.ts +92 -0
  42. package/dist-types/commands/DeletePerformanceAnalysisReportCommand.d.ts +82 -0
  43. package/dist-types/commands/GetPerformanceAnalysisReportCommand.d.ts +180 -0
  44. package/dist-types/commands/ListPerformanceAnalysisReportsCommand.d.ts +101 -0
  45. package/dist-types/commands/ListTagsForResourceCommand.d.ts +88 -0
  46. package/dist-types/commands/TagResourceCommand.d.ts +87 -0
  47. package/dist-types/commands/UntagResourceCommand.d.ts +84 -0
  48. package/dist-types/commands/index.d.ts +7 -0
  49. package/dist-types/models/models_0.d.ts +633 -51
  50. package/dist-types/pagination/ListPerformanceAnalysisReportsPaginator.d.ts +7 -0
  51. package/dist-types/pagination/index.d.ts +1 -0
  52. package/dist-types/protocols/Aws_json1_1.d.ts +63 -0
  53. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  54. package/dist-types/runtimeConfig.d.ts +1 -0
  55. package/dist-types/runtimeConfig.native.d.ts +1 -0
  56. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  57. package/dist-types/runtimeExtensions.d.ts +17 -0
  58. package/dist-types/ts3.4/PI.d.ts +119 -0
  59. package/dist-types/ts3.4/PIClient.d.ts +47 -2
  60. package/dist-types/ts3.4/clientConfiguration.d.ts +2 -0
  61. package/dist-types/ts3.4/commands/CreatePerformanceAnalysisReportCommand.d.ts +42 -0
  62. package/dist-types/ts3.4/commands/DeletePerformanceAnalysisReportCommand.d.ts +42 -0
  63. package/dist-types/ts3.4/commands/GetPerformanceAnalysisReportCommand.d.ts +42 -0
  64. package/dist-types/ts3.4/commands/ListPerformanceAnalysisReportsCommand.d.ts +42 -0
  65. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
  66. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
  67. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
  68. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  69. package/dist-types/ts3.4/models/models_0.d.ts +171 -29
  70. package/dist-types/ts3.4/pagination/ListPerformanceAnalysisReportsPaginator.d.ts +11 -0
  71. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  72. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +84 -0
  73. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
  74. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  75. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  76. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
  77. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  78. package/package.json +3 -3
@@ -2,6 +2,18 @@ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { InternalServiceError, InvalidArgumentException, NotAuthorizedException, } from "../models/models_0";
4
4
  import { PIServiceException as __BaseException } from "../models/PIServiceException";
5
+ export const se_CreatePerformanceAnalysisReportCommand = async (input, context) => {
6
+ const headers = sharedHeaders("CreatePerformanceAnalysisReport");
7
+ let body;
8
+ body = JSON.stringify(se_CreatePerformanceAnalysisReportRequest(input, context));
9
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
+ };
11
+ export const se_DeletePerformanceAnalysisReportCommand = async (input, context) => {
12
+ const headers = sharedHeaders("DeletePerformanceAnalysisReport");
13
+ let body;
14
+ body = JSON.stringify(_json(input));
15
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
+ };
5
17
  export const se_DescribeDimensionKeysCommand = async (input, context) => {
6
18
  const headers = sharedHeaders("DescribeDimensionKeys");
7
19
  let body;
@@ -14,6 +26,12 @@ export const se_GetDimensionKeyDetailsCommand = async (input, context) => {
14
26
  body = JSON.stringify(_json(input));
15
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
28
  };
29
+ export const se_GetPerformanceAnalysisReportCommand = async (input, context) => {
30
+ const headers = sharedHeaders("GetPerformanceAnalysisReport");
31
+ let body;
32
+ body = JSON.stringify(_json(input));
33
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
+ };
17
35
  export const se_GetResourceMetadataCommand = async (input, context) => {
18
36
  const headers = sharedHeaders("GetResourceMetadata");
19
37
  let body;
@@ -38,6 +56,106 @@ export const se_ListAvailableResourceMetricsCommand = async (input, context) =>
38
56
  body = JSON.stringify(_json(input));
39
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
58
  };
59
+ export const se_ListPerformanceAnalysisReportsCommand = async (input, context) => {
60
+ const headers = sharedHeaders("ListPerformanceAnalysisReports");
61
+ let body;
62
+ body = JSON.stringify(_json(input));
63
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
+ };
65
+ export const se_ListTagsForResourceCommand = async (input, context) => {
66
+ const headers = sharedHeaders("ListTagsForResource");
67
+ let body;
68
+ body = JSON.stringify(_json(input));
69
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
+ };
71
+ export const se_TagResourceCommand = async (input, context) => {
72
+ const headers = sharedHeaders("TagResource");
73
+ let body;
74
+ body = JSON.stringify(_json(input));
75
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
+ };
77
+ export const se_UntagResourceCommand = async (input, context) => {
78
+ const headers = sharedHeaders("UntagResource");
79
+ let body;
80
+ body = JSON.stringify(_json(input));
81
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
+ };
83
+ export const de_CreatePerformanceAnalysisReportCommand = async (output, context) => {
84
+ if (output.statusCode >= 300) {
85
+ return de_CreatePerformanceAnalysisReportCommandError(output, context);
86
+ }
87
+ const data = await parseBody(output.body, context);
88
+ let contents = {};
89
+ contents = _json(data);
90
+ const response = {
91
+ $metadata: deserializeMetadata(output),
92
+ ...contents,
93
+ };
94
+ return response;
95
+ };
96
+ const de_CreatePerformanceAnalysisReportCommandError = async (output, context) => {
97
+ const parsedOutput = {
98
+ ...output,
99
+ body: await parseErrorBody(output.body, context),
100
+ };
101
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
102
+ switch (errorCode) {
103
+ case "InternalServiceError":
104
+ case "com.amazonaws.pi#InternalServiceError":
105
+ throw await de_InternalServiceErrorRes(parsedOutput, context);
106
+ case "InvalidArgumentException":
107
+ case "com.amazonaws.pi#InvalidArgumentException":
108
+ throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
109
+ case "NotAuthorizedException":
110
+ case "com.amazonaws.pi#NotAuthorizedException":
111
+ throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
112
+ default:
113
+ const parsedBody = parsedOutput.body;
114
+ return throwDefaultError({
115
+ output,
116
+ parsedBody,
117
+ errorCode,
118
+ });
119
+ }
120
+ };
121
+ export const de_DeletePerformanceAnalysisReportCommand = async (output, context) => {
122
+ if (output.statusCode >= 300) {
123
+ return de_DeletePerformanceAnalysisReportCommandError(output, context);
124
+ }
125
+ const data = await parseBody(output.body, context);
126
+ let contents = {};
127
+ contents = _json(data);
128
+ const response = {
129
+ $metadata: deserializeMetadata(output),
130
+ ...contents,
131
+ };
132
+ return response;
133
+ };
134
+ const de_DeletePerformanceAnalysisReportCommandError = async (output, context) => {
135
+ const parsedOutput = {
136
+ ...output,
137
+ body: await parseErrorBody(output.body, context),
138
+ };
139
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
140
+ switch (errorCode) {
141
+ case "InternalServiceError":
142
+ case "com.amazonaws.pi#InternalServiceError":
143
+ throw await de_InternalServiceErrorRes(parsedOutput, context);
144
+ case "InvalidArgumentException":
145
+ case "com.amazonaws.pi#InvalidArgumentException":
146
+ throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
147
+ case "NotAuthorizedException":
148
+ case "com.amazonaws.pi#NotAuthorizedException":
149
+ throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
150
+ default:
151
+ const parsedBody = parsedOutput.body;
152
+ return throwDefaultError({
153
+ output,
154
+ parsedBody,
155
+ errorCode,
156
+ });
157
+ }
158
+ };
41
159
  export const de_DescribeDimensionKeysCommand = async (output, context) => {
42
160
  if (output.statusCode >= 300) {
43
161
  return de_DescribeDimensionKeysCommandError(output, context);
@@ -114,6 +232,44 @@ const de_GetDimensionKeyDetailsCommandError = async (output, context) => {
114
232
  });
115
233
  }
116
234
  };
235
+ export const de_GetPerformanceAnalysisReportCommand = async (output, context) => {
236
+ if (output.statusCode >= 300) {
237
+ return de_GetPerformanceAnalysisReportCommandError(output, context);
238
+ }
239
+ const data = await parseBody(output.body, context);
240
+ let contents = {};
241
+ contents = de_GetPerformanceAnalysisReportResponse(data, context);
242
+ const response = {
243
+ $metadata: deserializeMetadata(output),
244
+ ...contents,
245
+ };
246
+ return response;
247
+ };
248
+ const de_GetPerformanceAnalysisReportCommandError = async (output, context) => {
249
+ const parsedOutput = {
250
+ ...output,
251
+ body: await parseErrorBody(output.body, context),
252
+ };
253
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
254
+ switch (errorCode) {
255
+ case "InternalServiceError":
256
+ case "com.amazonaws.pi#InternalServiceError":
257
+ throw await de_InternalServiceErrorRes(parsedOutput, context);
258
+ case "InvalidArgumentException":
259
+ case "com.amazonaws.pi#InvalidArgumentException":
260
+ throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
261
+ case "NotAuthorizedException":
262
+ case "com.amazonaws.pi#NotAuthorizedException":
263
+ throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
264
+ default:
265
+ const parsedBody = parsedOutput.body;
266
+ return throwDefaultError({
267
+ output,
268
+ parsedBody,
269
+ errorCode,
270
+ });
271
+ }
272
+ };
117
273
  export const de_GetResourceMetadataCommand = async (output, context) => {
118
274
  if (output.statusCode >= 300) {
119
275
  return de_GetResourceMetadataCommandError(output, context);
@@ -266,6 +422,158 @@ const de_ListAvailableResourceMetricsCommandError = async (output, context) => {
266
422
  });
267
423
  }
268
424
  };
425
+ export const de_ListPerformanceAnalysisReportsCommand = async (output, context) => {
426
+ if (output.statusCode >= 300) {
427
+ return de_ListPerformanceAnalysisReportsCommandError(output, context);
428
+ }
429
+ const data = await parseBody(output.body, context);
430
+ let contents = {};
431
+ contents = de_ListPerformanceAnalysisReportsResponse(data, context);
432
+ const response = {
433
+ $metadata: deserializeMetadata(output),
434
+ ...contents,
435
+ };
436
+ return response;
437
+ };
438
+ const de_ListPerformanceAnalysisReportsCommandError = async (output, context) => {
439
+ const parsedOutput = {
440
+ ...output,
441
+ body: await parseErrorBody(output.body, context),
442
+ };
443
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
444
+ switch (errorCode) {
445
+ case "InternalServiceError":
446
+ case "com.amazonaws.pi#InternalServiceError":
447
+ throw await de_InternalServiceErrorRes(parsedOutput, context);
448
+ case "InvalidArgumentException":
449
+ case "com.amazonaws.pi#InvalidArgumentException":
450
+ throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
451
+ case "NotAuthorizedException":
452
+ case "com.amazonaws.pi#NotAuthorizedException":
453
+ throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
454
+ default:
455
+ const parsedBody = parsedOutput.body;
456
+ return throwDefaultError({
457
+ output,
458
+ parsedBody,
459
+ errorCode,
460
+ });
461
+ }
462
+ };
463
+ export const de_ListTagsForResourceCommand = async (output, context) => {
464
+ if (output.statusCode >= 300) {
465
+ return de_ListTagsForResourceCommandError(output, context);
466
+ }
467
+ const data = await parseBody(output.body, context);
468
+ let contents = {};
469
+ contents = _json(data);
470
+ const response = {
471
+ $metadata: deserializeMetadata(output),
472
+ ...contents,
473
+ };
474
+ return response;
475
+ };
476
+ const de_ListTagsForResourceCommandError = async (output, context) => {
477
+ const parsedOutput = {
478
+ ...output,
479
+ body: await parseErrorBody(output.body, context),
480
+ };
481
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
482
+ switch (errorCode) {
483
+ case "InternalServiceError":
484
+ case "com.amazonaws.pi#InternalServiceError":
485
+ throw await de_InternalServiceErrorRes(parsedOutput, context);
486
+ case "InvalidArgumentException":
487
+ case "com.amazonaws.pi#InvalidArgumentException":
488
+ throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
489
+ case "NotAuthorizedException":
490
+ case "com.amazonaws.pi#NotAuthorizedException":
491
+ throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
492
+ default:
493
+ const parsedBody = parsedOutput.body;
494
+ return throwDefaultError({
495
+ output,
496
+ parsedBody,
497
+ errorCode,
498
+ });
499
+ }
500
+ };
501
+ export const de_TagResourceCommand = async (output, context) => {
502
+ if (output.statusCode >= 300) {
503
+ return de_TagResourceCommandError(output, context);
504
+ }
505
+ const data = await parseBody(output.body, context);
506
+ let contents = {};
507
+ contents = _json(data);
508
+ const response = {
509
+ $metadata: deserializeMetadata(output),
510
+ ...contents,
511
+ };
512
+ return response;
513
+ };
514
+ const de_TagResourceCommandError = async (output, context) => {
515
+ const parsedOutput = {
516
+ ...output,
517
+ body: await parseErrorBody(output.body, context),
518
+ };
519
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
520
+ switch (errorCode) {
521
+ case "InternalServiceError":
522
+ case "com.amazonaws.pi#InternalServiceError":
523
+ throw await de_InternalServiceErrorRes(parsedOutput, context);
524
+ case "InvalidArgumentException":
525
+ case "com.amazonaws.pi#InvalidArgumentException":
526
+ throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
527
+ case "NotAuthorizedException":
528
+ case "com.amazonaws.pi#NotAuthorizedException":
529
+ throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
530
+ default:
531
+ const parsedBody = parsedOutput.body;
532
+ return throwDefaultError({
533
+ output,
534
+ parsedBody,
535
+ errorCode,
536
+ });
537
+ }
538
+ };
539
+ export const de_UntagResourceCommand = async (output, context) => {
540
+ if (output.statusCode >= 300) {
541
+ return de_UntagResourceCommandError(output, context);
542
+ }
543
+ const data = await parseBody(output.body, context);
544
+ let contents = {};
545
+ contents = _json(data);
546
+ const response = {
547
+ $metadata: deserializeMetadata(output),
548
+ ...contents,
549
+ };
550
+ return response;
551
+ };
552
+ const de_UntagResourceCommandError = async (output, context) => {
553
+ const parsedOutput = {
554
+ ...output,
555
+ body: await parseErrorBody(output.body, context),
556
+ };
557
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
558
+ switch (errorCode) {
559
+ case "InternalServiceError":
560
+ case "com.amazonaws.pi#InternalServiceError":
561
+ throw await de_InternalServiceErrorRes(parsedOutput, context);
562
+ case "InvalidArgumentException":
563
+ case "com.amazonaws.pi#InvalidArgumentException":
564
+ throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
565
+ case "NotAuthorizedException":
566
+ case "com.amazonaws.pi#NotAuthorizedException":
567
+ throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
568
+ default:
569
+ const parsedBody = parsedOutput.body;
570
+ return throwDefaultError({
571
+ output,
572
+ parsedBody,
573
+ errorCode,
574
+ });
575
+ }
576
+ };
269
577
  const de_InternalServiceErrorRes = async (parsedOutput, context) => {
270
578
  const body = parsedOutput.body;
271
579
  const deserialized = _json(body);
@@ -293,6 +601,15 @@ const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
293
601
  });
294
602
  return __decorateServiceException(exception, body);
295
603
  };
604
+ const se_CreatePerformanceAnalysisReportRequest = (input, context) => {
605
+ return take(input, {
606
+ EndTime: (_) => Math.round(_.getTime() / 1000),
607
+ Identifier: [],
608
+ ServiceType: [],
609
+ StartTime: (_) => Math.round(_.getTime() / 1000),
610
+ Tags: _json,
611
+ });
612
+ };
296
613
  const se_DescribeDimensionKeysRequest = (input, context) => {
297
614
  return take(input, {
298
615
  AdditionalMetrics: _json,
@@ -331,6 +648,49 @@ const de_AdditionalMetricsMap = (output, context) => {
331
648
  return acc;
332
649
  }, {});
333
650
  };
651
+ const de_AnalysisReport = (output, context) => {
652
+ return take(output, {
653
+ AnalysisReportId: __expectString,
654
+ CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
655
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
656
+ Identifier: __expectString,
657
+ Insights: (_) => de_InsightList(_, context),
658
+ ServiceType: __expectString,
659
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
660
+ Status: __expectString,
661
+ });
662
+ };
663
+ const de_AnalysisReportSummary = (output, context) => {
664
+ return take(output, {
665
+ AnalysisReportId: __expectString,
666
+ CreateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
667
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
668
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
669
+ Status: __expectString,
670
+ Tags: _json,
671
+ });
672
+ };
673
+ const de_AnalysisReportSummaryList = (output, context) => {
674
+ const retVal = (output || [])
675
+ .filter((e) => e != null)
676
+ .map((entry) => {
677
+ return de_AnalysisReportSummary(entry, context);
678
+ });
679
+ return retVal;
680
+ };
681
+ const de_Data = (output, context) => {
682
+ return take(output, {
683
+ PerformanceInsightsMetric: (_) => de_PerformanceInsightsMetric(_, context),
684
+ });
685
+ };
686
+ const de_DataList = (output, context) => {
687
+ const retVal = (output || [])
688
+ .filter((e) => e != null)
689
+ .map((entry) => {
690
+ return de_Data(entry, context);
691
+ });
692
+ return retVal;
693
+ };
334
694
  const de_DataPoint = (output, context) => {
335
695
  return take(output, {
336
696
  Timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -370,6 +730,11 @@ const de_DimensionKeyDescriptionList = (output, context) => {
370
730
  });
371
731
  return retVal;
372
732
  };
733
+ const de_GetPerformanceAnalysisReportResponse = (output, context) => {
734
+ return take(output, {
735
+ AnalysisReport: (_) => de_AnalysisReport(_, context),
736
+ });
737
+ };
373
738
  const de_GetResourceMetricsResponse = (output, context) => {
374
739
  return take(output, {
375
740
  AlignedEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -379,6 +744,35 @@ const de_GetResourceMetricsResponse = (output, context) => {
379
744
  NextToken: __expectString,
380
745
  });
381
746
  };
747
+ const de_Insight = (output, context) => {
748
+ return take(output, {
749
+ BaselineData: (_) => de_DataList(_, context),
750
+ Context: __expectString,
751
+ Description: __expectString,
752
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
753
+ InsightData: (_) => de_DataList(_, context),
754
+ InsightId: __expectString,
755
+ InsightType: __expectString,
756
+ Recommendations: _json,
757
+ Severity: __expectString,
758
+ StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
759
+ SupportingInsights: (_) => de_InsightList(_, context),
760
+ });
761
+ };
762
+ const de_InsightList = (output, context) => {
763
+ const retVal = (output || [])
764
+ .filter((e) => e != null)
765
+ .map((entry) => {
766
+ return de_Insight(entry, context);
767
+ });
768
+ return retVal;
769
+ };
770
+ const de_ListPerformanceAnalysisReportsResponse = (output, context) => {
771
+ return take(output, {
772
+ AnalysisReports: (_) => de_AnalysisReportSummaryList(_, context),
773
+ NextToken: __expectString,
774
+ });
775
+ };
382
776
  const de_MetricKeyDataPoints = (output, context) => {
383
777
  return take(output, {
384
778
  DataPoints: (_) => de_DataPointsList(_, context),
@@ -401,6 +795,14 @@ const de_MetricValuesList = (output, context) => {
401
795
  });
402
796
  return retVal;
403
797
  };
798
+ const de_PerformanceInsightsMetric = (output, context) => {
799
+ return take(output, {
800
+ Dimensions: _json,
801
+ DisplayName: __expectString,
802
+ Metric: __expectString,
803
+ Value: __limitedParseDouble,
804
+ });
805
+ };
404
806
  const deserializeMetadata = (output) => ({
405
807
  httpStatusCode: output.statusCode,
406
808
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -9,6 +9,7 @@ export const getRuntimeConfig = (config) => ({
9
9
  base64Encoder: config?.base64Encoder ?? toBase64,
10
10
  disableHostPrefix: config?.disableHostPrefix ?? false,
11
11
  endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
12
+ extensions: config?.extensions ?? [],
12
13
  logger: config?.logger ?? new NoOpLogger(),
13
14
  serviceId: config?.serviceId ?? "PI",
14
15
  urlParser: config?.urlParser ?? parseUrl,
@@ -0,0 +1,12 @@
1
+ import { getDefaultClientConfiguration, resolveDefaultRuntimeConfig } from "@smithy/types";
2
+ const asPartial = (t) => t;
3
+ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
4
+ const clientConfiguration = {
5
+ ...asPartial(getDefaultClientConfiguration(runtimeConfig)),
6
+ };
7
+ extensions.forEach((extension) => extension.configureClient(clientConfiguration));
8
+ return {
9
+ ...runtimeConfig,
10
+ ...resolveDefaultRuntimeConfig(clientConfiguration),
11
+ };
12
+ };
@@ -1,12 +1,31 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { CreatePerformanceAnalysisReportCommandInput, CreatePerformanceAnalysisReportCommandOutput } from "./commands/CreatePerformanceAnalysisReportCommand";
3
+ import { DeletePerformanceAnalysisReportCommandInput, DeletePerformanceAnalysisReportCommandOutput } from "./commands/DeletePerformanceAnalysisReportCommand";
2
4
  import { DescribeDimensionKeysCommandInput, DescribeDimensionKeysCommandOutput } from "./commands/DescribeDimensionKeysCommand";
3
5
  import { GetDimensionKeyDetailsCommandInput, GetDimensionKeyDetailsCommandOutput } from "./commands/GetDimensionKeyDetailsCommand";
6
+ import { GetPerformanceAnalysisReportCommandInput, GetPerformanceAnalysisReportCommandOutput } from "./commands/GetPerformanceAnalysisReportCommand";
4
7
  import { GetResourceMetadataCommandInput, GetResourceMetadataCommandOutput } from "./commands/GetResourceMetadataCommand";
5
8
  import { GetResourceMetricsCommandInput, GetResourceMetricsCommandOutput } from "./commands/GetResourceMetricsCommand";
6
9
  import { ListAvailableResourceDimensionsCommandInput, ListAvailableResourceDimensionsCommandOutput } from "./commands/ListAvailableResourceDimensionsCommand";
7
10
  import { ListAvailableResourceMetricsCommandInput, ListAvailableResourceMetricsCommandOutput } from "./commands/ListAvailableResourceMetricsCommand";
11
+ import { ListPerformanceAnalysisReportsCommandInput, ListPerformanceAnalysisReportsCommandOutput } from "./commands/ListPerformanceAnalysisReportsCommand";
12
+ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
13
+ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
14
+ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
8
15
  import { PIClient } from "./PIClient";
9
16
  export interface PI {
17
+ /**
18
+ * @see {@link CreatePerformanceAnalysisReportCommand}
19
+ */
20
+ createPerformanceAnalysisReport(args: CreatePerformanceAnalysisReportCommandInput, options?: __HttpHandlerOptions): Promise<CreatePerformanceAnalysisReportCommandOutput>;
21
+ createPerformanceAnalysisReport(args: CreatePerformanceAnalysisReportCommandInput, cb: (err: any, data?: CreatePerformanceAnalysisReportCommandOutput) => void): void;
22
+ createPerformanceAnalysisReport(args: CreatePerformanceAnalysisReportCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreatePerformanceAnalysisReportCommandOutput) => void): void;
23
+ /**
24
+ * @see {@link DeletePerformanceAnalysisReportCommand}
25
+ */
26
+ deletePerformanceAnalysisReport(args: DeletePerformanceAnalysisReportCommandInput, options?: __HttpHandlerOptions): Promise<DeletePerformanceAnalysisReportCommandOutput>;
27
+ deletePerformanceAnalysisReport(args: DeletePerformanceAnalysisReportCommandInput, cb: (err: any, data?: DeletePerformanceAnalysisReportCommandOutput) => void): void;
28
+ deletePerformanceAnalysisReport(args: DeletePerformanceAnalysisReportCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeletePerformanceAnalysisReportCommandOutput) => void): void;
10
29
  /**
11
30
  * @see {@link DescribeDimensionKeysCommand}
12
31
  */
@@ -19,6 +38,12 @@ export interface PI {
19
38
  getDimensionKeyDetails(args: GetDimensionKeyDetailsCommandInput, options?: __HttpHandlerOptions): Promise<GetDimensionKeyDetailsCommandOutput>;
20
39
  getDimensionKeyDetails(args: GetDimensionKeyDetailsCommandInput, cb: (err: any, data?: GetDimensionKeyDetailsCommandOutput) => void): void;
21
40
  getDimensionKeyDetails(args: GetDimensionKeyDetailsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDimensionKeyDetailsCommandOutput) => void): void;
41
+ /**
42
+ * @see {@link GetPerformanceAnalysisReportCommand}
43
+ */
44
+ getPerformanceAnalysisReport(args: GetPerformanceAnalysisReportCommandInput, options?: __HttpHandlerOptions): Promise<GetPerformanceAnalysisReportCommandOutput>;
45
+ getPerformanceAnalysisReport(args: GetPerformanceAnalysisReportCommandInput, cb: (err: any, data?: GetPerformanceAnalysisReportCommandOutput) => void): void;
46
+ getPerformanceAnalysisReport(args: GetPerformanceAnalysisReportCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPerformanceAnalysisReportCommandOutput) => void): void;
22
47
  /**
23
48
  * @see {@link GetResourceMetadataCommand}
24
49
  */
@@ -43,6 +68,30 @@ export interface PI {
43
68
  listAvailableResourceMetrics(args: ListAvailableResourceMetricsCommandInput, options?: __HttpHandlerOptions): Promise<ListAvailableResourceMetricsCommandOutput>;
44
69
  listAvailableResourceMetrics(args: ListAvailableResourceMetricsCommandInput, cb: (err: any, data?: ListAvailableResourceMetricsCommandOutput) => void): void;
45
70
  listAvailableResourceMetrics(args: ListAvailableResourceMetricsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAvailableResourceMetricsCommandOutput) => void): void;
71
+ /**
72
+ * @see {@link ListPerformanceAnalysisReportsCommand}
73
+ */
74
+ listPerformanceAnalysisReports(args: ListPerformanceAnalysisReportsCommandInput, options?: __HttpHandlerOptions): Promise<ListPerformanceAnalysisReportsCommandOutput>;
75
+ listPerformanceAnalysisReports(args: ListPerformanceAnalysisReportsCommandInput, cb: (err: any, data?: ListPerformanceAnalysisReportsCommandOutput) => void): void;
76
+ listPerformanceAnalysisReports(args: ListPerformanceAnalysisReportsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPerformanceAnalysisReportsCommandOutput) => void): void;
77
+ /**
78
+ * @see {@link ListTagsForResourceCommand}
79
+ */
80
+ listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
81
+ listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
82
+ listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
83
+ /**
84
+ * @see {@link TagResourceCommand}
85
+ */
86
+ tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
87
+ tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
88
+ tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
89
+ /**
90
+ * @see {@link UntagResourceCommand}
91
+ */
92
+ untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
93
+ untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
94
+ untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
46
95
  }
47
96
  /**
48
97
  * @public
@@ -8,22 +8,30 @@ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"
8
8
  import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
9
9
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
10
10
  import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
11
+ import { CreatePerformanceAnalysisReportCommandInput, CreatePerformanceAnalysisReportCommandOutput } from "./commands/CreatePerformanceAnalysisReportCommand";
12
+ import { DeletePerformanceAnalysisReportCommandInput, DeletePerformanceAnalysisReportCommandOutput } from "./commands/DeletePerformanceAnalysisReportCommand";
11
13
  import { DescribeDimensionKeysCommandInput, DescribeDimensionKeysCommandOutput } from "./commands/DescribeDimensionKeysCommand";
12
14
  import { GetDimensionKeyDetailsCommandInput, GetDimensionKeyDetailsCommandOutput } from "./commands/GetDimensionKeyDetailsCommand";
15
+ import { GetPerformanceAnalysisReportCommandInput, GetPerformanceAnalysisReportCommandOutput } from "./commands/GetPerformanceAnalysisReportCommand";
13
16
  import { GetResourceMetadataCommandInput, GetResourceMetadataCommandOutput } from "./commands/GetResourceMetadataCommand";
14
17
  import { GetResourceMetricsCommandInput, GetResourceMetricsCommandOutput } from "./commands/GetResourceMetricsCommand";
15
18
  import { ListAvailableResourceDimensionsCommandInput, ListAvailableResourceDimensionsCommandOutput } from "./commands/ListAvailableResourceDimensionsCommand";
16
19
  import { ListAvailableResourceMetricsCommandInput, ListAvailableResourceMetricsCommandOutput } from "./commands/ListAvailableResourceMetricsCommand";
20
+ import { ListPerformanceAnalysisReportsCommandInput, ListPerformanceAnalysisReportsCommandOutput } from "./commands/ListPerformanceAnalysisReportsCommand";
21
+ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
22
+ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
23
+ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
17
24
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
25
+ import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
18
26
  export { __Client };
19
27
  /**
20
28
  * @public
21
29
  */
22
- export type ServiceInputTypes = DescribeDimensionKeysCommandInput | GetDimensionKeyDetailsCommandInput | GetResourceMetadataCommandInput | GetResourceMetricsCommandInput | ListAvailableResourceDimensionsCommandInput | ListAvailableResourceMetricsCommandInput;
30
+ export type ServiceInputTypes = CreatePerformanceAnalysisReportCommandInput | DeletePerformanceAnalysisReportCommandInput | DescribeDimensionKeysCommandInput | GetDimensionKeyDetailsCommandInput | GetPerformanceAnalysisReportCommandInput | GetResourceMetadataCommandInput | GetResourceMetricsCommandInput | ListAvailableResourceDimensionsCommandInput | ListAvailableResourceMetricsCommandInput | ListPerformanceAnalysisReportsCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
23
31
  /**
24
32
  * @public
25
33
  */
26
- export type ServiceOutputTypes = DescribeDimensionKeysCommandOutput | GetDimensionKeyDetailsCommandOutput | GetResourceMetadataCommandOutput | GetResourceMetricsCommandOutput | ListAvailableResourceDimensionsCommandOutput | ListAvailableResourceMetricsCommandOutput;
34
+ export type ServiceOutputTypes = CreatePerformanceAnalysisReportCommandOutput | DeletePerformanceAnalysisReportCommandOutput | DescribeDimensionKeysCommandOutput | GetDimensionKeyDetailsCommandOutput | GetPerformanceAnalysisReportCommandOutput | GetResourceMetadataCommandOutput | GetResourceMetricsCommandOutput | ListAvailableResourceDimensionsCommandOutput | ListAvailableResourceMetricsCommandOutput | ListPerformanceAnalysisReportsCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
27
35
  /**
28
36
  * @public
29
37
  */
@@ -122,6 +130,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
122
130
  * Optional logger for logging debug/info/warn/error.
123
131
  */
124
132
  logger?: __Logger;
133
+ /**
134
+ * Optional extensions
135
+ */
136
+ extensions?: RuntimeExtension[];
125
137
  /**
126
138
  * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
127
139
  */
@@ -141,7 +153,7 @@ export interface PIClientConfig extends PIClientConfigType {
141
153
  /**
142
154
  * @public
143
155
  */
144
- export type PIClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
156
+ export type PIClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
145
157
  /**
146
158
  * @public
147
159
  *
@@ -0,0 +1,6 @@
1
+ import { DefaultClientConfiguration } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
5
+ export interface PIClientConfiguration extends DefaultClientConfiguration {
6
+ }