@aws-sdk/client-cloudwatch 3.310.0 → 3.315.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.
@@ -8,9 +8,7 @@ const fast_xml_parser_1 = require("fast-xml-parser");
8
8
  const CloudWatchServiceException_1 = require("../models/CloudWatchServiceException");
9
9
  const models_0_1 = require("../models/models_0");
10
10
  const se_DeleteAlarmsCommand = async (input, context) => {
11
- const headers = {
12
- "content-type": "application/x-www-form-urlencoded",
13
- };
11
+ const headers = SHARED_HEADERS;
14
12
  let body;
15
13
  body = buildFormUrlencodedString({
16
14
  ...se_DeleteAlarmsInput(input, context),
@@ -21,9 +19,7 @@ const se_DeleteAlarmsCommand = async (input, context) => {
21
19
  };
22
20
  exports.se_DeleteAlarmsCommand = se_DeleteAlarmsCommand;
23
21
  const se_DeleteAnomalyDetectorCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-www-form-urlencoded",
26
- };
22
+ const headers = SHARED_HEADERS;
27
23
  let body;
28
24
  body = buildFormUrlencodedString({
29
25
  ...se_DeleteAnomalyDetectorInput(input, context),
@@ -34,9 +30,7 @@ const se_DeleteAnomalyDetectorCommand = async (input, context) => {
34
30
  };
35
31
  exports.se_DeleteAnomalyDetectorCommand = se_DeleteAnomalyDetectorCommand;
36
32
  const se_DeleteDashboardsCommand = async (input, context) => {
37
- const headers = {
38
- "content-type": "application/x-www-form-urlencoded",
39
- };
33
+ const headers = SHARED_HEADERS;
40
34
  let body;
41
35
  body = buildFormUrlencodedString({
42
36
  ...se_DeleteDashboardsInput(input, context),
@@ -47,9 +41,7 @@ const se_DeleteDashboardsCommand = async (input, context) => {
47
41
  };
48
42
  exports.se_DeleteDashboardsCommand = se_DeleteDashboardsCommand;
49
43
  const se_DeleteInsightRulesCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-www-form-urlencoded",
52
- };
44
+ const headers = SHARED_HEADERS;
53
45
  let body;
54
46
  body = buildFormUrlencodedString({
55
47
  ...se_DeleteInsightRulesInput(input, context),
@@ -60,9 +52,7 @@ const se_DeleteInsightRulesCommand = async (input, context) => {
60
52
  };
61
53
  exports.se_DeleteInsightRulesCommand = se_DeleteInsightRulesCommand;
62
54
  const se_DeleteMetricStreamCommand = async (input, context) => {
63
- const headers = {
64
- "content-type": "application/x-www-form-urlencoded",
65
- };
55
+ const headers = SHARED_HEADERS;
66
56
  let body;
67
57
  body = buildFormUrlencodedString({
68
58
  ...se_DeleteMetricStreamInput(input, context),
@@ -73,9 +63,7 @@ const se_DeleteMetricStreamCommand = async (input, context) => {
73
63
  };
74
64
  exports.se_DeleteMetricStreamCommand = se_DeleteMetricStreamCommand;
75
65
  const se_DescribeAlarmHistoryCommand = async (input, context) => {
76
- const headers = {
77
- "content-type": "application/x-www-form-urlencoded",
78
- };
66
+ const headers = SHARED_HEADERS;
79
67
  let body;
80
68
  body = buildFormUrlencodedString({
81
69
  ...se_DescribeAlarmHistoryInput(input, context),
@@ -86,9 +74,7 @@ const se_DescribeAlarmHistoryCommand = async (input, context) => {
86
74
  };
87
75
  exports.se_DescribeAlarmHistoryCommand = se_DescribeAlarmHistoryCommand;
88
76
  const se_DescribeAlarmsCommand = async (input, context) => {
89
- const headers = {
90
- "content-type": "application/x-www-form-urlencoded",
91
- };
77
+ const headers = SHARED_HEADERS;
92
78
  let body;
93
79
  body = buildFormUrlencodedString({
94
80
  ...se_DescribeAlarmsInput(input, context),
@@ -99,9 +85,7 @@ const se_DescribeAlarmsCommand = async (input, context) => {
99
85
  };
100
86
  exports.se_DescribeAlarmsCommand = se_DescribeAlarmsCommand;
101
87
  const se_DescribeAlarmsForMetricCommand = async (input, context) => {
102
- const headers = {
103
- "content-type": "application/x-www-form-urlencoded",
104
- };
88
+ const headers = SHARED_HEADERS;
105
89
  let body;
106
90
  body = buildFormUrlencodedString({
107
91
  ...se_DescribeAlarmsForMetricInput(input, context),
@@ -112,9 +96,7 @@ const se_DescribeAlarmsForMetricCommand = async (input, context) => {
112
96
  };
113
97
  exports.se_DescribeAlarmsForMetricCommand = se_DescribeAlarmsForMetricCommand;
114
98
  const se_DescribeAnomalyDetectorsCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-www-form-urlencoded",
117
- };
99
+ const headers = SHARED_HEADERS;
118
100
  let body;
119
101
  body = buildFormUrlencodedString({
120
102
  ...se_DescribeAnomalyDetectorsInput(input, context),
@@ -125,9 +107,7 @@ const se_DescribeAnomalyDetectorsCommand = async (input, context) => {
125
107
  };
126
108
  exports.se_DescribeAnomalyDetectorsCommand = se_DescribeAnomalyDetectorsCommand;
127
109
  const se_DescribeInsightRulesCommand = async (input, context) => {
128
- const headers = {
129
- "content-type": "application/x-www-form-urlencoded",
130
- };
110
+ const headers = SHARED_HEADERS;
131
111
  let body;
132
112
  body = buildFormUrlencodedString({
133
113
  ...se_DescribeInsightRulesInput(input, context),
@@ -138,9 +118,7 @@ const se_DescribeInsightRulesCommand = async (input, context) => {
138
118
  };
139
119
  exports.se_DescribeInsightRulesCommand = se_DescribeInsightRulesCommand;
140
120
  const se_DisableAlarmActionsCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-www-form-urlencoded",
143
- };
121
+ const headers = SHARED_HEADERS;
144
122
  let body;
145
123
  body = buildFormUrlencodedString({
146
124
  ...se_DisableAlarmActionsInput(input, context),
@@ -151,9 +129,7 @@ const se_DisableAlarmActionsCommand = async (input, context) => {
151
129
  };
152
130
  exports.se_DisableAlarmActionsCommand = se_DisableAlarmActionsCommand;
153
131
  const se_DisableInsightRulesCommand = async (input, context) => {
154
- const headers = {
155
- "content-type": "application/x-www-form-urlencoded",
156
- };
132
+ const headers = SHARED_HEADERS;
157
133
  let body;
158
134
  body = buildFormUrlencodedString({
159
135
  ...se_DisableInsightRulesInput(input, context),
@@ -164,9 +140,7 @@ const se_DisableInsightRulesCommand = async (input, context) => {
164
140
  };
165
141
  exports.se_DisableInsightRulesCommand = se_DisableInsightRulesCommand;
166
142
  const se_EnableAlarmActionsCommand = async (input, context) => {
167
- const headers = {
168
- "content-type": "application/x-www-form-urlencoded",
169
- };
143
+ const headers = SHARED_HEADERS;
170
144
  let body;
171
145
  body = buildFormUrlencodedString({
172
146
  ...se_EnableAlarmActionsInput(input, context),
@@ -177,9 +151,7 @@ const se_EnableAlarmActionsCommand = async (input, context) => {
177
151
  };
178
152
  exports.se_EnableAlarmActionsCommand = se_EnableAlarmActionsCommand;
179
153
  const se_EnableInsightRulesCommand = async (input, context) => {
180
- const headers = {
181
- "content-type": "application/x-www-form-urlencoded",
182
- };
154
+ const headers = SHARED_HEADERS;
183
155
  let body;
184
156
  body = buildFormUrlencodedString({
185
157
  ...se_EnableInsightRulesInput(input, context),
@@ -190,9 +162,7 @@ const se_EnableInsightRulesCommand = async (input, context) => {
190
162
  };
191
163
  exports.se_EnableInsightRulesCommand = se_EnableInsightRulesCommand;
192
164
  const se_GetDashboardCommand = async (input, context) => {
193
- const headers = {
194
- "content-type": "application/x-www-form-urlencoded",
195
- };
165
+ const headers = SHARED_HEADERS;
196
166
  let body;
197
167
  body = buildFormUrlencodedString({
198
168
  ...se_GetDashboardInput(input, context),
@@ -203,9 +173,7 @@ const se_GetDashboardCommand = async (input, context) => {
203
173
  };
204
174
  exports.se_GetDashboardCommand = se_GetDashboardCommand;
205
175
  const se_GetInsightRuleReportCommand = async (input, context) => {
206
- const headers = {
207
- "content-type": "application/x-www-form-urlencoded",
208
- };
176
+ const headers = SHARED_HEADERS;
209
177
  let body;
210
178
  body = buildFormUrlencodedString({
211
179
  ...se_GetInsightRuleReportInput(input, context),
@@ -216,9 +184,7 @@ const se_GetInsightRuleReportCommand = async (input, context) => {
216
184
  };
217
185
  exports.se_GetInsightRuleReportCommand = se_GetInsightRuleReportCommand;
218
186
  const se_GetMetricDataCommand = async (input, context) => {
219
- const headers = {
220
- "content-type": "application/x-www-form-urlencoded",
221
- };
187
+ const headers = SHARED_HEADERS;
222
188
  let body;
223
189
  body = buildFormUrlencodedString({
224
190
  ...se_GetMetricDataInput(input, context),
@@ -229,9 +195,7 @@ const se_GetMetricDataCommand = async (input, context) => {
229
195
  };
230
196
  exports.se_GetMetricDataCommand = se_GetMetricDataCommand;
231
197
  const se_GetMetricStatisticsCommand = async (input, context) => {
232
- const headers = {
233
- "content-type": "application/x-www-form-urlencoded",
234
- };
198
+ const headers = SHARED_HEADERS;
235
199
  let body;
236
200
  body = buildFormUrlencodedString({
237
201
  ...se_GetMetricStatisticsInput(input, context),
@@ -242,9 +206,7 @@ const se_GetMetricStatisticsCommand = async (input, context) => {
242
206
  };
243
207
  exports.se_GetMetricStatisticsCommand = se_GetMetricStatisticsCommand;
244
208
  const se_GetMetricStreamCommand = async (input, context) => {
245
- const headers = {
246
- "content-type": "application/x-www-form-urlencoded",
247
- };
209
+ const headers = SHARED_HEADERS;
248
210
  let body;
249
211
  body = buildFormUrlencodedString({
250
212
  ...se_GetMetricStreamInput(input, context),
@@ -255,9 +217,7 @@ const se_GetMetricStreamCommand = async (input, context) => {
255
217
  };
256
218
  exports.se_GetMetricStreamCommand = se_GetMetricStreamCommand;
257
219
  const se_GetMetricWidgetImageCommand = async (input, context) => {
258
- const headers = {
259
- "content-type": "application/x-www-form-urlencoded",
260
- };
220
+ const headers = SHARED_HEADERS;
261
221
  let body;
262
222
  body = buildFormUrlencodedString({
263
223
  ...se_GetMetricWidgetImageInput(input, context),
@@ -268,9 +228,7 @@ const se_GetMetricWidgetImageCommand = async (input, context) => {
268
228
  };
269
229
  exports.se_GetMetricWidgetImageCommand = se_GetMetricWidgetImageCommand;
270
230
  const se_ListDashboardsCommand = async (input, context) => {
271
- const headers = {
272
- "content-type": "application/x-www-form-urlencoded",
273
- };
231
+ const headers = SHARED_HEADERS;
274
232
  let body;
275
233
  body = buildFormUrlencodedString({
276
234
  ...se_ListDashboardsInput(input, context),
@@ -281,9 +239,7 @@ const se_ListDashboardsCommand = async (input, context) => {
281
239
  };
282
240
  exports.se_ListDashboardsCommand = se_ListDashboardsCommand;
283
241
  const se_ListManagedInsightRulesCommand = async (input, context) => {
284
- const headers = {
285
- "content-type": "application/x-www-form-urlencoded",
286
- };
242
+ const headers = SHARED_HEADERS;
287
243
  let body;
288
244
  body = buildFormUrlencodedString({
289
245
  ...se_ListManagedInsightRulesInput(input, context),
@@ -294,9 +250,7 @@ const se_ListManagedInsightRulesCommand = async (input, context) => {
294
250
  };
295
251
  exports.se_ListManagedInsightRulesCommand = se_ListManagedInsightRulesCommand;
296
252
  const se_ListMetricsCommand = async (input, context) => {
297
- const headers = {
298
- "content-type": "application/x-www-form-urlencoded",
299
- };
253
+ const headers = SHARED_HEADERS;
300
254
  let body;
301
255
  body = buildFormUrlencodedString({
302
256
  ...se_ListMetricsInput(input, context),
@@ -307,9 +261,7 @@ const se_ListMetricsCommand = async (input, context) => {
307
261
  };
308
262
  exports.se_ListMetricsCommand = se_ListMetricsCommand;
309
263
  const se_ListMetricStreamsCommand = async (input, context) => {
310
- const headers = {
311
- "content-type": "application/x-www-form-urlencoded",
312
- };
264
+ const headers = SHARED_HEADERS;
313
265
  let body;
314
266
  body = buildFormUrlencodedString({
315
267
  ...se_ListMetricStreamsInput(input, context),
@@ -320,9 +272,7 @@ const se_ListMetricStreamsCommand = async (input, context) => {
320
272
  };
321
273
  exports.se_ListMetricStreamsCommand = se_ListMetricStreamsCommand;
322
274
  const se_ListTagsForResourceCommand = async (input, context) => {
323
- const headers = {
324
- "content-type": "application/x-www-form-urlencoded",
325
- };
275
+ const headers = SHARED_HEADERS;
326
276
  let body;
327
277
  body = buildFormUrlencodedString({
328
278
  ...se_ListTagsForResourceInput(input, context),
@@ -333,9 +283,7 @@ const se_ListTagsForResourceCommand = async (input, context) => {
333
283
  };
334
284
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
335
285
  const se_PutAnomalyDetectorCommand = async (input, context) => {
336
- const headers = {
337
- "content-type": "application/x-www-form-urlencoded",
338
- };
286
+ const headers = SHARED_HEADERS;
339
287
  let body;
340
288
  body = buildFormUrlencodedString({
341
289
  ...se_PutAnomalyDetectorInput(input, context),
@@ -346,9 +294,7 @@ const se_PutAnomalyDetectorCommand = async (input, context) => {
346
294
  };
347
295
  exports.se_PutAnomalyDetectorCommand = se_PutAnomalyDetectorCommand;
348
296
  const se_PutCompositeAlarmCommand = async (input, context) => {
349
- const headers = {
350
- "content-type": "application/x-www-form-urlencoded",
351
- };
297
+ const headers = SHARED_HEADERS;
352
298
  let body;
353
299
  body = buildFormUrlencodedString({
354
300
  ...se_PutCompositeAlarmInput(input, context),
@@ -359,9 +305,7 @@ const se_PutCompositeAlarmCommand = async (input, context) => {
359
305
  };
360
306
  exports.se_PutCompositeAlarmCommand = se_PutCompositeAlarmCommand;
361
307
  const se_PutDashboardCommand = async (input, context) => {
362
- const headers = {
363
- "content-type": "application/x-www-form-urlencoded",
364
- };
308
+ const headers = SHARED_HEADERS;
365
309
  let body;
366
310
  body = buildFormUrlencodedString({
367
311
  ...se_PutDashboardInput(input, context),
@@ -372,9 +316,7 @@ const se_PutDashboardCommand = async (input, context) => {
372
316
  };
373
317
  exports.se_PutDashboardCommand = se_PutDashboardCommand;
374
318
  const se_PutInsightRuleCommand = async (input, context) => {
375
- const headers = {
376
- "content-type": "application/x-www-form-urlencoded",
377
- };
319
+ const headers = SHARED_HEADERS;
378
320
  let body;
379
321
  body = buildFormUrlencodedString({
380
322
  ...se_PutInsightRuleInput(input, context),
@@ -385,9 +327,7 @@ const se_PutInsightRuleCommand = async (input, context) => {
385
327
  };
386
328
  exports.se_PutInsightRuleCommand = se_PutInsightRuleCommand;
387
329
  const se_PutManagedInsightRulesCommand = async (input, context) => {
388
- const headers = {
389
- "content-type": "application/x-www-form-urlencoded",
390
- };
330
+ const headers = SHARED_HEADERS;
391
331
  let body;
392
332
  body = buildFormUrlencodedString({
393
333
  ...se_PutManagedInsightRulesInput(input, context),
@@ -398,9 +338,7 @@ const se_PutManagedInsightRulesCommand = async (input, context) => {
398
338
  };
399
339
  exports.se_PutManagedInsightRulesCommand = se_PutManagedInsightRulesCommand;
400
340
  const se_PutMetricAlarmCommand = async (input, context) => {
401
- const headers = {
402
- "content-type": "application/x-www-form-urlencoded",
403
- };
341
+ const headers = SHARED_HEADERS;
404
342
  let body;
405
343
  body = buildFormUrlencodedString({
406
344
  ...se_PutMetricAlarmInput(input, context),
@@ -411,9 +349,7 @@ const se_PutMetricAlarmCommand = async (input, context) => {
411
349
  };
412
350
  exports.se_PutMetricAlarmCommand = se_PutMetricAlarmCommand;
413
351
  const se_PutMetricDataCommand = async (input, context) => {
414
- const headers = {
415
- "content-type": "application/x-www-form-urlencoded",
416
- };
352
+ const headers = SHARED_HEADERS;
417
353
  let body;
418
354
  body = buildFormUrlencodedString({
419
355
  ...se_PutMetricDataInput(input, context),
@@ -424,9 +360,7 @@ const se_PutMetricDataCommand = async (input, context) => {
424
360
  };
425
361
  exports.se_PutMetricDataCommand = se_PutMetricDataCommand;
426
362
  const se_PutMetricStreamCommand = async (input, context) => {
427
- const headers = {
428
- "content-type": "application/x-www-form-urlencoded",
429
- };
363
+ const headers = SHARED_HEADERS;
430
364
  let body;
431
365
  body = buildFormUrlencodedString({
432
366
  ...se_PutMetricStreamInput(input, context),
@@ -437,9 +371,7 @@ const se_PutMetricStreamCommand = async (input, context) => {
437
371
  };
438
372
  exports.se_PutMetricStreamCommand = se_PutMetricStreamCommand;
439
373
  const se_SetAlarmStateCommand = async (input, context) => {
440
- const headers = {
441
- "content-type": "application/x-www-form-urlencoded",
442
- };
374
+ const headers = SHARED_HEADERS;
443
375
  let body;
444
376
  body = buildFormUrlencodedString({
445
377
  ...se_SetAlarmStateInput(input, context),
@@ -450,9 +382,7 @@ const se_SetAlarmStateCommand = async (input, context) => {
450
382
  };
451
383
  exports.se_SetAlarmStateCommand = se_SetAlarmStateCommand;
452
384
  const se_StartMetricStreamsCommand = async (input, context) => {
453
- const headers = {
454
- "content-type": "application/x-www-form-urlencoded",
455
- };
385
+ const headers = SHARED_HEADERS;
456
386
  let body;
457
387
  body = buildFormUrlencodedString({
458
388
  ...se_StartMetricStreamsInput(input, context),
@@ -463,9 +393,7 @@ const se_StartMetricStreamsCommand = async (input, context) => {
463
393
  };
464
394
  exports.se_StartMetricStreamsCommand = se_StartMetricStreamsCommand;
465
395
  const se_StopMetricStreamsCommand = async (input, context) => {
466
- const headers = {
467
- "content-type": "application/x-www-form-urlencoded",
468
- };
396
+ const headers = SHARED_HEADERS;
469
397
  let body;
470
398
  body = buildFormUrlencodedString({
471
399
  ...se_StopMetricStreamsInput(input, context),
@@ -476,9 +404,7 @@ const se_StopMetricStreamsCommand = async (input, context) => {
476
404
  };
477
405
  exports.se_StopMetricStreamsCommand = se_StopMetricStreamsCommand;
478
406
  const se_TagResourceCommand = async (input, context) => {
479
- const headers = {
480
- "content-type": "application/x-www-form-urlencoded",
481
- };
407
+ const headers = SHARED_HEADERS;
482
408
  let body;
483
409
  body = buildFormUrlencodedString({
484
410
  ...se_TagResourceInput(input, context),
@@ -489,9 +415,7 @@ const se_TagResourceCommand = async (input, context) => {
489
415
  };
490
416
  exports.se_TagResourceCommand = se_TagResourceCommand;
491
417
  const se_UntagResourceCommand = async (input, context) => {
492
- const headers = {
493
- "content-type": "application/x-www-form-urlencoded",
494
- };
418
+ const headers = SHARED_HEADERS;
495
419
  let body;
496
420
  body = buildFormUrlencodedString({
497
421
  ...se_UntagResourceInput(input, context),
@@ -509,7 +433,7 @@ const de_DeleteAlarmsCommand = async (output, context) => {
509
433
  const response = {
510
434
  $metadata: deserializeMetadata(output),
511
435
  };
512
- return Promise.resolve(response);
436
+ return response;
513
437
  };
514
438
  exports.de_DeleteAlarmsCommand = de_DeleteAlarmsCommand;
515
439
  const de_DeleteAlarmsCommandError = async (output, context) => {
@@ -524,10 +448,9 @@ const de_DeleteAlarmsCommandError = async (output, context) => {
524
448
  throw await de_ResourceNotFoundRes(parsedOutput, context);
525
449
  default:
526
450
  const parsedBody = parsedOutput.body;
527
- (0, smithy_client_1.throwDefaultError)({
451
+ return throwDefaultError({
528
452
  output,
529
453
  parsedBody: parsedBody.Error,
530
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
531
454
  errorCode,
532
455
  });
533
456
  }
@@ -543,7 +466,7 @@ const de_DeleteAnomalyDetectorCommand = async (output, context) => {
543
466
  $metadata: deserializeMetadata(output),
544
467
  ...contents,
545
468
  };
546
- return Promise.resolve(response);
469
+ return response;
547
470
  };
548
471
  exports.de_DeleteAnomalyDetectorCommand = de_DeleteAnomalyDetectorCommand;
549
472
  const de_DeleteAnomalyDetectorCommandError = async (output, context) => {
@@ -570,10 +493,9 @@ const de_DeleteAnomalyDetectorCommandError = async (output, context) => {
570
493
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
571
494
  default:
572
495
  const parsedBody = parsedOutput.body;
573
- (0, smithy_client_1.throwDefaultError)({
496
+ return throwDefaultError({
574
497
  output,
575
498
  parsedBody: parsedBody.Error,
576
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
577
499
  errorCode,
578
500
  });
579
501
  }
@@ -589,7 +511,7 @@ const de_DeleteDashboardsCommand = async (output, context) => {
589
511
  $metadata: deserializeMetadata(output),
590
512
  ...contents,
591
513
  };
592
- return Promise.resolve(response);
514
+ return response;
593
515
  };
594
516
  exports.de_DeleteDashboardsCommand = de_DeleteDashboardsCommand;
595
517
  const de_DeleteDashboardsCommandError = async (output, context) => {
@@ -610,10 +532,9 @@ const de_DeleteDashboardsCommandError = async (output, context) => {
610
532
  throw await de_DashboardNotFoundErrorRes(parsedOutput, context);
611
533
  default:
612
534
  const parsedBody = parsedOutput.body;
613
- (0, smithy_client_1.throwDefaultError)({
535
+ return throwDefaultError({
614
536
  output,
615
537
  parsedBody: parsedBody.Error,
616
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
617
538
  errorCode,
618
539
  });
619
540
  }
@@ -629,7 +550,7 @@ const de_DeleteInsightRulesCommand = async (output, context) => {
629
550
  $metadata: deserializeMetadata(output),
630
551
  ...contents,
631
552
  };
632
- return Promise.resolve(response);
553
+ return response;
633
554
  };
634
555
  exports.de_DeleteInsightRulesCommand = de_DeleteInsightRulesCommand;
635
556
  const de_DeleteInsightRulesCommandError = async (output, context) => {
@@ -647,10 +568,9 @@ const de_DeleteInsightRulesCommandError = async (output, context) => {
647
568
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
648
569
  default:
649
570
  const parsedBody = parsedOutput.body;
650
- (0, smithy_client_1.throwDefaultError)({
571
+ return throwDefaultError({
651
572
  output,
652
573
  parsedBody: parsedBody.Error,
653
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
654
574
  errorCode,
655
575
  });
656
576
  }
@@ -666,7 +586,7 @@ const de_DeleteMetricStreamCommand = async (output, context) => {
666
586
  $metadata: deserializeMetadata(output),
667
587
  ...contents,
668
588
  };
669
- return Promise.resolve(response);
589
+ return response;
670
590
  };
671
591
  exports.de_DeleteMetricStreamCommand = de_DeleteMetricStreamCommand;
672
592
  const de_DeleteMetricStreamCommandError = async (output, context) => {
@@ -687,10 +607,9 @@ const de_DeleteMetricStreamCommandError = async (output, context) => {
687
607
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
688
608
  default:
689
609
  const parsedBody = parsedOutput.body;
690
- (0, smithy_client_1.throwDefaultError)({
610
+ return throwDefaultError({
691
611
  output,
692
612
  parsedBody: parsedBody.Error,
693
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
694
613
  errorCode,
695
614
  });
696
615
  }
@@ -706,7 +625,7 @@ const de_DescribeAlarmHistoryCommand = async (output, context) => {
706
625
  $metadata: deserializeMetadata(output),
707
626
  ...contents,
708
627
  };
709
- return Promise.resolve(response);
628
+ return response;
710
629
  };
711
630
  exports.de_DescribeAlarmHistoryCommand = de_DescribeAlarmHistoryCommand;
712
631
  const de_DescribeAlarmHistoryCommandError = async (output, context) => {
@@ -721,10 +640,9 @@ const de_DescribeAlarmHistoryCommandError = async (output, context) => {
721
640
  throw await de_InvalidNextTokenRes(parsedOutput, context);
722
641
  default:
723
642
  const parsedBody = parsedOutput.body;
724
- (0, smithy_client_1.throwDefaultError)({
643
+ return throwDefaultError({
725
644
  output,
726
645
  parsedBody: parsedBody.Error,
727
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
728
646
  errorCode,
729
647
  });
730
648
  }
@@ -740,7 +658,7 @@ const de_DescribeAlarmsCommand = async (output, context) => {
740
658
  $metadata: deserializeMetadata(output),
741
659
  ...contents,
742
660
  };
743
- return Promise.resolve(response);
661
+ return response;
744
662
  };
745
663
  exports.de_DescribeAlarmsCommand = de_DescribeAlarmsCommand;
746
664
  const de_DescribeAlarmsCommandError = async (output, context) => {
@@ -755,10 +673,9 @@ const de_DescribeAlarmsCommandError = async (output, context) => {
755
673
  throw await de_InvalidNextTokenRes(parsedOutput, context);
756
674
  default:
757
675
  const parsedBody = parsedOutput.body;
758
- (0, smithy_client_1.throwDefaultError)({
676
+ return throwDefaultError({
759
677
  output,
760
678
  parsedBody: parsedBody.Error,
761
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
762
679
  errorCode,
763
680
  });
764
681
  }
@@ -774,7 +691,7 @@ const de_DescribeAlarmsForMetricCommand = async (output, context) => {
774
691
  $metadata: deserializeMetadata(output),
775
692
  ...contents,
776
693
  };
777
- return Promise.resolve(response);
694
+ return response;
778
695
  };
779
696
  exports.de_DescribeAlarmsForMetricCommand = de_DescribeAlarmsForMetricCommand;
780
697
  const de_DescribeAlarmsForMetricCommandError = async (output, context) => {
@@ -784,10 +701,9 @@ const de_DescribeAlarmsForMetricCommandError = async (output, context) => {
784
701
  };
785
702
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
786
703
  const parsedBody = parsedOutput.body;
787
- (0, smithy_client_1.throwDefaultError)({
704
+ return throwDefaultError({
788
705
  output,
789
706
  parsedBody: parsedBody.Error,
790
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
791
707
  errorCode,
792
708
  });
793
709
  };
@@ -802,7 +718,7 @@ const de_DescribeAnomalyDetectorsCommand = async (output, context) => {
802
718
  $metadata: deserializeMetadata(output),
803
719
  ...contents,
804
720
  };
805
- return Promise.resolve(response);
721
+ return response;
806
722
  };
807
723
  exports.de_DescribeAnomalyDetectorsCommand = de_DescribeAnomalyDetectorsCommand;
808
724
  const de_DescribeAnomalyDetectorsCommandError = async (output, context) => {
@@ -826,10 +742,9 @@ const de_DescribeAnomalyDetectorsCommandError = async (output, context) => {
826
742
  throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
827
743
  default:
828
744
  const parsedBody = parsedOutput.body;
829
- (0, smithy_client_1.throwDefaultError)({
745
+ return throwDefaultError({
830
746
  output,
831
747
  parsedBody: parsedBody.Error,
832
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
833
748
  errorCode,
834
749
  });
835
750
  }
@@ -845,7 +760,7 @@ const de_DescribeInsightRulesCommand = async (output, context) => {
845
760
  $metadata: deserializeMetadata(output),
846
761
  ...contents,
847
762
  };
848
- return Promise.resolve(response);
763
+ return response;
849
764
  };
850
765
  exports.de_DescribeInsightRulesCommand = de_DescribeInsightRulesCommand;
851
766
  const de_DescribeInsightRulesCommandError = async (output, context) => {
@@ -860,10 +775,9 @@ const de_DescribeInsightRulesCommandError = async (output, context) => {
860
775
  throw await de_InvalidNextTokenRes(parsedOutput, context);
861
776
  default:
862
777
  const parsedBody = parsedOutput.body;
863
- (0, smithy_client_1.throwDefaultError)({
778
+ return throwDefaultError({
864
779
  output,
865
780
  parsedBody: parsedBody.Error,
866
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
867
781
  errorCode,
868
782
  });
869
783
  }
@@ -876,7 +790,7 @@ const de_DisableAlarmActionsCommand = async (output, context) => {
876
790
  const response = {
877
791
  $metadata: deserializeMetadata(output),
878
792
  };
879
- return Promise.resolve(response);
793
+ return response;
880
794
  };
881
795
  exports.de_DisableAlarmActionsCommand = de_DisableAlarmActionsCommand;
882
796
  const de_DisableAlarmActionsCommandError = async (output, context) => {
@@ -886,10 +800,9 @@ const de_DisableAlarmActionsCommandError = async (output, context) => {
886
800
  };
887
801
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
888
802
  const parsedBody = parsedOutput.body;
889
- (0, smithy_client_1.throwDefaultError)({
803
+ return throwDefaultError({
890
804
  output,
891
805
  parsedBody: parsedBody.Error,
892
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
893
806
  errorCode,
894
807
  });
895
808
  };
@@ -904,7 +817,7 @@ const de_DisableInsightRulesCommand = async (output, context) => {
904
817
  $metadata: deserializeMetadata(output),
905
818
  ...contents,
906
819
  };
907
- return Promise.resolve(response);
820
+ return response;
908
821
  };
909
822
  exports.de_DisableInsightRulesCommand = de_DisableInsightRulesCommand;
910
823
  const de_DisableInsightRulesCommandError = async (output, context) => {
@@ -922,10 +835,9 @@ const de_DisableInsightRulesCommandError = async (output, context) => {
922
835
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
923
836
  default:
924
837
  const parsedBody = parsedOutput.body;
925
- (0, smithy_client_1.throwDefaultError)({
838
+ return throwDefaultError({
926
839
  output,
927
840
  parsedBody: parsedBody.Error,
928
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
929
841
  errorCode,
930
842
  });
931
843
  }
@@ -938,7 +850,7 @@ const de_EnableAlarmActionsCommand = async (output, context) => {
938
850
  const response = {
939
851
  $metadata: deserializeMetadata(output),
940
852
  };
941
- return Promise.resolve(response);
853
+ return response;
942
854
  };
943
855
  exports.de_EnableAlarmActionsCommand = de_EnableAlarmActionsCommand;
944
856
  const de_EnableAlarmActionsCommandError = async (output, context) => {
@@ -948,10 +860,9 @@ const de_EnableAlarmActionsCommandError = async (output, context) => {
948
860
  };
949
861
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
950
862
  const parsedBody = parsedOutput.body;
951
- (0, smithy_client_1.throwDefaultError)({
863
+ return throwDefaultError({
952
864
  output,
953
865
  parsedBody: parsedBody.Error,
954
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
955
866
  errorCode,
956
867
  });
957
868
  };
@@ -966,7 +877,7 @@ const de_EnableInsightRulesCommand = async (output, context) => {
966
877
  $metadata: deserializeMetadata(output),
967
878
  ...contents,
968
879
  };
969
- return Promise.resolve(response);
880
+ return response;
970
881
  };
971
882
  exports.de_EnableInsightRulesCommand = de_EnableInsightRulesCommand;
972
883
  const de_EnableInsightRulesCommandError = async (output, context) => {
@@ -987,10 +898,9 @@ const de_EnableInsightRulesCommandError = async (output, context) => {
987
898
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
988
899
  default:
989
900
  const parsedBody = parsedOutput.body;
990
- (0, smithy_client_1.throwDefaultError)({
901
+ return throwDefaultError({
991
902
  output,
992
903
  parsedBody: parsedBody.Error,
993
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
994
904
  errorCode,
995
905
  });
996
906
  }
@@ -1006,7 +916,7 @@ const de_GetDashboardCommand = async (output, context) => {
1006
916
  $metadata: deserializeMetadata(output),
1007
917
  ...contents,
1008
918
  };
1009
- return Promise.resolve(response);
919
+ return response;
1010
920
  };
1011
921
  exports.de_GetDashboardCommand = de_GetDashboardCommand;
1012
922
  const de_GetDashboardCommandError = async (output, context) => {
@@ -1027,10 +937,9 @@ const de_GetDashboardCommandError = async (output, context) => {
1027
937
  throw await de_DashboardNotFoundErrorRes(parsedOutput, context);
1028
938
  default:
1029
939
  const parsedBody = parsedOutput.body;
1030
- (0, smithy_client_1.throwDefaultError)({
940
+ return throwDefaultError({
1031
941
  output,
1032
942
  parsedBody: parsedBody.Error,
1033
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1034
943
  errorCode,
1035
944
  });
1036
945
  }
@@ -1046,7 +955,7 @@ const de_GetInsightRuleReportCommand = async (output, context) => {
1046
955
  $metadata: deserializeMetadata(output),
1047
956
  ...contents,
1048
957
  };
1049
- return Promise.resolve(response);
958
+ return response;
1050
959
  };
1051
960
  exports.de_GetInsightRuleReportCommand = de_GetInsightRuleReportCommand;
1052
961
  const de_GetInsightRuleReportCommandError = async (output, context) => {
@@ -1067,10 +976,9 @@ const de_GetInsightRuleReportCommandError = async (output, context) => {
1067
976
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1068
977
  default:
1069
978
  const parsedBody = parsedOutput.body;
1070
- (0, smithy_client_1.throwDefaultError)({
979
+ return throwDefaultError({
1071
980
  output,
1072
981
  parsedBody: parsedBody.Error,
1073
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1074
982
  errorCode,
1075
983
  });
1076
984
  }
@@ -1086,7 +994,7 @@ const de_GetMetricDataCommand = async (output, context) => {
1086
994
  $metadata: deserializeMetadata(output),
1087
995
  ...contents,
1088
996
  };
1089
- return Promise.resolve(response);
997
+ return response;
1090
998
  };
1091
999
  exports.de_GetMetricDataCommand = de_GetMetricDataCommand;
1092
1000
  const de_GetMetricDataCommandError = async (output, context) => {
@@ -1101,10 +1009,9 @@ const de_GetMetricDataCommandError = async (output, context) => {
1101
1009
  throw await de_InvalidNextTokenRes(parsedOutput, context);
1102
1010
  default:
1103
1011
  const parsedBody = parsedOutput.body;
1104
- (0, smithy_client_1.throwDefaultError)({
1012
+ return throwDefaultError({
1105
1013
  output,
1106
1014
  parsedBody: parsedBody.Error,
1107
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1108
1015
  errorCode,
1109
1016
  });
1110
1017
  }
@@ -1120,7 +1027,7 @@ const de_GetMetricStatisticsCommand = async (output, context) => {
1120
1027
  $metadata: deserializeMetadata(output),
1121
1028
  ...contents,
1122
1029
  };
1123
- return Promise.resolve(response);
1030
+ return response;
1124
1031
  };
1125
1032
  exports.de_GetMetricStatisticsCommand = de_GetMetricStatisticsCommand;
1126
1033
  const de_GetMetricStatisticsCommandError = async (output, context) => {
@@ -1144,10 +1051,9 @@ const de_GetMetricStatisticsCommandError = async (output, context) => {
1144
1051
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1145
1052
  default:
1146
1053
  const parsedBody = parsedOutput.body;
1147
- (0, smithy_client_1.throwDefaultError)({
1054
+ return throwDefaultError({
1148
1055
  output,
1149
1056
  parsedBody: parsedBody.Error,
1150
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1151
1057
  errorCode,
1152
1058
  });
1153
1059
  }
@@ -1163,7 +1069,7 @@ const de_GetMetricStreamCommand = async (output, context) => {
1163
1069
  $metadata: deserializeMetadata(output),
1164
1070
  ...contents,
1165
1071
  };
1166
- return Promise.resolve(response);
1072
+ return response;
1167
1073
  };
1168
1074
  exports.de_GetMetricStreamCommand = de_GetMetricStreamCommand;
1169
1075
  const de_GetMetricStreamCommandError = async (output, context) => {
@@ -1190,10 +1096,9 @@ const de_GetMetricStreamCommandError = async (output, context) => {
1190
1096
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1191
1097
  default:
1192
1098
  const parsedBody = parsedOutput.body;
1193
- (0, smithy_client_1.throwDefaultError)({
1099
+ return throwDefaultError({
1194
1100
  output,
1195
1101
  parsedBody: parsedBody.Error,
1196
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1197
1102
  errorCode,
1198
1103
  });
1199
1104
  }
@@ -1209,7 +1114,7 @@ const de_GetMetricWidgetImageCommand = async (output, context) => {
1209
1114
  $metadata: deserializeMetadata(output),
1210
1115
  ...contents,
1211
1116
  };
1212
- return Promise.resolve(response);
1117
+ return response;
1213
1118
  };
1214
1119
  exports.de_GetMetricWidgetImageCommand = de_GetMetricWidgetImageCommand;
1215
1120
  const de_GetMetricWidgetImageCommandError = async (output, context) => {
@@ -1219,10 +1124,9 @@ const de_GetMetricWidgetImageCommandError = async (output, context) => {
1219
1124
  };
1220
1125
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1221
1126
  const parsedBody = parsedOutput.body;
1222
- (0, smithy_client_1.throwDefaultError)({
1127
+ return throwDefaultError({
1223
1128
  output,
1224
1129
  parsedBody: parsedBody.Error,
1225
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1226
1130
  errorCode,
1227
1131
  });
1228
1132
  };
@@ -1237,7 +1141,7 @@ const de_ListDashboardsCommand = async (output, context) => {
1237
1141
  $metadata: deserializeMetadata(output),
1238
1142
  ...contents,
1239
1143
  };
1240
- return Promise.resolve(response);
1144
+ return response;
1241
1145
  };
1242
1146
  exports.de_ListDashboardsCommand = de_ListDashboardsCommand;
1243
1147
  const de_ListDashboardsCommandError = async (output, context) => {
@@ -1255,10 +1159,9 @@ const de_ListDashboardsCommandError = async (output, context) => {
1255
1159
  throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1256
1160
  default:
1257
1161
  const parsedBody = parsedOutput.body;
1258
- (0, smithy_client_1.throwDefaultError)({
1162
+ return throwDefaultError({
1259
1163
  output,
1260
1164
  parsedBody: parsedBody.Error,
1261
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1262
1165
  errorCode,
1263
1166
  });
1264
1167
  }
@@ -1274,7 +1177,7 @@ const de_ListManagedInsightRulesCommand = async (output, context) => {
1274
1177
  $metadata: deserializeMetadata(output),
1275
1178
  ...contents,
1276
1179
  };
1277
- return Promise.resolve(response);
1180
+ return response;
1278
1181
  };
1279
1182
  exports.de_ListManagedInsightRulesCommand = de_ListManagedInsightRulesCommand;
1280
1183
  const de_ListManagedInsightRulesCommandError = async (output, context) => {
@@ -1295,10 +1198,9 @@ const de_ListManagedInsightRulesCommandError = async (output, context) => {
1295
1198
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1296
1199
  default:
1297
1200
  const parsedBody = parsedOutput.body;
1298
- (0, smithy_client_1.throwDefaultError)({
1201
+ return throwDefaultError({
1299
1202
  output,
1300
1203
  parsedBody: parsedBody.Error,
1301
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1302
1204
  errorCode,
1303
1205
  });
1304
1206
  }
@@ -1314,7 +1216,7 @@ const de_ListMetricsCommand = async (output, context) => {
1314
1216
  $metadata: deserializeMetadata(output),
1315
1217
  ...contents,
1316
1218
  };
1317
- return Promise.resolve(response);
1219
+ return response;
1318
1220
  };
1319
1221
  exports.de_ListMetricsCommand = de_ListMetricsCommand;
1320
1222
  const de_ListMetricsCommandError = async (output, context) => {
@@ -1332,10 +1234,9 @@ const de_ListMetricsCommandError = async (output, context) => {
1332
1234
  throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1333
1235
  default:
1334
1236
  const parsedBody = parsedOutput.body;
1335
- (0, smithy_client_1.throwDefaultError)({
1237
+ return throwDefaultError({
1336
1238
  output,
1337
1239
  parsedBody: parsedBody.Error,
1338
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1339
1240
  errorCode,
1340
1241
  });
1341
1242
  }
@@ -1351,7 +1252,7 @@ const de_ListMetricStreamsCommand = async (output, context) => {
1351
1252
  $metadata: deserializeMetadata(output),
1352
1253
  ...contents,
1353
1254
  };
1354
- return Promise.resolve(response);
1255
+ return response;
1355
1256
  };
1356
1257
  exports.de_ListMetricStreamsCommand = de_ListMetricStreamsCommand;
1357
1258
  const de_ListMetricStreamsCommandError = async (output, context) => {
@@ -1375,10 +1276,9 @@ const de_ListMetricStreamsCommandError = async (output, context) => {
1375
1276
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1376
1277
  default:
1377
1278
  const parsedBody = parsedOutput.body;
1378
- (0, smithy_client_1.throwDefaultError)({
1279
+ return throwDefaultError({
1379
1280
  output,
1380
1281
  parsedBody: parsedBody.Error,
1381
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1382
1282
  errorCode,
1383
1283
  });
1384
1284
  }
@@ -1394,7 +1294,7 @@ const de_ListTagsForResourceCommand = async (output, context) => {
1394
1294
  $metadata: deserializeMetadata(output),
1395
1295
  ...contents,
1396
1296
  };
1397
- return Promise.resolve(response);
1297
+ return response;
1398
1298
  };
1399
1299
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1400
1300
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -1415,10 +1315,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1415
1315
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1416
1316
  default:
1417
1317
  const parsedBody = parsedOutput.body;
1418
- (0, smithy_client_1.throwDefaultError)({
1318
+ return throwDefaultError({
1419
1319
  output,
1420
1320
  parsedBody: parsedBody.Error,
1421
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1422
1321
  errorCode,
1423
1322
  });
1424
1323
  }
@@ -1434,7 +1333,7 @@ const de_PutAnomalyDetectorCommand = async (output, context) => {
1434
1333
  $metadata: deserializeMetadata(output),
1435
1334
  ...contents,
1436
1335
  };
1437
- return Promise.resolve(response);
1336
+ return response;
1438
1337
  };
1439
1338
  exports.de_PutAnomalyDetectorCommand = de_PutAnomalyDetectorCommand;
1440
1339
  const de_PutAnomalyDetectorCommandError = async (output, context) => {
@@ -1461,10 +1360,9 @@ const de_PutAnomalyDetectorCommandError = async (output, context) => {
1461
1360
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1462
1361
  default:
1463
1362
  const parsedBody = parsedOutput.body;
1464
- (0, smithy_client_1.throwDefaultError)({
1363
+ return throwDefaultError({
1465
1364
  output,
1466
1365
  parsedBody: parsedBody.Error,
1467
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1468
1366
  errorCode,
1469
1367
  });
1470
1368
  }
@@ -1477,7 +1375,7 @@ const de_PutCompositeAlarmCommand = async (output, context) => {
1477
1375
  const response = {
1478
1376
  $metadata: deserializeMetadata(output),
1479
1377
  };
1480
- return Promise.resolve(response);
1378
+ return response;
1481
1379
  };
1482
1380
  exports.de_PutCompositeAlarmCommand = de_PutCompositeAlarmCommand;
1483
1381
  const de_PutCompositeAlarmCommandError = async (output, context) => {
@@ -1492,10 +1390,9 @@ const de_PutCompositeAlarmCommandError = async (output, context) => {
1492
1390
  throw await de_LimitExceededFaultRes(parsedOutput, context);
1493
1391
  default:
1494
1392
  const parsedBody = parsedOutput.body;
1495
- (0, smithy_client_1.throwDefaultError)({
1393
+ return throwDefaultError({
1496
1394
  output,
1497
1395
  parsedBody: parsedBody.Error,
1498
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1499
1396
  errorCode,
1500
1397
  });
1501
1398
  }
@@ -1511,7 +1408,7 @@ const de_PutDashboardCommand = async (output, context) => {
1511
1408
  $metadata: deserializeMetadata(output),
1512
1409
  ...contents,
1513
1410
  };
1514
- return Promise.resolve(response);
1411
+ return response;
1515
1412
  };
1516
1413
  exports.de_PutDashboardCommand = de_PutDashboardCommand;
1517
1414
  const de_PutDashboardCommandError = async (output, context) => {
@@ -1529,10 +1426,9 @@ const de_PutDashboardCommandError = async (output, context) => {
1529
1426
  throw await de_DashboardInvalidInputErrorRes(parsedOutput, context);
1530
1427
  default:
1531
1428
  const parsedBody = parsedOutput.body;
1532
- (0, smithy_client_1.throwDefaultError)({
1429
+ return throwDefaultError({
1533
1430
  output,
1534
1431
  parsedBody: parsedBody.Error,
1535
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1536
1432
  errorCode,
1537
1433
  });
1538
1434
  }
@@ -1548,7 +1444,7 @@ const de_PutInsightRuleCommand = async (output, context) => {
1548
1444
  $metadata: deserializeMetadata(output),
1549
1445
  ...contents,
1550
1446
  };
1551
- return Promise.resolve(response);
1447
+ return response;
1552
1448
  };
1553
1449
  exports.de_PutInsightRuleCommand = de_PutInsightRuleCommand;
1554
1450
  const de_PutInsightRuleCommandError = async (output, context) => {
@@ -1569,10 +1465,9 @@ const de_PutInsightRuleCommandError = async (output, context) => {
1569
1465
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1570
1466
  default:
1571
1467
  const parsedBody = parsedOutput.body;
1572
- (0, smithy_client_1.throwDefaultError)({
1468
+ return throwDefaultError({
1573
1469
  output,
1574
1470
  parsedBody: parsedBody.Error,
1575
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1576
1471
  errorCode,
1577
1472
  });
1578
1473
  }
@@ -1588,7 +1483,7 @@ const de_PutManagedInsightRulesCommand = async (output, context) => {
1588
1483
  $metadata: deserializeMetadata(output),
1589
1484
  ...contents,
1590
1485
  };
1591
- return Promise.resolve(response);
1486
+ return response;
1592
1487
  };
1593
1488
  exports.de_PutManagedInsightRulesCommand = de_PutManagedInsightRulesCommand;
1594
1489
  const de_PutManagedInsightRulesCommandError = async (output, context) => {
@@ -1606,10 +1501,9 @@ const de_PutManagedInsightRulesCommandError = async (output, context) => {
1606
1501
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1607
1502
  default:
1608
1503
  const parsedBody = parsedOutput.body;
1609
- (0, smithy_client_1.throwDefaultError)({
1504
+ return throwDefaultError({
1610
1505
  output,
1611
1506
  parsedBody: parsedBody.Error,
1612
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1613
1507
  errorCode,
1614
1508
  });
1615
1509
  }
@@ -1622,7 +1516,7 @@ const de_PutMetricAlarmCommand = async (output, context) => {
1622
1516
  const response = {
1623
1517
  $metadata: deserializeMetadata(output),
1624
1518
  };
1625
- return Promise.resolve(response);
1519
+ return response;
1626
1520
  };
1627
1521
  exports.de_PutMetricAlarmCommand = de_PutMetricAlarmCommand;
1628
1522
  const de_PutMetricAlarmCommandError = async (output, context) => {
@@ -1637,10 +1531,9 @@ const de_PutMetricAlarmCommandError = async (output, context) => {
1637
1531
  throw await de_LimitExceededFaultRes(parsedOutput, context);
1638
1532
  default:
1639
1533
  const parsedBody = parsedOutput.body;
1640
- (0, smithy_client_1.throwDefaultError)({
1534
+ return throwDefaultError({
1641
1535
  output,
1642
1536
  parsedBody: parsedBody.Error,
1643
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1644
1537
  errorCode,
1645
1538
  });
1646
1539
  }
@@ -1653,7 +1546,7 @@ const de_PutMetricDataCommand = async (output, context) => {
1653
1546
  const response = {
1654
1547
  $metadata: deserializeMetadata(output),
1655
1548
  };
1656
- return Promise.resolve(response);
1549
+ return response;
1657
1550
  };
1658
1551
  exports.de_PutMetricDataCommand = de_PutMetricDataCommand;
1659
1552
  const de_PutMetricDataCommandError = async (output, context) => {
@@ -1677,10 +1570,9 @@ const de_PutMetricDataCommandError = async (output, context) => {
1677
1570
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1678
1571
  default:
1679
1572
  const parsedBody = parsedOutput.body;
1680
- (0, smithy_client_1.throwDefaultError)({
1573
+ return throwDefaultError({
1681
1574
  output,
1682
1575
  parsedBody: parsedBody.Error,
1683
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1684
1576
  errorCode,
1685
1577
  });
1686
1578
  }
@@ -1696,7 +1588,7 @@ const de_PutMetricStreamCommand = async (output, context) => {
1696
1588
  $metadata: deserializeMetadata(output),
1697
1589
  ...contents,
1698
1590
  };
1699
- return Promise.resolve(response);
1591
+ return response;
1700
1592
  };
1701
1593
  exports.de_PutMetricStreamCommand = de_PutMetricStreamCommand;
1702
1594
  const de_PutMetricStreamCommandError = async (output, context) => {
@@ -1723,10 +1615,9 @@ const de_PutMetricStreamCommandError = async (output, context) => {
1723
1615
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1724
1616
  default:
1725
1617
  const parsedBody = parsedOutput.body;
1726
- (0, smithy_client_1.throwDefaultError)({
1618
+ return throwDefaultError({
1727
1619
  output,
1728
1620
  parsedBody: parsedBody.Error,
1729
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1730
1621
  errorCode,
1731
1622
  });
1732
1623
  }
@@ -1739,7 +1630,7 @@ const de_SetAlarmStateCommand = async (output, context) => {
1739
1630
  const response = {
1740
1631
  $metadata: deserializeMetadata(output),
1741
1632
  };
1742
- return Promise.resolve(response);
1633
+ return response;
1743
1634
  };
1744
1635
  exports.de_SetAlarmStateCommand = de_SetAlarmStateCommand;
1745
1636
  const de_SetAlarmStateCommandError = async (output, context) => {
@@ -1757,10 +1648,9 @@ const de_SetAlarmStateCommandError = async (output, context) => {
1757
1648
  throw await de_ResourceNotFoundRes(parsedOutput, context);
1758
1649
  default:
1759
1650
  const parsedBody = parsedOutput.body;
1760
- (0, smithy_client_1.throwDefaultError)({
1651
+ return throwDefaultError({
1761
1652
  output,
1762
1653
  parsedBody: parsedBody.Error,
1763
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1764
1654
  errorCode,
1765
1655
  });
1766
1656
  }
@@ -1776,7 +1666,7 @@ const de_StartMetricStreamsCommand = async (output, context) => {
1776
1666
  $metadata: deserializeMetadata(output),
1777
1667
  ...contents,
1778
1668
  };
1779
- return Promise.resolve(response);
1669
+ return response;
1780
1670
  };
1781
1671
  exports.de_StartMetricStreamsCommand = de_StartMetricStreamsCommand;
1782
1672
  const de_StartMetricStreamsCommandError = async (output, context) => {
@@ -1797,10 +1687,9 @@ const de_StartMetricStreamsCommandError = async (output, context) => {
1797
1687
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1798
1688
  default:
1799
1689
  const parsedBody = parsedOutput.body;
1800
- (0, smithy_client_1.throwDefaultError)({
1690
+ return throwDefaultError({
1801
1691
  output,
1802
1692
  parsedBody: parsedBody.Error,
1803
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1804
1693
  errorCode,
1805
1694
  });
1806
1695
  }
@@ -1816,7 +1705,7 @@ const de_StopMetricStreamsCommand = async (output, context) => {
1816
1705
  $metadata: deserializeMetadata(output),
1817
1706
  ...contents,
1818
1707
  };
1819
- return Promise.resolve(response);
1708
+ return response;
1820
1709
  };
1821
1710
  exports.de_StopMetricStreamsCommand = de_StopMetricStreamsCommand;
1822
1711
  const de_StopMetricStreamsCommandError = async (output, context) => {
@@ -1837,10 +1726,9 @@ const de_StopMetricStreamsCommandError = async (output, context) => {
1837
1726
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1838
1727
  default:
1839
1728
  const parsedBody = parsedOutput.body;
1840
- (0, smithy_client_1.throwDefaultError)({
1729
+ return throwDefaultError({
1841
1730
  output,
1842
1731
  parsedBody: parsedBody.Error,
1843
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1844
1732
  errorCode,
1845
1733
  });
1846
1734
  }
@@ -1856,7 +1744,7 @@ const de_TagResourceCommand = async (output, context) => {
1856
1744
  $metadata: deserializeMetadata(output),
1857
1745
  ...contents,
1858
1746
  };
1859
- return Promise.resolve(response);
1747
+ return response;
1860
1748
  };
1861
1749
  exports.de_TagResourceCommand = de_TagResourceCommand;
1862
1750
  const de_TagResourceCommandError = async (output, context) => {
@@ -1880,10 +1768,9 @@ const de_TagResourceCommandError = async (output, context) => {
1880
1768
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1881
1769
  default:
1882
1770
  const parsedBody = parsedOutput.body;
1883
- (0, smithy_client_1.throwDefaultError)({
1771
+ return throwDefaultError({
1884
1772
  output,
1885
1773
  parsedBody: parsedBody.Error,
1886
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1887
1774
  errorCode,
1888
1775
  });
1889
1776
  }
@@ -1899,7 +1786,7 @@ const de_UntagResourceCommand = async (output, context) => {
1899
1786
  $metadata: deserializeMetadata(output),
1900
1787
  ...contents,
1901
1788
  };
1902
- return Promise.resolve(response);
1789
+ return response;
1903
1790
  };
1904
1791
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
1905
1792
  const de_UntagResourceCommandError = async (output, context) => {
@@ -1923,10 +1810,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1923
1810
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1924
1811
  default:
1925
1812
  const parsedBody = parsedOutput.body;
1926
- (0, smithy_client_1.throwDefaultError)({
1813
+ return throwDefaultError({
1927
1814
  output,
1928
1815
  parsedBody: parsedBody.Error,
1929
- exceptionCtor: CloudWatchServiceException_1.CloudWatchServiceException,
1930
1816
  errorCode,
1931
1817
  });
1932
1818
  }
@@ -4944,6 +4830,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
4944
4830
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
4945
4831
  };
4946
4832
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4833
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudWatchServiceException_1.CloudWatchServiceException);
4947
4834
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
4948
4835
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
4949
4836
  const contents = {
@@ -4962,6 +4849,9 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
4962
4849
  }
4963
4850
  return new protocol_http_1.HttpRequest(contents);
4964
4851
  };
4852
+ const SHARED_HEADERS = {
4853
+ "content-type": "application/x-www-form-urlencoded",
4854
+ };
4965
4855
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
4966
4856
  if (encoded.length) {
4967
4857
  const parser = new fast_xml_parser_1.XMLParser({