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