@aws-sdk/client-resource-groups-tagging-api 3.312.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,56 +8,56 @@ const ResourceGroupsTaggingAPIServiceException_1 = require("../models/ResourceGr
8
8
  const se_DescribeReportCreationCommand = async (input, context) => {
9
9
  const headers = sharedHeaders("DescribeReportCreation");
10
10
  let body;
11
- body = JSON.stringify(se_DescribeReportCreationInput(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
12
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
13
  };
14
14
  exports.se_DescribeReportCreationCommand = se_DescribeReportCreationCommand;
15
15
  const se_GetComplianceSummaryCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("GetComplianceSummary");
17
17
  let body;
18
- body = JSON.stringify(se_GetComplianceSummaryInput(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
19
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
20
  };
21
21
  exports.se_GetComplianceSummaryCommand = se_GetComplianceSummaryCommand;
22
22
  const se_GetResourcesCommand = async (input, context) => {
23
23
  const headers = sharedHeaders("GetResources");
24
24
  let body;
25
- body = JSON.stringify(se_GetResourcesInput(input, context));
25
+ body = JSON.stringify((0, smithy_client_1._json)(input));
26
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
27
  };
28
28
  exports.se_GetResourcesCommand = se_GetResourcesCommand;
29
29
  const se_GetTagKeysCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("GetTagKeys");
31
31
  let body;
32
- body = JSON.stringify(se_GetTagKeysInput(input, context));
32
+ body = JSON.stringify((0, smithy_client_1._json)(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  exports.se_GetTagKeysCommand = se_GetTagKeysCommand;
36
36
  const se_GetTagValuesCommand = async (input, context) => {
37
37
  const headers = sharedHeaders("GetTagValues");
38
38
  let body;
39
- body = JSON.stringify(se_GetTagValuesInput(input, context));
39
+ body = JSON.stringify((0, smithy_client_1._json)(input));
40
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
41
  };
42
42
  exports.se_GetTagValuesCommand = se_GetTagValuesCommand;
43
43
  const se_StartReportCreationCommand = async (input, context) => {
44
44
  const headers = sharedHeaders("StartReportCreation");
45
45
  let body;
46
- body = JSON.stringify(se_StartReportCreationInput(input, context));
46
+ body = JSON.stringify((0, smithy_client_1._json)(input));
47
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
48
  };
49
49
  exports.se_StartReportCreationCommand = se_StartReportCreationCommand;
50
50
  const se_TagResourcesCommand = async (input, context) => {
51
51
  const headers = sharedHeaders("TagResources");
52
52
  let body;
53
- body = JSON.stringify(se_TagResourcesInput(input, context));
53
+ body = JSON.stringify((0, smithy_client_1._json)(input));
54
54
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
55
55
  };
56
56
  exports.se_TagResourcesCommand = se_TagResourcesCommand;
57
57
  const se_UntagResourcesCommand = async (input, context) => {
58
58
  const headers = sharedHeaders("UntagResources");
59
59
  let body;
60
- body = JSON.stringify(se_UntagResourcesInput(input, context));
60
+ body = JSON.stringify((0, smithy_client_1._json)(input));
61
61
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
62
62
  };
63
63
  exports.se_UntagResourcesCommand = se_UntagResourcesCommand;
@@ -67,12 +67,12 @@ const de_DescribeReportCreationCommand = async (output, context) => {
67
67
  }
68
68
  const data = await parseBody(output.body, context);
69
69
  let contents = {};
70
- contents = de_DescribeReportCreationOutput(data, context);
70
+ contents = (0, smithy_client_1._json)(data);
71
71
  const response = {
72
72
  $metadata: deserializeMetadata(output),
73
73
  ...contents,
74
74
  };
75
- return Promise.resolve(response);
75
+ return response;
76
76
  };
77
77
  exports.de_DescribeReportCreationCommand = de_DescribeReportCreationCommand;
78
78
  const de_DescribeReportCreationCommandError = async (output, context) => {
@@ -96,10 +96,9 @@ const de_DescribeReportCreationCommandError = async (output, context) => {
96
96
  throw await de_ThrottledExceptionRes(parsedOutput, context);
97
97
  default:
98
98
  const parsedBody = parsedOutput.body;
99
- (0, smithy_client_1.throwDefaultError)({
99
+ return throwDefaultError({
100
100
  output,
101
101
  parsedBody,
102
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
103
102
  errorCode,
104
103
  });
105
104
  }
@@ -110,12 +109,12 @@ const de_GetComplianceSummaryCommand = async (output, context) => {
110
109
  }
111
110
  const data = await parseBody(output.body, context);
112
111
  let contents = {};
113
- contents = de_GetComplianceSummaryOutput(data, context);
112
+ contents = (0, smithy_client_1._json)(data);
114
113
  const response = {
115
114
  $metadata: deserializeMetadata(output),
116
115
  ...contents,
117
116
  };
118
- return Promise.resolve(response);
117
+ return response;
119
118
  };
120
119
  exports.de_GetComplianceSummaryCommand = de_GetComplianceSummaryCommand;
121
120
  const de_GetComplianceSummaryCommandError = async (output, context) => {
@@ -139,10 +138,9 @@ const de_GetComplianceSummaryCommandError = async (output, context) => {
139
138
  throw await de_ThrottledExceptionRes(parsedOutput, context);
140
139
  default:
141
140
  const parsedBody = parsedOutput.body;
142
- (0, smithy_client_1.throwDefaultError)({
141
+ return throwDefaultError({
143
142
  output,
144
143
  parsedBody,
145
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
146
144
  errorCode,
147
145
  });
148
146
  }
@@ -153,12 +151,12 @@ const de_GetResourcesCommand = async (output, context) => {
153
151
  }
154
152
  const data = await parseBody(output.body, context);
155
153
  let contents = {};
156
- contents = de_GetResourcesOutput(data, context);
154
+ contents = (0, smithy_client_1._json)(data);
157
155
  const response = {
158
156
  $metadata: deserializeMetadata(output),
159
157
  ...contents,
160
158
  };
161
- return Promise.resolve(response);
159
+ return response;
162
160
  };
163
161
  exports.de_GetResourcesCommand = de_GetResourcesCommand;
164
162
  const de_GetResourcesCommandError = async (output, context) => {
@@ -182,10 +180,9 @@ const de_GetResourcesCommandError = async (output, context) => {
182
180
  throw await de_ThrottledExceptionRes(parsedOutput, context);
183
181
  default:
184
182
  const parsedBody = parsedOutput.body;
185
- (0, smithy_client_1.throwDefaultError)({
183
+ return throwDefaultError({
186
184
  output,
187
185
  parsedBody,
188
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
189
186
  errorCode,
190
187
  });
191
188
  }
@@ -196,12 +193,12 @@ const de_GetTagKeysCommand = async (output, context) => {
196
193
  }
197
194
  const data = await parseBody(output.body, context);
198
195
  let contents = {};
199
- contents = de_GetTagKeysOutput(data, context);
196
+ contents = (0, smithy_client_1._json)(data);
200
197
  const response = {
201
198
  $metadata: deserializeMetadata(output),
202
199
  ...contents,
203
200
  };
204
- return Promise.resolve(response);
201
+ return response;
205
202
  };
206
203
  exports.de_GetTagKeysCommand = de_GetTagKeysCommand;
207
204
  const de_GetTagKeysCommandError = async (output, context) => {
@@ -225,10 +222,9 @@ const de_GetTagKeysCommandError = async (output, context) => {
225
222
  throw await de_ThrottledExceptionRes(parsedOutput, context);
226
223
  default:
227
224
  const parsedBody = parsedOutput.body;
228
- (0, smithy_client_1.throwDefaultError)({
225
+ return throwDefaultError({
229
226
  output,
230
227
  parsedBody,
231
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
232
228
  errorCode,
233
229
  });
234
230
  }
@@ -239,12 +235,12 @@ const de_GetTagValuesCommand = async (output, context) => {
239
235
  }
240
236
  const data = await parseBody(output.body, context);
241
237
  let contents = {};
242
- contents = de_GetTagValuesOutput(data, context);
238
+ contents = (0, smithy_client_1._json)(data);
243
239
  const response = {
244
240
  $metadata: deserializeMetadata(output),
245
241
  ...contents,
246
242
  };
247
- return Promise.resolve(response);
243
+ return response;
248
244
  };
249
245
  exports.de_GetTagValuesCommand = de_GetTagValuesCommand;
250
246
  const de_GetTagValuesCommandError = async (output, context) => {
@@ -268,10 +264,9 @@ const de_GetTagValuesCommandError = async (output, context) => {
268
264
  throw await de_ThrottledExceptionRes(parsedOutput, context);
269
265
  default:
270
266
  const parsedBody = parsedOutput.body;
271
- (0, smithy_client_1.throwDefaultError)({
267
+ return throwDefaultError({
272
268
  output,
273
269
  parsedBody,
274
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
275
270
  errorCode,
276
271
  });
277
272
  }
@@ -282,12 +277,12 @@ const de_StartReportCreationCommand = async (output, context) => {
282
277
  }
283
278
  const data = await parseBody(output.body, context);
284
279
  let contents = {};
285
- contents = de_StartReportCreationOutput(data, context);
280
+ contents = (0, smithy_client_1._json)(data);
286
281
  const response = {
287
282
  $metadata: deserializeMetadata(output),
288
283
  ...contents,
289
284
  };
290
- return Promise.resolve(response);
285
+ return response;
291
286
  };
292
287
  exports.de_StartReportCreationCommand = de_StartReportCreationCommand;
293
288
  const de_StartReportCreationCommandError = async (output, context) => {
@@ -314,10 +309,9 @@ const de_StartReportCreationCommandError = async (output, context) => {
314
309
  throw await de_ThrottledExceptionRes(parsedOutput, context);
315
310
  default:
316
311
  const parsedBody = parsedOutput.body;
317
- (0, smithy_client_1.throwDefaultError)({
312
+ return throwDefaultError({
318
313
  output,
319
314
  parsedBody,
320
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
321
315
  errorCode,
322
316
  });
323
317
  }
@@ -328,12 +322,12 @@ const de_TagResourcesCommand = async (output, context) => {
328
322
  }
329
323
  const data = await parseBody(output.body, context);
330
324
  let contents = {};
331
- contents = de_TagResourcesOutput(data, context);
325
+ contents = (0, smithy_client_1._json)(data);
332
326
  const response = {
333
327
  $metadata: deserializeMetadata(output),
334
328
  ...contents,
335
329
  };
336
- return Promise.resolve(response);
330
+ return response;
337
331
  };
338
332
  exports.de_TagResourcesCommand = de_TagResourcesCommand;
339
333
  const de_TagResourcesCommandError = async (output, context) => {
@@ -354,10 +348,9 @@ const de_TagResourcesCommandError = async (output, context) => {
354
348
  throw await de_ThrottledExceptionRes(parsedOutput, context);
355
349
  default:
356
350
  const parsedBody = parsedOutput.body;
357
- (0, smithy_client_1.throwDefaultError)({
351
+ return throwDefaultError({
358
352
  output,
359
353
  parsedBody,
360
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
361
354
  errorCode,
362
355
  });
363
356
  }
@@ -368,12 +361,12 @@ const de_UntagResourcesCommand = async (output, context) => {
368
361
  }
369
362
  const data = await parseBody(output.body, context);
370
363
  let contents = {};
371
- contents = de_UntagResourcesOutput(data, context);
364
+ contents = (0, smithy_client_1._json)(data);
372
365
  const response = {
373
366
  $metadata: deserializeMetadata(output),
374
367
  ...contents,
375
368
  };
376
- return Promise.resolve(response);
369
+ return response;
377
370
  };
378
371
  exports.de_UntagResourcesCommand = de_UntagResourcesCommand;
379
372
  const de_UntagResourcesCommandError = async (output, context) => {
@@ -394,17 +387,16 @@ const de_UntagResourcesCommandError = async (output, context) => {
394
387
  throw await de_ThrottledExceptionRes(parsedOutput, context);
395
388
  default:
396
389
  const parsedBody = parsedOutput.body;
397
- (0, smithy_client_1.throwDefaultError)({
390
+ return throwDefaultError({
398
391
  output,
399
392
  parsedBody,
400
- exceptionCtor: ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException,
401
393
  errorCode,
402
394
  });
403
395
  }
404
396
  };
405
397
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
406
398
  const body = parsedOutput.body;
407
- const deserialized = de_ConcurrentModificationException(body, context);
399
+ const deserialized = (0, smithy_client_1._json)(body);
408
400
  const exception = new models_0_1.ConcurrentModificationException({
409
401
  $metadata: deserializeMetadata(parsedOutput),
410
402
  ...deserialized,
@@ -413,7 +405,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
413
405
  };
414
406
  const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
415
407
  const body = parsedOutput.body;
416
- const deserialized = de_ConstraintViolationException(body, context);
408
+ const deserialized = (0, smithy_client_1._json)(body);
417
409
  const exception = new models_0_1.ConstraintViolationException({
418
410
  $metadata: deserializeMetadata(parsedOutput),
419
411
  ...deserialized,
@@ -422,7 +414,7 @@ const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
422
414
  };
423
415
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
424
416
  const body = parsedOutput.body;
425
- const deserialized = de_InternalServiceException(body, context);
417
+ const deserialized = (0, smithy_client_1._json)(body);
426
418
  const exception = new models_0_1.InternalServiceException({
427
419
  $metadata: deserializeMetadata(parsedOutput),
428
420
  ...deserialized,
@@ -431,7 +423,7 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
431
423
  };
432
424
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
433
425
  const body = parsedOutput.body;
434
- const deserialized = de_InvalidParameterException(body, context);
426
+ const deserialized = (0, smithy_client_1._json)(body);
435
427
  const exception = new models_0_1.InvalidParameterException({
436
428
  $metadata: deserializeMetadata(parsedOutput),
437
429
  ...deserialized,
@@ -440,7 +432,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
440
432
  };
441
433
  const de_PaginationTokenExpiredExceptionRes = async (parsedOutput, context) => {
442
434
  const body = parsedOutput.body;
443
- const deserialized = de_PaginationTokenExpiredException(body, context);
435
+ const deserialized = (0, smithy_client_1._json)(body);
444
436
  const exception = new models_0_1.PaginationTokenExpiredException({
445
437
  $metadata: deserializeMetadata(parsedOutput),
446
438
  ...deserialized,
@@ -449,338 +441,13 @@ const de_PaginationTokenExpiredExceptionRes = async (parsedOutput, context) => {
449
441
  };
450
442
  const de_ThrottledExceptionRes = async (parsedOutput, context) => {
451
443
  const body = parsedOutput.body;
452
- const deserialized = de_ThrottledException(body, context);
444
+ const deserialized = (0, smithy_client_1._json)(body);
453
445
  const exception = new models_0_1.ThrottledException({
454
446
  $metadata: deserializeMetadata(parsedOutput),
455
447
  ...deserialized,
456
448
  });
457
449
  return (0, smithy_client_1.decorateServiceException)(exception, body);
458
450
  };
459
- const se_DescribeReportCreationInput = (input, context) => {
460
- return {};
461
- };
462
- const se_GetComplianceSummaryInput = (input, context) => {
463
- return {
464
- ...(input.GroupBy != null && { GroupBy: se_GroupBy(input.GroupBy, context) }),
465
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
466
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
467
- ...(input.RegionFilters != null && { RegionFilters: se_RegionFilterList(input.RegionFilters, context) }),
468
- ...(input.ResourceTypeFilters != null && {
469
- ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context),
470
- }),
471
- ...(input.TagKeyFilters != null && { TagKeyFilters: se_TagKeyFilterList(input.TagKeyFilters, context) }),
472
- ...(input.TargetIdFilters != null && { TargetIdFilters: se_TargetIdFilterList(input.TargetIdFilters, context) }),
473
- };
474
- };
475
- const se_GetResourcesInput = (input, context) => {
476
- return {
477
- ...(input.ExcludeCompliantResources != null && { ExcludeCompliantResources: input.ExcludeCompliantResources }),
478
- ...(input.IncludeComplianceDetails != null && { IncludeComplianceDetails: input.IncludeComplianceDetails }),
479
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
480
- ...(input.ResourceARNList != null && { ResourceARNList: se_ResourceARNListForGet(input.ResourceARNList, context) }),
481
- ...(input.ResourceTypeFilters != null && {
482
- ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context),
483
- }),
484
- ...(input.ResourcesPerPage != null && { ResourcesPerPage: input.ResourcesPerPage }),
485
- ...(input.TagFilters != null && { TagFilters: se_TagFilterList(input.TagFilters, context) }),
486
- ...(input.TagsPerPage != null && { TagsPerPage: input.TagsPerPage }),
487
- };
488
- };
489
- const se_GetTagKeysInput = (input, context) => {
490
- return {
491
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
492
- };
493
- };
494
- const se_GetTagValuesInput = (input, context) => {
495
- return {
496
- ...(input.Key != null && { Key: input.Key }),
497
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
498
- };
499
- };
500
- const se_GroupBy = (input, context) => {
501
- return input
502
- .filter((e) => e != null)
503
- .map((entry) => {
504
- return entry;
505
- });
506
- };
507
- const se_RegionFilterList = (input, context) => {
508
- return input
509
- .filter((e) => e != null)
510
- .map((entry) => {
511
- return entry;
512
- });
513
- };
514
- const se_ResourceARNListForGet = (input, context) => {
515
- return input
516
- .filter((e) => e != null)
517
- .map((entry) => {
518
- return entry;
519
- });
520
- };
521
- const se_ResourceARNListForTagUntag = (input, context) => {
522
- return input
523
- .filter((e) => e != null)
524
- .map((entry) => {
525
- return entry;
526
- });
527
- };
528
- const se_ResourceTypeFilterList = (input, context) => {
529
- return input
530
- .filter((e) => e != null)
531
- .map((entry) => {
532
- return entry;
533
- });
534
- };
535
- const se_StartReportCreationInput = (input, context) => {
536
- return {
537
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
538
- };
539
- };
540
- const se_TagFilter = (input, context) => {
541
- return {
542
- ...(input.Key != null && { Key: input.Key }),
543
- ...(input.Values != null && { Values: se_TagValueList(input.Values, context) }),
544
- };
545
- };
546
- const se_TagFilterList = (input, context) => {
547
- return input
548
- .filter((e) => e != null)
549
- .map((entry) => {
550
- return se_TagFilter(entry, context);
551
- });
552
- };
553
- const se_TagKeyFilterList = (input, context) => {
554
- return input
555
- .filter((e) => e != null)
556
- .map((entry) => {
557
- return entry;
558
- });
559
- };
560
- const se_TagKeyListForUntag = (input, context) => {
561
- return input
562
- .filter((e) => e != null)
563
- .map((entry) => {
564
- return entry;
565
- });
566
- };
567
- const se_TagMap = (input, context) => {
568
- return Object.entries(input).reduce((acc, [key, value]) => {
569
- if (value === null) {
570
- return acc;
571
- }
572
- acc[key] = value;
573
- return acc;
574
- }, {});
575
- };
576
- const se_TagResourcesInput = (input, context) => {
577
- return {
578
- ...(input.ResourceARNList != null && {
579
- ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context),
580
- }),
581
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
582
- };
583
- };
584
- const se_TagValueList = (input, context) => {
585
- return input
586
- .filter((e) => e != null)
587
- .map((entry) => {
588
- return entry;
589
- });
590
- };
591
- const se_TargetIdFilterList = (input, context) => {
592
- return input
593
- .filter((e) => e != null)
594
- .map((entry) => {
595
- return entry;
596
- });
597
- };
598
- const se_UntagResourcesInput = (input, context) => {
599
- return {
600
- ...(input.ResourceARNList != null && {
601
- ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context),
602
- }),
603
- ...(input.TagKeys != null && { TagKeys: se_TagKeyListForUntag(input.TagKeys, context) }),
604
- };
605
- };
606
- const de_ComplianceDetails = (output, context) => {
607
- return {
608
- ComplianceStatus: (0, smithy_client_1.expectBoolean)(output.ComplianceStatus),
609
- KeysWithNoncompliantValues: output.KeysWithNoncompliantValues != null ? de_TagKeyList(output.KeysWithNoncompliantValues, context) : undefined,
610
- NoncompliantKeys: output.NoncompliantKeys != null ? de_TagKeyList(output.NoncompliantKeys, context) : undefined,
611
- };
612
- };
613
- const de_ConcurrentModificationException = (output, context) => {
614
- return {
615
- Message: (0, smithy_client_1.expectString)(output.Message),
616
- };
617
- };
618
- const de_ConstraintViolationException = (output, context) => {
619
- return {
620
- Message: (0, smithy_client_1.expectString)(output.Message),
621
- };
622
- };
623
- const de_DescribeReportCreationOutput = (output, context) => {
624
- return {
625
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
626
- S3Location: (0, smithy_client_1.expectString)(output.S3Location),
627
- StartDate: (0, smithy_client_1.expectString)(output.StartDate),
628
- Status: (0, smithy_client_1.expectString)(output.Status),
629
- };
630
- };
631
- const de_FailedResourcesMap = (output, context) => {
632
- return Object.entries(output).reduce((acc, [key, value]) => {
633
- if (value === null) {
634
- return acc;
635
- }
636
- acc[key] = de_FailureInfo(value, context);
637
- return acc;
638
- }, {});
639
- };
640
- const de_FailureInfo = (output, context) => {
641
- return {
642
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
643
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
644
- StatusCode: (0, smithy_client_1.expectInt32)(output.StatusCode),
645
- };
646
- };
647
- const de_GetComplianceSummaryOutput = (output, context) => {
648
- return {
649
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
650
- SummaryList: output.SummaryList != null ? de_SummaryList(output.SummaryList, context) : undefined,
651
- };
652
- };
653
- const de_GetResourcesOutput = (output, context) => {
654
- return {
655
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
656
- ResourceTagMappingList: output.ResourceTagMappingList != null
657
- ? de_ResourceTagMappingList(output.ResourceTagMappingList, context)
658
- : undefined,
659
- };
660
- };
661
- const de_GetTagKeysOutput = (output, context) => {
662
- return {
663
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
664
- TagKeys: output.TagKeys != null ? de_TagKeyList(output.TagKeys, context) : undefined,
665
- };
666
- };
667
- const de_GetTagValuesOutput = (output, context) => {
668
- return {
669
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
670
- TagValues: output.TagValues != null ? de_TagValuesOutputList(output.TagValues, context) : undefined,
671
- };
672
- };
673
- const de_InternalServiceException = (output, context) => {
674
- return {
675
- Message: (0, smithy_client_1.expectString)(output.Message),
676
- };
677
- };
678
- const de_InvalidParameterException = (output, context) => {
679
- return {
680
- Message: (0, smithy_client_1.expectString)(output.Message),
681
- };
682
- };
683
- const de_PaginationTokenExpiredException = (output, context) => {
684
- return {
685
- Message: (0, smithy_client_1.expectString)(output.Message),
686
- };
687
- };
688
- const de_ResourceTagMapping = (output, context) => {
689
- return {
690
- ComplianceDetails: output.ComplianceDetails != null ? de_ComplianceDetails(output.ComplianceDetails, context) : undefined,
691
- ResourceARN: (0, smithy_client_1.expectString)(output.ResourceARN),
692
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
693
- };
694
- };
695
- const de_ResourceTagMappingList = (output, context) => {
696
- const retVal = (output || [])
697
- .filter((e) => e != null)
698
- .map((entry) => {
699
- if (entry === null) {
700
- return null;
701
- }
702
- return de_ResourceTagMapping(entry, context);
703
- });
704
- return retVal;
705
- };
706
- const de_StartReportCreationOutput = (output, context) => {
707
- return {};
708
- };
709
- const de_Summary = (output, context) => {
710
- return {
711
- LastUpdated: (0, smithy_client_1.expectString)(output.LastUpdated),
712
- NonCompliantResources: (0, smithy_client_1.expectLong)(output.NonCompliantResources),
713
- Region: (0, smithy_client_1.expectString)(output.Region),
714
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
715
- TargetId: (0, smithy_client_1.expectString)(output.TargetId),
716
- TargetIdType: (0, smithy_client_1.expectString)(output.TargetIdType),
717
- };
718
- };
719
- const de_SummaryList = (output, context) => {
720
- const retVal = (output || [])
721
- .filter((e) => e != null)
722
- .map((entry) => {
723
- if (entry === null) {
724
- return null;
725
- }
726
- return de_Summary(entry, context);
727
- });
728
- return retVal;
729
- };
730
- const de_Tag = (output, context) => {
731
- return {
732
- Key: (0, smithy_client_1.expectString)(output.Key),
733
- Value: (0, smithy_client_1.expectString)(output.Value),
734
- };
735
- };
736
- const de_TagKeyList = (output, context) => {
737
- const retVal = (output || [])
738
- .filter((e) => e != null)
739
- .map((entry) => {
740
- if (entry === null) {
741
- return null;
742
- }
743
- return (0, smithy_client_1.expectString)(entry);
744
- });
745
- return retVal;
746
- };
747
- const de_TagList = (output, context) => {
748
- const retVal = (output || [])
749
- .filter((e) => e != null)
750
- .map((entry) => {
751
- if (entry === null) {
752
- return null;
753
- }
754
- return de_Tag(entry, context);
755
- });
756
- return retVal;
757
- };
758
- const de_TagResourcesOutput = (output, context) => {
759
- return {
760
- FailedResourcesMap: output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined,
761
- };
762
- };
763
- const de_TagValuesOutputList = (output, context) => {
764
- const retVal = (output || [])
765
- .filter((e) => e != null)
766
- .map((entry) => {
767
- if (entry === null) {
768
- return null;
769
- }
770
- return (0, smithy_client_1.expectString)(entry);
771
- });
772
- return retVal;
773
- };
774
- const de_ThrottledException = (output, context) => {
775
- return {
776
- Message: (0, smithy_client_1.expectString)(output.Message),
777
- };
778
- };
779
- const de_UntagResourcesOutput = (output, context) => {
780
- return {
781
- FailedResourcesMap: output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined,
782
- };
783
- };
784
451
  const deserializeMetadata = (output) => ({
785
452
  httpStatusCode: output.statusCode,
786
453
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -794,6 +461,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
794
461
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
795
462
  };
796
463
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
464
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ResourceGroupsTaggingAPIServiceException_1.ResourceGroupsTaggingAPIServiceException);
797
465
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
798
466
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
799
467
  const contents = {
@@ -1,53 +1,53 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { ConcurrentModificationException, ConstraintViolationException, InternalServiceException, InvalidParameterException, PaginationTokenExpiredException, ThrottledException, } from "../models/models_0";
4
4
  import { ResourceGroupsTaggingAPIServiceException as __BaseException } from "../models/ResourceGroupsTaggingAPIServiceException";
5
5
  export const se_DescribeReportCreationCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("DescribeReportCreation");
7
7
  let body;
8
- body = JSON.stringify(se_DescribeReportCreationInput(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_GetComplianceSummaryCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("GetComplianceSummary");
13
13
  let body;
14
- body = JSON.stringify(se_GetComplianceSummaryInput(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_GetResourcesCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("GetResources");
19
19
  let body;
20
- body = JSON.stringify(se_GetResourcesInput(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_GetTagKeysCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("GetTagKeys");
25
25
  let body;
26
- body = JSON.stringify(se_GetTagKeysInput(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_GetTagValuesCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("GetTagValues");
31
31
  let body;
32
- body = JSON.stringify(se_GetTagValuesInput(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_StartReportCreationCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("StartReportCreation");
37
37
  let body;
38
- body = JSON.stringify(se_StartReportCreationInput(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_TagResourcesCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("TagResources");
43
43
  let body;
44
- body = JSON.stringify(se_TagResourcesInput(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_UntagResourcesCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("UntagResources");
49
49
  let body;
50
- body = JSON.stringify(se_UntagResourcesInput(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const de_DescribeReportCreationCommand = async (output, context) => {
@@ -56,12 +56,12 @@ export const de_DescribeReportCreationCommand = async (output, context) => {
56
56
  }
57
57
  const data = await parseBody(output.body, context);
58
58
  let contents = {};
59
- contents = de_DescribeReportCreationOutput(data, context);
59
+ contents = _json(data);
60
60
  const response = {
61
61
  $metadata: deserializeMetadata(output),
62
62
  ...contents,
63
63
  };
64
- return Promise.resolve(response);
64
+ return response;
65
65
  };
66
66
  const de_DescribeReportCreationCommandError = async (output, context) => {
67
67
  const parsedOutput = {
@@ -84,10 +84,9 @@ const de_DescribeReportCreationCommandError = async (output, context) => {
84
84
  throw await de_ThrottledExceptionRes(parsedOutput, context);
85
85
  default:
86
86
  const parsedBody = parsedOutput.body;
87
- throwDefaultError({
87
+ return throwDefaultError({
88
88
  output,
89
89
  parsedBody,
90
- exceptionCtor: __BaseException,
91
90
  errorCode,
92
91
  });
93
92
  }
@@ -98,12 +97,12 @@ export const de_GetComplianceSummaryCommand = async (output, context) => {
98
97
  }
99
98
  const data = await parseBody(output.body, context);
100
99
  let contents = {};
101
- contents = de_GetComplianceSummaryOutput(data, context);
100
+ contents = _json(data);
102
101
  const response = {
103
102
  $metadata: deserializeMetadata(output),
104
103
  ...contents,
105
104
  };
106
- return Promise.resolve(response);
105
+ return response;
107
106
  };
108
107
  const de_GetComplianceSummaryCommandError = async (output, context) => {
109
108
  const parsedOutput = {
@@ -126,10 +125,9 @@ const de_GetComplianceSummaryCommandError = async (output, context) => {
126
125
  throw await de_ThrottledExceptionRes(parsedOutput, context);
127
126
  default:
128
127
  const parsedBody = parsedOutput.body;
129
- throwDefaultError({
128
+ return throwDefaultError({
130
129
  output,
131
130
  parsedBody,
132
- exceptionCtor: __BaseException,
133
131
  errorCode,
134
132
  });
135
133
  }
@@ -140,12 +138,12 @@ export const de_GetResourcesCommand = async (output, context) => {
140
138
  }
141
139
  const data = await parseBody(output.body, context);
142
140
  let contents = {};
143
- contents = de_GetResourcesOutput(data, context);
141
+ contents = _json(data);
144
142
  const response = {
145
143
  $metadata: deserializeMetadata(output),
146
144
  ...contents,
147
145
  };
148
- return Promise.resolve(response);
146
+ return response;
149
147
  };
150
148
  const de_GetResourcesCommandError = async (output, context) => {
151
149
  const parsedOutput = {
@@ -168,10 +166,9 @@ const de_GetResourcesCommandError = async (output, context) => {
168
166
  throw await de_ThrottledExceptionRes(parsedOutput, context);
169
167
  default:
170
168
  const parsedBody = parsedOutput.body;
171
- throwDefaultError({
169
+ return throwDefaultError({
172
170
  output,
173
171
  parsedBody,
174
- exceptionCtor: __BaseException,
175
172
  errorCode,
176
173
  });
177
174
  }
@@ -182,12 +179,12 @@ export const de_GetTagKeysCommand = async (output, context) => {
182
179
  }
183
180
  const data = await parseBody(output.body, context);
184
181
  let contents = {};
185
- contents = de_GetTagKeysOutput(data, context);
182
+ contents = _json(data);
186
183
  const response = {
187
184
  $metadata: deserializeMetadata(output),
188
185
  ...contents,
189
186
  };
190
- return Promise.resolve(response);
187
+ return response;
191
188
  };
192
189
  const de_GetTagKeysCommandError = async (output, context) => {
193
190
  const parsedOutput = {
@@ -210,10 +207,9 @@ const de_GetTagKeysCommandError = async (output, context) => {
210
207
  throw await de_ThrottledExceptionRes(parsedOutput, context);
211
208
  default:
212
209
  const parsedBody = parsedOutput.body;
213
- throwDefaultError({
210
+ return throwDefaultError({
214
211
  output,
215
212
  parsedBody,
216
- exceptionCtor: __BaseException,
217
213
  errorCode,
218
214
  });
219
215
  }
@@ -224,12 +220,12 @@ export const de_GetTagValuesCommand = async (output, context) => {
224
220
  }
225
221
  const data = await parseBody(output.body, context);
226
222
  let contents = {};
227
- contents = de_GetTagValuesOutput(data, context);
223
+ contents = _json(data);
228
224
  const response = {
229
225
  $metadata: deserializeMetadata(output),
230
226
  ...contents,
231
227
  };
232
- return Promise.resolve(response);
228
+ return response;
233
229
  };
234
230
  const de_GetTagValuesCommandError = async (output, context) => {
235
231
  const parsedOutput = {
@@ -252,10 +248,9 @@ const de_GetTagValuesCommandError = async (output, context) => {
252
248
  throw await de_ThrottledExceptionRes(parsedOutput, context);
253
249
  default:
254
250
  const parsedBody = parsedOutput.body;
255
- throwDefaultError({
251
+ return throwDefaultError({
256
252
  output,
257
253
  parsedBody,
258
- exceptionCtor: __BaseException,
259
254
  errorCode,
260
255
  });
261
256
  }
@@ -266,12 +261,12 @@ export const de_StartReportCreationCommand = async (output, context) => {
266
261
  }
267
262
  const data = await parseBody(output.body, context);
268
263
  let contents = {};
269
- contents = de_StartReportCreationOutput(data, context);
264
+ contents = _json(data);
270
265
  const response = {
271
266
  $metadata: deserializeMetadata(output),
272
267
  ...contents,
273
268
  };
274
- return Promise.resolve(response);
269
+ return response;
275
270
  };
276
271
  const de_StartReportCreationCommandError = async (output, context) => {
277
272
  const parsedOutput = {
@@ -297,10 +292,9 @@ const de_StartReportCreationCommandError = async (output, context) => {
297
292
  throw await de_ThrottledExceptionRes(parsedOutput, context);
298
293
  default:
299
294
  const parsedBody = parsedOutput.body;
300
- throwDefaultError({
295
+ return throwDefaultError({
301
296
  output,
302
297
  parsedBody,
303
- exceptionCtor: __BaseException,
304
298
  errorCode,
305
299
  });
306
300
  }
@@ -311,12 +305,12 @@ export const de_TagResourcesCommand = async (output, context) => {
311
305
  }
312
306
  const data = await parseBody(output.body, context);
313
307
  let contents = {};
314
- contents = de_TagResourcesOutput(data, context);
308
+ contents = _json(data);
315
309
  const response = {
316
310
  $metadata: deserializeMetadata(output),
317
311
  ...contents,
318
312
  };
319
- return Promise.resolve(response);
313
+ return response;
320
314
  };
321
315
  const de_TagResourcesCommandError = async (output, context) => {
322
316
  const parsedOutput = {
@@ -336,10 +330,9 @@ const de_TagResourcesCommandError = async (output, context) => {
336
330
  throw await de_ThrottledExceptionRes(parsedOutput, context);
337
331
  default:
338
332
  const parsedBody = parsedOutput.body;
339
- throwDefaultError({
333
+ return throwDefaultError({
340
334
  output,
341
335
  parsedBody,
342
- exceptionCtor: __BaseException,
343
336
  errorCode,
344
337
  });
345
338
  }
@@ -350,12 +343,12 @@ export const de_UntagResourcesCommand = async (output, context) => {
350
343
  }
351
344
  const data = await parseBody(output.body, context);
352
345
  let contents = {};
353
- contents = de_UntagResourcesOutput(data, context);
346
+ contents = _json(data);
354
347
  const response = {
355
348
  $metadata: deserializeMetadata(output),
356
349
  ...contents,
357
350
  };
358
- return Promise.resolve(response);
351
+ return response;
359
352
  };
360
353
  const de_UntagResourcesCommandError = async (output, context) => {
361
354
  const parsedOutput = {
@@ -375,17 +368,16 @@ const de_UntagResourcesCommandError = async (output, context) => {
375
368
  throw await de_ThrottledExceptionRes(parsedOutput, context);
376
369
  default:
377
370
  const parsedBody = parsedOutput.body;
378
- throwDefaultError({
371
+ return throwDefaultError({
379
372
  output,
380
373
  parsedBody,
381
- exceptionCtor: __BaseException,
382
374
  errorCode,
383
375
  });
384
376
  }
385
377
  };
386
378
  const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
387
379
  const body = parsedOutput.body;
388
- const deserialized = de_ConcurrentModificationException(body, context);
380
+ const deserialized = _json(body);
389
381
  const exception = new ConcurrentModificationException({
390
382
  $metadata: deserializeMetadata(parsedOutput),
391
383
  ...deserialized,
@@ -394,7 +386,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
394
386
  };
395
387
  const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
396
388
  const body = parsedOutput.body;
397
- const deserialized = de_ConstraintViolationException(body, context);
389
+ const deserialized = _json(body);
398
390
  const exception = new ConstraintViolationException({
399
391
  $metadata: deserializeMetadata(parsedOutput),
400
392
  ...deserialized,
@@ -403,7 +395,7 @@ const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
403
395
  };
404
396
  const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
405
397
  const body = parsedOutput.body;
406
- const deserialized = de_InternalServiceException(body, context);
398
+ const deserialized = _json(body);
407
399
  const exception = new InternalServiceException({
408
400
  $metadata: deserializeMetadata(parsedOutput),
409
401
  ...deserialized,
@@ -412,7 +404,7 @@ const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
412
404
  };
413
405
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
414
406
  const body = parsedOutput.body;
415
- const deserialized = de_InvalidParameterException(body, context);
407
+ const deserialized = _json(body);
416
408
  const exception = new InvalidParameterException({
417
409
  $metadata: deserializeMetadata(parsedOutput),
418
410
  ...deserialized,
@@ -421,7 +413,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
421
413
  };
422
414
  const de_PaginationTokenExpiredExceptionRes = async (parsedOutput, context) => {
423
415
  const body = parsedOutput.body;
424
- const deserialized = de_PaginationTokenExpiredException(body, context);
416
+ const deserialized = _json(body);
425
417
  const exception = new PaginationTokenExpiredException({
426
418
  $metadata: deserializeMetadata(parsedOutput),
427
419
  ...deserialized,
@@ -430,338 +422,13 @@ const de_PaginationTokenExpiredExceptionRes = async (parsedOutput, context) => {
430
422
  };
431
423
  const de_ThrottledExceptionRes = async (parsedOutput, context) => {
432
424
  const body = parsedOutput.body;
433
- const deserialized = de_ThrottledException(body, context);
425
+ const deserialized = _json(body);
434
426
  const exception = new ThrottledException({
435
427
  $metadata: deserializeMetadata(parsedOutput),
436
428
  ...deserialized,
437
429
  });
438
430
  return __decorateServiceException(exception, body);
439
431
  };
440
- const se_DescribeReportCreationInput = (input, context) => {
441
- return {};
442
- };
443
- const se_GetComplianceSummaryInput = (input, context) => {
444
- return {
445
- ...(input.GroupBy != null && { GroupBy: se_GroupBy(input.GroupBy, context) }),
446
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
447
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
448
- ...(input.RegionFilters != null && { RegionFilters: se_RegionFilterList(input.RegionFilters, context) }),
449
- ...(input.ResourceTypeFilters != null && {
450
- ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context),
451
- }),
452
- ...(input.TagKeyFilters != null && { TagKeyFilters: se_TagKeyFilterList(input.TagKeyFilters, context) }),
453
- ...(input.TargetIdFilters != null && { TargetIdFilters: se_TargetIdFilterList(input.TargetIdFilters, context) }),
454
- };
455
- };
456
- const se_GetResourcesInput = (input, context) => {
457
- return {
458
- ...(input.ExcludeCompliantResources != null && { ExcludeCompliantResources: input.ExcludeCompliantResources }),
459
- ...(input.IncludeComplianceDetails != null && { IncludeComplianceDetails: input.IncludeComplianceDetails }),
460
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
461
- ...(input.ResourceARNList != null && { ResourceARNList: se_ResourceARNListForGet(input.ResourceARNList, context) }),
462
- ...(input.ResourceTypeFilters != null && {
463
- ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context),
464
- }),
465
- ...(input.ResourcesPerPage != null && { ResourcesPerPage: input.ResourcesPerPage }),
466
- ...(input.TagFilters != null && { TagFilters: se_TagFilterList(input.TagFilters, context) }),
467
- ...(input.TagsPerPage != null && { TagsPerPage: input.TagsPerPage }),
468
- };
469
- };
470
- const se_GetTagKeysInput = (input, context) => {
471
- return {
472
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
473
- };
474
- };
475
- const se_GetTagValuesInput = (input, context) => {
476
- return {
477
- ...(input.Key != null && { Key: input.Key }),
478
- ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }),
479
- };
480
- };
481
- const se_GroupBy = (input, context) => {
482
- return input
483
- .filter((e) => e != null)
484
- .map((entry) => {
485
- return entry;
486
- });
487
- };
488
- const se_RegionFilterList = (input, context) => {
489
- return input
490
- .filter((e) => e != null)
491
- .map((entry) => {
492
- return entry;
493
- });
494
- };
495
- const se_ResourceARNListForGet = (input, context) => {
496
- return input
497
- .filter((e) => e != null)
498
- .map((entry) => {
499
- return entry;
500
- });
501
- };
502
- const se_ResourceARNListForTagUntag = (input, context) => {
503
- return input
504
- .filter((e) => e != null)
505
- .map((entry) => {
506
- return entry;
507
- });
508
- };
509
- const se_ResourceTypeFilterList = (input, context) => {
510
- return input
511
- .filter((e) => e != null)
512
- .map((entry) => {
513
- return entry;
514
- });
515
- };
516
- const se_StartReportCreationInput = (input, context) => {
517
- return {
518
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
519
- };
520
- };
521
- const se_TagFilter = (input, context) => {
522
- return {
523
- ...(input.Key != null && { Key: input.Key }),
524
- ...(input.Values != null && { Values: se_TagValueList(input.Values, context) }),
525
- };
526
- };
527
- const se_TagFilterList = (input, context) => {
528
- return input
529
- .filter((e) => e != null)
530
- .map((entry) => {
531
- return se_TagFilter(entry, context);
532
- });
533
- };
534
- const se_TagKeyFilterList = (input, context) => {
535
- return input
536
- .filter((e) => e != null)
537
- .map((entry) => {
538
- return entry;
539
- });
540
- };
541
- const se_TagKeyListForUntag = (input, context) => {
542
- return input
543
- .filter((e) => e != null)
544
- .map((entry) => {
545
- return entry;
546
- });
547
- };
548
- const se_TagMap = (input, context) => {
549
- return Object.entries(input).reduce((acc, [key, value]) => {
550
- if (value === null) {
551
- return acc;
552
- }
553
- acc[key] = value;
554
- return acc;
555
- }, {});
556
- };
557
- const se_TagResourcesInput = (input, context) => {
558
- return {
559
- ...(input.ResourceARNList != null && {
560
- ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context),
561
- }),
562
- ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }),
563
- };
564
- };
565
- const se_TagValueList = (input, context) => {
566
- return input
567
- .filter((e) => e != null)
568
- .map((entry) => {
569
- return entry;
570
- });
571
- };
572
- const se_TargetIdFilterList = (input, context) => {
573
- return input
574
- .filter((e) => e != null)
575
- .map((entry) => {
576
- return entry;
577
- });
578
- };
579
- const se_UntagResourcesInput = (input, context) => {
580
- return {
581
- ...(input.ResourceARNList != null && {
582
- ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context),
583
- }),
584
- ...(input.TagKeys != null && { TagKeys: se_TagKeyListForUntag(input.TagKeys, context) }),
585
- };
586
- };
587
- const de_ComplianceDetails = (output, context) => {
588
- return {
589
- ComplianceStatus: __expectBoolean(output.ComplianceStatus),
590
- KeysWithNoncompliantValues: output.KeysWithNoncompliantValues != null ? de_TagKeyList(output.KeysWithNoncompliantValues, context) : undefined,
591
- NoncompliantKeys: output.NoncompliantKeys != null ? de_TagKeyList(output.NoncompliantKeys, context) : undefined,
592
- };
593
- };
594
- const de_ConcurrentModificationException = (output, context) => {
595
- return {
596
- Message: __expectString(output.Message),
597
- };
598
- };
599
- const de_ConstraintViolationException = (output, context) => {
600
- return {
601
- Message: __expectString(output.Message),
602
- };
603
- };
604
- const de_DescribeReportCreationOutput = (output, context) => {
605
- return {
606
- ErrorMessage: __expectString(output.ErrorMessage),
607
- S3Location: __expectString(output.S3Location),
608
- StartDate: __expectString(output.StartDate),
609
- Status: __expectString(output.Status),
610
- };
611
- };
612
- const de_FailedResourcesMap = (output, context) => {
613
- return Object.entries(output).reduce((acc, [key, value]) => {
614
- if (value === null) {
615
- return acc;
616
- }
617
- acc[key] = de_FailureInfo(value, context);
618
- return acc;
619
- }, {});
620
- };
621
- const de_FailureInfo = (output, context) => {
622
- return {
623
- ErrorCode: __expectString(output.ErrorCode),
624
- ErrorMessage: __expectString(output.ErrorMessage),
625
- StatusCode: __expectInt32(output.StatusCode),
626
- };
627
- };
628
- const de_GetComplianceSummaryOutput = (output, context) => {
629
- return {
630
- PaginationToken: __expectString(output.PaginationToken),
631
- SummaryList: output.SummaryList != null ? de_SummaryList(output.SummaryList, context) : undefined,
632
- };
633
- };
634
- const de_GetResourcesOutput = (output, context) => {
635
- return {
636
- PaginationToken: __expectString(output.PaginationToken),
637
- ResourceTagMappingList: output.ResourceTagMappingList != null
638
- ? de_ResourceTagMappingList(output.ResourceTagMappingList, context)
639
- : undefined,
640
- };
641
- };
642
- const de_GetTagKeysOutput = (output, context) => {
643
- return {
644
- PaginationToken: __expectString(output.PaginationToken),
645
- TagKeys: output.TagKeys != null ? de_TagKeyList(output.TagKeys, context) : undefined,
646
- };
647
- };
648
- const de_GetTagValuesOutput = (output, context) => {
649
- return {
650
- PaginationToken: __expectString(output.PaginationToken),
651
- TagValues: output.TagValues != null ? de_TagValuesOutputList(output.TagValues, context) : undefined,
652
- };
653
- };
654
- const de_InternalServiceException = (output, context) => {
655
- return {
656
- Message: __expectString(output.Message),
657
- };
658
- };
659
- const de_InvalidParameterException = (output, context) => {
660
- return {
661
- Message: __expectString(output.Message),
662
- };
663
- };
664
- const de_PaginationTokenExpiredException = (output, context) => {
665
- return {
666
- Message: __expectString(output.Message),
667
- };
668
- };
669
- const de_ResourceTagMapping = (output, context) => {
670
- return {
671
- ComplianceDetails: output.ComplianceDetails != null ? de_ComplianceDetails(output.ComplianceDetails, context) : undefined,
672
- ResourceARN: __expectString(output.ResourceARN),
673
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
674
- };
675
- };
676
- const de_ResourceTagMappingList = (output, context) => {
677
- const retVal = (output || [])
678
- .filter((e) => e != null)
679
- .map((entry) => {
680
- if (entry === null) {
681
- return null;
682
- }
683
- return de_ResourceTagMapping(entry, context);
684
- });
685
- return retVal;
686
- };
687
- const de_StartReportCreationOutput = (output, context) => {
688
- return {};
689
- };
690
- const de_Summary = (output, context) => {
691
- return {
692
- LastUpdated: __expectString(output.LastUpdated),
693
- NonCompliantResources: __expectLong(output.NonCompliantResources),
694
- Region: __expectString(output.Region),
695
- ResourceType: __expectString(output.ResourceType),
696
- TargetId: __expectString(output.TargetId),
697
- TargetIdType: __expectString(output.TargetIdType),
698
- };
699
- };
700
- const de_SummaryList = (output, context) => {
701
- const retVal = (output || [])
702
- .filter((e) => e != null)
703
- .map((entry) => {
704
- if (entry === null) {
705
- return null;
706
- }
707
- return de_Summary(entry, context);
708
- });
709
- return retVal;
710
- };
711
- const de_Tag = (output, context) => {
712
- return {
713
- Key: __expectString(output.Key),
714
- Value: __expectString(output.Value),
715
- };
716
- };
717
- const de_TagKeyList = (output, context) => {
718
- const retVal = (output || [])
719
- .filter((e) => e != null)
720
- .map((entry) => {
721
- if (entry === null) {
722
- return null;
723
- }
724
- return __expectString(entry);
725
- });
726
- return retVal;
727
- };
728
- const de_TagList = (output, context) => {
729
- const retVal = (output || [])
730
- .filter((e) => e != null)
731
- .map((entry) => {
732
- if (entry === null) {
733
- return null;
734
- }
735
- return de_Tag(entry, context);
736
- });
737
- return retVal;
738
- };
739
- const de_TagResourcesOutput = (output, context) => {
740
- return {
741
- FailedResourcesMap: output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined,
742
- };
743
- };
744
- const de_TagValuesOutputList = (output, context) => {
745
- const retVal = (output || [])
746
- .filter((e) => e != null)
747
- .map((entry) => {
748
- if (entry === null) {
749
- return null;
750
- }
751
- return __expectString(entry);
752
- });
753
- return retVal;
754
- };
755
- const de_ThrottledException = (output, context) => {
756
- return {
757
- Message: __expectString(output.Message),
758
- };
759
- };
760
- const de_UntagResourcesOutput = (output, context) => {
761
- return {
762
- FailedResourcesMap: output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined,
763
- };
764
- };
765
432
  const deserializeMetadata = (output) => ({
766
433
  httpStatusCode: output.statusCode,
767
434
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -775,6 +442,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
775
442
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
776
443
  };
777
444
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
445
+ const throwDefaultError = withBaseException(__BaseException);
778
446
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
779
447
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
780
448
  const contents = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-resource-groups-tagging-api",
3
3
  "description": "AWS SDK for JavaScript Resource Groups Tagging Api Client for Node.js, Browser and React Native",
4
- "version": "3.312.0",
4
+ "version": "3.315.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.312.0",
24
+ "@aws-sdk/client-sts": "3.315.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.315.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.310.0",
43
+ "@aws-sdk/smithy-client": "3.315.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.315.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",