@aws-sdk/client-pi 3.312.0 → 3.316.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/dist-cjs/PI.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PI = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const DescribeDimensionKeysCommand_1 = require("./commands/DescribeDimensionKeysCommand");
5
6
  const GetDimensionKeyDetailsCommand_1 = require("./commands/GetDimensionKeyDetailsCommand");
6
7
  const GetResourceMetadataCommand_1 = require("./commands/GetResourceMetadataCommand");
@@ -8,90 +9,15 @@ const GetResourceMetricsCommand_1 = require("./commands/GetResourceMetricsComman
8
9
  const ListAvailableResourceDimensionsCommand_1 = require("./commands/ListAvailableResourceDimensionsCommand");
9
10
  const ListAvailableResourceMetricsCommand_1 = require("./commands/ListAvailableResourceMetricsCommand");
10
11
  const PIClient_1 = require("./PIClient");
12
+ const commands = {
13
+ DescribeDimensionKeysCommand: DescribeDimensionKeysCommand_1.DescribeDimensionKeysCommand,
14
+ GetDimensionKeyDetailsCommand: GetDimensionKeyDetailsCommand_1.GetDimensionKeyDetailsCommand,
15
+ GetResourceMetadataCommand: GetResourceMetadataCommand_1.GetResourceMetadataCommand,
16
+ GetResourceMetricsCommand: GetResourceMetricsCommand_1.GetResourceMetricsCommand,
17
+ ListAvailableResourceDimensionsCommand: ListAvailableResourceDimensionsCommand_1.ListAvailableResourceDimensionsCommand,
18
+ ListAvailableResourceMetricsCommand: ListAvailableResourceMetricsCommand_1.ListAvailableResourceMetricsCommand,
19
+ };
11
20
  class PI extends PIClient_1.PIClient {
12
- describeDimensionKeys(args, optionsOrCb, cb) {
13
- const command = new DescribeDimensionKeysCommand_1.DescribeDimensionKeysCommand(args);
14
- if (typeof optionsOrCb === "function") {
15
- this.send(command, optionsOrCb);
16
- }
17
- else if (typeof cb === "function") {
18
- if (typeof optionsOrCb !== "object")
19
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
20
- this.send(command, optionsOrCb || {}, cb);
21
- }
22
- else {
23
- return this.send(command, optionsOrCb);
24
- }
25
- }
26
- getDimensionKeyDetails(args, optionsOrCb, cb) {
27
- const command = new GetDimensionKeyDetailsCommand_1.GetDimensionKeyDetailsCommand(args);
28
- if (typeof optionsOrCb === "function") {
29
- this.send(command, optionsOrCb);
30
- }
31
- else if (typeof cb === "function") {
32
- if (typeof optionsOrCb !== "object")
33
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
34
- this.send(command, optionsOrCb || {}, cb);
35
- }
36
- else {
37
- return this.send(command, optionsOrCb);
38
- }
39
- }
40
- getResourceMetadata(args, optionsOrCb, cb) {
41
- const command = new GetResourceMetadataCommand_1.GetResourceMetadataCommand(args);
42
- if (typeof optionsOrCb === "function") {
43
- this.send(command, optionsOrCb);
44
- }
45
- else if (typeof cb === "function") {
46
- if (typeof optionsOrCb !== "object")
47
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
48
- this.send(command, optionsOrCb || {}, cb);
49
- }
50
- else {
51
- return this.send(command, optionsOrCb);
52
- }
53
- }
54
- getResourceMetrics(args, optionsOrCb, cb) {
55
- const command = new GetResourceMetricsCommand_1.GetResourceMetricsCommand(args);
56
- if (typeof optionsOrCb === "function") {
57
- this.send(command, optionsOrCb);
58
- }
59
- else if (typeof cb === "function") {
60
- if (typeof optionsOrCb !== "object")
61
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
62
- this.send(command, optionsOrCb || {}, cb);
63
- }
64
- else {
65
- return this.send(command, optionsOrCb);
66
- }
67
- }
68
- listAvailableResourceDimensions(args, optionsOrCb, cb) {
69
- const command = new ListAvailableResourceDimensionsCommand_1.ListAvailableResourceDimensionsCommand(args);
70
- if (typeof optionsOrCb === "function") {
71
- this.send(command, optionsOrCb);
72
- }
73
- else if (typeof cb === "function") {
74
- if (typeof optionsOrCb !== "object")
75
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
76
- this.send(command, optionsOrCb || {}, cb);
77
- }
78
- else {
79
- return this.send(command, optionsOrCb);
80
- }
81
- }
82
- listAvailableResourceMetrics(args, optionsOrCb, cb) {
83
- const command = new ListAvailableResourceMetricsCommand_1.ListAvailableResourceMetricsCommand(args);
84
- if (typeof optionsOrCb === "function") {
85
- this.send(command, optionsOrCb);
86
- }
87
- else if (typeof cb === "function") {
88
- if (typeof optionsOrCb !== "object")
89
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
90
- this.send(command, optionsOrCb || {}, cb);
91
- }
92
- else {
93
- return this.send(command, optionsOrCb);
94
- }
95
- }
96
21
  }
97
22
  exports.PI = PI;
23
+ (0, smithy_client_1.createAggregatedClient)(commands, PI);