@aws-sdk/client-shield 3.41.0 → 3.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist-cjs/Shield.js +45 -0
  3. package/dist-cjs/commands/DisableApplicationLayerAutomaticResponseCommand.js +36 -0
  4. package/dist-cjs/commands/EnableApplicationLayerAutomaticResponseCommand.js +36 -0
  5. package/dist-cjs/commands/UpdateApplicationLayerAutomaticResponseCommand.js +36 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/endpoints.js +1 -0
  8. package/dist-cjs/models/models_0.js +74 -9
  9. package/dist-cjs/protocols/Aws_json1_1.js +363 -2
  10. package/dist-es/Shield.js +45 -0
  11. package/dist-es/commands/DisableApplicationLayerAutomaticResponseCommand.js +39 -0
  12. package/dist-es/commands/EnableApplicationLayerAutomaticResponseCommand.js +39 -0
  13. package/dist-es/commands/UpdateApplicationLayerAutomaticResponseCommand.js +39 -0
  14. package/dist-es/commands/index.js +3 -0
  15. package/dist-es/endpoints.js +1 -0
  16. package/dist-es/models/models_0.js +49 -4
  17. package/dist-es/protocols/Aws_json1_1.js +430 -50
  18. package/dist-types/Shield.d.ts +50 -12
  19. package/dist-types/ShieldClient.d.ts +5 -2
  20. package/dist-types/commands/AssociateDRTLogBucketCommand.d.ts +1 -1
  21. package/dist-types/commands/AssociateDRTRoleCommand.d.ts +4 -3
  22. package/dist-types/commands/AssociateHealthCheckCommand.d.ts +2 -2
  23. package/dist-types/commands/CreateProtectionCommand.d.ts +6 -2
  24. package/dist-types/commands/DisableApplicationLayerAutomaticResponseCommand.d.ts +36 -0
  25. package/dist-types/commands/DisassociateDRTLogBucketCommand.d.ts +0 -1
  26. package/dist-types/commands/DisassociateDRTRoleCommand.d.ts +0 -1
  27. package/dist-types/commands/DisassociateHealthCheckCommand.d.ts +2 -2
  28. package/dist-types/commands/EnableApplicationLayerAutomaticResponseCommand.d.ts +48 -0
  29. package/dist-types/commands/UpdateApplicationLayerAutomaticResponseCommand.d.ts +35 -0
  30. package/dist-types/commands/index.d.ts +3 -0
  31. package/dist-types/models/models_0.d.ts +260 -60
  32. package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
  33. package/dist-types/ts3.4/Shield.d.ts +15 -0
  34. package/dist-types/ts3.4/ShieldClient.d.ts +5 -2
  35. package/dist-types/ts3.4/commands/DisableApplicationLayerAutomaticResponseCommand.d.ts +17 -0
  36. package/dist-types/ts3.4/commands/EnableApplicationLayerAutomaticResponseCommand.d.ts +17 -0
  37. package/dist-types/ts3.4/commands/UpdateApplicationLayerAutomaticResponseCommand.d.ts +17 -0
  38. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  39. package/dist-types/ts3.4/models/models_0.d.ts +98 -10
  40. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +9 -0
  41. package/package.json +5 -5
@@ -188,6 +188,17 @@ export var serializeAws_json1_1DescribeSubscriptionCommand = function (input, co
188
188
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
189
189
  });
190
190
  }); };
191
+ export var serializeAws_json1_1DisableApplicationLayerAutomaticResponseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
192
+ var headers, body;
193
+ return __generator(this, function (_a) {
194
+ headers = {
195
+ "content-type": "application/x-amz-json-1.1",
196
+ "x-amz-target": "AWSShield_20160616.DisableApplicationLayerAutomaticResponse",
197
+ };
198
+ body = JSON.stringify(serializeAws_json1_1DisableApplicationLayerAutomaticResponseRequest(input, context));
199
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
200
+ });
201
+ }); };
191
202
  export var serializeAws_json1_1DisableProactiveEngagementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
192
203
  var headers, body;
193
204
  return __generator(this, function (_a) {
@@ -232,6 +243,17 @@ export var serializeAws_json1_1DisassociateHealthCheckCommand = function (input,
232
243
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
233
244
  });
234
245
  }); };
246
+ export var serializeAws_json1_1EnableApplicationLayerAutomaticResponseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
247
+ var headers, body;
248
+ return __generator(this, function (_a) {
249
+ headers = {
250
+ "content-type": "application/x-amz-json-1.1",
251
+ "x-amz-target": "AWSShield_20160616.EnableApplicationLayerAutomaticResponse",
252
+ };
253
+ body = JSON.stringify(serializeAws_json1_1EnableApplicationLayerAutomaticResponseRequest(input, context));
254
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
255
+ });
256
+ }); };
235
257
  export var serializeAws_json1_1EnableProactiveEngagementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
236
258
  var headers, body;
237
259
  return __generator(this, function (_a) {
@@ -331,6 +353,17 @@ export var serializeAws_json1_1UntagResourceCommand = function (input, context)
331
353
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
332
354
  });
333
355
  }); };
356
+ export var serializeAws_json1_1UpdateApplicationLayerAutomaticResponseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
357
+ var headers, body;
358
+ return __generator(this, function (_a) {
359
+ headers = {
360
+ "content-type": "application/x-amz-json-1.1",
361
+ "x-amz-target": "AWSShield_20160616.UpdateApplicationLayerAutomaticResponse",
362
+ };
363
+ body = JSON.stringify(serializeAws_json1_1UpdateApplicationLayerAutomaticResponseRequest(input, context));
364
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
365
+ });
366
+ }); };
334
367
  export var serializeAws_json1_1UpdateEmergencyContactSettingsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
335
368
  var headers, body;
336
369
  return __generator(this, function (_a) {
@@ -591,16 +624,16 @@ export var deserializeAws_json1_1AssociateHealthCheckCommand = function (output,
591
624
  });
592
625
  }); };
593
626
  var deserializeAws_json1_1AssociateHealthCheckCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
594
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
595
- var _h;
596
- return __generator(this, function (_j) {
597
- switch (_j.label) {
627
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
628
+ var _j;
629
+ return __generator(this, function (_k) {
630
+ switch (_k.label) {
598
631
  case 0:
599
632
  _a = [__assign({}, output)];
600
- _h = {};
633
+ _j = {};
601
634
  return [4, parseBody(output.body, context)];
602
635
  case 1:
603
- parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
636
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
604
637
  errorCode = "UnknownError";
605
638
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
606
639
  _b = errorCode;
@@ -609,50 +642,58 @@ var deserializeAws_json1_1AssociateHealthCheckCommandError = function (output, c
609
642
  case "com.amazonaws.shield#InternalErrorException": return [3, 2];
610
643
  case "InvalidParameterException": return [3, 4];
611
644
  case "com.amazonaws.shield#InvalidParameterException": return [3, 4];
612
- case "LimitsExceededException": return [3, 6];
613
- case "com.amazonaws.shield#LimitsExceededException": return [3, 6];
614
- case "OptimisticLockException": return [3, 8];
615
- case "com.amazonaws.shield#OptimisticLockException": return [3, 8];
616
- case "ResourceNotFoundException": return [3, 10];
617
- case "com.amazonaws.shield#ResourceNotFoundException": return [3, 10];
645
+ case "InvalidResourceException": return [3, 6];
646
+ case "com.amazonaws.shield#InvalidResourceException": return [3, 6];
647
+ case "LimitsExceededException": return [3, 8];
648
+ case "com.amazonaws.shield#LimitsExceededException": return [3, 8];
649
+ case "OptimisticLockException": return [3, 10];
650
+ case "com.amazonaws.shield#OptimisticLockException": return [3, 10];
651
+ case "ResourceNotFoundException": return [3, 12];
652
+ case "com.amazonaws.shield#ResourceNotFoundException": return [3, 12];
618
653
  }
619
- return [3, 12];
654
+ return [3, 14];
620
655
  case 2:
621
656
  _c = [{}];
622
657
  return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
623
658
  case 3:
624
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
625
- return [3, 13];
659
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
660
+ return [3, 15];
626
661
  case 4:
627
662
  _d = [{}];
628
663
  return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
629
664
  case 5:
630
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
631
- return [3, 13];
665
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
666
+ return [3, 15];
632
667
  case 6:
633
668
  _e = [{}];
634
- return [4, deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)];
669
+ return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
635
670
  case 7:
636
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
637
- return [3, 13];
671
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
672
+ return [3, 15];
638
673
  case 8:
639
674
  _f = [{}];
640
- return [4, deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)];
675
+ return [4, deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)];
641
676
  case 9:
642
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
643
- return [3, 13];
677
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
678
+ return [3, 15];
644
679
  case 10:
645
680
  _g = [{}];
646
- return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
681
+ return [4, deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)];
647
682
  case 11:
648
- response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
649
- return [3, 13];
683
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
684
+ return [3, 15];
650
685
  case 12:
686
+ _h = [{}];
687
+ return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
688
+ case 13:
689
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
690
+ return [3, 15];
691
+ case 14:
651
692
  parsedBody = parsedOutput.body;
652
693
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
653
694
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
654
- _j.label = 13;
655
- case 13:
695
+ _k.label = 15;
696
+ case 15:
656
697
  message = response.message || response.Message || errorCode;
657
698
  response.message = message;
658
699
  delete response.Message;
@@ -1684,6 +1725,94 @@ var deserializeAws_json1_1DescribeSubscriptionCommandError = function (output, c
1684
1725
  }
1685
1726
  });
1686
1727
  }); };
1728
+ export var deserializeAws_json1_1DisableApplicationLayerAutomaticResponseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1729
+ var data, contents, response;
1730
+ return __generator(this, function (_a) {
1731
+ switch (_a.label) {
1732
+ case 0:
1733
+ if (output.statusCode >= 300) {
1734
+ return [2, deserializeAws_json1_1DisableApplicationLayerAutomaticResponseCommandError(output, context)];
1735
+ }
1736
+ return [4, parseBody(output.body, context)];
1737
+ case 1:
1738
+ data = _a.sent();
1739
+ contents = {};
1740
+ contents = deserializeAws_json1_1DisableApplicationLayerAutomaticResponseResponse(data, context);
1741
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1742
+ return [2, Promise.resolve(response)];
1743
+ }
1744
+ });
1745
+ }); };
1746
+ var deserializeAws_json1_1DisableApplicationLayerAutomaticResponseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1747
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
1748
+ var _h;
1749
+ return __generator(this, function (_j) {
1750
+ switch (_j.label) {
1751
+ case 0:
1752
+ _a = [__assign({}, output)];
1753
+ _h = {};
1754
+ return [4, parseBody(output.body, context)];
1755
+ case 1:
1756
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
1757
+ errorCode = "UnknownError";
1758
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1759
+ _b = errorCode;
1760
+ switch (_b) {
1761
+ case "InternalErrorException": return [3, 2];
1762
+ case "com.amazonaws.shield#InternalErrorException": return [3, 2];
1763
+ case "InvalidOperationException": return [3, 4];
1764
+ case "com.amazonaws.shield#InvalidOperationException": return [3, 4];
1765
+ case "InvalidParameterException": return [3, 6];
1766
+ case "com.amazonaws.shield#InvalidParameterException": return [3, 6];
1767
+ case "OptimisticLockException": return [3, 8];
1768
+ case "com.amazonaws.shield#OptimisticLockException": return [3, 8];
1769
+ case "ResourceNotFoundException": return [3, 10];
1770
+ case "com.amazonaws.shield#ResourceNotFoundException": return [3, 10];
1771
+ }
1772
+ return [3, 12];
1773
+ case 2:
1774
+ _c = [{}];
1775
+ return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1776
+ case 3:
1777
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1778
+ return [3, 13];
1779
+ case 4:
1780
+ _d = [{}];
1781
+ return [4, deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)];
1782
+ case 5:
1783
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1784
+ return [3, 13];
1785
+ case 6:
1786
+ _e = [{}];
1787
+ return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
1788
+ case 7:
1789
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1790
+ return [3, 13];
1791
+ case 8:
1792
+ _f = [{}];
1793
+ return [4, deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)];
1794
+ case 9:
1795
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1796
+ return [3, 13];
1797
+ case 10:
1798
+ _g = [{}];
1799
+ return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
1800
+ case 11:
1801
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1802
+ return [3, 13];
1803
+ case 12:
1804
+ parsedBody = parsedOutput.body;
1805
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1806
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1807
+ _j.label = 13;
1808
+ case 13:
1809
+ message = response.message || response.Message || errorCode;
1810
+ response.message = message;
1811
+ delete response.Message;
1812
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1813
+ }
1814
+ });
1815
+ }); };
1687
1816
  export var deserializeAws_json1_1DisableProactiveEngagementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1688
1817
  var data, contents, response;
1689
1818
  return __generator(this, function (_a) {
@@ -1967,16 +2096,16 @@ export var deserializeAws_json1_1DisassociateHealthCheckCommand = function (outp
1967
2096
  });
1968
2097
  }); };
1969
2098
  var deserializeAws_json1_1DisassociateHealthCheckCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1970
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
1971
- var _g;
1972
- return __generator(this, function (_h) {
1973
- switch (_h.label) {
2099
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
2100
+ var _h;
2101
+ return __generator(this, function (_j) {
2102
+ switch (_j.label) {
1974
2103
  case 0:
1975
2104
  _a = [__assign({}, output)];
1976
- _g = {};
2105
+ _h = {};
1977
2106
  return [4, parseBody(output.body, context)];
1978
2107
  case 1:
1979
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
2108
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
1980
2109
  errorCode = "UnknownError";
1981
2110
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1982
2111
  _b = errorCode;
@@ -1985,42 +2114,146 @@ var deserializeAws_json1_1DisassociateHealthCheckCommandError = function (output
1985
2114
  case "com.amazonaws.shield#InternalErrorException": return [3, 2];
1986
2115
  case "InvalidParameterException": return [3, 4];
1987
2116
  case "com.amazonaws.shield#InvalidParameterException": return [3, 4];
1988
- case "OptimisticLockException": return [3, 6];
1989
- case "com.amazonaws.shield#OptimisticLockException": return [3, 6];
1990
- case "ResourceNotFoundException": return [3, 8];
1991
- case "com.amazonaws.shield#ResourceNotFoundException": return [3, 8];
2117
+ case "InvalidResourceException": return [3, 6];
2118
+ case "com.amazonaws.shield#InvalidResourceException": return [3, 6];
2119
+ case "OptimisticLockException": return [3, 8];
2120
+ case "com.amazonaws.shield#OptimisticLockException": return [3, 8];
2121
+ case "ResourceNotFoundException": return [3, 10];
2122
+ case "com.amazonaws.shield#ResourceNotFoundException": return [3, 10];
1992
2123
  }
1993
- return [3, 10];
2124
+ return [3, 12];
1994
2125
  case 2:
1995
2126
  _c = [{}];
1996
2127
  return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
1997
2128
  case 3:
1998
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1999
- return [3, 11];
2129
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2130
+ return [3, 13];
2000
2131
  case 4:
2001
2132
  _d = [{}];
2002
2133
  return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
2003
2134
  case 5:
2004
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2005
- return [3, 11];
2135
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2136
+ return [3, 13];
2006
2137
  case 6:
2007
2138
  _e = [{}];
2008
- return [4, deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)];
2139
+ return [4, deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)];
2009
2140
  case 7:
2010
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2011
- return [3, 11];
2141
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2142
+ return [3, 13];
2012
2143
  case 8:
2013
2144
  _f = [{}];
2014
- return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2145
+ return [4, deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)];
2015
2146
  case 9:
2016
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2017
- return [3, 11];
2147
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2148
+ return [3, 13];
2018
2149
  case 10:
2150
+ _g = [{}];
2151
+ return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2152
+ case 11:
2153
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2154
+ return [3, 13];
2155
+ case 12:
2019
2156
  parsedBody = parsedOutput.body;
2020
2157
  errorCode = parsedBody.code || parsedBody.Code || errorCode;
2021
2158
  response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2022
- _h.label = 11;
2159
+ _j.label = 13;
2160
+ case 13:
2161
+ message = response.message || response.Message || errorCode;
2162
+ response.message = message;
2163
+ delete response.Message;
2164
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
2165
+ }
2166
+ });
2167
+ }); };
2168
+ export var deserializeAws_json1_1EnableApplicationLayerAutomaticResponseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2169
+ var data, contents, response;
2170
+ return __generator(this, function (_a) {
2171
+ switch (_a.label) {
2172
+ case 0:
2173
+ if (output.statusCode >= 300) {
2174
+ return [2, deserializeAws_json1_1EnableApplicationLayerAutomaticResponseCommandError(output, context)];
2175
+ }
2176
+ return [4, parseBody(output.body, context)];
2177
+ case 1:
2178
+ data = _a.sent();
2179
+ contents = {};
2180
+ contents = deserializeAws_json1_1EnableApplicationLayerAutomaticResponseResponse(data, context);
2181
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
2182
+ return [2, Promise.resolve(response)];
2183
+ }
2184
+ });
2185
+ }); };
2186
+ var deserializeAws_json1_1EnableApplicationLayerAutomaticResponseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2187
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
2188
+ var _j;
2189
+ return __generator(this, function (_k) {
2190
+ switch (_k.label) {
2191
+ case 0:
2192
+ _a = [__assign({}, output)];
2193
+ _j = {};
2194
+ return [4, parseBody(output.body, context)];
2195
+ case 1:
2196
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
2197
+ errorCode = "UnknownError";
2198
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2199
+ _b = errorCode;
2200
+ switch (_b) {
2201
+ case "InternalErrorException": return [3, 2];
2202
+ case "com.amazonaws.shield#InternalErrorException": return [3, 2];
2203
+ case "InvalidOperationException": return [3, 4];
2204
+ case "com.amazonaws.shield#InvalidOperationException": return [3, 4];
2205
+ case "InvalidParameterException": return [3, 6];
2206
+ case "com.amazonaws.shield#InvalidParameterException": return [3, 6];
2207
+ case "LimitsExceededException": return [3, 8];
2208
+ case "com.amazonaws.shield#LimitsExceededException": return [3, 8];
2209
+ case "OptimisticLockException": return [3, 10];
2210
+ case "com.amazonaws.shield#OptimisticLockException": return [3, 10];
2211
+ case "ResourceNotFoundException": return [3, 12];
2212
+ case "com.amazonaws.shield#ResourceNotFoundException": return [3, 12];
2213
+ }
2214
+ return [3, 14];
2215
+ case 2:
2216
+ _c = [{}];
2217
+ return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
2218
+ case 3:
2219
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2220
+ return [3, 15];
2221
+ case 4:
2222
+ _d = [{}];
2223
+ return [4, deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)];
2224
+ case 5:
2225
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2226
+ return [3, 15];
2227
+ case 6:
2228
+ _e = [{}];
2229
+ return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
2230
+ case 7:
2231
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2232
+ return [3, 15];
2233
+ case 8:
2234
+ _f = [{}];
2235
+ return [4, deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)];
2236
+ case 9:
2237
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2238
+ return [3, 15];
2239
+ case 10:
2240
+ _g = [{}];
2241
+ return [4, deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)];
2023
2242
  case 11:
2243
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2244
+ return [3, 15];
2245
+ case 12:
2246
+ _h = [{}];
2247
+ return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2248
+ case 13:
2249
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2250
+ return [3, 15];
2251
+ case 14:
2252
+ parsedBody = parsedOutput.body;
2253
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2254
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2255
+ _k.label = 15;
2256
+ case 15:
2024
2257
  message = response.message || response.Message || errorCode;
2025
2258
  response.message = message;
2026
2259
  delete response.Message;
@@ -2692,6 +2925,94 @@ var deserializeAws_json1_1UntagResourceCommandError = function (output, context)
2692
2925
  }
2693
2926
  });
2694
2927
  }); };
2928
+ export var deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2929
+ var data, contents, response;
2930
+ return __generator(this, function (_a) {
2931
+ switch (_a.label) {
2932
+ case 0:
2933
+ if (output.statusCode >= 300) {
2934
+ return [2, deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseCommandError(output, context)];
2935
+ }
2936
+ return [4, parseBody(output.body, context)];
2937
+ case 1:
2938
+ data = _a.sent();
2939
+ contents = {};
2940
+ contents = deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseResponse(data, context);
2941
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
2942
+ return [2, Promise.resolve(response)];
2943
+ }
2944
+ });
2945
+ }); };
2946
+ var deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2947
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
2948
+ var _h;
2949
+ return __generator(this, function (_j) {
2950
+ switch (_j.label) {
2951
+ case 0:
2952
+ _a = [__assign({}, output)];
2953
+ _h = {};
2954
+ return [4, parseBody(output.body, context)];
2955
+ case 1:
2956
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
2957
+ errorCode = "UnknownError";
2958
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2959
+ _b = errorCode;
2960
+ switch (_b) {
2961
+ case "InternalErrorException": return [3, 2];
2962
+ case "com.amazonaws.shield#InternalErrorException": return [3, 2];
2963
+ case "InvalidOperationException": return [3, 4];
2964
+ case "com.amazonaws.shield#InvalidOperationException": return [3, 4];
2965
+ case "InvalidParameterException": return [3, 6];
2966
+ case "com.amazonaws.shield#InvalidParameterException": return [3, 6];
2967
+ case "OptimisticLockException": return [3, 8];
2968
+ case "com.amazonaws.shield#OptimisticLockException": return [3, 8];
2969
+ case "ResourceNotFoundException": return [3, 10];
2970
+ case "com.amazonaws.shield#ResourceNotFoundException": return [3, 10];
2971
+ }
2972
+ return [3, 12];
2973
+ case 2:
2974
+ _c = [{}];
2975
+ return [4, deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)];
2976
+ case 3:
2977
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2978
+ return [3, 13];
2979
+ case 4:
2980
+ _d = [{}];
2981
+ return [4, deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)];
2982
+ case 5:
2983
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2984
+ return [3, 13];
2985
+ case 6:
2986
+ _e = [{}];
2987
+ return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
2988
+ case 7:
2989
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2990
+ return [3, 13];
2991
+ case 8:
2992
+ _f = [{}];
2993
+ return [4, deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)];
2994
+ case 9:
2995
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2996
+ return [3, 13];
2997
+ case 10:
2998
+ _g = [{}];
2999
+ return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
3000
+ case 11:
3001
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
3002
+ return [3, 13];
3003
+ case 12:
3004
+ parsedBody = parsedOutput.body;
3005
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3006
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
3007
+ _j.label = 13;
3008
+ case 13:
3009
+ message = response.message || response.Message || errorCode;
3010
+ response.message = message;
3011
+ delete response.Message;
3012
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
3013
+ }
3014
+ });
3015
+ }); };
2695
3016
  export var deserializeAws_json1_1UpdateEmergencyContactSettingsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2696
3017
  var data, contents, response;
2697
3018
  return __generator(this, function (_a) {
@@ -3073,6 +3394,12 @@ var serializeAws_json1_1AssociateProactiveEngagementDetailsRequest = function (i
3073
3394
  EmergencyContactList: serializeAws_json1_1EmergencyContactList(input.EmergencyContactList, context),
3074
3395
  }));
3075
3396
  };
3397
+ var serializeAws_json1_1BlockAction = function (input, context) {
3398
+ return {};
3399
+ };
3400
+ var serializeAws_json1_1CountAction = function (input, context) {
3401
+ return {};
3402
+ };
3076
3403
  var serializeAws_json1_1CreateProtectionGroupRequest = function (input, context) {
3077
3404
  return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.Aggregation !== undefined && input.Aggregation !== null && { Aggregation: input.Aggregation })), (input.Members !== undefined &&
3078
3405
  input.Members !== null && { Members: serializeAws_json1_1ProtectionGroupMembers(input.Members, context) })), (input.Pattern !== undefined && input.Pattern !== null && { Pattern: input.Pattern })), (input.ProtectionGroupId !== undefined &&
@@ -3116,6 +3443,9 @@ var serializeAws_json1_1DescribeProtectionRequest = function (input, context) {
3116
3443
  var serializeAws_json1_1DescribeSubscriptionRequest = function (input, context) {
3117
3444
  return {};
3118
3445
  };
3446
+ var serializeAws_json1_1DisableApplicationLayerAutomaticResponseRequest = function (input, context) {
3447
+ return __assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }));
3448
+ };
3119
3449
  var serializeAws_json1_1DisableProactiveEngagementRequest = function (input, context) {
3120
3450
  return {};
3121
3451
  };
@@ -3142,6 +3472,10 @@ var serializeAws_json1_1EmergencyContactList = function (input, context) {
3142
3472
  return serializeAws_json1_1EmergencyContact(entry, context);
3143
3473
  });
3144
3474
  };
3475
+ var serializeAws_json1_1EnableApplicationLayerAutomaticResponseRequest = function (input, context) {
3476
+ return __assign(__assign({}, (input.Action !== undefined &&
3477
+ input.Action !== null && { Action: serializeAws_json1_1ResponseAction(input.Action, context) })), (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }));
3478
+ };
3145
3479
  var serializeAws_json1_1EnableProactiveEngagementRequest = function (input, context) {
3146
3480
  return {};
3147
3481
  };
@@ -3189,6 +3523,11 @@ var serializeAws_json1_1ResourceArnFilterList = function (input, context) {
3189
3523
  return entry;
3190
3524
  });
3191
3525
  };
3526
+ var serializeAws_json1_1ResponseAction = function (input, context) {
3527
+ return __assign(__assign({}, (input.Block !== undefined &&
3528
+ input.Block !== null && { Block: serializeAws_json1_1BlockAction(input.Block, context) })), (input.Count !== undefined &&
3529
+ input.Count !== null && { Count: serializeAws_json1_1CountAction(input.Count, context) }));
3530
+ };
3192
3531
  var serializeAws_json1_1Tag = function (input, context) {
3193
3532
  return __assign(__assign({}, (input.Key !== undefined && input.Key !== null && { Key: input.Key })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
3194
3533
  };
@@ -3224,6 +3563,10 @@ var serializeAws_json1_1UntagResourceRequest = function (input, context) {
3224
3563
  return __assign(__assign({}, (input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN })), (input.TagKeys !== undefined &&
3225
3564
  input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }));
3226
3565
  };
3566
+ var serializeAws_json1_1UpdateApplicationLayerAutomaticResponseRequest = function (input, context) {
3567
+ return __assign(__assign({}, (input.Action !== undefined &&
3568
+ input.Action !== null && { Action: serializeAws_json1_1ResponseAction(input.Action, context) })), (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }));
3569
+ };
3227
3570
  var serializeAws_json1_1UpdateEmergencyContactSettingsRequest = function (input, context) {
3228
3571
  return __assign({}, (input.EmergencyContactList !== undefined &&
3229
3572
  input.EmergencyContactList !== null && {
@@ -3248,6 +3591,14 @@ var deserializeAws_json1_1AccessDeniedForDependencyException = function (output,
3248
3591
  message: __expectString(output.message),
3249
3592
  };
3250
3593
  };
3594
+ var deserializeAws_json1_1ApplicationLayerAutomaticResponseConfiguration = function (output, context) {
3595
+ return {
3596
+ Action: output.Action !== undefined && output.Action !== null
3597
+ ? deserializeAws_json1_1ResponseAction(output.Action, context)
3598
+ : undefined,
3599
+ Status: __expectString(output.Status),
3600
+ };
3601
+ };
3251
3602
  var deserializeAws_json1_1AssociateDRTLogBucketResponse = function (output, context) {
3252
3603
  return {};
3253
3604
  };
@@ -3381,12 +3732,18 @@ var deserializeAws_json1_1AttackVolumeStatistics = function (output, context) {
3381
3732
  Max: __limitedParseDouble(output.Max),
3382
3733
  };
3383
3734
  };
3735
+ var deserializeAws_json1_1BlockAction = function (output, context) {
3736
+ return {};
3737
+ };
3384
3738
  var deserializeAws_json1_1Contributor = function (output, context) {
3385
3739
  return {
3386
3740
  Name: __expectString(output.Name),
3387
3741
  Value: __expectLong(output.Value),
3388
3742
  };
3389
3743
  };
3744
+ var deserializeAws_json1_1CountAction = function (output, context) {
3745
+ return {};
3746
+ };
3390
3747
  var deserializeAws_json1_1CreateProtectionGroupResponse = function (output, context) {
3391
3748
  return {};
3392
3749
  };
@@ -3460,6 +3817,9 @@ var deserializeAws_json1_1DescribeSubscriptionResponse = function (output, conte
3460
3817
  : undefined,
3461
3818
  };
3462
3819
  };
3820
+ var deserializeAws_json1_1DisableApplicationLayerAutomaticResponseResponse = function (output, context) {
3821
+ return {};
3822
+ };
3463
3823
  var deserializeAws_json1_1DisableProactiveEngagementResponse = function (output, context) {
3464
3824
  return {};
3465
3825
  };
@@ -3489,6 +3849,9 @@ var deserializeAws_json1_1EmergencyContactList = function (output, context) {
3489
3849
  return deserializeAws_json1_1EmergencyContact(entry, context);
3490
3850
  });
3491
3851
  };
3852
+ var deserializeAws_json1_1EnableApplicationLayerAutomaticResponseResponse = function (output, context) {
3853
+ return {};
3854
+ };
3492
3855
  var deserializeAws_json1_1EnableProactiveEngagementResponse = function (output, context) {
3493
3856
  return {};
3494
3857
  };
@@ -3640,6 +4003,10 @@ var deserializeAws_json1_1OptimisticLockException = function (output, context) {
3640
4003
  };
3641
4004
  var deserializeAws_json1_1Protection = function (output, context) {
3642
4005
  return {
4006
+ ApplicationLayerAutomaticResponseConfiguration: output.ApplicationLayerAutomaticResponseConfiguration !== undefined &&
4007
+ output.ApplicationLayerAutomaticResponseConfiguration !== null
4008
+ ? deserializeAws_json1_1ApplicationLayerAutomaticResponseConfiguration(output.ApplicationLayerAutomaticResponseConfiguration, context)
4009
+ : undefined,
3643
4010
  HealthCheckIds: output.HealthCheckIds !== undefined && output.HealthCheckIds !== null
3644
4011
  ? deserializeAws_json1_1HealthCheckIds(output.HealthCheckIds, context)
3645
4012
  : undefined,
@@ -3740,6 +4107,16 @@ var deserializeAws_json1_1ResourceNotFoundException = function (output, context)
3740
4107
  resourceType: __expectString(output.resourceType),
3741
4108
  };
3742
4109
  };
4110
+ var deserializeAws_json1_1ResponseAction = function (output, context) {
4111
+ return {
4112
+ Block: output.Block !== undefined && output.Block !== null
4113
+ ? deserializeAws_json1_1BlockAction(output.Block, context)
4114
+ : undefined,
4115
+ Count: output.Count !== undefined && output.Count !== null
4116
+ ? deserializeAws_json1_1CountAction(output.Count, context)
4117
+ : undefined,
4118
+ };
4119
+ };
3743
4120
  var deserializeAws_json1_1SubResourceSummary = function (output, context) {
3744
4121
  return {
3745
4122
  AttackVectors: output.AttackVectors !== undefined && output.AttackVectors !== null
@@ -3872,6 +4249,9 @@ var deserializeAws_json1_1TopContributors = function (output, context) {
3872
4249
  var deserializeAws_json1_1UntagResourceResponse = function (output, context) {
3873
4250
  return {};
3874
4251
  };
4252
+ var deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseResponse = function (output, context) {
4253
+ return {};
4254
+ };
3875
4255
  var deserializeAws_json1_1UpdateEmergencyContactSettingsResponse = function (output, context) {
3876
4256
  return {};
3877
4257
  };