@aws-sdk/client-pi 3.181.0 → 3.183.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/CHANGELOG.md +8 -0
- package/dist-es/PI.js +26 -33
- package/dist-es/PIClient.js +22 -28
- package/dist-es/commands/DescribeDimensionKeysCommand.js +21 -28
- package/dist-es/commands/GetDimensionKeyDetailsCommand.js +21 -28
- package/dist-es/commands/GetResourceMetadataCommand.js +21 -28
- package/dist-es/commands/GetResourceMetricsCommand.js +21 -28
- package/dist-es/commands/ListAvailableResourceDimensionsCommand.js +21 -28
- package/dist-es/commands/ListAvailableResourceMetricsCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/PIServiceException.js +5 -10
- package/dist-es/models/models_0.js +111 -62
- package/dist-es/pagination/DescribeDimensionKeysPaginator.js +25 -68
- package/dist-es/pagination/GetResourceMetricsPaginator.js +25 -68
- package/dist-es/pagination/ListAvailableResourceDimensionsPaginator.js +25 -68
- package/dist-es/pagination/ListAvailableResourceMetricsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +528 -629
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,557 +1,477 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { InternalServiceError, InvalidArgumentException, NotAuthorizedException, } from "../models/models_0";
|
|
5
4
|
import { PIServiceException as __BaseException } from "../models/PIServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
exceptionCtor: __BaseException,
|
|
301
|
-
errorCode: errorCode,
|
|
302
|
-
});
|
|
303
|
-
_d.label = 9;
|
|
304
|
-
case 9: return [2];
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
}); };
|
|
308
|
-
export var deserializeAws_json1_1ListAvailableResourceDimensionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
309
|
-
var data, contents, response;
|
|
310
|
-
return __generator(this, function (_a) {
|
|
311
|
-
switch (_a.label) {
|
|
312
|
-
case 0:
|
|
313
|
-
if (output.statusCode >= 300) {
|
|
314
|
-
return [2, deserializeAws_json1_1ListAvailableResourceDimensionsCommandError(output, context)];
|
|
315
|
-
}
|
|
316
|
-
return [4, parseBody(output.body, context)];
|
|
317
|
-
case 1:
|
|
318
|
-
data = _a.sent();
|
|
319
|
-
contents = {};
|
|
320
|
-
contents = deserializeAws_json1_1ListAvailableResourceDimensionsResponse(data, context);
|
|
321
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
322
|
-
return [2, Promise.resolve(response)];
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
}); };
|
|
326
|
-
var deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
327
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
328
|
-
var _c;
|
|
329
|
-
return __generator(this, function (_d) {
|
|
330
|
-
switch (_d.label) {
|
|
331
|
-
case 0:
|
|
332
|
-
_a = [__assign({}, output)];
|
|
333
|
-
_c = {};
|
|
334
|
-
return [4, parseErrorBody(output.body, context)];
|
|
335
|
-
case 1:
|
|
336
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
337
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
338
|
-
_b = errorCode;
|
|
339
|
-
switch (_b) {
|
|
340
|
-
case "InternalServiceError": return [3, 2];
|
|
341
|
-
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
342
|
-
case "InvalidArgumentException": return [3, 4];
|
|
343
|
-
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
344
|
-
case "NotAuthorizedException": return [3, 6];
|
|
345
|
-
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
346
|
-
}
|
|
347
|
-
return [3, 8];
|
|
348
|
-
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
349
|
-
case 3: throw _d.sent();
|
|
350
|
-
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
351
|
-
case 5: throw _d.sent();
|
|
352
|
-
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
353
|
-
case 7: throw _d.sent();
|
|
354
|
-
case 8:
|
|
355
|
-
parsedBody = parsedOutput.body;
|
|
356
|
-
throwDefaultError({
|
|
357
|
-
output: output,
|
|
358
|
-
parsedBody: parsedBody,
|
|
359
|
-
exceptionCtor: __BaseException,
|
|
360
|
-
errorCode: errorCode,
|
|
361
|
-
});
|
|
362
|
-
_d.label = 9;
|
|
363
|
-
case 9: return [2];
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
}); };
|
|
367
|
-
export var deserializeAws_json1_1ListAvailableResourceMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
368
|
-
var data, contents, response;
|
|
369
|
-
return __generator(this, function (_a) {
|
|
370
|
-
switch (_a.label) {
|
|
371
|
-
case 0:
|
|
372
|
-
if (output.statusCode >= 300) {
|
|
373
|
-
return [2, deserializeAws_json1_1ListAvailableResourceMetricsCommandError(output, context)];
|
|
374
|
-
}
|
|
375
|
-
return [4, parseBody(output.body, context)];
|
|
376
|
-
case 1:
|
|
377
|
-
data = _a.sent();
|
|
378
|
-
contents = {};
|
|
379
|
-
contents = deserializeAws_json1_1ListAvailableResourceMetricsResponse(data, context);
|
|
380
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
381
|
-
return [2, Promise.resolve(response)];
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
}); };
|
|
385
|
-
var deserializeAws_json1_1ListAvailableResourceMetricsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
386
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
387
|
-
var _c;
|
|
388
|
-
return __generator(this, function (_d) {
|
|
389
|
-
switch (_d.label) {
|
|
390
|
-
case 0:
|
|
391
|
-
_a = [__assign({}, output)];
|
|
392
|
-
_c = {};
|
|
393
|
-
return [4, parseErrorBody(output.body, context)];
|
|
394
|
-
case 1:
|
|
395
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
396
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
397
|
-
_b = errorCode;
|
|
398
|
-
switch (_b) {
|
|
399
|
-
case "InternalServiceError": return [3, 2];
|
|
400
|
-
case "com.amazonaws.pi#InternalServiceError": return [3, 2];
|
|
401
|
-
case "InvalidArgumentException": return [3, 4];
|
|
402
|
-
case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
|
|
403
|
-
case "NotAuthorizedException": return [3, 6];
|
|
404
|
-
case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
|
|
405
|
-
}
|
|
406
|
-
return [3, 8];
|
|
407
|
-
case 2: return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
|
|
408
|
-
case 3: throw _d.sent();
|
|
409
|
-
case 4: return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
410
|
-
case 5: throw _d.sent();
|
|
411
|
-
case 6: return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
412
|
-
case 7: throw _d.sent();
|
|
413
|
-
case 8:
|
|
414
|
-
parsedBody = parsedOutput.body;
|
|
415
|
-
throwDefaultError({
|
|
416
|
-
output: output,
|
|
417
|
-
parsedBody: parsedBody,
|
|
418
|
-
exceptionCtor: __BaseException,
|
|
419
|
-
errorCode: errorCode,
|
|
420
|
-
});
|
|
421
|
-
_d.label = 9;
|
|
422
|
-
case 9: return [2];
|
|
423
|
-
}
|
|
424
|
-
});
|
|
425
|
-
}); };
|
|
426
|
-
var deserializeAws_json1_1InternalServiceErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
427
|
-
var body, deserialized, exception;
|
|
428
|
-
return __generator(this, function (_a) {
|
|
429
|
-
body = parsedOutput.body;
|
|
430
|
-
deserialized = deserializeAws_json1_1InternalServiceError(body, context);
|
|
431
|
-
exception = new InternalServiceError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
432
|
-
return [2, __decorateServiceException(exception, body)];
|
|
5
|
+
export const serializeAws_json1_1DescribeDimensionKeysCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "PerformanceInsightsv20180227.DescribeDimensionKeys",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1DescribeDimensionKeysRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1GetDimensionKeyDetailsCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "PerformanceInsightsv20180227.GetDimensionKeyDetails",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1GetDimensionKeyDetailsRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1GetResourceMetadataCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "PerformanceInsightsv20180227.GetResourceMetadata",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1GetResourceMetadataRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_1GetResourceMetricsCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.1",
|
|
35
|
+
"x-amz-target": "PerformanceInsightsv20180227.GetResourceMetrics",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_1GetResourceMetricsRequest(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_1ListAvailableResourceDimensionsCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceDimensions",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceDimensionsRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_1ListAvailableResourceMetricsCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.1",
|
|
53
|
+
"x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceMetrics",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_1ListAvailableResourceMetricsRequest(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const deserializeAws_json1_1DescribeDimensionKeysCommand = async (output, context) => {
|
|
60
|
+
if (output.statusCode >= 300) {
|
|
61
|
+
return deserializeAws_json1_1DescribeDimensionKeysCommandError(output, context);
|
|
62
|
+
}
|
|
63
|
+
const data = await parseBody(output.body, context);
|
|
64
|
+
let contents = {};
|
|
65
|
+
contents = deserializeAws_json1_1DescribeDimensionKeysResponse(data, context);
|
|
66
|
+
const response = {
|
|
67
|
+
$metadata: deserializeMetadata(output),
|
|
68
|
+
...contents,
|
|
69
|
+
};
|
|
70
|
+
return Promise.resolve(response);
|
|
71
|
+
};
|
|
72
|
+
const deserializeAws_json1_1DescribeDimensionKeysCommandError = async (output, context) => {
|
|
73
|
+
const parsedOutput = {
|
|
74
|
+
...output,
|
|
75
|
+
body: await parseErrorBody(output.body, context),
|
|
76
|
+
};
|
|
77
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
78
|
+
switch (errorCode) {
|
|
79
|
+
case "InternalServiceError":
|
|
80
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
81
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
82
|
+
case "InvalidArgumentException":
|
|
83
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
84
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
85
|
+
case "NotAuthorizedException":
|
|
86
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
87
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
88
|
+
default:
|
|
89
|
+
const parsedBody = parsedOutput.body;
|
|
90
|
+
throwDefaultError({
|
|
91
|
+
output,
|
|
92
|
+
parsedBody,
|
|
93
|
+
exceptionCtor: __BaseException,
|
|
94
|
+
errorCode,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
export const deserializeAws_json1_1GetDimensionKeyDetailsCommand = async (output, context) => {
|
|
99
|
+
if (output.statusCode >= 300) {
|
|
100
|
+
return deserializeAws_json1_1GetDimensionKeyDetailsCommandError(output, context);
|
|
101
|
+
}
|
|
102
|
+
const data = await parseBody(output.body, context);
|
|
103
|
+
let contents = {};
|
|
104
|
+
contents = deserializeAws_json1_1GetDimensionKeyDetailsResponse(data, context);
|
|
105
|
+
const response = {
|
|
106
|
+
$metadata: deserializeMetadata(output),
|
|
107
|
+
...contents,
|
|
108
|
+
};
|
|
109
|
+
return Promise.resolve(response);
|
|
110
|
+
};
|
|
111
|
+
const deserializeAws_json1_1GetDimensionKeyDetailsCommandError = async (output, context) => {
|
|
112
|
+
const parsedOutput = {
|
|
113
|
+
...output,
|
|
114
|
+
body: await parseErrorBody(output.body, context),
|
|
115
|
+
};
|
|
116
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
117
|
+
switch (errorCode) {
|
|
118
|
+
case "InternalServiceError":
|
|
119
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
120
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
121
|
+
case "InvalidArgumentException":
|
|
122
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
123
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
124
|
+
case "NotAuthorizedException":
|
|
125
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
126
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
127
|
+
default:
|
|
128
|
+
const parsedBody = parsedOutput.body;
|
|
129
|
+
throwDefaultError({
|
|
130
|
+
output,
|
|
131
|
+
parsedBody,
|
|
132
|
+
exceptionCtor: __BaseException,
|
|
133
|
+
errorCode,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
export const deserializeAws_json1_1GetResourceMetadataCommand = async (output, context) => {
|
|
138
|
+
if (output.statusCode >= 300) {
|
|
139
|
+
return deserializeAws_json1_1GetResourceMetadataCommandError(output, context);
|
|
140
|
+
}
|
|
141
|
+
const data = await parseBody(output.body, context);
|
|
142
|
+
let contents = {};
|
|
143
|
+
contents = deserializeAws_json1_1GetResourceMetadataResponse(data, context);
|
|
144
|
+
const response = {
|
|
145
|
+
$metadata: deserializeMetadata(output),
|
|
146
|
+
...contents,
|
|
147
|
+
};
|
|
148
|
+
return Promise.resolve(response);
|
|
149
|
+
};
|
|
150
|
+
const deserializeAws_json1_1GetResourceMetadataCommandError = async (output, context) => {
|
|
151
|
+
const parsedOutput = {
|
|
152
|
+
...output,
|
|
153
|
+
body: await parseErrorBody(output.body, context),
|
|
154
|
+
};
|
|
155
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
156
|
+
switch (errorCode) {
|
|
157
|
+
case "InternalServiceError":
|
|
158
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
159
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
160
|
+
case "InvalidArgumentException":
|
|
161
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
162
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
163
|
+
case "NotAuthorizedException":
|
|
164
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
165
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
166
|
+
default:
|
|
167
|
+
const parsedBody = parsedOutput.body;
|
|
168
|
+
throwDefaultError({
|
|
169
|
+
output,
|
|
170
|
+
parsedBody,
|
|
171
|
+
exceptionCtor: __BaseException,
|
|
172
|
+
errorCode,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
export const deserializeAws_json1_1GetResourceMetricsCommand = async (output, context) => {
|
|
177
|
+
if (output.statusCode >= 300) {
|
|
178
|
+
return deserializeAws_json1_1GetResourceMetricsCommandError(output, context);
|
|
179
|
+
}
|
|
180
|
+
const data = await parseBody(output.body, context);
|
|
181
|
+
let contents = {};
|
|
182
|
+
contents = deserializeAws_json1_1GetResourceMetricsResponse(data, context);
|
|
183
|
+
const response = {
|
|
184
|
+
$metadata: deserializeMetadata(output),
|
|
185
|
+
...contents,
|
|
186
|
+
};
|
|
187
|
+
return Promise.resolve(response);
|
|
188
|
+
};
|
|
189
|
+
const deserializeAws_json1_1GetResourceMetricsCommandError = async (output, context) => {
|
|
190
|
+
const parsedOutput = {
|
|
191
|
+
...output,
|
|
192
|
+
body: await parseErrorBody(output.body, context),
|
|
193
|
+
};
|
|
194
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
195
|
+
switch (errorCode) {
|
|
196
|
+
case "InternalServiceError":
|
|
197
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
198
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
199
|
+
case "InvalidArgumentException":
|
|
200
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
201
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
202
|
+
case "NotAuthorizedException":
|
|
203
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
204
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
205
|
+
default:
|
|
206
|
+
const parsedBody = parsedOutput.body;
|
|
207
|
+
throwDefaultError({
|
|
208
|
+
output,
|
|
209
|
+
parsedBody,
|
|
210
|
+
exceptionCtor: __BaseException,
|
|
211
|
+
errorCode,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
export const deserializeAws_json1_1ListAvailableResourceDimensionsCommand = async (output, context) => {
|
|
216
|
+
if (output.statusCode >= 300) {
|
|
217
|
+
return deserializeAws_json1_1ListAvailableResourceDimensionsCommandError(output, context);
|
|
218
|
+
}
|
|
219
|
+
const data = await parseBody(output.body, context);
|
|
220
|
+
let contents = {};
|
|
221
|
+
contents = deserializeAws_json1_1ListAvailableResourceDimensionsResponse(data, context);
|
|
222
|
+
const response = {
|
|
223
|
+
$metadata: deserializeMetadata(output),
|
|
224
|
+
...contents,
|
|
225
|
+
};
|
|
226
|
+
return Promise.resolve(response);
|
|
227
|
+
};
|
|
228
|
+
const deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = async (output, context) => {
|
|
229
|
+
const parsedOutput = {
|
|
230
|
+
...output,
|
|
231
|
+
body: await parseErrorBody(output.body, context),
|
|
232
|
+
};
|
|
233
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
234
|
+
switch (errorCode) {
|
|
235
|
+
case "InternalServiceError":
|
|
236
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
237
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
238
|
+
case "InvalidArgumentException":
|
|
239
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
240
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
241
|
+
case "NotAuthorizedException":
|
|
242
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
243
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
244
|
+
default:
|
|
245
|
+
const parsedBody = parsedOutput.body;
|
|
246
|
+
throwDefaultError({
|
|
247
|
+
output,
|
|
248
|
+
parsedBody,
|
|
249
|
+
exceptionCtor: __BaseException,
|
|
250
|
+
errorCode,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
export const deserializeAws_json1_1ListAvailableResourceMetricsCommand = async (output, context) => {
|
|
255
|
+
if (output.statusCode >= 300) {
|
|
256
|
+
return deserializeAws_json1_1ListAvailableResourceMetricsCommandError(output, context);
|
|
257
|
+
}
|
|
258
|
+
const data = await parseBody(output.body, context);
|
|
259
|
+
let contents = {};
|
|
260
|
+
contents = deserializeAws_json1_1ListAvailableResourceMetricsResponse(data, context);
|
|
261
|
+
const response = {
|
|
262
|
+
$metadata: deserializeMetadata(output),
|
|
263
|
+
...contents,
|
|
264
|
+
};
|
|
265
|
+
return Promise.resolve(response);
|
|
266
|
+
};
|
|
267
|
+
const deserializeAws_json1_1ListAvailableResourceMetricsCommandError = async (output, context) => {
|
|
268
|
+
const parsedOutput = {
|
|
269
|
+
...output,
|
|
270
|
+
body: await parseErrorBody(output.body, context),
|
|
271
|
+
};
|
|
272
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
273
|
+
switch (errorCode) {
|
|
274
|
+
case "InternalServiceError":
|
|
275
|
+
case "com.amazonaws.pi#InternalServiceError":
|
|
276
|
+
throw await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context);
|
|
277
|
+
case "InvalidArgumentException":
|
|
278
|
+
case "com.amazonaws.pi#InvalidArgumentException":
|
|
279
|
+
throw await deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
280
|
+
case "NotAuthorizedException":
|
|
281
|
+
case "com.amazonaws.pi#NotAuthorizedException":
|
|
282
|
+
throw await deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
283
|
+
default:
|
|
284
|
+
const parsedBody = parsedOutput.body;
|
|
285
|
+
throwDefaultError({
|
|
286
|
+
output,
|
|
287
|
+
parsedBody,
|
|
288
|
+
exceptionCtor: __BaseException,
|
|
289
|
+
errorCode,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
const deserializeAws_json1_1InternalServiceErrorResponse = async (parsedOutput, context) => {
|
|
294
|
+
const body = parsedOutput.body;
|
|
295
|
+
const deserialized = deserializeAws_json1_1InternalServiceError(body, context);
|
|
296
|
+
const exception = new InternalServiceError({
|
|
297
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
298
|
+
...deserialized,
|
|
433
299
|
});
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
300
|
+
return __decorateServiceException(exception, body);
|
|
301
|
+
};
|
|
302
|
+
const deserializeAws_json1_1InvalidArgumentExceptionResponse = async (parsedOutput, context) => {
|
|
303
|
+
const body = parsedOutput.body;
|
|
304
|
+
const deserialized = deserializeAws_json1_1InvalidArgumentException(body, context);
|
|
305
|
+
const exception = new InvalidArgumentException({
|
|
306
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
307
|
+
...deserialized,
|
|
442
308
|
});
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
309
|
+
return __decorateServiceException(exception, body);
|
|
310
|
+
};
|
|
311
|
+
const deserializeAws_json1_1NotAuthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
312
|
+
const body = parsedOutput.body;
|
|
313
|
+
const deserialized = deserializeAws_json1_1NotAuthorizedException(body, context);
|
|
314
|
+
const exception = new NotAuthorizedException({
|
|
315
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
316
|
+
...deserialized,
|
|
451
317
|
});
|
|
452
|
-
|
|
453
|
-
|
|
318
|
+
return __decorateServiceException(exception, body);
|
|
319
|
+
};
|
|
320
|
+
const serializeAws_json1_1AdditionalMetricsList = (input, context) => {
|
|
454
321
|
return input
|
|
455
|
-
.filter(
|
|
456
|
-
.map(
|
|
322
|
+
.filter((e) => e != null)
|
|
323
|
+
.map((entry) => {
|
|
457
324
|
return entry;
|
|
458
325
|
});
|
|
459
326
|
};
|
|
460
|
-
|
|
461
|
-
return
|
|
462
|
-
|
|
463
|
-
|
|
327
|
+
const serializeAws_json1_1DescribeDimensionKeysRequest = (input, context) => {
|
|
328
|
+
return {
|
|
329
|
+
...(input.AdditionalMetrics != null && {
|
|
330
|
+
AdditionalMetrics: serializeAws_json1_1AdditionalMetricsList(input.AdditionalMetrics, context),
|
|
331
|
+
}),
|
|
332
|
+
...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
|
|
333
|
+
...(input.Filter != null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) }),
|
|
334
|
+
...(input.GroupBy != null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) }),
|
|
335
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
336
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
337
|
+
...(input.Metric != null && { Metric: input.Metric }),
|
|
338
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
339
|
+
...(input.PartitionBy != null && { PartitionBy: serializeAws_json1_1DimensionGroup(input.PartitionBy, context) }),
|
|
340
|
+
...(input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds }),
|
|
341
|
+
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
342
|
+
...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
|
|
343
|
+
};
|
|
464
344
|
};
|
|
465
|
-
|
|
466
|
-
return
|
|
345
|
+
const serializeAws_json1_1DimensionGroup = (input, context) => {
|
|
346
|
+
return {
|
|
347
|
+
...(input.Dimensions != null && { Dimensions: serializeAws_json1_1RequestStringList(input.Dimensions, context) }),
|
|
348
|
+
...(input.Group != null && { Group: input.Group }),
|
|
349
|
+
...(input.Limit != null && { Limit: input.Limit }),
|
|
350
|
+
};
|
|
467
351
|
};
|
|
468
|
-
|
|
352
|
+
const serializeAws_json1_1DimensionsMetricList = (input, context) => {
|
|
469
353
|
return input
|
|
470
|
-
.filter(
|
|
471
|
-
.map(
|
|
354
|
+
.filter((e) => e != null)
|
|
355
|
+
.map((entry) => {
|
|
472
356
|
return entry;
|
|
473
357
|
});
|
|
474
358
|
};
|
|
475
|
-
|
|
476
|
-
return
|
|
477
|
-
|
|
478
|
-
|
|
359
|
+
const serializeAws_json1_1GetDimensionKeyDetailsRequest = (input, context) => {
|
|
360
|
+
return {
|
|
361
|
+
...(input.Group != null && { Group: input.Group }),
|
|
362
|
+
...(input.GroupIdentifier != null && { GroupIdentifier: input.GroupIdentifier }),
|
|
363
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
364
|
+
...(input.RequestedDimensions != null && {
|
|
365
|
+
RequestedDimensions: serializeAws_json1_1RequestedDimensionList(input.RequestedDimensions, context),
|
|
366
|
+
}),
|
|
367
|
+
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
368
|
+
};
|
|
479
369
|
};
|
|
480
|
-
|
|
481
|
-
return
|
|
370
|
+
const serializeAws_json1_1GetResourceMetadataRequest = (input, context) => {
|
|
371
|
+
return {
|
|
372
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
373
|
+
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
374
|
+
};
|
|
482
375
|
};
|
|
483
|
-
|
|
484
|
-
return
|
|
485
|
-
|
|
486
|
-
|
|
376
|
+
const serializeAws_json1_1GetResourceMetricsRequest = (input, context) => {
|
|
377
|
+
return {
|
|
378
|
+
...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }),
|
|
379
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
380
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
381
|
+
...(input.MetricQueries != null && {
|
|
382
|
+
MetricQueries: serializeAws_json1_1MetricQueryList(input.MetricQueries, context),
|
|
383
|
+
}),
|
|
384
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
385
|
+
...(input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds }),
|
|
386
|
+
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
387
|
+
...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }),
|
|
388
|
+
};
|
|
487
389
|
};
|
|
488
|
-
|
|
489
|
-
return
|
|
390
|
+
const serializeAws_json1_1ListAvailableResourceDimensionsRequest = (input, context) => {
|
|
391
|
+
return {
|
|
392
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
393
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
394
|
+
...(input.Metrics != null && { Metrics: serializeAws_json1_1DimensionsMetricList(input.Metrics, context) }),
|
|
395
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
396
|
+
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
397
|
+
};
|
|
490
398
|
};
|
|
491
|
-
|
|
492
|
-
return
|
|
399
|
+
const serializeAws_json1_1ListAvailableResourceMetricsRequest = (input, context) => {
|
|
400
|
+
return {
|
|
401
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
402
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
403
|
+
...(input.MetricTypes != null && { MetricTypes: serializeAws_json1_1MetricTypeList(input.MetricTypes, context) }),
|
|
404
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
405
|
+
...(input.ServiceType != null && { ServiceType: input.ServiceType }),
|
|
406
|
+
};
|
|
493
407
|
};
|
|
494
|
-
|
|
495
|
-
return
|
|
408
|
+
const serializeAws_json1_1MetricQuery = (input, context) => {
|
|
409
|
+
return {
|
|
410
|
+
...(input.Filter != null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) }),
|
|
411
|
+
...(input.GroupBy != null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) }),
|
|
412
|
+
...(input.Metric != null && { Metric: input.Metric }),
|
|
413
|
+
};
|
|
496
414
|
};
|
|
497
|
-
|
|
498
|
-
return Object.entries(input).reduce(
|
|
499
|
-
var _b;
|
|
500
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
415
|
+
const serializeAws_json1_1MetricQueryFilterMap = (input, context) => {
|
|
416
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
501
417
|
if (value === null) {
|
|
502
418
|
return acc;
|
|
503
419
|
}
|
|
504
|
-
return
|
|
420
|
+
return {
|
|
421
|
+
...acc,
|
|
422
|
+
[key]: value,
|
|
423
|
+
};
|
|
505
424
|
}, {});
|
|
506
425
|
};
|
|
507
|
-
|
|
426
|
+
const serializeAws_json1_1MetricQueryList = (input, context) => {
|
|
508
427
|
return input
|
|
509
|
-
.filter(
|
|
510
|
-
.map(
|
|
428
|
+
.filter((e) => e != null)
|
|
429
|
+
.map((entry) => {
|
|
511
430
|
return serializeAws_json1_1MetricQuery(entry, context);
|
|
512
431
|
});
|
|
513
432
|
};
|
|
514
|
-
|
|
433
|
+
const serializeAws_json1_1MetricTypeList = (input, context) => {
|
|
515
434
|
return input
|
|
516
|
-
.filter(
|
|
517
|
-
.map(
|
|
435
|
+
.filter((e) => e != null)
|
|
436
|
+
.map((entry) => {
|
|
518
437
|
return entry;
|
|
519
438
|
});
|
|
520
439
|
};
|
|
521
|
-
|
|
440
|
+
const serializeAws_json1_1RequestedDimensionList = (input, context) => {
|
|
522
441
|
return input
|
|
523
|
-
.filter(
|
|
524
|
-
.map(
|
|
442
|
+
.filter((e) => e != null)
|
|
443
|
+
.map((entry) => {
|
|
525
444
|
return entry;
|
|
526
445
|
});
|
|
527
446
|
};
|
|
528
|
-
|
|
447
|
+
const serializeAws_json1_1RequestStringList = (input, context) => {
|
|
529
448
|
return input
|
|
530
|
-
.filter(
|
|
531
|
-
.map(
|
|
449
|
+
.filter((e) => e != null)
|
|
450
|
+
.map((entry) => {
|
|
532
451
|
return entry;
|
|
533
452
|
});
|
|
534
453
|
};
|
|
535
|
-
|
|
536
|
-
return Object.entries(output).reduce(
|
|
537
|
-
var _b;
|
|
538
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
454
|
+
const deserializeAws_json1_1AdditionalMetricsMap = (output, context) => {
|
|
455
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
539
456
|
if (value === null) {
|
|
540
457
|
return acc;
|
|
541
458
|
}
|
|
542
|
-
return
|
|
459
|
+
return {
|
|
460
|
+
...acc,
|
|
461
|
+
[key]: __limitedParseDouble(value),
|
|
462
|
+
};
|
|
543
463
|
}, {});
|
|
544
464
|
};
|
|
545
|
-
|
|
465
|
+
const deserializeAws_json1_1DataPoint = (output, context) => {
|
|
546
466
|
return {
|
|
547
467
|
Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
|
|
548
468
|
Value: __limitedParseDouble(output.Value),
|
|
549
469
|
};
|
|
550
470
|
};
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
.filter(
|
|
554
|
-
.map(
|
|
471
|
+
const deserializeAws_json1_1DataPointsList = (output, context) => {
|
|
472
|
+
const retVal = (output || [])
|
|
473
|
+
.filter((e) => e != null)
|
|
474
|
+
.map((entry) => {
|
|
555
475
|
if (entry === null) {
|
|
556
476
|
return null;
|
|
557
477
|
}
|
|
@@ -559,7 +479,7 @@ var deserializeAws_json1_1DataPointsList = function (output, context) {
|
|
|
559
479
|
});
|
|
560
480
|
return retVal;
|
|
561
481
|
};
|
|
562
|
-
|
|
482
|
+
const deserializeAws_json1_1DescribeDimensionKeysResponse = (output, context) => {
|
|
563
483
|
return {
|
|
564
484
|
AlignedEndTime: output.AlignedEndTime != null
|
|
565
485
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedEndTime)))
|
|
@@ -574,15 +494,15 @@ var deserializeAws_json1_1DescribeDimensionKeysResponse = function (output, cont
|
|
|
574
494
|
: undefined,
|
|
575
495
|
};
|
|
576
496
|
};
|
|
577
|
-
|
|
497
|
+
const deserializeAws_json1_1DimensionDetail = (output, context) => {
|
|
578
498
|
return {
|
|
579
499
|
Identifier: __expectString(output.Identifier),
|
|
580
500
|
};
|
|
581
501
|
};
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
.filter(
|
|
585
|
-
.map(
|
|
502
|
+
const deserializeAws_json1_1DimensionDetailList = (output, context) => {
|
|
503
|
+
const retVal = (output || [])
|
|
504
|
+
.filter((e) => e != null)
|
|
505
|
+
.map((entry) => {
|
|
586
506
|
if (entry === null) {
|
|
587
507
|
return null;
|
|
588
508
|
}
|
|
@@ -590,16 +510,16 @@ var deserializeAws_json1_1DimensionDetailList = function (output, context) {
|
|
|
590
510
|
});
|
|
591
511
|
return retVal;
|
|
592
512
|
};
|
|
593
|
-
|
|
513
|
+
const deserializeAws_json1_1DimensionGroupDetail = (output, context) => {
|
|
594
514
|
return {
|
|
595
515
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionDetailList(output.Dimensions, context) : undefined,
|
|
596
516
|
Group: __expectString(output.Group),
|
|
597
517
|
};
|
|
598
518
|
};
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
.filter(
|
|
602
|
-
.map(
|
|
519
|
+
const deserializeAws_json1_1DimensionGroupDetailList = (output, context) => {
|
|
520
|
+
const retVal = (output || [])
|
|
521
|
+
.filter((e) => e != null)
|
|
522
|
+
.map((entry) => {
|
|
603
523
|
if (entry === null) {
|
|
604
524
|
return null;
|
|
605
525
|
}
|
|
@@ -607,7 +527,7 @@ var deserializeAws_json1_1DimensionGroupDetailList = function (output, context)
|
|
|
607
527
|
});
|
|
608
528
|
return retVal;
|
|
609
529
|
};
|
|
610
|
-
|
|
530
|
+
const deserializeAws_json1_1DimensionKeyDescription = (output, context) => {
|
|
611
531
|
return {
|
|
612
532
|
AdditionalMetrics: output.AdditionalMetrics != null
|
|
613
533
|
? deserializeAws_json1_1AdditionalMetricsMap(output.AdditionalMetrics, context)
|
|
@@ -617,10 +537,10 @@ var deserializeAws_json1_1DimensionKeyDescription = function (output, context) {
|
|
|
617
537
|
Total: __limitedParseDouble(output.Total),
|
|
618
538
|
};
|
|
619
539
|
};
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
.filter(
|
|
623
|
-
.map(
|
|
540
|
+
const deserializeAws_json1_1DimensionKeyDescriptionList = (output, context) => {
|
|
541
|
+
const retVal = (output || [])
|
|
542
|
+
.filter((e) => e != null)
|
|
543
|
+
.map((entry) => {
|
|
624
544
|
if (entry === null) {
|
|
625
545
|
return null;
|
|
626
546
|
}
|
|
@@ -628,17 +548,17 @@ var deserializeAws_json1_1DimensionKeyDescriptionList = function (output, contex
|
|
|
628
548
|
});
|
|
629
549
|
return retVal;
|
|
630
550
|
};
|
|
631
|
-
|
|
551
|
+
const deserializeAws_json1_1DimensionKeyDetail = (output, context) => {
|
|
632
552
|
return {
|
|
633
553
|
Dimension: __expectString(output.Dimension),
|
|
634
554
|
Status: __expectString(output.Status),
|
|
635
555
|
Value: __expectString(output.Value),
|
|
636
556
|
};
|
|
637
557
|
};
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
.filter(
|
|
641
|
-
.map(
|
|
558
|
+
const deserializeAws_json1_1DimensionKeyDetailList = (output, context) => {
|
|
559
|
+
const retVal = (output || [])
|
|
560
|
+
.filter((e) => e != null)
|
|
561
|
+
.map((entry) => {
|
|
642
562
|
if (entry === null) {
|
|
643
563
|
return null;
|
|
644
564
|
}
|
|
@@ -646,43 +566,45 @@ var deserializeAws_json1_1DimensionKeyDetailList = function (output, context) {
|
|
|
646
566
|
});
|
|
647
567
|
return retVal;
|
|
648
568
|
};
|
|
649
|
-
|
|
650
|
-
return Object.entries(output).reduce(
|
|
651
|
-
var _b;
|
|
652
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
569
|
+
const deserializeAws_json1_1DimensionMap = (output, context) => {
|
|
570
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
653
571
|
if (value === null) {
|
|
654
572
|
return acc;
|
|
655
573
|
}
|
|
656
|
-
return
|
|
574
|
+
return {
|
|
575
|
+
...acc,
|
|
576
|
+
[key]: __expectString(value),
|
|
577
|
+
};
|
|
657
578
|
}, {});
|
|
658
579
|
};
|
|
659
|
-
|
|
580
|
+
const deserializeAws_json1_1FeatureMetadata = (output, context) => {
|
|
660
581
|
return {
|
|
661
582
|
Status: __expectString(output.Status),
|
|
662
583
|
};
|
|
663
584
|
};
|
|
664
|
-
|
|
665
|
-
return Object.entries(output).reduce(
|
|
666
|
-
var _b;
|
|
667
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
585
|
+
const deserializeAws_json1_1FeatureMetadataMap = (output, context) => {
|
|
586
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
668
587
|
if (value === null) {
|
|
669
588
|
return acc;
|
|
670
589
|
}
|
|
671
|
-
return
|
|
590
|
+
return {
|
|
591
|
+
...acc,
|
|
592
|
+
[key]: deserializeAws_json1_1FeatureMetadata(value, context),
|
|
593
|
+
};
|
|
672
594
|
}, {});
|
|
673
595
|
};
|
|
674
|
-
|
|
596
|
+
const deserializeAws_json1_1GetDimensionKeyDetailsResponse = (output, context) => {
|
|
675
597
|
return {
|
|
676
598
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionKeyDetailList(output.Dimensions, context) : undefined,
|
|
677
599
|
};
|
|
678
600
|
};
|
|
679
|
-
|
|
601
|
+
const deserializeAws_json1_1GetResourceMetadataResponse = (output, context) => {
|
|
680
602
|
return {
|
|
681
603
|
Features: output.Features != null ? deserializeAws_json1_1FeatureMetadataMap(output.Features, context) : undefined,
|
|
682
604
|
Identifier: __expectString(output.Identifier),
|
|
683
605
|
};
|
|
684
606
|
};
|
|
685
|
-
|
|
607
|
+
const deserializeAws_json1_1GetResourceMetricsResponse = (output, context) => {
|
|
686
608
|
return {
|
|
687
609
|
AlignedEndTime: output.AlignedEndTime != null
|
|
688
610
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedEndTime)))
|
|
@@ -695,17 +617,17 @@ var deserializeAws_json1_1GetResourceMetricsResponse = function (output, context
|
|
|
695
617
|
NextToken: __expectString(output.NextToken),
|
|
696
618
|
};
|
|
697
619
|
};
|
|
698
|
-
|
|
620
|
+
const deserializeAws_json1_1InternalServiceError = (output, context) => {
|
|
699
621
|
return {
|
|
700
622
|
Message: __expectString(output.Message),
|
|
701
623
|
};
|
|
702
624
|
};
|
|
703
|
-
|
|
625
|
+
const deserializeAws_json1_1InvalidArgumentException = (output, context) => {
|
|
704
626
|
return {
|
|
705
627
|
Message: __expectString(output.Message),
|
|
706
628
|
};
|
|
707
629
|
};
|
|
708
|
-
|
|
630
|
+
const deserializeAws_json1_1ListAvailableResourceDimensionsResponse = (output, context) => {
|
|
709
631
|
return {
|
|
710
632
|
MetricDimensions: output.MetricDimensions != null
|
|
711
633
|
? deserializeAws_json1_1MetricDimensionsList(output.MetricDimensions, context)
|
|
@@ -713,22 +635,22 @@ var deserializeAws_json1_1ListAvailableResourceDimensionsResponse = function (ou
|
|
|
713
635
|
NextToken: __expectString(output.NextToken),
|
|
714
636
|
};
|
|
715
637
|
};
|
|
716
|
-
|
|
638
|
+
const deserializeAws_json1_1ListAvailableResourceMetricsResponse = (output, context) => {
|
|
717
639
|
return {
|
|
718
640
|
Metrics: output.Metrics != null ? deserializeAws_json1_1ResponseResourceMetricList(output.Metrics, context) : undefined,
|
|
719
641
|
NextToken: __expectString(output.NextToken),
|
|
720
642
|
};
|
|
721
643
|
};
|
|
722
|
-
|
|
644
|
+
const deserializeAws_json1_1MetricDimensionGroups = (output, context) => {
|
|
723
645
|
return {
|
|
724
646
|
Groups: output.Groups != null ? deserializeAws_json1_1DimensionGroupDetailList(output.Groups, context) : undefined,
|
|
725
647
|
Metric: __expectString(output.Metric),
|
|
726
648
|
};
|
|
727
649
|
};
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
.filter(
|
|
731
|
-
.map(
|
|
650
|
+
const deserializeAws_json1_1MetricDimensionsList = (output, context) => {
|
|
651
|
+
const retVal = (output || [])
|
|
652
|
+
.filter((e) => e != null)
|
|
653
|
+
.map((entry) => {
|
|
732
654
|
if (entry === null) {
|
|
733
655
|
return null;
|
|
734
656
|
}
|
|
@@ -736,16 +658,16 @@ var deserializeAws_json1_1MetricDimensionsList = function (output, context) {
|
|
|
736
658
|
});
|
|
737
659
|
return retVal;
|
|
738
660
|
};
|
|
739
|
-
|
|
661
|
+
const deserializeAws_json1_1MetricKeyDataPoints = (output, context) => {
|
|
740
662
|
return {
|
|
741
663
|
DataPoints: output.DataPoints != null ? deserializeAws_json1_1DataPointsList(output.DataPoints, context) : undefined,
|
|
742
664
|
Key: output.Key != null ? deserializeAws_json1_1ResponseResourceMetricKey(output.Key, context) : undefined,
|
|
743
665
|
};
|
|
744
666
|
};
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
.filter(
|
|
748
|
-
.map(
|
|
667
|
+
const deserializeAws_json1_1MetricKeyDataPointsList = (output, context) => {
|
|
668
|
+
const retVal = (output || [])
|
|
669
|
+
.filter((e) => e != null)
|
|
670
|
+
.map((entry) => {
|
|
749
671
|
if (entry === null) {
|
|
750
672
|
return null;
|
|
751
673
|
}
|
|
@@ -753,10 +675,10 @@ var deserializeAws_json1_1MetricKeyDataPointsList = function (output, context) {
|
|
|
753
675
|
});
|
|
754
676
|
return retVal;
|
|
755
677
|
};
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
.filter(
|
|
759
|
-
.map(
|
|
678
|
+
const deserializeAws_json1_1MetricValuesList = (output, context) => {
|
|
679
|
+
const retVal = (output || [])
|
|
680
|
+
.filter((e) => e != null)
|
|
681
|
+
.map((entry) => {
|
|
760
682
|
if (entry === null) {
|
|
761
683
|
return null;
|
|
762
684
|
}
|
|
@@ -764,20 +686,20 @@ var deserializeAws_json1_1MetricValuesList = function (output, context) {
|
|
|
764
686
|
});
|
|
765
687
|
return retVal;
|
|
766
688
|
};
|
|
767
|
-
|
|
689
|
+
const deserializeAws_json1_1NotAuthorizedException = (output, context) => {
|
|
768
690
|
return {
|
|
769
691
|
Message: __expectString(output.Message),
|
|
770
692
|
};
|
|
771
693
|
};
|
|
772
|
-
|
|
694
|
+
const deserializeAws_json1_1ResponsePartitionKey = (output, context) => {
|
|
773
695
|
return {
|
|
774
696
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionMap(output.Dimensions, context) : undefined,
|
|
775
697
|
};
|
|
776
698
|
};
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
.filter(
|
|
780
|
-
.map(
|
|
699
|
+
const deserializeAws_json1_1ResponsePartitionKeyList = (output, context) => {
|
|
700
|
+
const retVal = (output || [])
|
|
701
|
+
.filter((e) => e != null)
|
|
702
|
+
.map((entry) => {
|
|
781
703
|
if (entry === null) {
|
|
782
704
|
return null;
|
|
783
705
|
}
|
|
@@ -785,23 +707,23 @@ var deserializeAws_json1_1ResponsePartitionKeyList = function (output, context)
|
|
|
785
707
|
});
|
|
786
708
|
return retVal;
|
|
787
709
|
};
|
|
788
|
-
|
|
710
|
+
const deserializeAws_json1_1ResponseResourceMetric = (output, context) => {
|
|
789
711
|
return {
|
|
790
712
|
Description: __expectString(output.Description),
|
|
791
713
|
Metric: __expectString(output.Metric),
|
|
792
714
|
Unit: __expectString(output.Unit),
|
|
793
715
|
};
|
|
794
716
|
};
|
|
795
|
-
|
|
717
|
+
const deserializeAws_json1_1ResponseResourceMetricKey = (output, context) => {
|
|
796
718
|
return {
|
|
797
719
|
Dimensions: output.Dimensions != null ? deserializeAws_json1_1DimensionMap(output.Dimensions, context) : undefined,
|
|
798
720
|
Metric: __expectString(output.Metric),
|
|
799
721
|
};
|
|
800
722
|
};
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
.filter(
|
|
804
|
-
.map(
|
|
723
|
+
const deserializeAws_json1_1ResponseResourceMetricList = (output, context) => {
|
|
724
|
+
const retVal = (output || [])
|
|
725
|
+
.filter((e) => e != null)
|
|
726
|
+
.map((entry) => {
|
|
805
727
|
if (entry === null) {
|
|
806
728
|
return null;
|
|
807
729
|
}
|
|
@@ -809,75 +731,52 @@ var deserializeAws_json1_1ResponseResourceMetricList = function (output, context
|
|
|
809
731
|
});
|
|
810
732
|
return retVal;
|
|
811
733
|
};
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
});
|
|
820
|
-
};
|
|
821
|
-
var collectBody = function (streamBody, context) {
|
|
822
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
734
|
+
const deserializeMetadata = (output) => ({
|
|
735
|
+
httpStatusCode: output.statusCode,
|
|
736
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
737
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
738
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
739
|
+
});
|
|
740
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
823
741
|
if (streamBody instanceof Uint8Array) {
|
|
824
742
|
return Promise.resolve(streamBody);
|
|
825
743
|
}
|
|
826
744
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
827
745
|
};
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
};
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
if (resolvedHostname !== undefined) {
|
|
847
|
-
contents.hostname = resolvedHostname;
|
|
848
|
-
}
|
|
849
|
-
if (body !== undefined) {
|
|
850
|
-
contents.body = body;
|
|
851
|
-
}
|
|
852
|
-
return [2, new __HttpRequest(contents)];
|
|
853
|
-
}
|
|
854
|
-
});
|
|
855
|
-
}); };
|
|
856
|
-
var parseBody = function (streamBody, context) {
|
|
857
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
858
|
-
if (encoded.length) {
|
|
859
|
-
return JSON.parse(encoded);
|
|
860
|
-
}
|
|
861
|
-
return {};
|
|
862
|
-
});
|
|
746
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
747
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
748
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
749
|
+
const contents = {
|
|
750
|
+
protocol,
|
|
751
|
+
hostname,
|
|
752
|
+
port,
|
|
753
|
+
method: "POST",
|
|
754
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
755
|
+
headers,
|
|
756
|
+
};
|
|
757
|
+
if (resolvedHostname !== undefined) {
|
|
758
|
+
contents.hostname = resolvedHostname;
|
|
759
|
+
}
|
|
760
|
+
if (body !== undefined) {
|
|
761
|
+
contents.body = body;
|
|
762
|
+
}
|
|
763
|
+
return new __HttpRequest(contents);
|
|
863
764
|
};
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
880
|
-
var cleanValue = rawValue;
|
|
765
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
766
|
+
if (encoded.length) {
|
|
767
|
+
return JSON.parse(encoded);
|
|
768
|
+
}
|
|
769
|
+
return {};
|
|
770
|
+
});
|
|
771
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
772
|
+
const value = await parseBody(errorBody, context);
|
|
773
|
+
value.message = value.message ?? value.Message;
|
|
774
|
+
return value;
|
|
775
|
+
};
|
|
776
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
777
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
778
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
779
|
+
let cleanValue = rawValue;
|
|
881
780
|
if (typeof cleanValue === "number") {
|
|
882
781
|
cleanValue = cleanValue.toString();
|
|
883
782
|
}
|
|
@@ -892,7 +791,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
892
791
|
}
|
|
893
792
|
return cleanValue;
|
|
894
793
|
};
|
|
895
|
-
|
|
794
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
896
795
|
if (headerKey !== undefined) {
|
|
897
796
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
898
797
|
}
|