@aws-sdk/client-pi 3.388.0 → 3.392.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.
- package/README.md +63 -7
- package/dist-cjs/PI.js +14 -0
- package/dist-cjs/commands/CreatePerformanceAnalysisReportCommand.js +46 -0
- package/dist-cjs/commands/DeletePerformanceAnalysisReportCommand.js +46 -0
- package/dist-cjs/commands/GetPerformanceAnalysisReportCommand.js +47 -0
- package/dist-cjs/commands/ListPerformanceAnalysisReportsCommand.js +46 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +46 -0
- package/dist-cjs/commands/UntagResourceCommand.js +46 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/endpoint/ruleset.js +1 -1
- package/dist-cjs/models/models_0.js +49 -1
- package/dist-cjs/pagination/ListPerformanceAnalysisReportsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +417 -1
- package/dist-es/PI.js +14 -0
- package/dist-es/commands/CreatePerformanceAnalysisReportCommand.js +42 -0
- package/dist-es/commands/DeletePerformanceAnalysisReportCommand.js +42 -0
- package/dist-es/commands/GetPerformanceAnalysisReportCommand.js +43 -0
- package/dist-es/commands/ListPerformanceAnalysisReportsCommand.js +42 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +42 -0
- package/dist-es/commands/UntagResourceCommand.js +42 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/endpoint/ruleset.js +1 -1
- package/dist-es/models/models_0.js +44 -0
- package/dist-es/pagination/ListPerformanceAnalysisReportsPaginator.js +25 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +402 -0
- package/dist-types/PI.d.ts +49 -0
- package/dist-types/PIClient.d.ts +9 -2
- package/dist-types/commands/CreatePerformanceAnalysisReportCommand.d.ts +92 -0
- package/dist-types/commands/DeletePerformanceAnalysisReportCommand.d.ts +82 -0
- package/dist-types/commands/GetPerformanceAnalysisReportCommand.d.ts +180 -0
- package/dist-types/commands/ListPerformanceAnalysisReportsCommand.d.ts +101 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +88 -0
- package/dist-types/commands/TagResourceCommand.d.ts +87 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +84 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +633 -51
- package/dist-types/pagination/ListPerformanceAnalysisReportsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +63 -0
- package/dist-types/ts3.4/PI.d.ts +119 -0
- package/dist-types/ts3.4/PIClient.d.ts +44 -2
- package/dist-types/ts3.4/commands/CreatePerformanceAnalysisReportCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeletePerformanceAnalysisReportCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetPerformanceAnalysisReportCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListPerformanceAnalysisReportsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/models/models_0.d.ts +171 -29
- package/dist-types/ts3.4/pagination/ListPerformanceAnalysisReportsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +84 -0
- package/package.json +28 -28
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ListAvailableResourceMetricsCommand = exports.de_ListAvailableResourceDimensionsCommand = exports.de_GetResourceMetricsCommand = exports.de_GetResourceMetadataCommand = exports.de_GetDimensionKeyDetailsCommand = exports.de_DescribeDimensionKeysCommand = exports.se_ListAvailableResourceMetricsCommand = exports.se_ListAvailableResourceDimensionsCommand = exports.se_GetResourceMetricsCommand = exports.se_GetResourceMetadataCommand = exports.se_GetDimensionKeyDetailsCommand = exports.se_DescribeDimensionKeysCommand = void 0;
|
|
3
|
+
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPerformanceAnalysisReportsCommand = exports.de_ListAvailableResourceMetricsCommand = exports.de_ListAvailableResourceDimensionsCommand = exports.de_GetResourceMetricsCommand = exports.de_GetResourceMetadataCommand = exports.de_GetPerformanceAnalysisReportCommand = exports.de_GetDimensionKeyDetailsCommand = exports.de_DescribeDimensionKeysCommand = exports.de_DeletePerformanceAnalysisReportCommand = exports.de_CreatePerformanceAnalysisReportCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPerformanceAnalysisReportsCommand = exports.se_ListAvailableResourceMetricsCommand = exports.se_ListAvailableResourceDimensionsCommand = exports.se_GetResourceMetricsCommand = exports.se_GetResourceMetadataCommand = exports.se_GetPerformanceAnalysisReportCommand = exports.se_GetDimensionKeyDetailsCommand = exports.se_DescribeDimensionKeysCommand = exports.se_DeletePerformanceAnalysisReportCommand = exports.se_CreatePerformanceAnalysisReportCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const PIServiceException_1 = require("../models/PIServiceException");
|
|
8
|
+
const se_CreatePerformanceAnalysisReportCommand = async (input, context) => {
|
|
9
|
+
const headers = sharedHeaders("CreatePerformanceAnalysisReport");
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(se_CreatePerformanceAnalysisReportRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
exports.se_CreatePerformanceAnalysisReportCommand = se_CreatePerformanceAnalysisReportCommand;
|
|
15
|
+
const se_DeletePerformanceAnalysisReportCommand = async (input, context) => {
|
|
16
|
+
const headers = sharedHeaders("DeletePerformanceAnalysisReport");
|
|
17
|
+
let body;
|
|
18
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
19
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
+
};
|
|
21
|
+
exports.se_DeletePerformanceAnalysisReportCommand = se_DeletePerformanceAnalysisReportCommand;
|
|
8
22
|
const se_DescribeDimensionKeysCommand = async (input, context) => {
|
|
9
23
|
const headers = sharedHeaders("DescribeDimensionKeys");
|
|
10
24
|
let body;
|
|
@@ -19,6 +33,13 @@ const se_GetDimensionKeyDetailsCommand = async (input, context) => {
|
|
|
19
33
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
34
|
};
|
|
21
35
|
exports.se_GetDimensionKeyDetailsCommand = se_GetDimensionKeyDetailsCommand;
|
|
36
|
+
const se_GetPerformanceAnalysisReportCommand = async (input, context) => {
|
|
37
|
+
const headers = sharedHeaders("GetPerformanceAnalysisReport");
|
|
38
|
+
let body;
|
|
39
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
40
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
+
};
|
|
42
|
+
exports.se_GetPerformanceAnalysisReportCommand = se_GetPerformanceAnalysisReportCommand;
|
|
22
43
|
const se_GetResourceMetadataCommand = async (input, context) => {
|
|
23
44
|
const headers = sharedHeaders("GetResourceMetadata");
|
|
24
45
|
let body;
|
|
@@ -47,6 +68,112 @@ const se_ListAvailableResourceMetricsCommand = async (input, context) => {
|
|
|
47
68
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
69
|
};
|
|
49
70
|
exports.se_ListAvailableResourceMetricsCommand = se_ListAvailableResourceMetricsCommand;
|
|
71
|
+
const se_ListPerformanceAnalysisReportsCommand = async (input, context) => {
|
|
72
|
+
const headers = sharedHeaders("ListPerformanceAnalysisReports");
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
exports.se_ListPerformanceAnalysisReportsCommand = se_ListPerformanceAnalysisReportsCommand;
|
|
78
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
79
|
+
const headers = sharedHeaders("ListTagsForResource");
|
|
80
|
+
let body;
|
|
81
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
82
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
83
|
+
};
|
|
84
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
85
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
86
|
+
const headers = sharedHeaders("TagResource");
|
|
87
|
+
let body;
|
|
88
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
89
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
90
|
+
};
|
|
91
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
92
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
93
|
+
const headers = sharedHeaders("UntagResource");
|
|
94
|
+
let body;
|
|
95
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
96
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
|
+
};
|
|
98
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
99
|
+
const de_CreatePerformanceAnalysisReportCommand = async (output, context) => {
|
|
100
|
+
if (output.statusCode >= 300) {
|
|
101
|
+
return de_CreatePerformanceAnalysisReportCommandError(output, context);
|
|
102
|
+
}
|
|
103
|
+
const data = await parseBody(output.body, context);
|
|
104
|
+
let contents = {};
|
|
105
|
+
contents = (0, smithy_client_1._json)(data);
|
|
106
|
+
const response = {
|
|
107
|
+
$metadata: deserializeMetadata(output),
|
|
108
|
+
...contents,
|
|
109
|
+
};
|
|
110
|
+
return response;
|
|
111
|
+
};
|
|
112
|
+
exports.de_CreatePerformanceAnalysisReportCommand = de_CreatePerformanceAnalysisReportCommand;
|
|
113
|
+
const de_CreatePerformanceAnalysisReportCommandError = async (output, context) => {
|
|
114
|
+
const parsedOutput = {
|
|
115
|
+
...output,
|
|
116
|
+
body: await parseErrorBody(output.body, context),
|
|
117
|
+
};
|
|
118
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
119
|
+
switch (errorCode) {
|
|
120
|
+
case "InternalServiceError":
|
|
121
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
122
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
123
|
+
case "InvalidArgumentException":
|
|
124
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
125
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
126
|
+
case "NotAuthorizedException":
|
|
127
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
128
|
+
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
129
|
+
default:
|
|
130
|
+
const parsedBody = parsedOutput.body;
|
|
131
|
+
return throwDefaultError({
|
|
132
|
+
output,
|
|
133
|
+
parsedBody,
|
|
134
|
+
errorCode,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const de_DeletePerformanceAnalysisReportCommand = async (output, context) => {
|
|
139
|
+
if (output.statusCode >= 300) {
|
|
140
|
+
return de_DeletePerformanceAnalysisReportCommandError(output, context);
|
|
141
|
+
}
|
|
142
|
+
const data = await parseBody(output.body, context);
|
|
143
|
+
let contents = {};
|
|
144
|
+
contents = (0, smithy_client_1._json)(data);
|
|
145
|
+
const response = {
|
|
146
|
+
$metadata: deserializeMetadata(output),
|
|
147
|
+
...contents,
|
|
148
|
+
};
|
|
149
|
+
return response;
|
|
150
|
+
};
|
|
151
|
+
exports.de_DeletePerformanceAnalysisReportCommand = de_DeletePerformanceAnalysisReportCommand;
|
|
152
|
+
const de_DeletePerformanceAnalysisReportCommandError = async (output, context) => {
|
|
153
|
+
const parsedOutput = {
|
|
154
|
+
...output,
|
|
155
|
+
body: await parseErrorBody(output.body, context),
|
|
156
|
+
};
|
|
157
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
158
|
+
switch (errorCode) {
|
|
159
|
+
case "InternalServiceError":
|
|
160
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
161
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
162
|
+
case "InvalidArgumentException":
|
|
163
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
164
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
165
|
+
case "NotAuthorizedException":
|
|
166
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
167
|
+
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
168
|
+
default:
|
|
169
|
+
const parsedBody = parsedOutput.body;
|
|
170
|
+
return throwDefaultError({
|
|
171
|
+
output,
|
|
172
|
+
parsedBody,
|
|
173
|
+
errorCode,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
};
|
|
50
177
|
const de_DescribeDimensionKeysCommand = async (output, context) => {
|
|
51
178
|
if (output.statusCode >= 300) {
|
|
52
179
|
return de_DescribeDimensionKeysCommandError(output, context);
|
|
@@ -125,6 +252,45 @@ const de_GetDimensionKeyDetailsCommandError = async (output, context) => {
|
|
|
125
252
|
});
|
|
126
253
|
}
|
|
127
254
|
};
|
|
255
|
+
const de_GetPerformanceAnalysisReportCommand = async (output, context) => {
|
|
256
|
+
if (output.statusCode >= 300) {
|
|
257
|
+
return de_GetPerformanceAnalysisReportCommandError(output, context);
|
|
258
|
+
}
|
|
259
|
+
const data = await parseBody(output.body, context);
|
|
260
|
+
let contents = {};
|
|
261
|
+
contents = de_GetPerformanceAnalysisReportResponse(data, context);
|
|
262
|
+
const response = {
|
|
263
|
+
$metadata: deserializeMetadata(output),
|
|
264
|
+
...contents,
|
|
265
|
+
};
|
|
266
|
+
return response;
|
|
267
|
+
};
|
|
268
|
+
exports.de_GetPerformanceAnalysisReportCommand = de_GetPerformanceAnalysisReportCommand;
|
|
269
|
+
const de_GetPerformanceAnalysisReportCommandError = async (output, context) => {
|
|
270
|
+
const parsedOutput = {
|
|
271
|
+
...output,
|
|
272
|
+
body: await parseErrorBody(output.body, context),
|
|
273
|
+
};
|
|
274
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
275
|
+
switch (errorCode) {
|
|
276
|
+
case "InternalServiceError":
|
|
277
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
278
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
279
|
+
case "InvalidArgumentException":
|
|
280
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
281
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
282
|
+
case "NotAuthorizedException":
|
|
283
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
284
|
+
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
285
|
+
default:
|
|
286
|
+
const parsedBody = parsedOutput.body;
|
|
287
|
+
return throwDefaultError({
|
|
288
|
+
output,
|
|
289
|
+
parsedBody,
|
|
290
|
+
errorCode,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
};
|
|
128
294
|
const de_GetResourceMetadataCommand = async (output, context) => {
|
|
129
295
|
if (output.statusCode >= 300) {
|
|
130
296
|
return de_GetResourceMetadataCommandError(output, context);
|
|
@@ -281,6 +447,162 @@ const de_ListAvailableResourceMetricsCommandError = async (output, context) => {
|
|
|
281
447
|
});
|
|
282
448
|
}
|
|
283
449
|
};
|
|
450
|
+
const de_ListPerformanceAnalysisReportsCommand = async (output, context) => {
|
|
451
|
+
if (output.statusCode >= 300) {
|
|
452
|
+
return de_ListPerformanceAnalysisReportsCommandError(output, context);
|
|
453
|
+
}
|
|
454
|
+
const data = await parseBody(output.body, context);
|
|
455
|
+
let contents = {};
|
|
456
|
+
contents = de_ListPerformanceAnalysisReportsResponse(data, context);
|
|
457
|
+
const response = {
|
|
458
|
+
$metadata: deserializeMetadata(output),
|
|
459
|
+
...contents,
|
|
460
|
+
};
|
|
461
|
+
return response;
|
|
462
|
+
};
|
|
463
|
+
exports.de_ListPerformanceAnalysisReportsCommand = de_ListPerformanceAnalysisReportsCommand;
|
|
464
|
+
const de_ListPerformanceAnalysisReportsCommandError = async (output, context) => {
|
|
465
|
+
const parsedOutput = {
|
|
466
|
+
...output,
|
|
467
|
+
body: await parseErrorBody(output.body, context),
|
|
468
|
+
};
|
|
469
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
470
|
+
switch (errorCode) {
|
|
471
|
+
case "InternalServiceError":
|
|
472
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
473
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
474
|
+
case "InvalidArgumentException":
|
|
475
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
476
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
477
|
+
case "NotAuthorizedException":
|
|
478
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
479
|
+
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
480
|
+
default:
|
|
481
|
+
const parsedBody = parsedOutput.body;
|
|
482
|
+
return throwDefaultError({
|
|
483
|
+
output,
|
|
484
|
+
parsedBody,
|
|
485
|
+
errorCode,
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
490
|
+
if (output.statusCode >= 300) {
|
|
491
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
492
|
+
}
|
|
493
|
+
const data = await parseBody(output.body, context);
|
|
494
|
+
let contents = {};
|
|
495
|
+
contents = (0, smithy_client_1._json)(data);
|
|
496
|
+
const response = {
|
|
497
|
+
$metadata: deserializeMetadata(output),
|
|
498
|
+
...contents,
|
|
499
|
+
};
|
|
500
|
+
return response;
|
|
501
|
+
};
|
|
502
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
503
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
504
|
+
const parsedOutput = {
|
|
505
|
+
...output,
|
|
506
|
+
body: await parseErrorBody(output.body, context),
|
|
507
|
+
};
|
|
508
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
509
|
+
switch (errorCode) {
|
|
510
|
+
case "InternalServiceError":
|
|
511
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
512
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
513
|
+
case "InvalidArgumentException":
|
|
514
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
515
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
516
|
+
case "NotAuthorizedException":
|
|
517
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
518
|
+
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
519
|
+
default:
|
|
520
|
+
const parsedBody = parsedOutput.body;
|
|
521
|
+
return throwDefaultError({
|
|
522
|
+
output,
|
|
523
|
+
parsedBody,
|
|
524
|
+
errorCode,
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
529
|
+
if (output.statusCode >= 300) {
|
|
530
|
+
return de_TagResourceCommandError(output, context);
|
|
531
|
+
}
|
|
532
|
+
const data = await parseBody(output.body, context);
|
|
533
|
+
let contents = {};
|
|
534
|
+
contents = (0, smithy_client_1._json)(data);
|
|
535
|
+
const response = {
|
|
536
|
+
$metadata: deserializeMetadata(output),
|
|
537
|
+
...contents,
|
|
538
|
+
};
|
|
539
|
+
return response;
|
|
540
|
+
};
|
|
541
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
542
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
543
|
+
const parsedOutput = {
|
|
544
|
+
...output,
|
|
545
|
+
body: await parseErrorBody(output.body, context),
|
|
546
|
+
};
|
|
547
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
548
|
+
switch (errorCode) {
|
|
549
|
+
case "InternalServiceError":
|
|
550
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
551
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
552
|
+
case "InvalidArgumentException":
|
|
553
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
554
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
555
|
+
case "NotAuthorizedException":
|
|
556
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
557
|
+
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
558
|
+
default:
|
|
559
|
+
const parsedBody = parsedOutput.body;
|
|
560
|
+
return throwDefaultError({
|
|
561
|
+
output,
|
|
562
|
+
parsedBody,
|
|
563
|
+
errorCode,
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
568
|
+
if (output.statusCode >= 300) {
|
|
569
|
+
return de_UntagResourceCommandError(output, context);
|
|
570
|
+
}
|
|
571
|
+
const data = await parseBody(output.body, context);
|
|
572
|
+
let contents = {};
|
|
573
|
+
contents = (0, smithy_client_1._json)(data);
|
|
574
|
+
const response = {
|
|
575
|
+
$metadata: deserializeMetadata(output),
|
|
576
|
+
...contents,
|
|
577
|
+
};
|
|
578
|
+
return response;
|
|
579
|
+
};
|
|
580
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
581
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
582
|
+
const parsedOutput = {
|
|
583
|
+
...output,
|
|
584
|
+
body: await parseErrorBody(output.body, context),
|
|
585
|
+
};
|
|
586
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
587
|
+
switch (errorCode) {
|
|
588
|
+
case "InternalServiceError":
|
|
589
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
590
|
+
throw await de_InternalServiceErrorRes(parsedOutput, context);
|
|
591
|
+
case "InvalidArgumentException":
|
|
592
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
593
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
594
|
+
case "NotAuthorizedException":
|
|
595
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
596
|
+
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
597
|
+
default:
|
|
598
|
+
const parsedBody = parsedOutput.body;
|
|
599
|
+
return throwDefaultError({
|
|
600
|
+
output,
|
|
601
|
+
parsedBody,
|
|
602
|
+
errorCode,
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
};
|
|
284
606
|
const de_InternalServiceErrorRes = async (parsedOutput, context) => {
|
|
285
607
|
const body = parsedOutput.body;
|
|
286
608
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -308,6 +630,15 @@ const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
|
308
630
|
});
|
|
309
631
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
310
632
|
};
|
|
633
|
+
const se_CreatePerformanceAnalysisReportRequest = (input, context) => {
|
|
634
|
+
return (0, smithy_client_1.take)(input, {
|
|
635
|
+
EndTime: (_) => Math.round(_.getTime() / 1000),
|
|
636
|
+
Identifier: [],
|
|
637
|
+
ServiceType: [],
|
|
638
|
+
StartTime: (_) => Math.round(_.getTime() / 1000),
|
|
639
|
+
Tags: smithy_client_1._json,
|
|
640
|
+
});
|
|
641
|
+
};
|
|
311
642
|
const se_DescribeDimensionKeysRequest = (input, context) => {
|
|
312
643
|
return (0, smithy_client_1.take)(input, {
|
|
313
644
|
AdditionalMetrics: smithy_client_1._json,
|
|
@@ -346,6 +677,49 @@ const de_AdditionalMetricsMap = (output, context) => {
|
|
|
346
677
|
return acc;
|
|
347
678
|
}, {});
|
|
348
679
|
};
|
|
680
|
+
const de_AnalysisReport = (output, context) => {
|
|
681
|
+
return (0, smithy_client_1.take)(output, {
|
|
682
|
+
AnalysisReportId: smithy_client_1.expectString,
|
|
683
|
+
CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
684
|
+
EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
685
|
+
Identifier: smithy_client_1.expectString,
|
|
686
|
+
Insights: (_) => de_InsightList(_, context),
|
|
687
|
+
ServiceType: smithy_client_1.expectString,
|
|
688
|
+
StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
689
|
+
Status: smithy_client_1.expectString,
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
const de_AnalysisReportSummary = (output, context) => {
|
|
693
|
+
return (0, smithy_client_1.take)(output, {
|
|
694
|
+
AnalysisReportId: smithy_client_1.expectString,
|
|
695
|
+
CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
696
|
+
EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
697
|
+
StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
698
|
+
Status: smithy_client_1.expectString,
|
|
699
|
+
Tags: smithy_client_1._json,
|
|
700
|
+
});
|
|
701
|
+
};
|
|
702
|
+
const de_AnalysisReportSummaryList = (output, context) => {
|
|
703
|
+
const retVal = (output || [])
|
|
704
|
+
.filter((e) => e != null)
|
|
705
|
+
.map((entry) => {
|
|
706
|
+
return de_AnalysisReportSummary(entry, context);
|
|
707
|
+
});
|
|
708
|
+
return retVal;
|
|
709
|
+
};
|
|
710
|
+
const de_Data = (output, context) => {
|
|
711
|
+
return (0, smithy_client_1.take)(output, {
|
|
712
|
+
PerformanceInsightsMetric: (_) => de_PerformanceInsightsMetric(_, context),
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
const de_DataList = (output, context) => {
|
|
716
|
+
const retVal = (output || [])
|
|
717
|
+
.filter((e) => e != null)
|
|
718
|
+
.map((entry) => {
|
|
719
|
+
return de_Data(entry, context);
|
|
720
|
+
});
|
|
721
|
+
return retVal;
|
|
722
|
+
};
|
|
349
723
|
const de_DataPoint = (output, context) => {
|
|
350
724
|
return (0, smithy_client_1.take)(output, {
|
|
351
725
|
Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
@@ -385,6 +759,11 @@ const de_DimensionKeyDescriptionList = (output, context) => {
|
|
|
385
759
|
});
|
|
386
760
|
return retVal;
|
|
387
761
|
};
|
|
762
|
+
const de_GetPerformanceAnalysisReportResponse = (output, context) => {
|
|
763
|
+
return (0, smithy_client_1.take)(output, {
|
|
764
|
+
AnalysisReport: (_) => de_AnalysisReport(_, context),
|
|
765
|
+
});
|
|
766
|
+
};
|
|
388
767
|
const de_GetResourceMetricsResponse = (output, context) => {
|
|
389
768
|
return (0, smithy_client_1.take)(output, {
|
|
390
769
|
AlignedEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
@@ -394,6 +773,35 @@ const de_GetResourceMetricsResponse = (output, context) => {
|
|
|
394
773
|
NextToken: smithy_client_1.expectString,
|
|
395
774
|
});
|
|
396
775
|
};
|
|
776
|
+
const de_Insight = (output, context) => {
|
|
777
|
+
return (0, smithy_client_1.take)(output, {
|
|
778
|
+
BaselineData: (_) => de_DataList(_, context),
|
|
779
|
+
Context: smithy_client_1.expectString,
|
|
780
|
+
Description: smithy_client_1.expectString,
|
|
781
|
+
EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
782
|
+
InsightData: (_) => de_DataList(_, context),
|
|
783
|
+
InsightId: smithy_client_1.expectString,
|
|
784
|
+
InsightType: smithy_client_1.expectString,
|
|
785
|
+
Recommendations: smithy_client_1._json,
|
|
786
|
+
Severity: smithy_client_1.expectString,
|
|
787
|
+
StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
788
|
+
SupportingInsights: (_) => de_InsightList(_, context),
|
|
789
|
+
});
|
|
790
|
+
};
|
|
791
|
+
const de_InsightList = (output, context) => {
|
|
792
|
+
const retVal = (output || [])
|
|
793
|
+
.filter((e) => e != null)
|
|
794
|
+
.map((entry) => {
|
|
795
|
+
return de_Insight(entry, context);
|
|
796
|
+
});
|
|
797
|
+
return retVal;
|
|
798
|
+
};
|
|
799
|
+
const de_ListPerformanceAnalysisReportsResponse = (output, context) => {
|
|
800
|
+
return (0, smithy_client_1.take)(output, {
|
|
801
|
+
AnalysisReports: (_) => de_AnalysisReportSummaryList(_, context),
|
|
802
|
+
NextToken: smithy_client_1.expectString,
|
|
803
|
+
});
|
|
804
|
+
};
|
|
397
805
|
const de_MetricKeyDataPoints = (output, context) => {
|
|
398
806
|
return (0, smithy_client_1.take)(output, {
|
|
399
807
|
DataPoints: (_) => de_DataPointsList(_, context),
|
|
@@ -416,6 +824,14 @@ const de_MetricValuesList = (output, context) => {
|
|
|
416
824
|
});
|
|
417
825
|
return retVal;
|
|
418
826
|
};
|
|
827
|
+
const de_PerformanceInsightsMetric = (output, context) => {
|
|
828
|
+
return (0, smithy_client_1.take)(output, {
|
|
829
|
+
Dimensions: smithy_client_1._json,
|
|
830
|
+
DisplayName: smithy_client_1.expectString,
|
|
831
|
+
Metric: smithy_client_1.expectString,
|
|
832
|
+
Value: smithy_client_1.limitedParseDouble,
|
|
833
|
+
});
|
|
834
|
+
};
|
|
419
835
|
const deserializeMetadata = (output) => ({
|
|
420
836
|
httpStatusCode: output.statusCode,
|
|
421
837
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/PI.js
CHANGED
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
2
|
+
import { CreatePerformanceAnalysisReportCommand, } from "./commands/CreatePerformanceAnalysisReportCommand";
|
|
3
|
+
import { DeletePerformanceAnalysisReportCommand, } from "./commands/DeletePerformanceAnalysisReportCommand";
|
|
2
4
|
import { DescribeDimensionKeysCommand, } from "./commands/DescribeDimensionKeysCommand";
|
|
3
5
|
import { GetDimensionKeyDetailsCommand, } from "./commands/GetDimensionKeyDetailsCommand";
|
|
6
|
+
import { GetPerformanceAnalysisReportCommand, } from "./commands/GetPerformanceAnalysisReportCommand";
|
|
4
7
|
import { GetResourceMetadataCommand, } from "./commands/GetResourceMetadataCommand";
|
|
5
8
|
import { GetResourceMetricsCommand, } from "./commands/GetResourceMetricsCommand";
|
|
6
9
|
import { ListAvailableResourceDimensionsCommand, } from "./commands/ListAvailableResourceDimensionsCommand";
|
|
7
10
|
import { ListAvailableResourceMetricsCommand, } from "./commands/ListAvailableResourceMetricsCommand";
|
|
11
|
+
import { ListPerformanceAnalysisReportsCommand, } from "./commands/ListPerformanceAnalysisReportsCommand";
|
|
12
|
+
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
13
|
+
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
14
|
+
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
8
15
|
import { PIClient } from "./PIClient";
|
|
9
16
|
const commands = {
|
|
17
|
+
CreatePerformanceAnalysisReportCommand,
|
|
18
|
+
DeletePerformanceAnalysisReportCommand,
|
|
10
19
|
DescribeDimensionKeysCommand,
|
|
11
20
|
GetDimensionKeyDetailsCommand,
|
|
21
|
+
GetPerformanceAnalysisReportCommand,
|
|
12
22
|
GetResourceMetadataCommand,
|
|
13
23
|
GetResourceMetricsCommand,
|
|
14
24
|
ListAvailableResourceDimensionsCommand,
|
|
15
25
|
ListAvailableResourceMetricsCommand,
|
|
26
|
+
ListPerformanceAnalysisReportsCommand,
|
|
27
|
+
ListTagsForResourceCommand,
|
|
28
|
+
TagResourceCommand,
|
|
29
|
+
UntagResourceCommand,
|
|
16
30
|
};
|
|
17
31
|
export class PI extends PIClient {
|
|
18
32
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { de_CreatePerformanceAnalysisReportCommand, se_CreatePerformanceAnalysisReportCommand, } from "../protocols/Aws_json1_1";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class CreatePerformanceAnalysisReportCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, CreatePerformanceAnalysisReportCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "PIClient";
|
|
25
|
+
const commandName = "CreatePerformanceAnalysisReportCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_CreatePerformanceAnalysisReportCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_CreatePerformanceAnalysisReportCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { de_DeletePerformanceAnalysisReportCommand, se_DeletePerformanceAnalysisReportCommand, } from "../protocols/Aws_json1_1";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class DeletePerformanceAnalysisReportCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, DeletePerformanceAnalysisReportCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "PIClient";
|
|
25
|
+
const commandName = "DeletePerformanceAnalysisReportCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: (_) => _,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_DeletePerformanceAnalysisReportCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_DeletePerformanceAnalysisReportCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { GetPerformanceAnalysisReportResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { de_GetPerformanceAnalysisReportCommand, se_GetPerformanceAnalysisReportCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetPerformanceAnalysisReportCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetPerformanceAnalysisReportCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "PIClient";
|
|
26
|
+
const commandName = "GetPerformanceAnalysisReportCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: GetPerformanceAnalysisReportResponseFilterSensitiveLog,
|
|
33
|
+
};
|
|
34
|
+
const { requestHandler } = configuration;
|
|
35
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
36
|
+
}
|
|
37
|
+
serialize(input, context) {
|
|
38
|
+
return se_GetPerformanceAnalysisReportCommand(input, context);
|
|
39
|
+
}
|
|
40
|
+
deserialize(output, context) {
|
|
41
|
+
return de_GetPerformanceAnalysisReportCommand(output, context);
|
|
42
|
+
}
|
|
43
|
+
}
|