@aws-sdk/client-iot-data-plane 3.504.0 → 3.507.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/dist-cjs/index.js +18 -234
- package/dist-es/protocols/Aws_restJson1.js +17 -233
- package/package.json +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -440,7 +440,7 @@ var se_UpdateThingShadowCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
440
440
|
}, "se_UpdateThingShadowCommand");
|
|
441
441
|
var de_DeleteThingShadowCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
442
442
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
443
|
-
return
|
|
443
|
+
return de_CommandError(output, context);
|
|
444
444
|
}
|
|
445
445
|
const contents = (0, import_smithy_client.map)({
|
|
446
446
|
$metadata: deserializeMetadata(output)
|
|
@@ -449,49 +449,9 @@ var de_DeleteThingShadowCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
449
449
|
contents.payload = data;
|
|
450
450
|
return contents;
|
|
451
451
|
}, "de_DeleteThingShadowCommand");
|
|
452
|
-
var de_DeleteThingShadowCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
453
|
-
const parsedOutput = {
|
|
454
|
-
...output,
|
|
455
|
-
body: await parseErrorBody(output.body, context)
|
|
456
|
-
};
|
|
457
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
458
|
-
switch (errorCode) {
|
|
459
|
-
case "InternalFailureException":
|
|
460
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
461
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
462
|
-
case "InvalidRequestException":
|
|
463
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
464
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
465
|
-
case "MethodNotAllowedException":
|
|
466
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
467
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
468
|
-
case "ResourceNotFoundException":
|
|
469
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
470
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
471
|
-
case "ServiceUnavailableException":
|
|
472
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
473
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
474
|
-
case "ThrottlingException":
|
|
475
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
476
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
477
|
-
case "UnauthorizedException":
|
|
478
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
479
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
480
|
-
case "UnsupportedDocumentEncodingException":
|
|
481
|
-
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
482
|
-
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
483
|
-
default:
|
|
484
|
-
const parsedBody = parsedOutput.body;
|
|
485
|
-
return throwDefaultError({
|
|
486
|
-
output,
|
|
487
|
-
parsedBody,
|
|
488
|
-
errorCode
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
}, "de_DeleteThingShadowCommandError");
|
|
492
452
|
var de_GetRetainedMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
493
453
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
494
|
-
return
|
|
454
|
+
return de_CommandError(output, context);
|
|
495
455
|
}
|
|
496
456
|
const contents = (0, import_smithy_client.map)({
|
|
497
457
|
$metadata: deserializeMetadata(output)
|
|
@@ -507,46 +467,9 @@ var de_GetRetainedMessageCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
507
467
|
Object.assign(contents, doc);
|
|
508
468
|
return contents;
|
|
509
469
|
}, "de_GetRetainedMessageCommand");
|
|
510
|
-
var de_GetRetainedMessageCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
511
|
-
const parsedOutput = {
|
|
512
|
-
...output,
|
|
513
|
-
body: await parseErrorBody(output.body, context)
|
|
514
|
-
};
|
|
515
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
516
|
-
switch (errorCode) {
|
|
517
|
-
case "InternalFailureException":
|
|
518
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
519
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
520
|
-
case "InvalidRequestException":
|
|
521
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
522
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
523
|
-
case "MethodNotAllowedException":
|
|
524
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
525
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
526
|
-
case "ResourceNotFoundException":
|
|
527
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
528
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
529
|
-
case "ServiceUnavailableException":
|
|
530
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
531
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
532
|
-
case "ThrottlingException":
|
|
533
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
534
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
535
|
-
case "UnauthorizedException":
|
|
536
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
537
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
538
|
-
default:
|
|
539
|
-
const parsedBody = parsedOutput.body;
|
|
540
|
-
return throwDefaultError({
|
|
541
|
-
output,
|
|
542
|
-
parsedBody,
|
|
543
|
-
errorCode
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
}, "de_GetRetainedMessageCommandError");
|
|
547
470
|
var de_GetThingShadowCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
548
471
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
549
|
-
return
|
|
472
|
+
return de_CommandError(output, context);
|
|
550
473
|
}
|
|
551
474
|
const contents = (0, import_smithy_client.map)({
|
|
552
475
|
$metadata: deserializeMetadata(output)
|
|
@@ -555,49 +478,9 @@ var de_GetThingShadowCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
555
478
|
contents.payload = data;
|
|
556
479
|
return contents;
|
|
557
480
|
}, "de_GetThingShadowCommand");
|
|
558
|
-
var de_GetThingShadowCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
559
|
-
const parsedOutput = {
|
|
560
|
-
...output,
|
|
561
|
-
body: await parseErrorBody(output.body, context)
|
|
562
|
-
};
|
|
563
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
564
|
-
switch (errorCode) {
|
|
565
|
-
case "InternalFailureException":
|
|
566
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
567
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
568
|
-
case "InvalidRequestException":
|
|
569
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
570
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
571
|
-
case "MethodNotAllowedException":
|
|
572
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
573
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
574
|
-
case "ResourceNotFoundException":
|
|
575
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
576
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
577
|
-
case "ServiceUnavailableException":
|
|
578
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
579
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
580
|
-
case "ThrottlingException":
|
|
581
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
582
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
583
|
-
case "UnauthorizedException":
|
|
584
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
585
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
586
|
-
case "UnsupportedDocumentEncodingException":
|
|
587
|
-
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
588
|
-
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
589
|
-
default:
|
|
590
|
-
const parsedBody = parsedOutput.body;
|
|
591
|
-
return throwDefaultError({
|
|
592
|
-
output,
|
|
593
|
-
parsedBody,
|
|
594
|
-
errorCode
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
}, "de_GetThingShadowCommandError");
|
|
598
481
|
var de_ListNamedShadowsForThingCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
599
482
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
600
|
-
return
|
|
483
|
+
return de_CommandError(output, context);
|
|
601
484
|
}
|
|
602
485
|
const contents = (0, import_smithy_client.map)({
|
|
603
486
|
$metadata: deserializeMetadata(output)
|
|
@@ -611,46 +494,9 @@ var de_ListNamedShadowsForThingCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
611
494
|
Object.assign(contents, doc);
|
|
612
495
|
return contents;
|
|
613
496
|
}, "de_ListNamedShadowsForThingCommand");
|
|
614
|
-
var de_ListNamedShadowsForThingCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
615
|
-
const parsedOutput = {
|
|
616
|
-
...output,
|
|
617
|
-
body: await parseErrorBody(output.body, context)
|
|
618
|
-
};
|
|
619
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
620
|
-
switch (errorCode) {
|
|
621
|
-
case "InternalFailureException":
|
|
622
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
623
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
624
|
-
case "InvalidRequestException":
|
|
625
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
626
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
627
|
-
case "MethodNotAllowedException":
|
|
628
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
629
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
630
|
-
case "ResourceNotFoundException":
|
|
631
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
632
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
633
|
-
case "ServiceUnavailableException":
|
|
634
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
635
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
636
|
-
case "ThrottlingException":
|
|
637
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
638
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
639
|
-
case "UnauthorizedException":
|
|
640
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
641
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
642
|
-
default:
|
|
643
|
-
const parsedBody = parsedOutput.body;
|
|
644
|
-
return throwDefaultError({
|
|
645
|
-
output,
|
|
646
|
-
parsedBody,
|
|
647
|
-
errorCode
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
|
-
}, "de_ListNamedShadowsForThingCommandError");
|
|
651
497
|
var de_ListRetainedMessagesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
652
498
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
653
|
-
return
|
|
499
|
+
return de_CommandError(output, context);
|
|
654
500
|
}
|
|
655
501
|
const contents = (0, import_smithy_client.map)({
|
|
656
502
|
$metadata: deserializeMetadata(output)
|
|
@@ -663,43 +509,9 @@ var de_ListRetainedMessagesCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
663
509
|
Object.assign(contents, doc);
|
|
664
510
|
return contents;
|
|
665
511
|
}, "de_ListRetainedMessagesCommand");
|
|
666
|
-
var de_ListRetainedMessagesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
667
|
-
const parsedOutput = {
|
|
668
|
-
...output,
|
|
669
|
-
body: await parseErrorBody(output.body, context)
|
|
670
|
-
};
|
|
671
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
672
|
-
switch (errorCode) {
|
|
673
|
-
case "InternalFailureException":
|
|
674
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
675
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
676
|
-
case "InvalidRequestException":
|
|
677
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
678
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
679
|
-
case "MethodNotAllowedException":
|
|
680
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
681
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
682
|
-
case "ServiceUnavailableException":
|
|
683
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
684
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
685
|
-
case "ThrottlingException":
|
|
686
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
687
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
688
|
-
case "UnauthorizedException":
|
|
689
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
690
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
691
|
-
default:
|
|
692
|
-
const parsedBody = parsedOutput.body;
|
|
693
|
-
return throwDefaultError({
|
|
694
|
-
output,
|
|
695
|
-
parsedBody,
|
|
696
|
-
errorCode
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
}, "de_ListRetainedMessagesCommandError");
|
|
700
512
|
var de_PublishCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
701
513
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
702
|
-
return
|
|
514
|
+
return de_CommandError(output, context);
|
|
703
515
|
}
|
|
704
516
|
const contents = (0, import_smithy_client.map)({
|
|
705
517
|
$metadata: deserializeMetadata(output)
|
|
@@ -707,40 +519,9 @@ var de_PublishCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
707
519
|
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
708
520
|
return contents;
|
|
709
521
|
}, "de_PublishCommand");
|
|
710
|
-
var de_PublishCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
711
|
-
const parsedOutput = {
|
|
712
|
-
...output,
|
|
713
|
-
body: await parseErrorBody(output.body, context)
|
|
714
|
-
};
|
|
715
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
716
|
-
switch (errorCode) {
|
|
717
|
-
case "InternalFailureException":
|
|
718
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
719
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
720
|
-
case "InvalidRequestException":
|
|
721
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
722
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
723
|
-
case "MethodNotAllowedException":
|
|
724
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
725
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
726
|
-
case "ThrottlingException":
|
|
727
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
728
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
729
|
-
case "UnauthorizedException":
|
|
730
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
731
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
732
|
-
default:
|
|
733
|
-
const parsedBody = parsedOutput.body;
|
|
734
|
-
return throwDefaultError({
|
|
735
|
-
output,
|
|
736
|
-
parsedBody,
|
|
737
|
-
errorCode
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
}, "de_PublishCommandError");
|
|
741
522
|
var de_UpdateThingShadowCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
742
523
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
743
|
-
return
|
|
524
|
+
return de_CommandError(output, context);
|
|
744
525
|
}
|
|
745
526
|
const contents = (0, import_smithy_client.map)({
|
|
746
527
|
$metadata: deserializeMetadata(output)
|
|
@@ -749,16 +530,13 @@ var de_UpdateThingShadowCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
749
530
|
contents.payload = data;
|
|
750
531
|
return contents;
|
|
751
532
|
}, "de_UpdateThingShadowCommand");
|
|
752
|
-
var
|
|
533
|
+
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
753
534
|
const parsedOutput = {
|
|
754
535
|
...output,
|
|
755
536
|
body: await parseErrorBody(output.body, context)
|
|
756
537
|
};
|
|
757
538
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
758
539
|
switch (errorCode) {
|
|
759
|
-
case "ConflictException":
|
|
760
|
-
case "com.amazonaws.iotdataplane#ConflictException":
|
|
761
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
762
540
|
case "InternalFailureException":
|
|
763
541
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
764
542
|
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
@@ -768,9 +546,9 @@ var de_UpdateThingShadowCommandError = /* @__PURE__ */ __name(async (output, con
|
|
|
768
546
|
case "MethodNotAllowedException":
|
|
769
547
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
770
548
|
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
771
|
-
case "
|
|
772
|
-
case "com.amazonaws.iotdataplane#
|
|
773
|
-
throw await
|
|
549
|
+
case "ResourceNotFoundException":
|
|
550
|
+
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
551
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
774
552
|
case "ServiceUnavailableException":
|
|
775
553
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
776
554
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
@@ -783,6 +561,12 @@ var de_UpdateThingShadowCommandError = /* @__PURE__ */ __name(async (output, con
|
|
|
783
561
|
case "UnsupportedDocumentEncodingException":
|
|
784
562
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
785
563
|
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
564
|
+
case "ConflictException":
|
|
565
|
+
case "com.amazonaws.iotdataplane#ConflictException":
|
|
566
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
567
|
+
case "RequestEntityTooLargeException":
|
|
568
|
+
case "com.amazonaws.iotdataplane#RequestEntityTooLargeException":
|
|
569
|
+
throw await de_RequestEntityTooLargeExceptionRes(parsedOutput, context);
|
|
786
570
|
default:
|
|
787
571
|
const parsedBody = parsedOutput.body;
|
|
788
572
|
return throwDefaultError({
|
|
@@ -791,7 +575,7 @@ var de_UpdateThingShadowCommandError = /* @__PURE__ */ __name(async (output, con
|
|
|
791
575
|
errorCode
|
|
792
576
|
});
|
|
793
577
|
}
|
|
794
|
-
}, "
|
|
578
|
+
}, "de_CommandError");
|
|
795
579
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(IoTDataPlaneServiceException);
|
|
796
580
|
var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
797
581
|
const contents = (0, import_smithy_client.map)({});
|
|
@@ -106,7 +106,7 @@ export const se_UpdateThingShadowCommand = async (input, context) => {
|
|
|
106
106
|
};
|
|
107
107
|
export const de_DeleteThingShadowCommand = async (output, context) => {
|
|
108
108
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
109
|
-
return
|
|
109
|
+
return de_CommandError(output, context);
|
|
110
110
|
}
|
|
111
111
|
const contents = map({
|
|
112
112
|
$metadata: deserializeMetadata(output),
|
|
@@ -115,49 +115,9 @@ export const de_DeleteThingShadowCommand = async (output, context) => {
|
|
|
115
115
|
contents.payload = data;
|
|
116
116
|
return contents;
|
|
117
117
|
};
|
|
118
|
-
const de_DeleteThingShadowCommandError = async (output, context) => {
|
|
119
|
-
const parsedOutput = {
|
|
120
|
-
...output,
|
|
121
|
-
body: await parseErrorBody(output.body, context),
|
|
122
|
-
};
|
|
123
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
124
|
-
switch (errorCode) {
|
|
125
|
-
case "InternalFailureException":
|
|
126
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
127
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
128
|
-
case "InvalidRequestException":
|
|
129
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
130
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
131
|
-
case "MethodNotAllowedException":
|
|
132
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
133
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
134
|
-
case "ResourceNotFoundException":
|
|
135
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
136
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
137
|
-
case "ServiceUnavailableException":
|
|
138
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
139
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
140
|
-
case "ThrottlingException":
|
|
141
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
142
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
143
|
-
case "UnauthorizedException":
|
|
144
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
145
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
146
|
-
case "UnsupportedDocumentEncodingException":
|
|
147
|
-
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
148
|
-
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
149
|
-
default:
|
|
150
|
-
const parsedBody = parsedOutput.body;
|
|
151
|
-
return throwDefaultError({
|
|
152
|
-
output,
|
|
153
|
-
parsedBody,
|
|
154
|
-
errorCode,
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
118
|
export const de_GetRetainedMessageCommand = async (output, context) => {
|
|
159
119
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
160
|
-
return
|
|
120
|
+
return de_CommandError(output, context);
|
|
161
121
|
}
|
|
162
122
|
const contents = map({
|
|
163
123
|
$metadata: deserializeMetadata(output),
|
|
@@ -173,46 +133,9 @@ export const de_GetRetainedMessageCommand = async (output, context) => {
|
|
|
173
133
|
Object.assign(contents, doc);
|
|
174
134
|
return contents;
|
|
175
135
|
};
|
|
176
|
-
const de_GetRetainedMessageCommandError = async (output, context) => {
|
|
177
|
-
const parsedOutput = {
|
|
178
|
-
...output,
|
|
179
|
-
body: await parseErrorBody(output.body, context),
|
|
180
|
-
};
|
|
181
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
182
|
-
switch (errorCode) {
|
|
183
|
-
case "InternalFailureException":
|
|
184
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
185
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
186
|
-
case "InvalidRequestException":
|
|
187
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
188
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
189
|
-
case "MethodNotAllowedException":
|
|
190
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
191
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
192
|
-
case "ResourceNotFoundException":
|
|
193
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
194
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
195
|
-
case "ServiceUnavailableException":
|
|
196
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
197
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
198
|
-
case "ThrottlingException":
|
|
199
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
200
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
201
|
-
case "UnauthorizedException":
|
|
202
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
203
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
204
|
-
default:
|
|
205
|
-
const parsedBody = parsedOutput.body;
|
|
206
|
-
return throwDefaultError({
|
|
207
|
-
output,
|
|
208
|
-
parsedBody,
|
|
209
|
-
errorCode,
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
136
|
export const de_GetThingShadowCommand = async (output, context) => {
|
|
214
137
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
215
|
-
return
|
|
138
|
+
return de_CommandError(output, context);
|
|
216
139
|
}
|
|
217
140
|
const contents = map({
|
|
218
141
|
$metadata: deserializeMetadata(output),
|
|
@@ -221,49 +144,9 @@ export const de_GetThingShadowCommand = async (output, context) => {
|
|
|
221
144
|
contents.payload = data;
|
|
222
145
|
return contents;
|
|
223
146
|
};
|
|
224
|
-
const de_GetThingShadowCommandError = async (output, context) => {
|
|
225
|
-
const parsedOutput = {
|
|
226
|
-
...output,
|
|
227
|
-
body: await parseErrorBody(output.body, context),
|
|
228
|
-
};
|
|
229
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
230
|
-
switch (errorCode) {
|
|
231
|
-
case "InternalFailureException":
|
|
232
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
233
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
234
|
-
case "InvalidRequestException":
|
|
235
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
236
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
237
|
-
case "MethodNotAllowedException":
|
|
238
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
239
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
240
|
-
case "ResourceNotFoundException":
|
|
241
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
242
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
243
|
-
case "ServiceUnavailableException":
|
|
244
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
245
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
246
|
-
case "ThrottlingException":
|
|
247
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
248
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
249
|
-
case "UnauthorizedException":
|
|
250
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
251
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
252
|
-
case "UnsupportedDocumentEncodingException":
|
|
253
|
-
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
254
|
-
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
255
|
-
default:
|
|
256
|
-
const parsedBody = parsedOutput.body;
|
|
257
|
-
return throwDefaultError({
|
|
258
|
-
output,
|
|
259
|
-
parsedBody,
|
|
260
|
-
errorCode,
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
147
|
export const de_ListNamedShadowsForThingCommand = async (output, context) => {
|
|
265
148
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
266
|
-
return
|
|
149
|
+
return de_CommandError(output, context);
|
|
267
150
|
}
|
|
268
151
|
const contents = map({
|
|
269
152
|
$metadata: deserializeMetadata(output),
|
|
@@ -277,46 +160,9 @@ export const de_ListNamedShadowsForThingCommand = async (output, context) => {
|
|
|
277
160
|
Object.assign(contents, doc);
|
|
278
161
|
return contents;
|
|
279
162
|
};
|
|
280
|
-
const de_ListNamedShadowsForThingCommandError = async (output, context) => {
|
|
281
|
-
const parsedOutput = {
|
|
282
|
-
...output,
|
|
283
|
-
body: await parseErrorBody(output.body, context),
|
|
284
|
-
};
|
|
285
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
286
|
-
switch (errorCode) {
|
|
287
|
-
case "InternalFailureException":
|
|
288
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
289
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
290
|
-
case "InvalidRequestException":
|
|
291
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
292
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
293
|
-
case "MethodNotAllowedException":
|
|
294
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
295
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
296
|
-
case "ResourceNotFoundException":
|
|
297
|
-
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
298
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
299
|
-
case "ServiceUnavailableException":
|
|
300
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
301
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
302
|
-
case "ThrottlingException":
|
|
303
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
304
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
305
|
-
case "UnauthorizedException":
|
|
306
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
307
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
308
|
-
default:
|
|
309
|
-
const parsedBody = parsedOutput.body;
|
|
310
|
-
return throwDefaultError({
|
|
311
|
-
output,
|
|
312
|
-
parsedBody,
|
|
313
|
-
errorCode,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
163
|
export const de_ListRetainedMessagesCommand = async (output, context) => {
|
|
318
164
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
319
|
-
return
|
|
165
|
+
return de_CommandError(output, context);
|
|
320
166
|
}
|
|
321
167
|
const contents = map({
|
|
322
168
|
$metadata: deserializeMetadata(output),
|
|
@@ -329,43 +175,9 @@ export const de_ListRetainedMessagesCommand = async (output, context) => {
|
|
|
329
175
|
Object.assign(contents, doc);
|
|
330
176
|
return contents;
|
|
331
177
|
};
|
|
332
|
-
const de_ListRetainedMessagesCommandError = async (output, context) => {
|
|
333
|
-
const parsedOutput = {
|
|
334
|
-
...output,
|
|
335
|
-
body: await parseErrorBody(output.body, context),
|
|
336
|
-
};
|
|
337
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
338
|
-
switch (errorCode) {
|
|
339
|
-
case "InternalFailureException":
|
|
340
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
341
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
342
|
-
case "InvalidRequestException":
|
|
343
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
344
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
345
|
-
case "MethodNotAllowedException":
|
|
346
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
347
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
348
|
-
case "ServiceUnavailableException":
|
|
349
|
-
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
350
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
351
|
-
case "ThrottlingException":
|
|
352
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
353
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
354
|
-
case "UnauthorizedException":
|
|
355
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
356
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
357
|
-
default:
|
|
358
|
-
const parsedBody = parsedOutput.body;
|
|
359
|
-
return throwDefaultError({
|
|
360
|
-
output,
|
|
361
|
-
parsedBody,
|
|
362
|
-
errorCode,
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
178
|
export const de_PublishCommand = async (output, context) => {
|
|
367
179
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
368
|
-
return
|
|
180
|
+
return de_CommandError(output, context);
|
|
369
181
|
}
|
|
370
182
|
const contents = map({
|
|
371
183
|
$metadata: deserializeMetadata(output),
|
|
@@ -373,40 +185,9 @@ export const de_PublishCommand = async (output, context) => {
|
|
|
373
185
|
await collectBody(output.body, context);
|
|
374
186
|
return contents;
|
|
375
187
|
};
|
|
376
|
-
const de_PublishCommandError = async (output, context) => {
|
|
377
|
-
const parsedOutput = {
|
|
378
|
-
...output,
|
|
379
|
-
body: await parseErrorBody(output.body, context),
|
|
380
|
-
};
|
|
381
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
382
|
-
switch (errorCode) {
|
|
383
|
-
case "InternalFailureException":
|
|
384
|
-
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
385
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
386
|
-
case "InvalidRequestException":
|
|
387
|
-
case "com.amazonaws.iotdataplane#InvalidRequestException":
|
|
388
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
389
|
-
case "MethodNotAllowedException":
|
|
390
|
-
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
391
|
-
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
392
|
-
case "ThrottlingException":
|
|
393
|
-
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
394
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
395
|
-
case "UnauthorizedException":
|
|
396
|
-
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
397
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
398
|
-
default:
|
|
399
|
-
const parsedBody = parsedOutput.body;
|
|
400
|
-
return throwDefaultError({
|
|
401
|
-
output,
|
|
402
|
-
parsedBody,
|
|
403
|
-
errorCode,
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
};
|
|
407
188
|
export const de_UpdateThingShadowCommand = async (output, context) => {
|
|
408
189
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
409
|
-
return
|
|
190
|
+
return de_CommandError(output, context);
|
|
410
191
|
}
|
|
411
192
|
const contents = map({
|
|
412
193
|
$metadata: deserializeMetadata(output),
|
|
@@ -415,16 +196,13 @@ export const de_UpdateThingShadowCommand = async (output, context) => {
|
|
|
415
196
|
contents.payload = data;
|
|
416
197
|
return contents;
|
|
417
198
|
};
|
|
418
|
-
const
|
|
199
|
+
const de_CommandError = async (output, context) => {
|
|
419
200
|
const parsedOutput = {
|
|
420
201
|
...output,
|
|
421
202
|
body: await parseErrorBody(output.body, context),
|
|
422
203
|
};
|
|
423
204
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
424
205
|
switch (errorCode) {
|
|
425
|
-
case "ConflictException":
|
|
426
|
-
case "com.amazonaws.iotdataplane#ConflictException":
|
|
427
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
428
206
|
case "InternalFailureException":
|
|
429
207
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
430
208
|
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
@@ -434,9 +212,9 @@ const de_UpdateThingShadowCommandError = async (output, context) => {
|
|
|
434
212
|
case "MethodNotAllowedException":
|
|
435
213
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
436
214
|
throw await de_MethodNotAllowedExceptionRes(parsedOutput, context);
|
|
437
|
-
case "
|
|
438
|
-
case "com.amazonaws.iotdataplane#
|
|
439
|
-
throw await
|
|
215
|
+
case "ResourceNotFoundException":
|
|
216
|
+
case "com.amazonaws.iotdataplane#ResourceNotFoundException":
|
|
217
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
440
218
|
case "ServiceUnavailableException":
|
|
441
219
|
case "com.amazonaws.iotdataplane#ServiceUnavailableException":
|
|
442
220
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
@@ -449,6 +227,12 @@ const de_UpdateThingShadowCommandError = async (output, context) => {
|
|
|
449
227
|
case "UnsupportedDocumentEncodingException":
|
|
450
228
|
case "com.amazonaws.iotdataplane#UnsupportedDocumentEncodingException":
|
|
451
229
|
throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context);
|
|
230
|
+
case "ConflictException":
|
|
231
|
+
case "com.amazonaws.iotdataplane#ConflictException":
|
|
232
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
233
|
+
case "RequestEntityTooLargeException":
|
|
234
|
+
case "com.amazonaws.iotdataplane#RequestEntityTooLargeException":
|
|
235
|
+
throw await de_RequestEntityTooLargeExceptionRes(parsedOutput, context);
|
|
452
236
|
default:
|
|
453
237
|
const parsedBody = parsedOutput.body;
|
|
454
238
|
return throwDefaultError({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iot-data-plane",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iot Data Plane Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.507.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-iot-data-plane",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.507.0",
|
|
24
24
|
"@aws-sdk/core": "3.496.0",
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.507.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.502.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.502.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.502.0",
|