@aws-sdk/client-pi 3.47.2 → 3.48.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 (63) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +18 -13
  3. package/dist-cjs/PI.js +45 -0
  4. package/dist-cjs/commands/GetResourceMetadataCommand.js +36 -0
  5. package/dist-cjs/commands/ListAvailableResourceDimensionsCommand.js +36 -0
  6. package/dist-cjs/commands/ListAvailableResourceMetricsCommand.js +36 -0
  7. package/dist-cjs/commands/index.js +3 -0
  8. package/dist-cjs/index.js +1 -0
  9. package/dist-cjs/models/models_0.js +77 -1
  10. package/dist-cjs/pagination/DescribeDimensionKeysPaginator.js +35 -0
  11. package/dist-cjs/pagination/GetResourceMetricsPaginator.js +35 -0
  12. package/dist-cjs/pagination/Interfaces.js +2 -0
  13. package/dist-cjs/pagination/ListAvailableResourceDimensionsPaginator.js +35 -0
  14. package/dist-cjs/pagination/ListAvailableResourceMetricsPaginator.js +35 -0
  15. package/dist-cjs/pagination/index.js +8 -0
  16. package/dist-cjs/protocols/Aws_json1_1.js +402 -1
  17. package/dist-es/PI.js +45 -0
  18. package/dist-es/commands/GetResourceMetadataCommand.js +39 -0
  19. package/dist-es/commands/ListAvailableResourceDimensionsCommand.js +39 -0
  20. package/dist-es/commands/ListAvailableResourceMetricsCommand.js +39 -0
  21. package/dist-es/commands/index.js +3 -0
  22. package/dist-es/index.js +1 -0
  23. package/dist-es/models/models_0.js +54 -0
  24. package/dist-es/pagination/DescribeDimensionKeysPaginator.js +74 -0
  25. package/dist-es/pagination/GetResourceMetricsPaginator.js +74 -0
  26. package/dist-es/pagination/Interfaces.js +1 -0
  27. package/dist-es/pagination/ListAvailableResourceDimensionsPaginator.js +74 -0
  28. package/dist-es/pagination/ListAvailableResourceMetricsPaginator.js +74 -0
  29. package/dist-es/pagination/index.js +5 -0
  30. package/dist-es/protocols/Aws_json1_1.js +414 -1
  31. package/dist-types/PI.d.ts +48 -18
  32. package/dist-types/PIClient.d.ts +22 -14
  33. package/dist-types/commands/DescribeDimensionKeysCommand.d.ts +2 -2
  34. package/dist-types/commands/GetDimensionKeyDetailsCommand.d.ts +5 -4
  35. package/dist-types/commands/GetResourceMetadataCommand.d.ts +37 -0
  36. package/dist-types/commands/ListAvailableResourceDimensionsCommand.d.ts +35 -0
  37. package/dist-types/commands/ListAvailableResourceMetricsCommand.d.ts +36 -0
  38. package/dist-types/commands/index.d.ts +3 -0
  39. package/dist-types/index.d.ts +1 -0
  40. package/dist-types/models/models_0.d.ts +413 -83
  41. package/dist-types/pagination/DescribeDimensionKeysPaginator.d.ts +4 -0
  42. package/dist-types/pagination/GetResourceMetricsPaginator.d.ts +4 -0
  43. package/dist-types/pagination/Interfaces.d.ts +6 -0
  44. package/dist-types/pagination/ListAvailableResourceDimensionsPaginator.d.ts +4 -0
  45. package/dist-types/pagination/ListAvailableResourceMetricsPaginator.d.ts +4 -0
  46. package/dist-types/pagination/index.d.ts +5 -0
  47. package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
  48. package/dist-types/ts3.4/PI.d.ts +15 -0
  49. package/dist-types/ts3.4/PIClient.d.ts +5 -2
  50. package/dist-types/ts3.4/commands/GetResourceMetadataCommand.d.ts +17 -0
  51. package/dist-types/ts3.4/commands/ListAvailableResourceDimensionsCommand.d.ts +17 -0
  52. package/dist-types/ts3.4/commands/ListAvailableResourceMetricsCommand.d.ts +17 -0
  53. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  54. package/dist-types/ts3.4/index.d.ts +1 -0
  55. package/dist-types/ts3.4/models/models_0.d.ts +142 -0
  56. package/dist-types/ts3.4/pagination/DescribeDimensionKeysPaginator.d.ts +4 -0
  57. package/dist-types/ts3.4/pagination/GetResourceMetricsPaginator.d.ts +4 -0
  58. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  59. package/dist-types/ts3.4/pagination/ListAvailableResourceDimensionsPaginator.d.ts +4 -0
  60. package/dist-types/ts3.4/pagination/ListAvailableResourceMetricsPaginator.d.ts +4 -0
  61. package/dist-types/ts3.4/pagination/index.d.ts +5 -0
  62. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +9 -0
  63. package/package.json +3 -3
@@ -23,6 +23,17 @@ export var serializeAws_json1_1GetDimensionKeyDetailsCommand = function (input,
23
23
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
24
24
  });
25
25
  }); };
26
+ export var serializeAws_json1_1GetResourceMetadataCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
27
+ var headers, body;
28
+ return __generator(this, function (_a) {
29
+ headers = {
30
+ "content-type": "application/x-amz-json-1.1",
31
+ "x-amz-target": "PerformanceInsightsv20180227.GetResourceMetadata",
32
+ };
33
+ body = JSON.stringify(serializeAws_json1_1GetResourceMetadataRequest(input, context));
34
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
35
+ });
36
+ }); };
26
37
  export var serializeAws_json1_1GetResourceMetricsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
27
38
  var headers, body;
28
39
  return __generator(this, function (_a) {
@@ -34,6 +45,28 @@ export var serializeAws_json1_1GetResourceMetricsCommand = function (input, cont
34
45
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
35
46
  });
36
47
  }); };
48
+ export var serializeAws_json1_1ListAvailableResourceDimensionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
49
+ var headers, body;
50
+ return __generator(this, function (_a) {
51
+ headers = {
52
+ "content-type": "application/x-amz-json-1.1",
53
+ "x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceDimensions",
54
+ };
55
+ body = JSON.stringify(serializeAws_json1_1ListAvailableResourceDimensionsRequest(input, context));
56
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
57
+ });
58
+ }); };
59
+ export var serializeAws_json1_1ListAvailableResourceMetricsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
60
+ var headers, body;
61
+ return __generator(this, function (_a) {
62
+ headers = {
63
+ "content-type": "application/x-amz-json-1.1",
64
+ "x-amz-target": "PerformanceInsightsv20180227.ListAvailableResourceMetrics",
65
+ };
66
+ body = JSON.stringify(serializeAws_json1_1ListAvailableResourceMetricsRequest(input, context));
67
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
68
+ });
69
+ }); };
37
70
  export var deserializeAws_json1_1DescribeDimensionKeysCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
38
71
  var data, contents, response;
39
72
  return __generator(this, function (_a) {
@@ -178,6 +211,78 @@ var deserializeAws_json1_1GetDimensionKeyDetailsCommandError = function (output,
178
211
  }
179
212
  });
180
213
  }); };
214
+ export var deserializeAws_json1_1GetResourceMetadataCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
215
+ var data, contents, response;
216
+ return __generator(this, function (_a) {
217
+ switch (_a.label) {
218
+ case 0:
219
+ if (output.statusCode >= 300) {
220
+ return [2, deserializeAws_json1_1GetResourceMetadataCommandError(output, context)];
221
+ }
222
+ return [4, parseBody(output.body, context)];
223
+ case 1:
224
+ data = _a.sent();
225
+ contents = {};
226
+ contents = deserializeAws_json1_1GetResourceMetadataResponse(data, context);
227
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
228
+ return [2, Promise.resolve(response)];
229
+ }
230
+ });
231
+ }); };
232
+ var deserializeAws_json1_1GetResourceMetadataCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
233
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
234
+ var _f;
235
+ return __generator(this, function (_g) {
236
+ switch (_g.label) {
237
+ case 0:
238
+ _a = [__assign({}, output)];
239
+ _f = {};
240
+ return [4, parseBody(output.body, context)];
241
+ case 1:
242
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
243
+ errorCode = "UnknownError";
244
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
245
+ _b = errorCode;
246
+ switch (_b) {
247
+ case "InternalServiceError": return [3, 2];
248
+ case "com.amazonaws.pi#InternalServiceError": return [3, 2];
249
+ case "InvalidArgumentException": return [3, 4];
250
+ case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
251
+ case "NotAuthorizedException": return [3, 6];
252
+ case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
253
+ }
254
+ return [3, 8];
255
+ case 2:
256
+ _c = [{}];
257
+ return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
258
+ case 3:
259
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
260
+ return [3, 9];
261
+ case 4:
262
+ _d = [{}];
263
+ return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
264
+ case 5:
265
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
266
+ return [3, 9];
267
+ case 6:
268
+ _e = [{}];
269
+ return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
270
+ case 7:
271
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
272
+ return [3, 9];
273
+ case 8:
274
+ parsedBody = parsedOutput.body;
275
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
276
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
277
+ _g.label = 9;
278
+ case 9:
279
+ message = response.message || response.Message || errorCode;
280
+ response.message = message;
281
+ delete response.Message;
282
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
283
+ }
284
+ });
285
+ }); };
181
286
  export var deserializeAws_json1_1GetResourceMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
182
287
  var data, contents, response;
183
288
  return __generator(this, function (_a) {
@@ -250,6 +355,150 @@ var deserializeAws_json1_1GetResourceMetricsCommandError = function (output, con
250
355
  }
251
356
  });
252
357
  }); };
358
+ export var deserializeAws_json1_1ListAvailableResourceDimensionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
359
+ var data, contents, response;
360
+ return __generator(this, function (_a) {
361
+ switch (_a.label) {
362
+ case 0:
363
+ if (output.statusCode >= 300) {
364
+ return [2, deserializeAws_json1_1ListAvailableResourceDimensionsCommandError(output, context)];
365
+ }
366
+ return [4, parseBody(output.body, context)];
367
+ case 1:
368
+ data = _a.sent();
369
+ contents = {};
370
+ contents = deserializeAws_json1_1ListAvailableResourceDimensionsResponse(data, context);
371
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
372
+ return [2, Promise.resolve(response)];
373
+ }
374
+ });
375
+ }); };
376
+ var deserializeAws_json1_1ListAvailableResourceDimensionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
377
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
378
+ var _f;
379
+ return __generator(this, function (_g) {
380
+ switch (_g.label) {
381
+ case 0:
382
+ _a = [__assign({}, output)];
383
+ _f = {};
384
+ return [4, parseBody(output.body, context)];
385
+ case 1:
386
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
387
+ errorCode = "UnknownError";
388
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
389
+ _b = errorCode;
390
+ switch (_b) {
391
+ case "InternalServiceError": return [3, 2];
392
+ case "com.amazonaws.pi#InternalServiceError": return [3, 2];
393
+ case "InvalidArgumentException": return [3, 4];
394
+ case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
395
+ case "NotAuthorizedException": return [3, 6];
396
+ case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
397
+ }
398
+ return [3, 8];
399
+ case 2:
400
+ _c = [{}];
401
+ return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
402
+ case 3:
403
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
404
+ return [3, 9];
405
+ case 4:
406
+ _d = [{}];
407
+ return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
408
+ case 5:
409
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
410
+ return [3, 9];
411
+ case 6:
412
+ _e = [{}];
413
+ return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
414
+ case 7:
415
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
416
+ return [3, 9];
417
+ case 8:
418
+ parsedBody = parsedOutput.body;
419
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
420
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
421
+ _g.label = 9;
422
+ case 9:
423
+ message = response.message || response.Message || errorCode;
424
+ response.message = message;
425
+ delete response.Message;
426
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
427
+ }
428
+ });
429
+ }); };
430
+ export var deserializeAws_json1_1ListAvailableResourceMetricsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
431
+ var data, contents, response;
432
+ return __generator(this, function (_a) {
433
+ switch (_a.label) {
434
+ case 0:
435
+ if (output.statusCode >= 300) {
436
+ return [2, deserializeAws_json1_1ListAvailableResourceMetricsCommandError(output, context)];
437
+ }
438
+ return [4, parseBody(output.body, context)];
439
+ case 1:
440
+ data = _a.sent();
441
+ contents = {};
442
+ contents = deserializeAws_json1_1ListAvailableResourceMetricsResponse(data, context);
443
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
444
+ return [2, Promise.resolve(response)];
445
+ }
446
+ });
447
+ }); };
448
+ var deserializeAws_json1_1ListAvailableResourceMetricsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
449
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
450
+ var _f;
451
+ return __generator(this, function (_g) {
452
+ switch (_g.label) {
453
+ case 0:
454
+ _a = [__assign({}, output)];
455
+ _f = {};
456
+ return [4, parseBody(output.body, context)];
457
+ case 1:
458
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
459
+ errorCode = "UnknownError";
460
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
461
+ _b = errorCode;
462
+ switch (_b) {
463
+ case "InternalServiceError": return [3, 2];
464
+ case "com.amazonaws.pi#InternalServiceError": return [3, 2];
465
+ case "InvalidArgumentException": return [3, 4];
466
+ case "com.amazonaws.pi#InvalidArgumentException": return [3, 4];
467
+ case "NotAuthorizedException": return [3, 6];
468
+ case "com.amazonaws.pi#NotAuthorizedException": return [3, 6];
469
+ }
470
+ return [3, 8];
471
+ case 2:
472
+ _c = [{}];
473
+ return [4, deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)];
474
+ case 3:
475
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
476
+ return [3, 9];
477
+ case 4:
478
+ _d = [{}];
479
+ return [4, deserializeAws_json1_1InvalidArgumentExceptionResponse(parsedOutput, context)];
480
+ case 5:
481
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
482
+ return [3, 9];
483
+ case 6:
484
+ _e = [{}];
485
+ return [4, deserializeAws_json1_1NotAuthorizedExceptionResponse(parsedOutput, context)];
486
+ case 7:
487
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
488
+ return [3, 9];
489
+ case 8:
490
+ parsedBody = parsedOutput.body;
491
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
492
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
493
+ _g.label = 9;
494
+ case 9:
495
+ message = response.message || response.Message || errorCode;
496
+ response.message = message;
497
+ delete response.Message;
498
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
499
+ }
500
+ });
501
+ }); };
253
502
  var deserializeAws_json1_1InternalServiceErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
254
503
  var body, deserialized, contents;
255
504
  return __generator(this, function (_a) {
@@ -277,8 +526,21 @@ var deserializeAws_json1_1NotAuthorizedExceptionResponse = function (parsedOutpu
277
526
  return [2, contents];
278
527
  });
279
528
  }); };
529
+ var serializeAws_json1_1AdditionalMetricsList = function (input, context) {
530
+ return input
531
+ .filter(function (e) { return e != null; })
532
+ .map(function (entry) {
533
+ if (entry === null) {
534
+ return null;
535
+ }
536
+ return entry;
537
+ });
538
+ };
280
539
  var serializeAws_json1_1DescribeDimensionKeysRequest = function (input, context) {
281
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EndTime !== undefined &&
540
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AdditionalMetrics !== undefined &&
541
+ input.AdditionalMetrics !== null && {
542
+ AdditionalMetrics: serializeAws_json1_1AdditionalMetricsList(input.AdditionalMetrics, context),
543
+ })), (input.EndTime !== undefined &&
282
544
  input.EndTime !== null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.Filter !== undefined &&
283
545
  input.Filter !== null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) })), (input.GroupBy !== undefined &&
284
546
  input.GroupBy !== null && { GroupBy: serializeAws_json1_1DimensionGroup(input.GroupBy, context) })), (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.Metric !== undefined && input.Metric !== null && { Metric: input.Metric })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.PartitionBy !== undefined &&
@@ -290,6 +552,16 @@ var serializeAws_json1_1DimensionGroup = function (input, context) {
290
552
  return __assign(__assign(__assign({}, (input.Dimensions !== undefined &&
291
553
  input.Dimensions !== null && { Dimensions: serializeAws_json1_1RequestStringList(input.Dimensions, context) })), (input.Group !== undefined && input.Group !== null && { Group: input.Group })), (input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit }));
292
554
  };
555
+ var serializeAws_json1_1DimensionsMetricList = function (input, context) {
556
+ return input
557
+ .filter(function (e) { return e != null; })
558
+ .map(function (entry) {
559
+ if (entry === null) {
560
+ return null;
561
+ }
562
+ return entry;
563
+ });
564
+ };
293
565
  var serializeAws_json1_1GetDimensionKeyDetailsRequest = function (input, context) {
294
566
  return __assign(__assign(__assign(__assign(__assign({}, (input.Group !== undefined && input.Group !== null && { Group: input.Group })), (input.GroupIdentifier !== undefined &&
295
567
  input.GroupIdentifier !== null && { GroupIdentifier: input.GroupIdentifier })), (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.RequestedDimensions !== undefined &&
@@ -297,6 +569,9 @@ var serializeAws_json1_1GetDimensionKeyDetailsRequest = function (input, context
297
569
  RequestedDimensions: serializeAws_json1_1RequestedDimensionList(input.RequestedDimensions, context),
298
570
  })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
299
571
  };
572
+ var serializeAws_json1_1GetResourceMetadataRequest = function (input, context) {
573
+ return __assign(__assign({}, (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
574
+ };
300
575
  var serializeAws_json1_1GetResourceMetricsRequest = function (input, context) {
301
576
  return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.EndTime !== undefined &&
302
577
  input.EndTime !== null && { EndTime: Math.round(input.EndTime.getTime() / 1000) })), (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.MetricQueries !== undefined &&
@@ -306,6 +581,14 @@ var serializeAws_json1_1GetResourceMetricsRequest = function (input, context) {
306
581
  input.PeriodInSeconds !== null && { PeriodInSeconds: input.PeriodInSeconds })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType })), (input.StartTime !== undefined &&
307
582
  input.StartTime !== null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }));
308
583
  };
584
+ var serializeAws_json1_1ListAvailableResourceDimensionsRequest = function (input, context) {
585
+ return __assign(__assign(__assign(__assign(__assign({}, (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.Metrics !== undefined &&
586
+ input.Metrics !== null && { Metrics: serializeAws_json1_1DimensionsMetricList(input.Metrics, context) })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
587
+ };
588
+ var serializeAws_json1_1ListAvailableResourceMetricsRequest = function (input, context) {
589
+ return __assign(__assign(__assign(__assign(__assign({}, (input.Identifier !== undefined && input.Identifier !== null && { Identifier: input.Identifier })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.MetricTypes !== undefined &&
590
+ input.MetricTypes !== null && { MetricTypes: serializeAws_json1_1MetricTypeList(input.MetricTypes, context) })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.ServiceType !== undefined && input.ServiceType !== null && { ServiceType: input.ServiceType }));
591
+ };
309
592
  var serializeAws_json1_1MetricQuery = function (input, context) {
310
593
  return __assign(__assign(__assign({}, (input.Filter !== undefined &&
311
594
  input.Filter !== null && { Filter: serializeAws_json1_1MetricQueryFilterMap(input.Filter, context) })), (input.GroupBy !== undefined &&
@@ -331,6 +614,16 @@ var serializeAws_json1_1MetricQueryList = function (input, context) {
331
614
  return serializeAws_json1_1MetricQuery(entry, context);
332
615
  });
333
616
  };
617
+ var serializeAws_json1_1MetricTypeList = function (input, context) {
618
+ return input
619
+ .filter(function (e) { return e != null; })
620
+ .map(function (entry) {
621
+ if (entry === null) {
622
+ return null;
623
+ }
624
+ return entry;
625
+ });
626
+ };
334
627
  var serializeAws_json1_1RequestedDimensionList = function (input, context) {
335
628
  return input
336
629
  .filter(function (e) { return e != null; })
@@ -351,6 +644,16 @@ var serializeAws_json1_1RequestStringList = function (input, context) {
351
644
  return entry;
352
645
  });
353
646
  };
647
+ var deserializeAws_json1_1AdditionalMetricsMap = function (output, context) {
648
+ return Object.entries(output).reduce(function (acc, _a) {
649
+ var _b;
650
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
651
+ if (value === null) {
652
+ return acc;
653
+ }
654
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = __limitedParseDouble(value), _b));
655
+ }, {});
656
+ };
354
657
  var deserializeAws_json1_1DataPoint = function (output, context) {
355
658
  return {
356
659
  Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
@@ -386,8 +689,44 @@ var deserializeAws_json1_1DescribeDimensionKeysResponse = function (output, cont
386
689
  : undefined,
387
690
  };
388
691
  };
692
+ var deserializeAws_json1_1DimensionDetail = function (output, context) {
693
+ return {
694
+ Identifier: __expectString(output.Identifier),
695
+ };
696
+ };
697
+ var deserializeAws_json1_1DimensionDetailList = function (output, context) {
698
+ return (output || [])
699
+ .filter(function (e) { return e != null; })
700
+ .map(function (entry) {
701
+ if (entry === null) {
702
+ return null;
703
+ }
704
+ return deserializeAws_json1_1DimensionDetail(entry, context);
705
+ });
706
+ };
707
+ var deserializeAws_json1_1DimensionGroupDetail = function (output, context) {
708
+ return {
709
+ Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
710
+ ? deserializeAws_json1_1DimensionDetailList(output.Dimensions, context)
711
+ : undefined,
712
+ Group: __expectString(output.Group),
713
+ };
714
+ };
715
+ var deserializeAws_json1_1DimensionGroupDetailList = function (output, context) {
716
+ return (output || [])
717
+ .filter(function (e) { return e != null; })
718
+ .map(function (entry) {
719
+ if (entry === null) {
720
+ return null;
721
+ }
722
+ return deserializeAws_json1_1DimensionGroupDetail(entry, context);
723
+ });
724
+ };
389
725
  var deserializeAws_json1_1DimensionKeyDescription = function (output, context) {
390
726
  return {
727
+ AdditionalMetrics: output.AdditionalMetrics !== undefined && output.AdditionalMetrics !== null
728
+ ? deserializeAws_json1_1AdditionalMetricsMap(output.AdditionalMetrics, context)
729
+ : undefined,
391
730
  Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
392
731
  ? deserializeAws_json1_1DimensionMap(output.Dimensions, context)
393
732
  : undefined,
@@ -434,6 +773,21 @@ var deserializeAws_json1_1DimensionMap = function (output, context) {
434
773
  return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
435
774
  }, {});
436
775
  };
776
+ var deserializeAws_json1_1FeatureMetadata = function (output, context) {
777
+ return {
778
+ Status: __expectString(output.Status),
779
+ };
780
+ };
781
+ var deserializeAws_json1_1FeatureMetadataMap = function (output, context) {
782
+ return Object.entries(output).reduce(function (acc, _a) {
783
+ var _b;
784
+ var _c = __read(_a, 2), key = _c[0], value = _c[1];
785
+ if (value === null) {
786
+ return acc;
787
+ }
788
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1FeatureMetadata(value, context), _b));
789
+ }, {});
790
+ };
437
791
  var deserializeAws_json1_1GetDimensionKeyDetailsResponse = function (output, context) {
438
792
  return {
439
793
  Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
@@ -441,6 +795,14 @@ var deserializeAws_json1_1GetDimensionKeyDetailsResponse = function (output, con
441
795
  : undefined,
442
796
  };
443
797
  };
798
+ var deserializeAws_json1_1GetResourceMetadataResponse = function (output, context) {
799
+ return {
800
+ Features: output.Features !== undefined && output.Features !== null
801
+ ? deserializeAws_json1_1FeatureMetadataMap(output.Features, context)
802
+ : undefined,
803
+ Identifier: __expectString(output.Identifier),
804
+ };
805
+ };
444
806
  var deserializeAws_json1_1GetResourceMetricsResponse = function (output, context) {
445
807
  return {
446
808
  AlignedEndTime: output.AlignedEndTime !== undefined && output.AlignedEndTime !== null
@@ -466,6 +828,40 @@ var deserializeAws_json1_1InvalidArgumentException = function (output, context)
466
828
  Message: __expectString(output.Message),
467
829
  };
468
830
  };
831
+ var deserializeAws_json1_1ListAvailableResourceDimensionsResponse = function (output, context) {
832
+ return {
833
+ MetricDimensions: output.MetricDimensions !== undefined && output.MetricDimensions !== null
834
+ ? deserializeAws_json1_1MetricDimensionsList(output.MetricDimensions, context)
835
+ : undefined,
836
+ NextToken: __expectString(output.NextToken),
837
+ };
838
+ };
839
+ var deserializeAws_json1_1ListAvailableResourceMetricsResponse = function (output, context) {
840
+ return {
841
+ Metrics: output.Metrics !== undefined && output.Metrics !== null
842
+ ? deserializeAws_json1_1ResponseResourceMetricList(output.Metrics, context)
843
+ : undefined,
844
+ NextToken: __expectString(output.NextToken),
845
+ };
846
+ };
847
+ var deserializeAws_json1_1MetricDimensionGroups = function (output, context) {
848
+ return {
849
+ Groups: output.Groups !== undefined && output.Groups !== null
850
+ ? deserializeAws_json1_1DimensionGroupDetailList(output.Groups, context)
851
+ : undefined,
852
+ Metric: __expectString(output.Metric),
853
+ };
854
+ };
855
+ var deserializeAws_json1_1MetricDimensionsList = function (output, context) {
856
+ return (output || [])
857
+ .filter(function (e) { return e != null; })
858
+ .map(function (entry) {
859
+ if (entry === null) {
860
+ return null;
861
+ }
862
+ return deserializeAws_json1_1MetricDimensionGroups(entry, context);
863
+ });
864
+ };
469
865
  var deserializeAws_json1_1MetricKeyDataPoints = function (output, context) {
470
866
  return {
471
867
  DataPoints: output.DataPoints !== undefined && output.DataPoints !== null
@@ -518,6 +914,13 @@ var deserializeAws_json1_1ResponsePartitionKeyList = function (output, context)
518
914
  return deserializeAws_json1_1ResponsePartitionKey(entry, context);
519
915
  });
520
916
  };
917
+ var deserializeAws_json1_1ResponseResourceMetric = function (output, context) {
918
+ return {
919
+ Description: __expectString(output.Description),
920
+ Metric: __expectString(output.Metric),
921
+ Unit: __expectString(output.Unit),
922
+ };
923
+ };
521
924
  var deserializeAws_json1_1ResponseResourceMetricKey = function (output, context) {
522
925
  return {
523
926
  Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
@@ -526,6 +929,16 @@ var deserializeAws_json1_1ResponseResourceMetricKey = function (output, context)
526
929
  Metric: __expectString(output.Metric),
527
930
  };
528
931
  };
932
+ var deserializeAws_json1_1ResponseResourceMetricList = function (output, context) {
933
+ return (output || [])
934
+ .filter(function (e) { return e != null; })
935
+ .map(function (entry) {
936
+ if (entry === null) {
937
+ return null;
938
+ }
939
+ return deserializeAws_json1_1ResponseResourceMetric(entry, context);
940
+ });
941
+ };
529
942
  var deserializeMetadata = function (output) {
530
943
  var _a;
531
944
  return ({
@@ -1,36 +1,44 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
2
  import { DescribeDimensionKeysCommandInput, DescribeDimensionKeysCommandOutput } from "./commands/DescribeDimensionKeysCommand";
3
3
  import { GetDimensionKeyDetailsCommandInput, GetDimensionKeyDetailsCommandOutput } from "./commands/GetDimensionKeyDetailsCommand";
4
+ import { GetResourceMetadataCommandInput, GetResourceMetadataCommandOutput } from "./commands/GetResourceMetadataCommand";
4
5
  import { GetResourceMetricsCommandInput, GetResourceMetricsCommandOutput } from "./commands/GetResourceMetricsCommand";
6
+ import { ListAvailableResourceDimensionsCommandInput, ListAvailableResourceDimensionsCommandOutput } from "./commands/ListAvailableResourceDimensionsCommand";
7
+ import { ListAvailableResourceMetricsCommandInput, ListAvailableResourceMetricsCommandOutput } from "./commands/ListAvailableResourceMetricsCommand";
5
8
  import { PIClient } from "./PIClient";
6
9
  /**
7
10
  * <fullname>Amazon RDS Performance Insights</fullname>
8
11
  *
9
- * <p>Amazon RDS Performance Insights enables you to monitor and explore different dimensions of
10
- * database load based on data captured from a running DB instance. The guide provides detailed
11
- * information about Performance Insights data types, parameters and errors.</p>
12
+ * <p>Amazon RDS Performance Insights enables you to monitor and explore different dimensions of database load based on
13
+ * data captured from a running DB instance. The guide provides detailed information about Performance Insights
14
+ * data types, parameters and errors.
15
+ * </p>
12
16
  *
13
- * <p>When Performance Insights is enabled, the Amazon RDS Performance Insights API provides visibility into the performance of your DB instance. Amazon
14
- * CloudWatch provides the authoritative source for AWS service-vended monitoring metrics. Performance Insights offers a domain-specific
15
- * view of DB load. </p>
16
- * <p>DB load is measured as Average Active Sessions. Performance Insights provides the data to API consumers as a two-dimensional
17
- * time-series dataset. The time dimension provides DB load data for each time point in the queried time range. Each time
18
- * point decomposes overall load in relation to the requested dimensions, measured at that time point. Examples include
19
- * SQL, Wait event, User, and Host.</p>
17
+ * <p>When Performance Insights is enabled, the Amazon RDS Performance Insights API provides visibility into the performance of your DB instance.
18
+ * Amazon CloudWatch provides the authoritative source for Amazon Web Services service-vended monitoring metrics.
19
+ * Performance Insights offers a domain-specific view of DB load.
20
+ * </p>
21
+ * <p>DB load is measured as average active sessions. Performance Insights provides the data to API consumers as a two-dimensional
22
+ * time-series dataset. The time dimension provides DB load data for each time point in the
23
+ * queried time range. Each time point decomposes overall load in relation to the requested dimensions,
24
+ * measured at that time point. Examples include SQL, Wait event, User, and Host.
25
+ * </p>
20
26
  *
21
27
  * <ul>
22
28
  * <li>
23
- * <p>To learn more about Performance Insights and Amazon Aurora DB instances, go to the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights.html">Amazon Aurora User Guide</a>.</p>
29
+ * <p>To learn more about Performance Insights and Amazon Aurora DB instances, go to the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights.html"> Amazon Aurora User Guide</a>.
30
+ * </p>
24
31
  * </li>
25
32
  * <li>
26
- * <p>To learn more about Performance Insights and Amazon RDS DB instances, go to the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html">Amazon RDS User Guide</a>.</p>
33
+ * <p>To learn more about Performance Insights and Amazon RDS DB instances, go to the <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html"> Amazon RDS User Guide</a>.
34
+ * </p>
27
35
  * </li>
28
36
  * </ul>
29
37
  */
30
38
  export declare class PI extends PIClient {
31
39
  /**
32
- * <p>For a specific time period, retrieve the top <code>N</code> dimension keys for a
33
- * metric.</p>
40
+ * <p>For a specific time period, retrieve the top <code>N</code> dimension keys for a metric.
41
+ * </p>
34
42
  * <note>
35
43
  * <p>Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements,
36
44
  * only the first 500 bytes are returned.</p>
@@ -40,14 +48,23 @@ export declare class PI extends PIClient {
40
48
  describeDimensionKeys(args: DescribeDimensionKeysCommandInput, cb: (err: any, data?: DescribeDimensionKeysCommandOutput) => void): void;
41
49
  describeDimensionKeys(args: DescribeDimensionKeysCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeDimensionKeysCommandOutput) => void): void;
42
50
  /**
43
- * <p>Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a
44
- * SQL ID, <code>GetDimensionKeyDetails</code> retrieves the full text of the dimension <code>db.sql.statement</code>
45
- * associated with this ID. This operation is useful because <code>GetResourceMetrics</code> and
46
- * <code>DescribeDimensionKeys</code> don't support retrieval of large SQL statement text.</p>
51
+ * <p>Get the attributes of the specified dimension group for a DB instance or data source.
52
+ * For example, if you specify a SQL ID, <code>GetDimensionKeyDetails</code> retrieves
53
+ * the full text of the dimension <code>db.sql.statement</code>cassociated with this ID.
54
+ * This operation is useful because <code>GetResourceMetrics</code> and <code>DescribeDimensionKeys</code>
55
+ * don't support retrieval of large SQL statement text.</p>
47
56
  */
48
57
  getDimensionKeyDetails(args: GetDimensionKeyDetailsCommandInput, options?: __HttpHandlerOptions): Promise<GetDimensionKeyDetailsCommandOutput>;
49
58
  getDimensionKeyDetails(args: GetDimensionKeyDetailsCommandInput, cb: (err: any, data?: GetDimensionKeyDetailsCommandOutput) => void): void;
50
59
  getDimensionKeyDetails(args: GetDimensionKeyDetailsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDimensionKeyDetailsCommandOutput) => void): void;
60
+ /**
61
+ * <p>Retrieve the metadata for different features. For example, the metadata might indicate
62
+ * that a feature is turned on or off on a specific DB instance.
63
+ * </p>
64
+ */
65
+ getResourceMetadata(args: GetResourceMetadataCommandInput, options?: __HttpHandlerOptions): Promise<GetResourceMetadataCommandOutput>;
66
+ getResourceMetadata(args: GetResourceMetadataCommandInput, cb: (err: any, data?: GetResourceMetadataCommandOutput) => void): void;
67
+ getResourceMetadata(args: GetResourceMetadataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetResourceMetadataCommandOutput) => void): void;
51
68
  /**
52
69
  * <p>Retrieve Performance Insights metrics for a set of data sources, over a time period. You can provide
53
70
  * specific dimension groups and dimensions, and provide aggregation and filtering criteria for
@@ -60,4 +77,17 @@ export declare class PI extends PIClient {
60
77
  getResourceMetrics(args: GetResourceMetricsCommandInput, options?: __HttpHandlerOptions): Promise<GetResourceMetricsCommandOutput>;
61
78
  getResourceMetrics(args: GetResourceMetricsCommandInput, cb: (err: any, data?: GetResourceMetricsCommandOutput) => void): void;
62
79
  getResourceMetrics(args: GetResourceMetricsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetResourceMetricsCommandOutput) => void): void;
80
+ /**
81
+ * <p>Retrieve the dimensions that can be queried for each specified metric type on a specified DB instance.</p>
82
+ */
83
+ listAvailableResourceDimensions(args: ListAvailableResourceDimensionsCommandInput, options?: __HttpHandlerOptions): Promise<ListAvailableResourceDimensionsCommandOutput>;
84
+ listAvailableResourceDimensions(args: ListAvailableResourceDimensionsCommandInput, cb: (err: any, data?: ListAvailableResourceDimensionsCommandOutput) => void): void;
85
+ listAvailableResourceDimensions(args: ListAvailableResourceDimensionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAvailableResourceDimensionsCommandOutput) => void): void;
86
+ /**
87
+ * <p>Retrieve metrics of the specified types that can be queried for a specified DB instance.
88
+ * </p>
89
+ */
90
+ listAvailableResourceMetrics(args: ListAvailableResourceMetricsCommandInput, options?: __HttpHandlerOptions): Promise<ListAvailableResourceMetricsCommandOutput>;
91
+ listAvailableResourceMetrics(args: ListAvailableResourceMetricsCommandInput, cb: (err: any, data?: ListAvailableResourceMetricsCommandOutput) => void): void;
92
+ listAvailableResourceMetrics(args: ListAvailableResourceMetricsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAvailableResourceMetricsCommandOutput) => void): void;
63
93
  }