@aws-sdk/client-resource-groups 3.141.0 → 3.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +182 -315
- package/dist-es/protocols/Aws_restJson1.js +234 -316
- package/package.json +6 -6
|
@@ -125,16 +125,7 @@ const serializeAws_restJson1GetTagsCommand = async (input, context) => {
|
|
|
125
125
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
126
126
|
const headers = {};
|
|
127
127
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
|
|
128
|
-
|
|
129
|
-
const labelValue = input.Arn;
|
|
130
|
-
if (labelValue.length <= 0) {
|
|
131
|
-
throw new Error("Empty value provided for input HTTP label: Arn.");
|
|
132
|
-
}
|
|
133
|
-
resolvedPath = resolvedPath.replace("{Arn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
throw new Error("No value provided for input HTTP label: Arn.");
|
|
137
|
-
}
|
|
128
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
|
|
138
129
|
let body;
|
|
139
130
|
return new protocol_http_1.HttpRequest({
|
|
140
131
|
protocol,
|
|
@@ -202,10 +193,10 @@ const serializeAws_restJson1ListGroupsCommand = async (input, context) => {
|
|
|
202
193
|
"content-type": "application/json",
|
|
203
194
|
};
|
|
204
195
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/groups-list";
|
|
205
|
-
const query = {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
};
|
|
196
|
+
const query = map({
|
|
197
|
+
maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
198
|
+
nextToken: [, input.NextToken],
|
|
199
|
+
});
|
|
209
200
|
let body;
|
|
210
201
|
body = JSON.stringify({
|
|
211
202
|
...(input.Filters != null && { Filters: serializeAws_restJson1GroupFilterList(input.Filters, context) }),
|
|
@@ -277,16 +268,7 @@ const serializeAws_restJson1TagCommand = async (input, context) => {
|
|
|
277
268
|
"content-type": "application/json",
|
|
278
269
|
};
|
|
279
270
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
|
|
280
|
-
|
|
281
|
-
const labelValue = input.Arn;
|
|
282
|
-
if (labelValue.length <= 0) {
|
|
283
|
-
throw new Error("Empty value provided for input HTTP label: Arn.");
|
|
284
|
-
}
|
|
285
|
-
resolvedPath = resolvedPath.replace("{Arn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
throw new Error("No value provided for input HTTP label: Arn.");
|
|
289
|
-
}
|
|
271
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
|
|
290
272
|
let body;
|
|
291
273
|
body = JSON.stringify({
|
|
292
274
|
...(input.Tags != null && { Tags: serializeAws_restJson1Tags(input.Tags, context) }),
|
|
@@ -332,16 +314,7 @@ const serializeAws_restJson1UntagCommand = async (input, context) => {
|
|
|
332
314
|
"content-type": "application/json",
|
|
333
315
|
};
|
|
334
316
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags";
|
|
335
|
-
|
|
336
|
-
const labelValue = input.Arn;
|
|
337
|
-
if (labelValue.length <= 0) {
|
|
338
|
-
throw new Error("Empty value provided for input HTTP label: Arn.");
|
|
339
|
-
}
|
|
340
|
-
resolvedPath = resolvedPath.replace("{Arn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
341
|
-
}
|
|
342
|
-
else {
|
|
343
|
-
throw new Error("No value provided for input HTTP label: Arn.");
|
|
344
|
-
}
|
|
317
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Arn", () => input.Arn, "{Arn}", false);
|
|
345
318
|
let body;
|
|
346
319
|
body = JSON.stringify({
|
|
347
320
|
...(input.Keys != null && { Keys: serializeAws_restJson1TagKeyList(input.Keys, context) }),
|
|
@@ -409,27 +382,23 @@ const deserializeAws_restJson1CreateGroupCommand = async (output, context) => {
|
|
|
409
382
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
383
|
return deserializeAws_restJson1CreateGroupCommandError(output, context);
|
|
411
384
|
}
|
|
412
|
-
const contents = {
|
|
385
|
+
const contents = map({
|
|
413
386
|
$metadata: deserializeMetadata(output),
|
|
414
|
-
|
|
415
|
-
GroupConfiguration: undefined,
|
|
416
|
-
ResourceQuery: undefined,
|
|
417
|
-
Tags: undefined,
|
|
418
|
-
};
|
|
387
|
+
});
|
|
419
388
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
420
|
-
if (data.Group
|
|
389
|
+
if (data.Group != null) {
|
|
421
390
|
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
422
391
|
}
|
|
423
|
-
if (data.GroupConfiguration
|
|
392
|
+
if (data.GroupConfiguration != null) {
|
|
424
393
|
contents.GroupConfiguration = deserializeAws_restJson1GroupConfiguration(data.GroupConfiguration, context);
|
|
425
394
|
}
|
|
426
|
-
if (data.ResourceQuery
|
|
395
|
+
if (data.ResourceQuery != null) {
|
|
427
396
|
contents.ResourceQuery = deserializeAws_restJson1ResourceQuery(data.ResourceQuery, context);
|
|
428
397
|
}
|
|
429
|
-
if (data.Tags
|
|
398
|
+
if (data.Tags != null) {
|
|
430
399
|
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
431
400
|
}
|
|
432
|
-
return
|
|
401
|
+
return contents;
|
|
433
402
|
};
|
|
434
403
|
exports.deserializeAws_restJson1CreateGroupCommand = deserializeAws_restJson1CreateGroupCommand;
|
|
435
404
|
const deserializeAws_restJson1CreateGroupCommandError = async (output, context) => {
|
|
@@ -437,7 +406,6 @@ const deserializeAws_restJson1CreateGroupCommandError = async (output, context)
|
|
|
437
406
|
...output,
|
|
438
407
|
body: await parseBody(output.body, context),
|
|
439
408
|
};
|
|
440
|
-
let response;
|
|
441
409
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
442
410
|
switch (errorCode) {
|
|
443
411
|
case "BadRequestException":
|
|
@@ -457,29 +425,26 @@ const deserializeAws_restJson1CreateGroupCommandError = async (output, context)
|
|
|
457
425
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
458
426
|
default:
|
|
459
427
|
const parsedBody = parsedOutput.body;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
$metadata,
|
|
428
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
429
|
+
output,
|
|
430
|
+
parsedBody,
|
|
431
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
432
|
+
errorCode,
|
|
466
433
|
});
|
|
467
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
468
434
|
}
|
|
469
435
|
};
|
|
470
436
|
const deserializeAws_restJson1DeleteGroupCommand = async (output, context) => {
|
|
471
437
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
472
438
|
return deserializeAws_restJson1DeleteGroupCommandError(output, context);
|
|
473
439
|
}
|
|
474
|
-
const contents = {
|
|
440
|
+
const contents = map({
|
|
475
441
|
$metadata: deserializeMetadata(output),
|
|
476
|
-
|
|
477
|
-
};
|
|
442
|
+
});
|
|
478
443
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
479
|
-
if (data.Group
|
|
444
|
+
if (data.Group != null) {
|
|
480
445
|
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
481
446
|
}
|
|
482
|
-
return
|
|
447
|
+
return contents;
|
|
483
448
|
};
|
|
484
449
|
exports.deserializeAws_restJson1DeleteGroupCommand = deserializeAws_restJson1DeleteGroupCommand;
|
|
485
450
|
const deserializeAws_restJson1DeleteGroupCommandError = async (output, context) => {
|
|
@@ -487,7 +452,6 @@ const deserializeAws_restJson1DeleteGroupCommandError = async (output, context)
|
|
|
487
452
|
...output,
|
|
488
453
|
body: await parseBody(output.body, context),
|
|
489
454
|
};
|
|
490
|
-
let response;
|
|
491
455
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
492
456
|
switch (errorCode) {
|
|
493
457
|
case "BadRequestException":
|
|
@@ -510,29 +474,26 @@ const deserializeAws_restJson1DeleteGroupCommandError = async (output, context)
|
|
|
510
474
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
511
475
|
default:
|
|
512
476
|
const parsedBody = parsedOutput.body;
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
$metadata,
|
|
477
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
478
|
+
output,
|
|
479
|
+
parsedBody,
|
|
480
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
481
|
+
errorCode,
|
|
519
482
|
});
|
|
520
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
521
483
|
}
|
|
522
484
|
};
|
|
523
485
|
const deserializeAws_restJson1GetGroupCommand = async (output, context) => {
|
|
524
486
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
525
487
|
return deserializeAws_restJson1GetGroupCommandError(output, context);
|
|
526
488
|
}
|
|
527
|
-
const contents = {
|
|
489
|
+
const contents = map({
|
|
528
490
|
$metadata: deserializeMetadata(output),
|
|
529
|
-
|
|
530
|
-
};
|
|
491
|
+
});
|
|
531
492
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
532
|
-
if (data.Group
|
|
493
|
+
if (data.Group != null) {
|
|
533
494
|
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
534
495
|
}
|
|
535
|
-
return
|
|
496
|
+
return contents;
|
|
536
497
|
};
|
|
537
498
|
exports.deserializeAws_restJson1GetGroupCommand = deserializeAws_restJson1GetGroupCommand;
|
|
538
499
|
const deserializeAws_restJson1GetGroupCommandError = async (output, context) => {
|
|
@@ -540,7 +501,6 @@ const deserializeAws_restJson1GetGroupCommandError = async (output, context) =>
|
|
|
540
501
|
...output,
|
|
541
502
|
body: await parseBody(output.body, context),
|
|
542
503
|
};
|
|
543
|
-
let response;
|
|
544
504
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
545
505
|
switch (errorCode) {
|
|
546
506
|
case "BadRequestException":
|
|
@@ -563,29 +523,26 @@ const deserializeAws_restJson1GetGroupCommandError = async (output, context) =>
|
|
|
563
523
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
564
524
|
default:
|
|
565
525
|
const parsedBody = parsedOutput.body;
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
$metadata,
|
|
526
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
527
|
+
output,
|
|
528
|
+
parsedBody,
|
|
529
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
530
|
+
errorCode,
|
|
572
531
|
});
|
|
573
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
574
532
|
}
|
|
575
533
|
};
|
|
576
534
|
const deserializeAws_restJson1GetGroupConfigurationCommand = async (output, context) => {
|
|
577
535
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
578
536
|
return deserializeAws_restJson1GetGroupConfigurationCommandError(output, context);
|
|
579
537
|
}
|
|
580
|
-
const contents = {
|
|
538
|
+
const contents = map({
|
|
581
539
|
$metadata: deserializeMetadata(output),
|
|
582
|
-
|
|
583
|
-
};
|
|
540
|
+
});
|
|
584
541
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
585
|
-
if (data.GroupConfiguration
|
|
542
|
+
if (data.GroupConfiguration != null) {
|
|
586
543
|
contents.GroupConfiguration = deserializeAws_restJson1GroupConfiguration(data.GroupConfiguration, context);
|
|
587
544
|
}
|
|
588
|
-
return
|
|
545
|
+
return contents;
|
|
589
546
|
};
|
|
590
547
|
exports.deserializeAws_restJson1GetGroupConfigurationCommand = deserializeAws_restJson1GetGroupConfigurationCommand;
|
|
591
548
|
const deserializeAws_restJson1GetGroupConfigurationCommandError = async (output, context) => {
|
|
@@ -593,7 +550,6 @@ const deserializeAws_restJson1GetGroupConfigurationCommandError = async (output,
|
|
|
593
550
|
...output,
|
|
594
551
|
body: await parseBody(output.body, context),
|
|
595
552
|
};
|
|
596
|
-
let response;
|
|
597
553
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
598
554
|
switch (errorCode) {
|
|
599
555
|
case "BadRequestException":
|
|
@@ -616,29 +572,26 @@ const deserializeAws_restJson1GetGroupConfigurationCommandError = async (output,
|
|
|
616
572
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
617
573
|
default:
|
|
618
574
|
const parsedBody = parsedOutput.body;
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
$metadata,
|
|
575
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
576
|
+
output,
|
|
577
|
+
parsedBody,
|
|
578
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
579
|
+
errorCode,
|
|
625
580
|
});
|
|
626
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
627
581
|
}
|
|
628
582
|
};
|
|
629
583
|
const deserializeAws_restJson1GetGroupQueryCommand = async (output, context) => {
|
|
630
584
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
631
585
|
return deserializeAws_restJson1GetGroupQueryCommandError(output, context);
|
|
632
586
|
}
|
|
633
|
-
const contents = {
|
|
587
|
+
const contents = map({
|
|
634
588
|
$metadata: deserializeMetadata(output),
|
|
635
|
-
|
|
636
|
-
};
|
|
589
|
+
});
|
|
637
590
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
638
|
-
if (data.GroupQuery
|
|
591
|
+
if (data.GroupQuery != null) {
|
|
639
592
|
contents.GroupQuery = deserializeAws_restJson1GroupQuery(data.GroupQuery, context);
|
|
640
593
|
}
|
|
641
|
-
return
|
|
594
|
+
return contents;
|
|
642
595
|
};
|
|
643
596
|
exports.deserializeAws_restJson1GetGroupQueryCommand = deserializeAws_restJson1GetGroupQueryCommand;
|
|
644
597
|
const deserializeAws_restJson1GetGroupQueryCommandError = async (output, context) => {
|
|
@@ -646,7 +599,6 @@ const deserializeAws_restJson1GetGroupQueryCommandError = async (output, context
|
|
|
646
599
|
...output,
|
|
647
600
|
body: await parseBody(output.body, context),
|
|
648
601
|
};
|
|
649
|
-
let response;
|
|
650
602
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
651
603
|
switch (errorCode) {
|
|
652
604
|
case "BadRequestException":
|
|
@@ -669,33 +621,29 @@ const deserializeAws_restJson1GetGroupQueryCommandError = async (output, context
|
|
|
669
621
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
670
622
|
default:
|
|
671
623
|
const parsedBody = parsedOutput.body;
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
$metadata,
|
|
624
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
625
|
+
output,
|
|
626
|
+
parsedBody,
|
|
627
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
628
|
+
errorCode,
|
|
678
629
|
});
|
|
679
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
680
630
|
}
|
|
681
631
|
};
|
|
682
632
|
const deserializeAws_restJson1GetTagsCommand = async (output, context) => {
|
|
683
633
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
684
634
|
return deserializeAws_restJson1GetTagsCommandError(output, context);
|
|
685
635
|
}
|
|
686
|
-
const contents = {
|
|
636
|
+
const contents = map({
|
|
687
637
|
$metadata: deserializeMetadata(output),
|
|
688
|
-
|
|
689
|
-
Tags: undefined,
|
|
690
|
-
};
|
|
638
|
+
});
|
|
691
639
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
692
|
-
if (data.Arn
|
|
640
|
+
if (data.Arn != null) {
|
|
693
641
|
contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
|
|
694
642
|
}
|
|
695
|
-
if (data.Tags
|
|
643
|
+
if (data.Tags != null) {
|
|
696
644
|
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
697
645
|
}
|
|
698
|
-
return
|
|
646
|
+
return contents;
|
|
699
647
|
};
|
|
700
648
|
exports.deserializeAws_restJson1GetTagsCommand = deserializeAws_restJson1GetTagsCommand;
|
|
701
649
|
const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
|
|
@@ -703,7 +651,6 @@ const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
|
|
|
703
651
|
...output,
|
|
704
652
|
body: await parseBody(output.body, context),
|
|
705
653
|
};
|
|
706
|
-
let response;
|
|
707
654
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
708
655
|
switch (errorCode) {
|
|
709
656
|
case "BadRequestException":
|
|
@@ -726,37 +673,32 @@ const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
|
|
|
726
673
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
727
674
|
default:
|
|
728
675
|
const parsedBody = parsedOutput.body;
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
$metadata,
|
|
676
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
677
|
+
output,
|
|
678
|
+
parsedBody,
|
|
679
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
680
|
+
errorCode,
|
|
735
681
|
});
|
|
736
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
737
682
|
}
|
|
738
683
|
};
|
|
739
684
|
const deserializeAws_restJson1GroupResourcesCommand = async (output, context) => {
|
|
740
685
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
741
686
|
return deserializeAws_restJson1GroupResourcesCommandError(output, context);
|
|
742
687
|
}
|
|
743
|
-
const contents = {
|
|
688
|
+
const contents = map({
|
|
744
689
|
$metadata: deserializeMetadata(output),
|
|
745
|
-
|
|
746
|
-
Pending: undefined,
|
|
747
|
-
Succeeded: undefined,
|
|
748
|
-
};
|
|
690
|
+
});
|
|
749
691
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
750
|
-
if (data.Failed
|
|
692
|
+
if (data.Failed != null) {
|
|
751
693
|
contents.Failed = deserializeAws_restJson1FailedResourceList(data.Failed, context);
|
|
752
694
|
}
|
|
753
|
-
if (data.Pending
|
|
695
|
+
if (data.Pending != null) {
|
|
754
696
|
contents.Pending = deserializeAws_restJson1PendingResourceList(data.Pending, context);
|
|
755
697
|
}
|
|
756
|
-
if (data.Succeeded
|
|
698
|
+
if (data.Succeeded != null) {
|
|
757
699
|
contents.Succeeded = deserializeAws_restJson1ResourceArnList(data.Succeeded, context);
|
|
758
700
|
}
|
|
759
|
-
return
|
|
701
|
+
return contents;
|
|
760
702
|
};
|
|
761
703
|
exports.deserializeAws_restJson1GroupResourcesCommand = deserializeAws_restJson1GroupResourcesCommand;
|
|
762
704
|
const deserializeAws_restJson1GroupResourcesCommandError = async (output, context) => {
|
|
@@ -764,7 +706,6 @@ const deserializeAws_restJson1GroupResourcesCommandError = async (output, contex
|
|
|
764
706
|
...output,
|
|
765
707
|
body: await parseBody(output.body, context),
|
|
766
708
|
};
|
|
767
|
-
let response;
|
|
768
709
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
769
710
|
switch (errorCode) {
|
|
770
711
|
case "BadRequestException":
|
|
@@ -787,41 +728,35 @@ const deserializeAws_restJson1GroupResourcesCommandError = async (output, contex
|
|
|
787
728
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
788
729
|
default:
|
|
789
730
|
const parsedBody = parsedOutput.body;
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
$metadata,
|
|
731
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
732
|
+
output,
|
|
733
|
+
parsedBody,
|
|
734
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
735
|
+
errorCode,
|
|
796
736
|
});
|
|
797
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
798
737
|
}
|
|
799
738
|
};
|
|
800
739
|
const deserializeAws_restJson1ListGroupResourcesCommand = async (output, context) => {
|
|
801
740
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
802
741
|
return deserializeAws_restJson1ListGroupResourcesCommandError(output, context);
|
|
803
742
|
}
|
|
804
|
-
const contents = {
|
|
743
|
+
const contents = map({
|
|
805
744
|
$metadata: deserializeMetadata(output),
|
|
806
|
-
|
|
807
|
-
QueryErrors: undefined,
|
|
808
|
-
ResourceIdentifiers: undefined,
|
|
809
|
-
Resources: undefined,
|
|
810
|
-
};
|
|
745
|
+
});
|
|
811
746
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
812
|
-
if (data.NextToken
|
|
747
|
+
if (data.NextToken != null) {
|
|
813
748
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
814
749
|
}
|
|
815
|
-
if (data.QueryErrors
|
|
750
|
+
if (data.QueryErrors != null) {
|
|
816
751
|
contents.QueryErrors = deserializeAws_restJson1QueryErrorList(data.QueryErrors, context);
|
|
817
752
|
}
|
|
818
|
-
if (data.ResourceIdentifiers
|
|
753
|
+
if (data.ResourceIdentifiers != null) {
|
|
819
754
|
contents.ResourceIdentifiers = deserializeAws_restJson1ResourceIdentifierList(data.ResourceIdentifiers, context);
|
|
820
755
|
}
|
|
821
|
-
if (data.Resources
|
|
756
|
+
if (data.Resources != null) {
|
|
822
757
|
contents.Resources = deserializeAws_restJson1ListGroupResourcesItemList(data.Resources, context);
|
|
823
758
|
}
|
|
824
|
-
return
|
|
759
|
+
return contents;
|
|
825
760
|
};
|
|
826
761
|
exports.deserializeAws_restJson1ListGroupResourcesCommand = deserializeAws_restJson1ListGroupResourcesCommand;
|
|
827
762
|
const deserializeAws_restJson1ListGroupResourcesCommandError = async (output, context) => {
|
|
@@ -829,7 +764,6 @@ const deserializeAws_restJson1ListGroupResourcesCommandError = async (output, co
|
|
|
829
764
|
...output,
|
|
830
765
|
body: await parseBody(output.body, context),
|
|
831
766
|
};
|
|
832
|
-
let response;
|
|
833
767
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
834
768
|
switch (errorCode) {
|
|
835
769
|
case "BadRequestException":
|
|
@@ -855,37 +789,32 @@ const deserializeAws_restJson1ListGroupResourcesCommandError = async (output, co
|
|
|
855
789
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
856
790
|
default:
|
|
857
791
|
const parsedBody = parsedOutput.body;
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
$metadata,
|
|
792
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
793
|
+
output,
|
|
794
|
+
parsedBody,
|
|
795
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
796
|
+
errorCode,
|
|
864
797
|
});
|
|
865
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
866
798
|
}
|
|
867
799
|
};
|
|
868
800
|
const deserializeAws_restJson1ListGroupsCommand = async (output, context) => {
|
|
869
801
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
870
802
|
return deserializeAws_restJson1ListGroupsCommandError(output, context);
|
|
871
803
|
}
|
|
872
|
-
const contents = {
|
|
804
|
+
const contents = map({
|
|
873
805
|
$metadata: deserializeMetadata(output),
|
|
874
|
-
|
|
875
|
-
Groups: undefined,
|
|
876
|
-
NextToken: undefined,
|
|
877
|
-
};
|
|
806
|
+
});
|
|
878
807
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
879
|
-
if (data.GroupIdentifiers
|
|
808
|
+
if (data.GroupIdentifiers != null) {
|
|
880
809
|
contents.GroupIdentifiers = deserializeAws_restJson1GroupIdentifierList(data.GroupIdentifiers, context);
|
|
881
810
|
}
|
|
882
|
-
if (data.Groups
|
|
811
|
+
if (data.Groups != null) {
|
|
883
812
|
contents.Groups = deserializeAws_restJson1GroupList(data.Groups, context);
|
|
884
813
|
}
|
|
885
|
-
if (data.NextToken
|
|
814
|
+
if (data.NextToken != null) {
|
|
886
815
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
887
816
|
}
|
|
888
|
-
return
|
|
817
|
+
return contents;
|
|
889
818
|
};
|
|
890
819
|
exports.deserializeAws_restJson1ListGroupsCommand = deserializeAws_restJson1ListGroupsCommand;
|
|
891
820
|
const deserializeAws_restJson1ListGroupsCommandError = async (output, context) => {
|
|
@@ -893,7 +822,6 @@ const deserializeAws_restJson1ListGroupsCommandError = async (output, context) =
|
|
|
893
822
|
...output,
|
|
894
823
|
body: await parseBody(output.body, context),
|
|
895
824
|
};
|
|
896
|
-
let response;
|
|
897
825
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
898
826
|
switch (errorCode) {
|
|
899
827
|
case "BadRequestException":
|
|
@@ -913,25 +841,23 @@ const deserializeAws_restJson1ListGroupsCommandError = async (output, context) =
|
|
|
913
841
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
914
842
|
default:
|
|
915
843
|
const parsedBody = parsedOutput.body;
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
$metadata,
|
|
844
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
845
|
+
output,
|
|
846
|
+
parsedBody,
|
|
847
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
848
|
+
errorCode,
|
|
922
849
|
});
|
|
923
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
924
850
|
}
|
|
925
851
|
};
|
|
926
852
|
const deserializeAws_restJson1PutGroupConfigurationCommand = async (output, context) => {
|
|
927
853
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
928
854
|
return deserializeAws_restJson1PutGroupConfigurationCommandError(output, context);
|
|
929
855
|
}
|
|
930
|
-
const contents = {
|
|
856
|
+
const contents = map({
|
|
931
857
|
$metadata: deserializeMetadata(output),
|
|
932
|
-
};
|
|
858
|
+
});
|
|
933
859
|
await collectBody(output.body, context);
|
|
934
|
-
return
|
|
860
|
+
return contents;
|
|
935
861
|
};
|
|
936
862
|
exports.deserializeAws_restJson1PutGroupConfigurationCommand = deserializeAws_restJson1PutGroupConfigurationCommand;
|
|
937
863
|
const deserializeAws_restJson1PutGroupConfigurationCommandError = async (output, context) => {
|
|
@@ -939,7 +865,6 @@ const deserializeAws_restJson1PutGroupConfigurationCommandError = async (output,
|
|
|
939
865
|
...output,
|
|
940
866
|
body: await parseBody(output.body, context),
|
|
941
867
|
};
|
|
942
|
-
let response;
|
|
943
868
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
944
869
|
switch (errorCode) {
|
|
945
870
|
case "BadRequestException":
|
|
@@ -962,37 +887,32 @@ const deserializeAws_restJson1PutGroupConfigurationCommandError = async (output,
|
|
|
962
887
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
963
888
|
default:
|
|
964
889
|
const parsedBody = parsedOutput.body;
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
$metadata,
|
|
890
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
891
|
+
output,
|
|
892
|
+
parsedBody,
|
|
893
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
894
|
+
errorCode,
|
|
971
895
|
});
|
|
972
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
973
896
|
}
|
|
974
897
|
};
|
|
975
898
|
const deserializeAws_restJson1SearchResourcesCommand = async (output, context) => {
|
|
976
899
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
977
900
|
return deserializeAws_restJson1SearchResourcesCommandError(output, context);
|
|
978
901
|
}
|
|
979
|
-
const contents = {
|
|
902
|
+
const contents = map({
|
|
980
903
|
$metadata: deserializeMetadata(output),
|
|
981
|
-
|
|
982
|
-
QueryErrors: undefined,
|
|
983
|
-
ResourceIdentifiers: undefined,
|
|
984
|
-
};
|
|
904
|
+
});
|
|
985
905
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
986
|
-
if (data.NextToken
|
|
906
|
+
if (data.NextToken != null) {
|
|
987
907
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
988
908
|
}
|
|
989
|
-
if (data.QueryErrors
|
|
909
|
+
if (data.QueryErrors != null) {
|
|
990
910
|
contents.QueryErrors = deserializeAws_restJson1QueryErrorList(data.QueryErrors, context);
|
|
991
911
|
}
|
|
992
|
-
if (data.ResourceIdentifiers
|
|
912
|
+
if (data.ResourceIdentifiers != null) {
|
|
993
913
|
contents.ResourceIdentifiers = deserializeAws_restJson1ResourceIdentifierList(data.ResourceIdentifiers, context);
|
|
994
914
|
}
|
|
995
|
-
return
|
|
915
|
+
return contents;
|
|
996
916
|
};
|
|
997
917
|
exports.deserializeAws_restJson1SearchResourcesCommand = deserializeAws_restJson1SearchResourcesCommand;
|
|
998
918
|
const deserializeAws_restJson1SearchResourcesCommandError = async (output, context) => {
|
|
@@ -1000,7 +920,6 @@ const deserializeAws_restJson1SearchResourcesCommandError = async (output, conte
|
|
|
1000
920
|
...output,
|
|
1001
921
|
body: await parseBody(output.body, context),
|
|
1002
922
|
};
|
|
1003
|
-
let response;
|
|
1004
923
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1005
924
|
switch (errorCode) {
|
|
1006
925
|
case "BadRequestException":
|
|
@@ -1023,33 +942,29 @@ const deserializeAws_restJson1SearchResourcesCommandError = async (output, conte
|
|
|
1023
942
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
1024
943
|
default:
|
|
1025
944
|
const parsedBody = parsedOutput.body;
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
$metadata,
|
|
945
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
946
|
+
output,
|
|
947
|
+
parsedBody,
|
|
948
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
949
|
+
errorCode,
|
|
1032
950
|
});
|
|
1033
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1034
951
|
}
|
|
1035
952
|
};
|
|
1036
953
|
const deserializeAws_restJson1TagCommand = async (output, context) => {
|
|
1037
954
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1038
955
|
return deserializeAws_restJson1TagCommandError(output, context);
|
|
1039
956
|
}
|
|
1040
|
-
const contents = {
|
|
957
|
+
const contents = map({
|
|
1041
958
|
$metadata: deserializeMetadata(output),
|
|
1042
|
-
|
|
1043
|
-
Tags: undefined,
|
|
1044
|
-
};
|
|
959
|
+
});
|
|
1045
960
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1046
|
-
if (data.Arn
|
|
961
|
+
if (data.Arn != null) {
|
|
1047
962
|
contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
|
|
1048
963
|
}
|
|
1049
|
-
if (data.Tags
|
|
964
|
+
if (data.Tags != null) {
|
|
1050
965
|
contents.Tags = deserializeAws_restJson1Tags(data.Tags, context);
|
|
1051
966
|
}
|
|
1052
|
-
return
|
|
967
|
+
return contents;
|
|
1053
968
|
};
|
|
1054
969
|
exports.deserializeAws_restJson1TagCommand = deserializeAws_restJson1TagCommand;
|
|
1055
970
|
const deserializeAws_restJson1TagCommandError = async (output, context) => {
|
|
@@ -1057,7 +972,6 @@ const deserializeAws_restJson1TagCommandError = async (output, context) => {
|
|
|
1057
972
|
...output,
|
|
1058
973
|
body: await parseBody(output.body, context),
|
|
1059
974
|
};
|
|
1060
|
-
let response;
|
|
1061
975
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1062
976
|
switch (errorCode) {
|
|
1063
977
|
case "BadRequestException":
|
|
@@ -1080,37 +994,32 @@ const deserializeAws_restJson1TagCommandError = async (output, context) => {
|
|
|
1080
994
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1081
995
|
default:
|
|
1082
996
|
const parsedBody = parsedOutput.body;
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
$metadata,
|
|
997
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
998
|
+
output,
|
|
999
|
+
parsedBody,
|
|
1000
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
1001
|
+
errorCode,
|
|
1089
1002
|
});
|
|
1090
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1091
1003
|
}
|
|
1092
1004
|
};
|
|
1093
1005
|
const deserializeAws_restJson1UngroupResourcesCommand = async (output, context) => {
|
|
1094
1006
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1095
1007
|
return deserializeAws_restJson1UngroupResourcesCommandError(output, context);
|
|
1096
1008
|
}
|
|
1097
|
-
const contents = {
|
|
1009
|
+
const contents = map({
|
|
1098
1010
|
$metadata: deserializeMetadata(output),
|
|
1099
|
-
|
|
1100
|
-
Pending: undefined,
|
|
1101
|
-
Succeeded: undefined,
|
|
1102
|
-
};
|
|
1011
|
+
});
|
|
1103
1012
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1104
|
-
if (data.Failed
|
|
1013
|
+
if (data.Failed != null) {
|
|
1105
1014
|
contents.Failed = deserializeAws_restJson1FailedResourceList(data.Failed, context);
|
|
1106
1015
|
}
|
|
1107
|
-
if (data.Pending
|
|
1016
|
+
if (data.Pending != null) {
|
|
1108
1017
|
contents.Pending = deserializeAws_restJson1PendingResourceList(data.Pending, context);
|
|
1109
1018
|
}
|
|
1110
|
-
if (data.Succeeded
|
|
1019
|
+
if (data.Succeeded != null) {
|
|
1111
1020
|
contents.Succeeded = deserializeAws_restJson1ResourceArnList(data.Succeeded, context);
|
|
1112
1021
|
}
|
|
1113
|
-
return
|
|
1022
|
+
return contents;
|
|
1114
1023
|
};
|
|
1115
1024
|
exports.deserializeAws_restJson1UngroupResourcesCommand = deserializeAws_restJson1UngroupResourcesCommand;
|
|
1116
1025
|
const deserializeAws_restJson1UngroupResourcesCommandError = async (output, context) => {
|
|
@@ -1118,7 +1027,6 @@ const deserializeAws_restJson1UngroupResourcesCommandError = async (output, cont
|
|
|
1118
1027
|
...output,
|
|
1119
1028
|
body: await parseBody(output.body, context),
|
|
1120
1029
|
};
|
|
1121
|
-
let response;
|
|
1122
1030
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1123
1031
|
switch (errorCode) {
|
|
1124
1032
|
case "BadRequestException":
|
|
@@ -1141,33 +1049,29 @@ const deserializeAws_restJson1UngroupResourcesCommandError = async (output, cont
|
|
|
1141
1049
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1142
1050
|
default:
|
|
1143
1051
|
const parsedBody = parsedOutput.body;
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
$metadata,
|
|
1052
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1053
|
+
output,
|
|
1054
|
+
parsedBody,
|
|
1055
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
1056
|
+
errorCode,
|
|
1150
1057
|
});
|
|
1151
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1152
1058
|
}
|
|
1153
1059
|
};
|
|
1154
1060
|
const deserializeAws_restJson1UntagCommand = async (output, context) => {
|
|
1155
1061
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1156
1062
|
return deserializeAws_restJson1UntagCommandError(output, context);
|
|
1157
1063
|
}
|
|
1158
|
-
const contents = {
|
|
1064
|
+
const contents = map({
|
|
1159
1065
|
$metadata: deserializeMetadata(output),
|
|
1160
|
-
|
|
1161
|
-
Keys: undefined,
|
|
1162
|
-
};
|
|
1066
|
+
});
|
|
1163
1067
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1164
|
-
if (data.Arn
|
|
1068
|
+
if (data.Arn != null) {
|
|
1165
1069
|
contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
|
|
1166
1070
|
}
|
|
1167
|
-
if (data.Keys
|
|
1071
|
+
if (data.Keys != null) {
|
|
1168
1072
|
contents.Keys = deserializeAws_restJson1TagKeyList(data.Keys, context);
|
|
1169
1073
|
}
|
|
1170
|
-
return
|
|
1074
|
+
return contents;
|
|
1171
1075
|
};
|
|
1172
1076
|
exports.deserializeAws_restJson1UntagCommand = deserializeAws_restJson1UntagCommand;
|
|
1173
1077
|
const deserializeAws_restJson1UntagCommandError = async (output, context) => {
|
|
@@ -1175,7 +1079,6 @@ const deserializeAws_restJson1UntagCommandError = async (output, context) => {
|
|
|
1175
1079
|
...output,
|
|
1176
1080
|
body: await parseBody(output.body, context),
|
|
1177
1081
|
};
|
|
1178
|
-
let response;
|
|
1179
1082
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1180
1083
|
switch (errorCode) {
|
|
1181
1084
|
case "BadRequestException":
|
|
@@ -1198,29 +1101,26 @@ const deserializeAws_restJson1UntagCommandError = async (output, context) => {
|
|
|
1198
1101
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1199
1102
|
default:
|
|
1200
1103
|
const parsedBody = parsedOutput.body;
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
$metadata,
|
|
1104
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1105
|
+
output,
|
|
1106
|
+
parsedBody,
|
|
1107
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
1108
|
+
errorCode,
|
|
1207
1109
|
});
|
|
1208
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1209
1110
|
}
|
|
1210
1111
|
};
|
|
1211
1112
|
const deserializeAws_restJson1UpdateGroupCommand = async (output, context) => {
|
|
1212
1113
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1213
1114
|
return deserializeAws_restJson1UpdateGroupCommandError(output, context);
|
|
1214
1115
|
}
|
|
1215
|
-
const contents = {
|
|
1116
|
+
const contents = map({
|
|
1216
1117
|
$metadata: deserializeMetadata(output),
|
|
1217
|
-
|
|
1218
|
-
};
|
|
1118
|
+
});
|
|
1219
1119
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1220
|
-
if (data.Group
|
|
1120
|
+
if (data.Group != null) {
|
|
1221
1121
|
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
1222
1122
|
}
|
|
1223
|
-
return
|
|
1123
|
+
return contents;
|
|
1224
1124
|
};
|
|
1225
1125
|
exports.deserializeAws_restJson1UpdateGroupCommand = deserializeAws_restJson1UpdateGroupCommand;
|
|
1226
1126
|
const deserializeAws_restJson1UpdateGroupCommandError = async (output, context) => {
|
|
@@ -1228,7 +1128,6 @@ const deserializeAws_restJson1UpdateGroupCommandError = async (output, context)
|
|
|
1228
1128
|
...output,
|
|
1229
1129
|
body: await parseBody(output.body, context),
|
|
1230
1130
|
};
|
|
1231
|
-
let response;
|
|
1232
1131
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1233
1132
|
switch (errorCode) {
|
|
1234
1133
|
case "BadRequestException":
|
|
@@ -1251,29 +1150,26 @@ const deserializeAws_restJson1UpdateGroupCommandError = async (output, context)
|
|
|
1251
1150
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1252
1151
|
default:
|
|
1253
1152
|
const parsedBody = parsedOutput.body;
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
$metadata,
|
|
1153
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1154
|
+
output,
|
|
1155
|
+
parsedBody,
|
|
1156
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
1157
|
+
errorCode,
|
|
1260
1158
|
});
|
|
1261
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1262
1159
|
}
|
|
1263
1160
|
};
|
|
1264
1161
|
const deserializeAws_restJson1UpdateGroupQueryCommand = async (output, context) => {
|
|
1265
1162
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1266
1163
|
return deserializeAws_restJson1UpdateGroupQueryCommandError(output, context);
|
|
1267
1164
|
}
|
|
1268
|
-
const contents = {
|
|
1165
|
+
const contents = map({
|
|
1269
1166
|
$metadata: deserializeMetadata(output),
|
|
1270
|
-
|
|
1271
|
-
};
|
|
1167
|
+
});
|
|
1272
1168
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1273
|
-
if (data.GroupQuery
|
|
1169
|
+
if (data.GroupQuery != null) {
|
|
1274
1170
|
contents.GroupQuery = deserializeAws_restJson1GroupQuery(data.GroupQuery, context);
|
|
1275
1171
|
}
|
|
1276
|
-
return
|
|
1172
|
+
return contents;
|
|
1277
1173
|
};
|
|
1278
1174
|
exports.deserializeAws_restJson1UpdateGroupQueryCommand = deserializeAws_restJson1UpdateGroupQueryCommand;
|
|
1279
1175
|
const deserializeAws_restJson1UpdateGroupQueryCommandError = async (output, context) => {
|
|
@@ -1281,7 +1177,6 @@ const deserializeAws_restJson1UpdateGroupQueryCommandError = async (output, cont
|
|
|
1281
1177
|
...output,
|
|
1282
1178
|
body: await parseBody(output.body, context),
|
|
1283
1179
|
};
|
|
1284
|
-
let response;
|
|
1285
1180
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1286
1181
|
switch (errorCode) {
|
|
1287
1182
|
case "BadRequestException":
|
|
@@ -1304,20 +1199,19 @@ const deserializeAws_restJson1UpdateGroupQueryCommandError = async (output, cont
|
|
|
1304
1199
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1305
1200
|
default:
|
|
1306
1201
|
const parsedBody = parsedOutput.body;
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
$metadata,
|
|
1202
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1203
|
+
output,
|
|
1204
|
+
parsedBody,
|
|
1205
|
+
exceptionCtor: ResourceGroupsServiceException_1.ResourceGroupsServiceException,
|
|
1206
|
+
errorCode,
|
|
1313
1207
|
});
|
|
1314
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1315
1208
|
}
|
|
1316
1209
|
};
|
|
1210
|
+
const map = smithy_client_1.map;
|
|
1317
1211
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1318
|
-
const contents = {};
|
|
1212
|
+
const contents = map({});
|
|
1319
1213
|
const data = parsedOutput.body;
|
|
1320
|
-
if (data.Message
|
|
1214
|
+
if (data.Message != null) {
|
|
1321
1215
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1322
1216
|
}
|
|
1323
1217
|
const exception = new models_0_1.BadRequestException({
|
|
@@ -1327,9 +1221,9 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
|
|
|
1327
1221
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1328
1222
|
};
|
|
1329
1223
|
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
1330
|
-
const contents = {};
|
|
1224
|
+
const contents = map({});
|
|
1331
1225
|
const data = parsedOutput.body;
|
|
1332
|
-
if (data.Message
|
|
1226
|
+
if (data.Message != null) {
|
|
1333
1227
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1334
1228
|
}
|
|
1335
1229
|
const exception = new models_0_1.ForbiddenException({
|
|
@@ -1339,9 +1233,9 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
|
|
|
1339
1233
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1340
1234
|
};
|
|
1341
1235
|
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
1342
|
-
const contents = {};
|
|
1236
|
+
const contents = map({});
|
|
1343
1237
|
const data = parsedOutput.body;
|
|
1344
|
-
if (data.Message
|
|
1238
|
+
if (data.Message != null) {
|
|
1345
1239
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1346
1240
|
}
|
|
1347
1241
|
const exception = new models_0_1.InternalServerErrorException({
|
|
@@ -1351,9 +1245,9 @@ const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (pars
|
|
|
1351
1245
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1352
1246
|
};
|
|
1353
1247
|
const deserializeAws_restJson1MethodNotAllowedExceptionResponse = async (parsedOutput, context) => {
|
|
1354
|
-
const contents = {};
|
|
1248
|
+
const contents = map({});
|
|
1355
1249
|
const data = parsedOutput.body;
|
|
1356
|
-
if (data.Message
|
|
1250
|
+
if (data.Message != null) {
|
|
1357
1251
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1358
1252
|
}
|
|
1359
1253
|
const exception = new models_0_1.MethodNotAllowedException({
|
|
@@ -1363,9 +1257,9 @@ const deserializeAws_restJson1MethodNotAllowedExceptionResponse = async (parsedO
|
|
|
1363
1257
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1364
1258
|
};
|
|
1365
1259
|
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1366
|
-
const contents = {};
|
|
1260
|
+
const contents = map({});
|
|
1367
1261
|
const data = parsedOutput.body;
|
|
1368
|
-
if (data.Message
|
|
1262
|
+
if (data.Message != null) {
|
|
1369
1263
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1370
1264
|
}
|
|
1371
1265
|
const exception = new models_0_1.NotFoundException({
|
|
@@ -1375,9 +1269,9 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
|
|
|
1375
1269
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1376
1270
|
};
|
|
1377
1271
|
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1378
|
-
const contents = {};
|
|
1272
|
+
const contents = map({});
|
|
1379
1273
|
const data = parsedOutput.body;
|
|
1380
|
-
if (data.Message
|
|
1274
|
+
if (data.Message != null) {
|
|
1381
1275
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1382
1276
|
}
|
|
1383
1277
|
const exception = new models_0_1.TooManyRequestsException({
|
|
@@ -1387,9 +1281,9 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
|
|
|
1387
1281
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1388
1282
|
};
|
|
1389
1283
|
const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
1390
|
-
const contents = {};
|
|
1284
|
+
const contents = map({});
|
|
1391
1285
|
const data = parsedOutput.body;
|
|
1392
|
-
if (data.Message
|
|
1286
|
+
if (data.Message != null) {
|
|
1393
1287
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1394
1288
|
}
|
|
1395
1289
|
const exception = new models_0_1.UnauthorizedException({
|
|
@@ -1410,9 +1304,6 @@ const serializeAws_restJson1GroupConfigurationList = (input, context) => {
|
|
|
1410
1304
|
return input
|
|
1411
1305
|
.filter((e) => e != null)
|
|
1412
1306
|
.map((entry) => {
|
|
1413
|
-
if (entry === null) {
|
|
1414
|
-
return null;
|
|
1415
|
-
}
|
|
1416
1307
|
return serializeAws_restJson1GroupConfigurationItem(entry, context);
|
|
1417
1308
|
});
|
|
1418
1309
|
};
|
|
@@ -1428,9 +1319,6 @@ const serializeAws_restJson1GroupConfigurationParameterValueList = (input, conte
|
|
|
1428
1319
|
return input
|
|
1429
1320
|
.filter((e) => e != null)
|
|
1430
1321
|
.map((entry) => {
|
|
1431
|
-
if (entry === null) {
|
|
1432
|
-
return null;
|
|
1433
|
-
}
|
|
1434
1322
|
return entry;
|
|
1435
1323
|
});
|
|
1436
1324
|
};
|
|
@@ -1444,9 +1332,6 @@ const serializeAws_restJson1GroupFilterList = (input, context) => {
|
|
|
1444
1332
|
return input
|
|
1445
1333
|
.filter((e) => e != null)
|
|
1446
1334
|
.map((entry) => {
|
|
1447
|
-
if (entry === null) {
|
|
1448
|
-
return null;
|
|
1449
|
-
}
|
|
1450
1335
|
return serializeAws_restJson1GroupFilter(entry, context);
|
|
1451
1336
|
});
|
|
1452
1337
|
};
|
|
@@ -1454,9 +1339,6 @@ const serializeAws_restJson1GroupFilterValues = (input, context) => {
|
|
|
1454
1339
|
return input
|
|
1455
1340
|
.filter((e) => e != null)
|
|
1456
1341
|
.map((entry) => {
|
|
1457
|
-
if (entry === null) {
|
|
1458
|
-
return null;
|
|
1459
|
-
}
|
|
1460
1342
|
return entry;
|
|
1461
1343
|
});
|
|
1462
1344
|
};
|
|
@@ -1464,9 +1346,6 @@ const serializeAws_restJson1GroupParameterList = (input, context) => {
|
|
|
1464
1346
|
return input
|
|
1465
1347
|
.filter((e) => e != null)
|
|
1466
1348
|
.map((entry) => {
|
|
1467
|
-
if (entry === null) {
|
|
1468
|
-
return null;
|
|
1469
|
-
}
|
|
1470
1349
|
return serializeAws_restJson1GroupConfigurationParameter(entry, context);
|
|
1471
1350
|
});
|
|
1472
1351
|
};
|
|
@@ -1474,9 +1353,6 @@ const serializeAws_restJson1ResourceArnList = (input, context) => {
|
|
|
1474
1353
|
return input
|
|
1475
1354
|
.filter((e) => e != null)
|
|
1476
1355
|
.map((entry) => {
|
|
1477
|
-
if (entry === null) {
|
|
1478
|
-
return null;
|
|
1479
|
-
}
|
|
1480
1356
|
return entry;
|
|
1481
1357
|
});
|
|
1482
1358
|
};
|
|
@@ -1490,9 +1366,6 @@ const serializeAws_restJson1ResourceFilterList = (input, context) => {
|
|
|
1490
1366
|
return input
|
|
1491
1367
|
.filter((e) => e != null)
|
|
1492
1368
|
.map((entry) => {
|
|
1493
|
-
if (entry === null) {
|
|
1494
|
-
return null;
|
|
1495
|
-
}
|
|
1496
1369
|
return serializeAws_restJson1ResourceFilter(entry, context);
|
|
1497
1370
|
});
|
|
1498
1371
|
};
|
|
@@ -1500,9 +1373,6 @@ const serializeAws_restJson1ResourceFilterValues = (input, context) => {
|
|
|
1500
1373
|
return input
|
|
1501
1374
|
.filter((e) => e != null)
|
|
1502
1375
|
.map((entry) => {
|
|
1503
|
-
if (entry === null) {
|
|
1504
|
-
return null;
|
|
1505
|
-
}
|
|
1506
1376
|
return entry;
|
|
1507
1377
|
});
|
|
1508
1378
|
};
|
|
@@ -1516,9 +1386,6 @@ const serializeAws_restJson1TagKeyList = (input, context) => {
|
|
|
1516
1386
|
return input
|
|
1517
1387
|
.filter((e) => e != null)
|
|
1518
1388
|
.map((entry) => {
|
|
1519
|
-
if (entry === null) {
|
|
1520
|
-
return null;
|
|
1521
|
-
}
|
|
1522
1389
|
return entry;
|
|
1523
1390
|
});
|
|
1524
1391
|
};
|