@aws-sdk/client-cloudwatch 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.
Files changed (61) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist-es/CloudWatch.js +154 -161
  3. package/dist-es/CloudWatchClient.js +22 -28
  4. package/dist-es/commands/DeleteAlarmsCommand.js +22 -29
  5. package/dist-es/commands/DeleteAnomalyDetectorCommand.js +21 -28
  6. package/dist-es/commands/DeleteDashboardsCommand.js +21 -28
  7. package/dist-es/commands/DeleteInsightRulesCommand.js +21 -28
  8. package/dist-es/commands/DeleteMetricStreamCommand.js +21 -28
  9. package/dist-es/commands/DescribeAlarmHistoryCommand.js +21 -28
  10. package/dist-es/commands/DescribeAlarmsCommand.js +21 -28
  11. package/dist-es/commands/DescribeAlarmsForMetricCommand.js +21 -28
  12. package/dist-es/commands/DescribeAnomalyDetectorsCommand.js +21 -28
  13. package/dist-es/commands/DescribeInsightRulesCommand.js +21 -28
  14. package/dist-es/commands/DisableAlarmActionsCommand.js +22 -29
  15. package/dist-es/commands/DisableInsightRulesCommand.js +21 -28
  16. package/dist-es/commands/EnableAlarmActionsCommand.js +22 -29
  17. package/dist-es/commands/EnableInsightRulesCommand.js +21 -28
  18. package/dist-es/commands/GetDashboardCommand.js +21 -28
  19. package/dist-es/commands/GetInsightRuleReportCommand.js +21 -28
  20. package/dist-es/commands/GetMetricDataCommand.js +21 -28
  21. package/dist-es/commands/GetMetricStatisticsCommand.js +21 -28
  22. package/dist-es/commands/GetMetricStreamCommand.js +21 -28
  23. package/dist-es/commands/GetMetricWidgetImageCommand.js +21 -28
  24. package/dist-es/commands/ListDashboardsCommand.js +21 -28
  25. package/dist-es/commands/ListManagedInsightRulesCommand.js +21 -28
  26. package/dist-es/commands/ListMetricStreamsCommand.js +21 -28
  27. package/dist-es/commands/ListMetricsCommand.js +21 -28
  28. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  29. package/dist-es/commands/PutAnomalyDetectorCommand.js +21 -28
  30. package/dist-es/commands/PutCompositeAlarmCommand.js +22 -29
  31. package/dist-es/commands/PutDashboardCommand.js +21 -28
  32. package/dist-es/commands/PutInsightRuleCommand.js +21 -28
  33. package/dist-es/commands/PutManagedInsightRulesCommand.js +21 -28
  34. package/dist-es/commands/PutMetricAlarmCommand.js +22 -29
  35. package/dist-es/commands/PutMetricDataCommand.js +22 -29
  36. package/dist-es/commands/PutMetricStreamCommand.js +21 -28
  37. package/dist-es/commands/SetAlarmStateCommand.js +22 -29
  38. package/dist-es/commands/StartMetricStreamsCommand.js +21 -28
  39. package/dist-es/commands/StopMetricStreamsCommand.js +21 -28
  40. package/dist-es/commands/TagResourceCommand.js +21 -28
  41. package/dist-es/commands/UntagResourceCommand.js +21 -28
  42. package/dist-es/endpoints.js +8 -8
  43. package/dist-es/models/CloudWatchServiceException.js +5 -10
  44. package/dist-es/models/models_0.js +459 -254
  45. package/dist-es/pagination/DescribeAlarmHistoryPaginator.js +25 -68
  46. package/dist-es/pagination/DescribeAlarmsPaginator.js +25 -68
  47. package/dist-es/pagination/DescribeAnomalyDetectorsPaginator.js +25 -68
  48. package/dist-es/pagination/DescribeInsightRulesPaginator.js +25 -68
  49. package/dist-es/pagination/GetMetricDataPaginator.js +25 -68
  50. package/dist-es/pagination/ListDashboardsPaginator.js +24 -67
  51. package/dist-es/pagination/ListManagedInsightRulesPaginator.js +25 -68
  52. package/dist-es/pagination/ListMetricStreamsPaginator.js +25 -68
  53. package/dist-es/pagination/ListMetricsPaginator.js +24 -67
  54. package/dist-es/protocols/Aws_query.js +2741 -3777
  55. package/dist-es/runtimeConfig.browser.js +26 -12
  56. package/dist-es/runtimeConfig.js +30 -12
  57. package/dist-es/runtimeConfig.native.js +8 -5
  58. package/dist-es/runtimeConfig.shared.js +8 -11
  59. package/dist-es/waiters/waitForAlarmExists.js +29 -49
  60. package/dist-es/waiters/waitForCompositeAlarmExists.js +29 -49
  61. package/package.json +34 -34
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CloudWatchClient } from "./CloudWatchClient";
3
2
  import { DeleteAlarmsCommand, } from "./commands/DeleteAlarmsCommand";
4
3
  import { DeleteAnomalyDetectorCommand, } from "./commands/DeleteAnomalyDetectorCommand";
@@ -38,543 +37,537 @@ import { StartMetricStreamsCommand, } from "./commands/StartMetricStreamsCommand
38
37
  import { StopMetricStreamsCommand, } from "./commands/StopMetricStreamsCommand";
39
38
  import { TagResourceCommand } from "./commands/TagResourceCommand";
40
39
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
41
- var CloudWatch = (function (_super) {
42
- __extends(CloudWatch, _super);
43
- function CloudWatch() {
44
- return _super !== null && _super.apply(this, arguments) || this;
45
- }
46
- CloudWatch.prototype.deleteAlarms = function (args, optionsOrCb, cb) {
47
- var command = new DeleteAlarmsCommand(args);
40
+ export class CloudWatch extends CloudWatchClient {
41
+ deleteAlarms(args, optionsOrCb, cb) {
42
+ const command = new DeleteAlarmsCommand(args);
48
43
  if (typeof optionsOrCb === "function") {
49
44
  this.send(command, optionsOrCb);
50
45
  }
51
46
  else if (typeof cb === "function") {
52
47
  if (typeof optionsOrCb !== "object")
53
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
48
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
54
49
  this.send(command, optionsOrCb || {}, cb);
55
50
  }
56
51
  else {
57
52
  return this.send(command, optionsOrCb);
58
53
  }
59
- };
60
- CloudWatch.prototype.deleteAnomalyDetector = function (args, optionsOrCb, cb) {
61
- var command = new DeleteAnomalyDetectorCommand(args);
54
+ }
55
+ deleteAnomalyDetector(args, optionsOrCb, cb) {
56
+ const command = new DeleteAnomalyDetectorCommand(args);
62
57
  if (typeof optionsOrCb === "function") {
63
58
  this.send(command, optionsOrCb);
64
59
  }
65
60
  else if (typeof cb === "function") {
66
61
  if (typeof optionsOrCb !== "object")
67
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
62
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
68
63
  this.send(command, optionsOrCb || {}, cb);
69
64
  }
70
65
  else {
71
66
  return this.send(command, optionsOrCb);
72
67
  }
73
- };
74
- CloudWatch.prototype.deleteDashboards = function (args, optionsOrCb, cb) {
75
- var command = new DeleteDashboardsCommand(args);
68
+ }
69
+ deleteDashboards(args, optionsOrCb, cb) {
70
+ const command = new DeleteDashboardsCommand(args);
76
71
  if (typeof optionsOrCb === "function") {
77
72
  this.send(command, optionsOrCb);
78
73
  }
79
74
  else if (typeof cb === "function") {
80
75
  if (typeof optionsOrCb !== "object")
81
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
76
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
82
77
  this.send(command, optionsOrCb || {}, cb);
83
78
  }
84
79
  else {
85
80
  return this.send(command, optionsOrCb);
86
81
  }
87
- };
88
- CloudWatch.prototype.deleteInsightRules = function (args, optionsOrCb, cb) {
89
- var command = new DeleteInsightRulesCommand(args);
82
+ }
83
+ deleteInsightRules(args, optionsOrCb, cb) {
84
+ const command = new DeleteInsightRulesCommand(args);
90
85
  if (typeof optionsOrCb === "function") {
91
86
  this.send(command, optionsOrCb);
92
87
  }
93
88
  else if (typeof cb === "function") {
94
89
  if (typeof optionsOrCb !== "object")
95
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
90
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
96
91
  this.send(command, optionsOrCb || {}, cb);
97
92
  }
98
93
  else {
99
94
  return this.send(command, optionsOrCb);
100
95
  }
101
- };
102
- CloudWatch.prototype.deleteMetricStream = function (args, optionsOrCb, cb) {
103
- var command = new DeleteMetricStreamCommand(args);
96
+ }
97
+ deleteMetricStream(args, optionsOrCb, cb) {
98
+ const command = new DeleteMetricStreamCommand(args);
104
99
  if (typeof optionsOrCb === "function") {
105
100
  this.send(command, optionsOrCb);
106
101
  }
107
102
  else if (typeof cb === "function") {
108
103
  if (typeof optionsOrCb !== "object")
109
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
104
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
110
105
  this.send(command, optionsOrCb || {}, cb);
111
106
  }
112
107
  else {
113
108
  return this.send(command, optionsOrCb);
114
109
  }
115
- };
116
- CloudWatch.prototype.describeAlarmHistory = function (args, optionsOrCb, cb) {
117
- var command = new DescribeAlarmHistoryCommand(args);
110
+ }
111
+ describeAlarmHistory(args, optionsOrCb, cb) {
112
+ const command = new DescribeAlarmHistoryCommand(args);
118
113
  if (typeof optionsOrCb === "function") {
119
114
  this.send(command, optionsOrCb);
120
115
  }
121
116
  else if (typeof cb === "function") {
122
117
  if (typeof optionsOrCb !== "object")
123
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
118
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
124
119
  this.send(command, optionsOrCb || {}, cb);
125
120
  }
126
121
  else {
127
122
  return this.send(command, optionsOrCb);
128
123
  }
129
- };
130
- CloudWatch.prototype.describeAlarms = function (args, optionsOrCb, cb) {
131
- var command = new DescribeAlarmsCommand(args);
124
+ }
125
+ describeAlarms(args, optionsOrCb, cb) {
126
+ const command = new DescribeAlarmsCommand(args);
132
127
  if (typeof optionsOrCb === "function") {
133
128
  this.send(command, optionsOrCb);
134
129
  }
135
130
  else if (typeof cb === "function") {
136
131
  if (typeof optionsOrCb !== "object")
137
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
132
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
138
133
  this.send(command, optionsOrCb || {}, cb);
139
134
  }
140
135
  else {
141
136
  return this.send(command, optionsOrCb);
142
137
  }
143
- };
144
- CloudWatch.prototype.describeAlarmsForMetric = function (args, optionsOrCb, cb) {
145
- var command = new DescribeAlarmsForMetricCommand(args);
138
+ }
139
+ describeAlarmsForMetric(args, optionsOrCb, cb) {
140
+ const command = new DescribeAlarmsForMetricCommand(args);
146
141
  if (typeof optionsOrCb === "function") {
147
142
  this.send(command, optionsOrCb);
148
143
  }
149
144
  else if (typeof cb === "function") {
150
145
  if (typeof optionsOrCb !== "object")
151
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
146
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
152
147
  this.send(command, optionsOrCb || {}, cb);
153
148
  }
154
149
  else {
155
150
  return this.send(command, optionsOrCb);
156
151
  }
157
- };
158
- CloudWatch.prototype.describeAnomalyDetectors = function (args, optionsOrCb, cb) {
159
- var command = new DescribeAnomalyDetectorsCommand(args);
152
+ }
153
+ describeAnomalyDetectors(args, optionsOrCb, cb) {
154
+ const command = new DescribeAnomalyDetectorsCommand(args);
160
155
  if (typeof optionsOrCb === "function") {
161
156
  this.send(command, optionsOrCb);
162
157
  }
163
158
  else if (typeof cb === "function") {
164
159
  if (typeof optionsOrCb !== "object")
165
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
160
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
166
161
  this.send(command, optionsOrCb || {}, cb);
167
162
  }
168
163
  else {
169
164
  return this.send(command, optionsOrCb);
170
165
  }
171
- };
172
- CloudWatch.prototype.describeInsightRules = function (args, optionsOrCb, cb) {
173
- var command = new DescribeInsightRulesCommand(args);
166
+ }
167
+ describeInsightRules(args, optionsOrCb, cb) {
168
+ const command = new DescribeInsightRulesCommand(args);
174
169
  if (typeof optionsOrCb === "function") {
175
170
  this.send(command, optionsOrCb);
176
171
  }
177
172
  else if (typeof cb === "function") {
178
173
  if (typeof optionsOrCb !== "object")
179
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
174
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
180
175
  this.send(command, optionsOrCb || {}, cb);
181
176
  }
182
177
  else {
183
178
  return this.send(command, optionsOrCb);
184
179
  }
185
- };
186
- CloudWatch.prototype.disableAlarmActions = function (args, optionsOrCb, cb) {
187
- var command = new DisableAlarmActionsCommand(args);
180
+ }
181
+ disableAlarmActions(args, optionsOrCb, cb) {
182
+ const command = new DisableAlarmActionsCommand(args);
188
183
  if (typeof optionsOrCb === "function") {
189
184
  this.send(command, optionsOrCb);
190
185
  }
191
186
  else if (typeof cb === "function") {
192
187
  if (typeof optionsOrCb !== "object")
193
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
188
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
194
189
  this.send(command, optionsOrCb || {}, cb);
195
190
  }
196
191
  else {
197
192
  return this.send(command, optionsOrCb);
198
193
  }
199
- };
200
- CloudWatch.prototype.disableInsightRules = function (args, optionsOrCb, cb) {
201
- var command = new DisableInsightRulesCommand(args);
194
+ }
195
+ disableInsightRules(args, optionsOrCb, cb) {
196
+ const command = new DisableInsightRulesCommand(args);
202
197
  if (typeof optionsOrCb === "function") {
203
198
  this.send(command, optionsOrCb);
204
199
  }
205
200
  else if (typeof cb === "function") {
206
201
  if (typeof optionsOrCb !== "object")
207
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
202
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
208
203
  this.send(command, optionsOrCb || {}, cb);
209
204
  }
210
205
  else {
211
206
  return this.send(command, optionsOrCb);
212
207
  }
213
- };
214
- CloudWatch.prototype.enableAlarmActions = function (args, optionsOrCb, cb) {
215
- var command = new EnableAlarmActionsCommand(args);
208
+ }
209
+ enableAlarmActions(args, optionsOrCb, cb) {
210
+ const command = new EnableAlarmActionsCommand(args);
216
211
  if (typeof optionsOrCb === "function") {
217
212
  this.send(command, optionsOrCb);
218
213
  }
219
214
  else if (typeof cb === "function") {
220
215
  if (typeof optionsOrCb !== "object")
221
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
216
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
222
217
  this.send(command, optionsOrCb || {}, cb);
223
218
  }
224
219
  else {
225
220
  return this.send(command, optionsOrCb);
226
221
  }
227
- };
228
- CloudWatch.prototype.enableInsightRules = function (args, optionsOrCb, cb) {
229
- var command = new EnableInsightRulesCommand(args);
222
+ }
223
+ enableInsightRules(args, optionsOrCb, cb) {
224
+ const command = new EnableInsightRulesCommand(args);
230
225
  if (typeof optionsOrCb === "function") {
231
226
  this.send(command, optionsOrCb);
232
227
  }
233
228
  else if (typeof cb === "function") {
234
229
  if (typeof optionsOrCb !== "object")
235
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
230
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
236
231
  this.send(command, optionsOrCb || {}, cb);
237
232
  }
238
233
  else {
239
234
  return this.send(command, optionsOrCb);
240
235
  }
241
- };
242
- CloudWatch.prototype.getDashboard = function (args, optionsOrCb, cb) {
243
- var command = new GetDashboardCommand(args);
236
+ }
237
+ getDashboard(args, optionsOrCb, cb) {
238
+ const command = new GetDashboardCommand(args);
244
239
  if (typeof optionsOrCb === "function") {
245
240
  this.send(command, optionsOrCb);
246
241
  }
247
242
  else if (typeof cb === "function") {
248
243
  if (typeof optionsOrCb !== "object")
249
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
244
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
250
245
  this.send(command, optionsOrCb || {}, cb);
251
246
  }
252
247
  else {
253
248
  return this.send(command, optionsOrCb);
254
249
  }
255
- };
256
- CloudWatch.prototype.getInsightRuleReport = function (args, optionsOrCb, cb) {
257
- var command = new GetInsightRuleReportCommand(args);
250
+ }
251
+ getInsightRuleReport(args, optionsOrCb, cb) {
252
+ const command = new GetInsightRuleReportCommand(args);
258
253
  if (typeof optionsOrCb === "function") {
259
254
  this.send(command, optionsOrCb);
260
255
  }
261
256
  else if (typeof cb === "function") {
262
257
  if (typeof optionsOrCb !== "object")
263
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
258
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
264
259
  this.send(command, optionsOrCb || {}, cb);
265
260
  }
266
261
  else {
267
262
  return this.send(command, optionsOrCb);
268
263
  }
269
- };
270
- CloudWatch.prototype.getMetricData = function (args, optionsOrCb, cb) {
271
- var command = new GetMetricDataCommand(args);
264
+ }
265
+ getMetricData(args, optionsOrCb, cb) {
266
+ const command = new GetMetricDataCommand(args);
272
267
  if (typeof optionsOrCb === "function") {
273
268
  this.send(command, optionsOrCb);
274
269
  }
275
270
  else if (typeof cb === "function") {
276
271
  if (typeof optionsOrCb !== "object")
277
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
272
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
278
273
  this.send(command, optionsOrCb || {}, cb);
279
274
  }
280
275
  else {
281
276
  return this.send(command, optionsOrCb);
282
277
  }
283
- };
284
- CloudWatch.prototype.getMetricStatistics = function (args, optionsOrCb, cb) {
285
- var command = new GetMetricStatisticsCommand(args);
278
+ }
279
+ getMetricStatistics(args, optionsOrCb, cb) {
280
+ const command = new GetMetricStatisticsCommand(args);
286
281
  if (typeof optionsOrCb === "function") {
287
282
  this.send(command, optionsOrCb);
288
283
  }
289
284
  else if (typeof cb === "function") {
290
285
  if (typeof optionsOrCb !== "object")
291
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
286
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
292
287
  this.send(command, optionsOrCb || {}, cb);
293
288
  }
294
289
  else {
295
290
  return this.send(command, optionsOrCb);
296
291
  }
297
- };
298
- CloudWatch.prototype.getMetricStream = function (args, optionsOrCb, cb) {
299
- var command = new GetMetricStreamCommand(args);
292
+ }
293
+ getMetricStream(args, optionsOrCb, cb) {
294
+ const command = new GetMetricStreamCommand(args);
300
295
  if (typeof optionsOrCb === "function") {
301
296
  this.send(command, optionsOrCb);
302
297
  }
303
298
  else if (typeof cb === "function") {
304
299
  if (typeof optionsOrCb !== "object")
305
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
300
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
306
301
  this.send(command, optionsOrCb || {}, cb);
307
302
  }
308
303
  else {
309
304
  return this.send(command, optionsOrCb);
310
305
  }
311
- };
312
- CloudWatch.prototype.getMetricWidgetImage = function (args, optionsOrCb, cb) {
313
- var command = new GetMetricWidgetImageCommand(args);
306
+ }
307
+ getMetricWidgetImage(args, optionsOrCb, cb) {
308
+ const command = new GetMetricWidgetImageCommand(args);
314
309
  if (typeof optionsOrCb === "function") {
315
310
  this.send(command, optionsOrCb);
316
311
  }
317
312
  else if (typeof cb === "function") {
318
313
  if (typeof optionsOrCb !== "object")
319
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
314
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
320
315
  this.send(command, optionsOrCb || {}, cb);
321
316
  }
322
317
  else {
323
318
  return this.send(command, optionsOrCb);
324
319
  }
325
- };
326
- CloudWatch.prototype.listDashboards = function (args, optionsOrCb, cb) {
327
- var command = new ListDashboardsCommand(args);
320
+ }
321
+ listDashboards(args, optionsOrCb, cb) {
322
+ const command = new ListDashboardsCommand(args);
328
323
  if (typeof optionsOrCb === "function") {
329
324
  this.send(command, optionsOrCb);
330
325
  }
331
326
  else if (typeof cb === "function") {
332
327
  if (typeof optionsOrCb !== "object")
333
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
328
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
334
329
  this.send(command, optionsOrCb || {}, cb);
335
330
  }
336
331
  else {
337
332
  return this.send(command, optionsOrCb);
338
333
  }
339
- };
340
- CloudWatch.prototype.listManagedInsightRules = function (args, optionsOrCb, cb) {
341
- var command = new ListManagedInsightRulesCommand(args);
334
+ }
335
+ listManagedInsightRules(args, optionsOrCb, cb) {
336
+ const command = new ListManagedInsightRulesCommand(args);
342
337
  if (typeof optionsOrCb === "function") {
343
338
  this.send(command, optionsOrCb);
344
339
  }
345
340
  else if (typeof cb === "function") {
346
341
  if (typeof optionsOrCb !== "object")
347
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
342
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
348
343
  this.send(command, optionsOrCb || {}, cb);
349
344
  }
350
345
  else {
351
346
  return this.send(command, optionsOrCb);
352
347
  }
353
- };
354
- CloudWatch.prototype.listMetrics = function (args, optionsOrCb, cb) {
355
- var command = new ListMetricsCommand(args);
348
+ }
349
+ listMetrics(args, optionsOrCb, cb) {
350
+ const command = new ListMetricsCommand(args);
356
351
  if (typeof optionsOrCb === "function") {
357
352
  this.send(command, optionsOrCb);
358
353
  }
359
354
  else if (typeof cb === "function") {
360
355
  if (typeof optionsOrCb !== "object")
361
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
356
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
362
357
  this.send(command, optionsOrCb || {}, cb);
363
358
  }
364
359
  else {
365
360
  return this.send(command, optionsOrCb);
366
361
  }
367
- };
368
- CloudWatch.prototype.listMetricStreams = function (args, optionsOrCb, cb) {
369
- var command = new ListMetricStreamsCommand(args);
362
+ }
363
+ listMetricStreams(args, optionsOrCb, cb) {
364
+ const command = new ListMetricStreamsCommand(args);
370
365
  if (typeof optionsOrCb === "function") {
371
366
  this.send(command, optionsOrCb);
372
367
  }
373
368
  else if (typeof cb === "function") {
374
369
  if (typeof optionsOrCb !== "object")
375
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
370
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
376
371
  this.send(command, optionsOrCb || {}, cb);
377
372
  }
378
373
  else {
379
374
  return this.send(command, optionsOrCb);
380
375
  }
381
- };
382
- CloudWatch.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
383
- var command = new ListTagsForResourceCommand(args);
376
+ }
377
+ listTagsForResource(args, optionsOrCb, cb) {
378
+ const command = new ListTagsForResourceCommand(args);
384
379
  if (typeof optionsOrCb === "function") {
385
380
  this.send(command, optionsOrCb);
386
381
  }
387
382
  else if (typeof cb === "function") {
388
383
  if (typeof optionsOrCb !== "object")
389
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
384
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
390
385
  this.send(command, optionsOrCb || {}, cb);
391
386
  }
392
387
  else {
393
388
  return this.send(command, optionsOrCb);
394
389
  }
395
- };
396
- CloudWatch.prototype.putAnomalyDetector = function (args, optionsOrCb, cb) {
397
- var command = new PutAnomalyDetectorCommand(args);
390
+ }
391
+ putAnomalyDetector(args, optionsOrCb, cb) {
392
+ const command = new PutAnomalyDetectorCommand(args);
398
393
  if (typeof optionsOrCb === "function") {
399
394
  this.send(command, optionsOrCb);
400
395
  }
401
396
  else if (typeof cb === "function") {
402
397
  if (typeof optionsOrCb !== "object")
403
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
398
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
404
399
  this.send(command, optionsOrCb || {}, cb);
405
400
  }
406
401
  else {
407
402
  return this.send(command, optionsOrCb);
408
403
  }
409
- };
410
- CloudWatch.prototype.putCompositeAlarm = function (args, optionsOrCb, cb) {
411
- var command = new PutCompositeAlarmCommand(args);
404
+ }
405
+ putCompositeAlarm(args, optionsOrCb, cb) {
406
+ const command = new PutCompositeAlarmCommand(args);
412
407
  if (typeof optionsOrCb === "function") {
413
408
  this.send(command, optionsOrCb);
414
409
  }
415
410
  else if (typeof cb === "function") {
416
411
  if (typeof optionsOrCb !== "object")
417
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
412
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
418
413
  this.send(command, optionsOrCb || {}, cb);
419
414
  }
420
415
  else {
421
416
  return this.send(command, optionsOrCb);
422
417
  }
423
- };
424
- CloudWatch.prototype.putDashboard = function (args, optionsOrCb, cb) {
425
- var command = new PutDashboardCommand(args);
418
+ }
419
+ putDashboard(args, optionsOrCb, cb) {
420
+ const command = new PutDashboardCommand(args);
426
421
  if (typeof optionsOrCb === "function") {
427
422
  this.send(command, optionsOrCb);
428
423
  }
429
424
  else if (typeof cb === "function") {
430
425
  if (typeof optionsOrCb !== "object")
431
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
426
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
432
427
  this.send(command, optionsOrCb || {}, cb);
433
428
  }
434
429
  else {
435
430
  return this.send(command, optionsOrCb);
436
431
  }
437
- };
438
- CloudWatch.prototype.putInsightRule = function (args, optionsOrCb, cb) {
439
- var command = new PutInsightRuleCommand(args);
432
+ }
433
+ putInsightRule(args, optionsOrCb, cb) {
434
+ const command = new PutInsightRuleCommand(args);
440
435
  if (typeof optionsOrCb === "function") {
441
436
  this.send(command, optionsOrCb);
442
437
  }
443
438
  else if (typeof cb === "function") {
444
439
  if (typeof optionsOrCb !== "object")
445
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
440
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
446
441
  this.send(command, optionsOrCb || {}, cb);
447
442
  }
448
443
  else {
449
444
  return this.send(command, optionsOrCb);
450
445
  }
451
- };
452
- CloudWatch.prototype.putManagedInsightRules = function (args, optionsOrCb, cb) {
453
- var command = new PutManagedInsightRulesCommand(args);
446
+ }
447
+ putManagedInsightRules(args, optionsOrCb, cb) {
448
+ const command = new PutManagedInsightRulesCommand(args);
454
449
  if (typeof optionsOrCb === "function") {
455
450
  this.send(command, optionsOrCb);
456
451
  }
457
452
  else if (typeof cb === "function") {
458
453
  if (typeof optionsOrCb !== "object")
459
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
454
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
460
455
  this.send(command, optionsOrCb || {}, cb);
461
456
  }
462
457
  else {
463
458
  return this.send(command, optionsOrCb);
464
459
  }
465
- };
466
- CloudWatch.prototype.putMetricAlarm = function (args, optionsOrCb, cb) {
467
- var command = new PutMetricAlarmCommand(args);
460
+ }
461
+ putMetricAlarm(args, optionsOrCb, cb) {
462
+ const command = new PutMetricAlarmCommand(args);
468
463
  if (typeof optionsOrCb === "function") {
469
464
  this.send(command, optionsOrCb);
470
465
  }
471
466
  else if (typeof cb === "function") {
472
467
  if (typeof optionsOrCb !== "object")
473
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
468
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
474
469
  this.send(command, optionsOrCb || {}, cb);
475
470
  }
476
471
  else {
477
472
  return this.send(command, optionsOrCb);
478
473
  }
479
- };
480
- CloudWatch.prototype.putMetricData = function (args, optionsOrCb, cb) {
481
- var command = new PutMetricDataCommand(args);
474
+ }
475
+ putMetricData(args, optionsOrCb, cb) {
476
+ const command = new PutMetricDataCommand(args);
482
477
  if (typeof optionsOrCb === "function") {
483
478
  this.send(command, optionsOrCb);
484
479
  }
485
480
  else if (typeof cb === "function") {
486
481
  if (typeof optionsOrCb !== "object")
487
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
482
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
488
483
  this.send(command, optionsOrCb || {}, cb);
489
484
  }
490
485
  else {
491
486
  return this.send(command, optionsOrCb);
492
487
  }
493
- };
494
- CloudWatch.prototype.putMetricStream = function (args, optionsOrCb, cb) {
495
- var command = new PutMetricStreamCommand(args);
488
+ }
489
+ putMetricStream(args, optionsOrCb, cb) {
490
+ const command = new PutMetricStreamCommand(args);
496
491
  if (typeof optionsOrCb === "function") {
497
492
  this.send(command, optionsOrCb);
498
493
  }
499
494
  else if (typeof cb === "function") {
500
495
  if (typeof optionsOrCb !== "object")
501
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
496
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
502
497
  this.send(command, optionsOrCb || {}, cb);
503
498
  }
504
499
  else {
505
500
  return this.send(command, optionsOrCb);
506
501
  }
507
- };
508
- CloudWatch.prototype.setAlarmState = function (args, optionsOrCb, cb) {
509
- var command = new SetAlarmStateCommand(args);
502
+ }
503
+ setAlarmState(args, optionsOrCb, cb) {
504
+ const command = new SetAlarmStateCommand(args);
510
505
  if (typeof optionsOrCb === "function") {
511
506
  this.send(command, optionsOrCb);
512
507
  }
513
508
  else if (typeof cb === "function") {
514
509
  if (typeof optionsOrCb !== "object")
515
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
510
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
516
511
  this.send(command, optionsOrCb || {}, cb);
517
512
  }
518
513
  else {
519
514
  return this.send(command, optionsOrCb);
520
515
  }
521
- };
522
- CloudWatch.prototype.startMetricStreams = function (args, optionsOrCb, cb) {
523
- var command = new StartMetricStreamsCommand(args);
516
+ }
517
+ startMetricStreams(args, optionsOrCb, cb) {
518
+ const command = new StartMetricStreamsCommand(args);
524
519
  if (typeof optionsOrCb === "function") {
525
520
  this.send(command, optionsOrCb);
526
521
  }
527
522
  else if (typeof cb === "function") {
528
523
  if (typeof optionsOrCb !== "object")
529
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
524
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
530
525
  this.send(command, optionsOrCb || {}, cb);
531
526
  }
532
527
  else {
533
528
  return this.send(command, optionsOrCb);
534
529
  }
535
- };
536
- CloudWatch.prototype.stopMetricStreams = function (args, optionsOrCb, cb) {
537
- var command = new StopMetricStreamsCommand(args);
530
+ }
531
+ stopMetricStreams(args, optionsOrCb, cb) {
532
+ const command = new StopMetricStreamsCommand(args);
538
533
  if (typeof optionsOrCb === "function") {
539
534
  this.send(command, optionsOrCb);
540
535
  }
541
536
  else if (typeof cb === "function") {
542
537
  if (typeof optionsOrCb !== "object")
543
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
538
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
544
539
  this.send(command, optionsOrCb || {}, cb);
545
540
  }
546
541
  else {
547
542
  return this.send(command, optionsOrCb);
548
543
  }
549
- };
550
- CloudWatch.prototype.tagResource = function (args, optionsOrCb, cb) {
551
- var command = new TagResourceCommand(args);
544
+ }
545
+ tagResource(args, optionsOrCb, cb) {
546
+ const command = new TagResourceCommand(args);
552
547
  if (typeof optionsOrCb === "function") {
553
548
  this.send(command, optionsOrCb);
554
549
  }
555
550
  else if (typeof cb === "function") {
556
551
  if (typeof optionsOrCb !== "object")
557
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
552
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
558
553
  this.send(command, optionsOrCb || {}, cb);
559
554
  }
560
555
  else {
561
556
  return this.send(command, optionsOrCb);
562
557
  }
563
- };
564
- CloudWatch.prototype.untagResource = function (args, optionsOrCb, cb) {
565
- var command = new UntagResourceCommand(args);
558
+ }
559
+ untagResource(args, optionsOrCb, cb) {
560
+ const command = new UntagResourceCommand(args);
566
561
  if (typeof optionsOrCb === "function") {
567
562
  this.send(command, optionsOrCb);
568
563
  }
569
564
  else if (typeof cb === "function") {
570
565
  if (typeof optionsOrCb !== "object")
571
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
566
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
572
567
  this.send(command, optionsOrCb || {}, cb);
573
568
  }
574
569
  else {
575
570
  return this.send(command, optionsOrCb);
576
571
  }
577
- };
578
- return CloudWatch;
579
- }(CloudWatchClient));
580
- export { CloudWatch };
572
+ }
573
+ }