@aws-sdk/client-wafv2 3.927.0 → 3.929.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 (82) hide show
  1. package/dist-cjs/index.js +2289 -2259
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/WAFV2Client.js +2 -0
  4. package/dist-es/commands/AssociateWebACLCommand.js +3 -9
  5. package/dist-es/commands/CheckCapacityCommand.js +3 -9
  6. package/dist-es/commands/CreateAPIKeyCommand.js +3 -9
  7. package/dist-es/commands/CreateIPSetCommand.js +3 -9
  8. package/dist-es/commands/CreateRegexPatternSetCommand.js +3 -9
  9. package/dist-es/commands/CreateRuleGroupCommand.js +3 -9
  10. package/dist-es/commands/CreateWebACLCommand.js +3 -9
  11. package/dist-es/commands/DeleteAPIKeyCommand.js +3 -9
  12. package/dist-es/commands/DeleteFirewallManagerRuleGroupsCommand.js +3 -9
  13. package/dist-es/commands/DeleteIPSetCommand.js +3 -9
  14. package/dist-es/commands/DeleteLoggingConfigurationCommand.js +3 -9
  15. package/dist-es/commands/DeletePermissionPolicyCommand.js +3 -9
  16. package/dist-es/commands/DeleteRegexPatternSetCommand.js +3 -9
  17. package/dist-es/commands/DeleteRuleGroupCommand.js +3 -9
  18. package/dist-es/commands/DeleteWebACLCommand.js +3 -9
  19. package/dist-es/commands/DescribeAllManagedProductsCommand.js +3 -9
  20. package/dist-es/commands/DescribeManagedProductsByVendorCommand.js +3 -9
  21. package/dist-es/commands/DescribeManagedRuleGroupCommand.js +3 -9
  22. package/dist-es/commands/DisassociateWebACLCommand.js +3 -9
  23. package/dist-es/commands/GenerateMobileSdkReleaseUrlCommand.js +3 -9
  24. package/dist-es/commands/GetDecryptedAPIKeyCommand.js +3 -9
  25. package/dist-es/commands/GetIPSetCommand.js +3 -9
  26. package/dist-es/commands/GetLoggingConfigurationCommand.js +3 -9
  27. package/dist-es/commands/GetManagedRuleSetCommand.js +3 -9
  28. package/dist-es/commands/GetMobileSdkReleaseCommand.js +3 -9
  29. package/dist-es/commands/GetPermissionPolicyCommand.js +3 -9
  30. package/dist-es/commands/GetRateBasedStatementManagedKeysCommand.js +3 -9
  31. package/dist-es/commands/GetRegexPatternSetCommand.js +3 -9
  32. package/dist-es/commands/GetRuleGroupCommand.js +3 -9
  33. package/dist-es/commands/GetSampledRequestsCommand.js +3 -9
  34. package/dist-es/commands/GetWebACLCommand.js +3 -9
  35. package/dist-es/commands/GetWebACLForResourceCommand.js +3 -9
  36. package/dist-es/commands/ListAPIKeysCommand.js +3 -9
  37. package/dist-es/commands/ListAvailableManagedRuleGroupVersionsCommand.js +3 -9
  38. package/dist-es/commands/ListAvailableManagedRuleGroupsCommand.js +3 -9
  39. package/dist-es/commands/ListIPSetsCommand.js +3 -9
  40. package/dist-es/commands/ListLoggingConfigurationsCommand.js +3 -9
  41. package/dist-es/commands/ListManagedRuleSetsCommand.js +3 -9
  42. package/dist-es/commands/ListMobileSdkReleasesCommand.js +3 -9
  43. package/dist-es/commands/ListRegexPatternSetsCommand.js +3 -9
  44. package/dist-es/commands/ListResourcesForWebACLCommand.js +3 -9
  45. package/dist-es/commands/ListRuleGroupsCommand.js +3 -9
  46. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  47. package/dist-es/commands/ListWebACLsCommand.js +3 -9
  48. package/dist-es/commands/PutLoggingConfigurationCommand.js +3 -9
  49. package/dist-es/commands/PutManagedRuleSetVersionsCommand.js +3 -9
  50. package/dist-es/commands/PutPermissionPolicyCommand.js +3 -9
  51. package/dist-es/commands/TagResourceCommand.js +3 -9
  52. package/dist-es/commands/UntagResourceCommand.js +3 -9
  53. package/dist-es/commands/UpdateIPSetCommand.js +3 -9
  54. package/dist-es/commands/UpdateManagedRuleSetVersionExpiryDateCommand.js +3 -9
  55. package/dist-es/commands/UpdateRegexPatternSetCommand.js +3 -9
  56. package/dist-es/commands/UpdateRuleGroupCommand.js +3 -9
  57. package/dist-es/commands/UpdateWebACLCommand.js +3 -9
  58. package/dist-es/models/models_0.js +1 -0
  59. package/dist-es/runtimeConfig.shared.js +7 -0
  60. package/dist-es/schemas/schemas_0.js +2143 -0
  61. package/dist-types/WAFV2Client.d.ts +10 -1
  62. package/dist-types/commands/DeleteLoggingConfigurationCommand.d.ts +1 -1
  63. package/dist-types/commands/GetLoggingConfigurationCommand.d.ts +2 -2
  64. package/dist-types/commands/ListLoggingConfigurationsCommand.d.ts +2 -2
  65. package/dist-types/commands/PutLoggingConfigurationCommand.d.ts +2 -2
  66. package/dist-types/models/models_0.d.ts +13 -0
  67. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  68. package/dist-types/runtimeConfig.d.ts +1 -0
  69. package/dist-types/runtimeConfig.native.d.ts +1 -0
  70. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  71. package/dist-types/schemas/schemas_0.d.ts +381 -0
  72. package/dist-types/ts3.4/WAFV2Client.d.ts +4 -0
  73. package/dist-types/ts3.4/models/models_0.d.ts +1 -0
  74. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  75. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  76. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  77. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  78. package/dist-types/ts3.4/schemas/schemas_0.d.ts +387 -0
  79. package/package.json +5 -5
  80. package/dist-es/protocols/Aws_json1_1.js +0 -1828
  81. package/dist-types/protocols/Aws_json1_1.d.ts +0 -488
  82. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -653
@@ -1,1828 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { WAFAssociatedItemException, WAFConfigurationWarningException, WAFDuplicateItemException, WAFExpiredManagedRuleGroupVersionException, WAFInternalErrorException, WAFInvalidOperationException, WAFInvalidParameterException, WAFInvalidPermissionPolicyException, WAFInvalidResourceException, WAFLimitsExceededException, WAFLogDestinationPermissionIssueException, WAFNonexistentItemException, WAFOptimisticLockException, WAFServiceLinkedRoleErrorException, WAFSubscriptionNotFoundException, WAFTagOperationException, WAFTagOperationInternalErrorException, WAFUnavailableEntityException, WAFUnsupportedAggregateKeyTypeException, } from "../models/models_0";
5
- import { WAFV2ServiceException as __BaseException } from "../models/WAFV2ServiceException";
6
- export const se_AssociateWebACLCommand = async (input, context) => {
7
- const headers = sharedHeaders("AssociateWebACL");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CheckCapacityCommand = async (input, context) => {
13
- const headers = sharedHeaders("CheckCapacity");
14
- let body;
15
- body = JSON.stringify(se_CheckCapacityRequest(input, context));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_CreateAPIKeyCommand = async (input, context) => {
19
- const headers = sharedHeaders("CreateAPIKey");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_CreateIPSetCommand = async (input, context) => {
25
- const headers = sharedHeaders("CreateIPSet");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_CreateRegexPatternSetCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateRegexPatternSet");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_CreateRuleGroupCommand = async (input, context) => {
37
- const headers = sharedHeaders("CreateRuleGroup");
38
- let body;
39
- body = JSON.stringify(se_CreateRuleGroupRequest(input, context));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_CreateWebACLCommand = async (input, context) => {
43
- const headers = sharedHeaders("CreateWebACL");
44
- let body;
45
- body = JSON.stringify(se_CreateWebACLRequest(input, context));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DeleteAPIKeyCommand = async (input, context) => {
49
- const headers = sharedHeaders("DeleteAPIKey");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_DeleteFirewallManagerRuleGroupsCommand = async (input, context) => {
55
- const headers = sharedHeaders("DeleteFirewallManagerRuleGroups");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_DeleteIPSetCommand = async (input, context) => {
61
- const headers = sharedHeaders("DeleteIPSet");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_DeleteLoggingConfigurationCommand = async (input, context) => {
67
- const headers = sharedHeaders("DeleteLoggingConfiguration");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_DeletePermissionPolicyCommand = async (input, context) => {
73
- const headers = sharedHeaders("DeletePermissionPolicy");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_DeleteRegexPatternSetCommand = async (input, context) => {
79
- const headers = sharedHeaders("DeleteRegexPatternSet");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_DeleteRuleGroupCommand = async (input, context) => {
85
- const headers = sharedHeaders("DeleteRuleGroup");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_DeleteWebACLCommand = async (input, context) => {
91
- const headers = sharedHeaders("DeleteWebACL");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_DescribeAllManagedProductsCommand = async (input, context) => {
97
- const headers = sharedHeaders("DescribeAllManagedProducts");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_DescribeManagedProductsByVendorCommand = async (input, context) => {
103
- const headers = sharedHeaders("DescribeManagedProductsByVendor");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_DescribeManagedRuleGroupCommand = async (input, context) => {
109
- const headers = sharedHeaders("DescribeManagedRuleGroup");
110
- let body;
111
- body = JSON.stringify(_json(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_DisassociateWebACLCommand = async (input, context) => {
115
- const headers = sharedHeaders("DisassociateWebACL");
116
- let body;
117
- body = JSON.stringify(_json(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_GenerateMobileSdkReleaseUrlCommand = async (input, context) => {
121
- const headers = sharedHeaders("GenerateMobileSdkReleaseUrl");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_GetDecryptedAPIKeyCommand = async (input, context) => {
127
- const headers = sharedHeaders("GetDecryptedAPIKey");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_GetIPSetCommand = async (input, context) => {
133
- const headers = sharedHeaders("GetIPSet");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_GetLoggingConfigurationCommand = async (input, context) => {
139
- const headers = sharedHeaders("GetLoggingConfiguration");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_GetManagedRuleSetCommand = async (input, context) => {
145
- const headers = sharedHeaders("GetManagedRuleSet");
146
- let body;
147
- body = JSON.stringify(_json(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_GetMobileSdkReleaseCommand = async (input, context) => {
151
- const headers = sharedHeaders("GetMobileSdkRelease");
152
- let body;
153
- body = JSON.stringify(_json(input));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const se_GetPermissionPolicyCommand = async (input, context) => {
157
- const headers = sharedHeaders("GetPermissionPolicy");
158
- let body;
159
- body = JSON.stringify(_json(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- export const se_GetRateBasedStatementManagedKeysCommand = async (input, context) => {
163
- const headers = sharedHeaders("GetRateBasedStatementManagedKeys");
164
- let body;
165
- body = JSON.stringify(_json(input));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const se_GetRegexPatternSetCommand = async (input, context) => {
169
- const headers = sharedHeaders("GetRegexPatternSet");
170
- let body;
171
- body = JSON.stringify(_json(input));
172
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
173
- };
174
- export const se_GetRuleGroupCommand = async (input, context) => {
175
- const headers = sharedHeaders("GetRuleGroup");
176
- let body;
177
- body = JSON.stringify(_json(input));
178
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
179
- };
180
- export const se_GetSampledRequestsCommand = async (input, context) => {
181
- const headers = sharedHeaders("GetSampledRequests");
182
- let body;
183
- body = JSON.stringify(se_GetSampledRequestsRequest(input, context));
184
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
- };
186
- export const se_GetWebACLCommand = async (input, context) => {
187
- const headers = sharedHeaders("GetWebACL");
188
- let body;
189
- body = JSON.stringify(_json(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- export const se_GetWebACLForResourceCommand = async (input, context) => {
193
- const headers = sharedHeaders("GetWebACLForResource");
194
- let body;
195
- body = JSON.stringify(_json(input));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
- export const se_ListAPIKeysCommand = async (input, context) => {
199
- const headers = sharedHeaders("ListAPIKeys");
200
- let body;
201
- body = JSON.stringify(_json(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- export const se_ListAvailableManagedRuleGroupsCommand = async (input, context) => {
205
- const headers = sharedHeaders("ListAvailableManagedRuleGroups");
206
- let body;
207
- body = JSON.stringify(_json(input));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
- export const se_ListAvailableManagedRuleGroupVersionsCommand = async (input, context) => {
211
- const headers = sharedHeaders("ListAvailableManagedRuleGroupVersions");
212
- let body;
213
- body = JSON.stringify(_json(input));
214
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
- };
216
- export const se_ListIPSetsCommand = async (input, context) => {
217
- const headers = sharedHeaders("ListIPSets");
218
- let body;
219
- body = JSON.stringify(_json(input));
220
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
- };
222
- export const se_ListLoggingConfigurationsCommand = async (input, context) => {
223
- const headers = sharedHeaders("ListLoggingConfigurations");
224
- let body;
225
- body = JSON.stringify(_json(input));
226
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
- };
228
- export const se_ListManagedRuleSetsCommand = async (input, context) => {
229
- const headers = sharedHeaders("ListManagedRuleSets");
230
- let body;
231
- body = JSON.stringify(_json(input));
232
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
233
- };
234
- export const se_ListMobileSdkReleasesCommand = async (input, context) => {
235
- const headers = sharedHeaders("ListMobileSdkReleases");
236
- let body;
237
- body = JSON.stringify(_json(input));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
- export const se_ListRegexPatternSetsCommand = async (input, context) => {
241
- const headers = sharedHeaders("ListRegexPatternSets");
242
- let body;
243
- body = JSON.stringify(_json(input));
244
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
- };
246
- export const se_ListResourcesForWebACLCommand = async (input, context) => {
247
- const headers = sharedHeaders("ListResourcesForWebACL");
248
- let body;
249
- body = JSON.stringify(_json(input));
250
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
251
- };
252
- export const se_ListRuleGroupsCommand = async (input, context) => {
253
- const headers = sharedHeaders("ListRuleGroups");
254
- let body;
255
- body = JSON.stringify(_json(input));
256
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
- };
258
- export const se_ListTagsForResourceCommand = async (input, context) => {
259
- const headers = sharedHeaders("ListTagsForResource");
260
- let body;
261
- body = JSON.stringify(_json(input));
262
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
263
- };
264
- export const se_ListWebACLsCommand = async (input, context) => {
265
- const headers = sharedHeaders("ListWebACLs");
266
- let body;
267
- body = JSON.stringify(_json(input));
268
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
269
- };
270
- export const se_PutLoggingConfigurationCommand = async (input, context) => {
271
- const headers = sharedHeaders("PutLoggingConfiguration");
272
- let body;
273
- body = JSON.stringify(_json(input));
274
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
- };
276
- export const se_PutManagedRuleSetVersionsCommand = async (input, context) => {
277
- const headers = sharedHeaders("PutManagedRuleSetVersions");
278
- let body;
279
- body = JSON.stringify(_json(input));
280
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
281
- };
282
- export const se_PutPermissionPolicyCommand = async (input, context) => {
283
- const headers = sharedHeaders("PutPermissionPolicy");
284
- let body;
285
- body = JSON.stringify(_json(input));
286
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
- };
288
- export const se_TagResourceCommand = async (input, context) => {
289
- const headers = sharedHeaders("TagResource");
290
- let body;
291
- body = JSON.stringify(_json(input));
292
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
293
- };
294
- export const se_UntagResourceCommand = async (input, context) => {
295
- const headers = sharedHeaders("UntagResource");
296
- let body;
297
- body = JSON.stringify(_json(input));
298
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
299
- };
300
- export const se_UpdateIPSetCommand = async (input, context) => {
301
- const headers = sharedHeaders("UpdateIPSet");
302
- let body;
303
- body = JSON.stringify(_json(input));
304
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
305
- };
306
- export const se_UpdateManagedRuleSetVersionExpiryDateCommand = async (input, context) => {
307
- const headers = sharedHeaders("UpdateManagedRuleSetVersionExpiryDate");
308
- let body;
309
- body = JSON.stringify(se_UpdateManagedRuleSetVersionExpiryDateRequest(input, context));
310
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
311
- };
312
- export const se_UpdateRegexPatternSetCommand = async (input, context) => {
313
- const headers = sharedHeaders("UpdateRegexPatternSet");
314
- let body;
315
- body = JSON.stringify(_json(input));
316
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
317
- };
318
- export const se_UpdateRuleGroupCommand = async (input, context) => {
319
- const headers = sharedHeaders("UpdateRuleGroup");
320
- let body;
321
- body = JSON.stringify(se_UpdateRuleGroupRequest(input, context));
322
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
323
- };
324
- export const se_UpdateWebACLCommand = async (input, context) => {
325
- const headers = sharedHeaders("UpdateWebACL");
326
- let body;
327
- body = JSON.stringify(se_UpdateWebACLRequest(input, context));
328
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
329
- };
330
- export const de_AssociateWebACLCommand = async (output, context) => {
331
- if (output.statusCode >= 300) {
332
- return de_CommandError(output, context);
333
- }
334
- const data = await parseBody(output.body, context);
335
- let contents = {};
336
- contents = _json(data);
337
- const response = {
338
- $metadata: deserializeMetadata(output),
339
- ...contents,
340
- };
341
- return response;
342
- };
343
- export const de_CheckCapacityCommand = async (output, context) => {
344
- if (output.statusCode >= 300) {
345
- return de_CommandError(output, context);
346
- }
347
- const data = await parseBody(output.body, context);
348
- let contents = {};
349
- contents = _json(data);
350
- const response = {
351
- $metadata: deserializeMetadata(output),
352
- ...contents,
353
- };
354
- return response;
355
- };
356
- export const de_CreateAPIKeyCommand = async (output, context) => {
357
- if (output.statusCode >= 300) {
358
- return de_CommandError(output, context);
359
- }
360
- const data = await parseBody(output.body, context);
361
- let contents = {};
362
- contents = _json(data);
363
- const response = {
364
- $metadata: deserializeMetadata(output),
365
- ...contents,
366
- };
367
- return response;
368
- };
369
- export const de_CreateIPSetCommand = async (output, context) => {
370
- if (output.statusCode >= 300) {
371
- return de_CommandError(output, context);
372
- }
373
- const data = await parseBody(output.body, context);
374
- let contents = {};
375
- contents = _json(data);
376
- const response = {
377
- $metadata: deserializeMetadata(output),
378
- ...contents,
379
- };
380
- return response;
381
- };
382
- export const de_CreateRegexPatternSetCommand = async (output, context) => {
383
- if (output.statusCode >= 300) {
384
- return de_CommandError(output, context);
385
- }
386
- const data = await parseBody(output.body, context);
387
- let contents = {};
388
- contents = _json(data);
389
- const response = {
390
- $metadata: deserializeMetadata(output),
391
- ...contents,
392
- };
393
- return response;
394
- };
395
- export const de_CreateRuleGroupCommand = async (output, context) => {
396
- if (output.statusCode >= 300) {
397
- return de_CommandError(output, context);
398
- }
399
- const data = await parseBody(output.body, context);
400
- let contents = {};
401
- contents = _json(data);
402
- const response = {
403
- $metadata: deserializeMetadata(output),
404
- ...contents,
405
- };
406
- return response;
407
- };
408
- export const de_CreateWebACLCommand = async (output, context) => {
409
- if (output.statusCode >= 300) {
410
- return de_CommandError(output, context);
411
- }
412
- const data = await parseBody(output.body, context);
413
- let contents = {};
414
- contents = _json(data);
415
- const response = {
416
- $metadata: deserializeMetadata(output),
417
- ...contents,
418
- };
419
- return response;
420
- };
421
- export const de_DeleteAPIKeyCommand = async (output, context) => {
422
- if (output.statusCode >= 300) {
423
- return de_CommandError(output, context);
424
- }
425
- const data = await parseBody(output.body, context);
426
- let contents = {};
427
- contents = _json(data);
428
- const response = {
429
- $metadata: deserializeMetadata(output),
430
- ...contents,
431
- };
432
- return response;
433
- };
434
- export const de_DeleteFirewallManagerRuleGroupsCommand = async (output, context) => {
435
- if (output.statusCode >= 300) {
436
- return de_CommandError(output, context);
437
- }
438
- const data = await parseBody(output.body, context);
439
- let contents = {};
440
- contents = _json(data);
441
- const response = {
442
- $metadata: deserializeMetadata(output),
443
- ...contents,
444
- };
445
- return response;
446
- };
447
- export const de_DeleteIPSetCommand = async (output, context) => {
448
- if (output.statusCode >= 300) {
449
- return de_CommandError(output, context);
450
- }
451
- const data = await parseBody(output.body, context);
452
- let contents = {};
453
- contents = _json(data);
454
- const response = {
455
- $metadata: deserializeMetadata(output),
456
- ...contents,
457
- };
458
- return response;
459
- };
460
- export const de_DeleteLoggingConfigurationCommand = async (output, context) => {
461
- if (output.statusCode >= 300) {
462
- return de_CommandError(output, context);
463
- }
464
- const data = await parseBody(output.body, context);
465
- let contents = {};
466
- contents = _json(data);
467
- const response = {
468
- $metadata: deserializeMetadata(output),
469
- ...contents,
470
- };
471
- return response;
472
- };
473
- export const de_DeletePermissionPolicyCommand = async (output, context) => {
474
- if (output.statusCode >= 300) {
475
- return de_CommandError(output, context);
476
- }
477
- const data = await parseBody(output.body, context);
478
- let contents = {};
479
- contents = _json(data);
480
- const response = {
481
- $metadata: deserializeMetadata(output),
482
- ...contents,
483
- };
484
- return response;
485
- };
486
- export const de_DeleteRegexPatternSetCommand = async (output, context) => {
487
- if (output.statusCode >= 300) {
488
- return de_CommandError(output, context);
489
- }
490
- const data = await parseBody(output.body, context);
491
- let contents = {};
492
- contents = _json(data);
493
- const response = {
494
- $metadata: deserializeMetadata(output),
495
- ...contents,
496
- };
497
- return response;
498
- };
499
- export const de_DeleteRuleGroupCommand = async (output, context) => {
500
- if (output.statusCode >= 300) {
501
- return de_CommandError(output, context);
502
- }
503
- const data = await parseBody(output.body, context);
504
- let contents = {};
505
- contents = _json(data);
506
- const response = {
507
- $metadata: deserializeMetadata(output),
508
- ...contents,
509
- };
510
- return response;
511
- };
512
- export const de_DeleteWebACLCommand = async (output, context) => {
513
- if (output.statusCode >= 300) {
514
- return de_CommandError(output, context);
515
- }
516
- const data = await parseBody(output.body, context);
517
- let contents = {};
518
- contents = _json(data);
519
- const response = {
520
- $metadata: deserializeMetadata(output),
521
- ...contents,
522
- };
523
- return response;
524
- };
525
- export const de_DescribeAllManagedProductsCommand = async (output, context) => {
526
- if (output.statusCode >= 300) {
527
- return de_CommandError(output, context);
528
- }
529
- const data = await parseBody(output.body, context);
530
- let contents = {};
531
- contents = _json(data);
532
- const response = {
533
- $metadata: deserializeMetadata(output),
534
- ...contents,
535
- };
536
- return response;
537
- };
538
- export const de_DescribeManagedProductsByVendorCommand = async (output, context) => {
539
- if (output.statusCode >= 300) {
540
- return de_CommandError(output, context);
541
- }
542
- const data = await parseBody(output.body, context);
543
- let contents = {};
544
- contents = _json(data);
545
- const response = {
546
- $metadata: deserializeMetadata(output),
547
- ...contents,
548
- };
549
- return response;
550
- };
551
- export const de_DescribeManagedRuleGroupCommand = async (output, context) => {
552
- if (output.statusCode >= 300) {
553
- return de_CommandError(output, context);
554
- }
555
- const data = await parseBody(output.body, context);
556
- let contents = {};
557
- contents = _json(data);
558
- const response = {
559
- $metadata: deserializeMetadata(output),
560
- ...contents,
561
- };
562
- return response;
563
- };
564
- export const de_DisassociateWebACLCommand = async (output, context) => {
565
- if (output.statusCode >= 300) {
566
- return de_CommandError(output, context);
567
- }
568
- const data = await parseBody(output.body, context);
569
- let contents = {};
570
- contents = _json(data);
571
- const response = {
572
- $metadata: deserializeMetadata(output),
573
- ...contents,
574
- };
575
- return response;
576
- };
577
- export const de_GenerateMobileSdkReleaseUrlCommand = async (output, context) => {
578
- if (output.statusCode >= 300) {
579
- return de_CommandError(output, context);
580
- }
581
- const data = await parseBody(output.body, context);
582
- let contents = {};
583
- contents = _json(data);
584
- const response = {
585
- $metadata: deserializeMetadata(output),
586
- ...contents,
587
- };
588
- return response;
589
- };
590
- export const de_GetDecryptedAPIKeyCommand = async (output, context) => {
591
- if (output.statusCode >= 300) {
592
- return de_CommandError(output, context);
593
- }
594
- const data = await parseBody(output.body, context);
595
- let contents = {};
596
- contents = de_GetDecryptedAPIKeyResponse(data, context);
597
- const response = {
598
- $metadata: deserializeMetadata(output),
599
- ...contents,
600
- };
601
- return response;
602
- };
603
- export const de_GetIPSetCommand = async (output, context) => {
604
- if (output.statusCode >= 300) {
605
- return de_CommandError(output, context);
606
- }
607
- const data = await parseBody(output.body, context);
608
- let contents = {};
609
- contents = _json(data);
610
- const response = {
611
- $metadata: deserializeMetadata(output),
612
- ...contents,
613
- };
614
- return response;
615
- };
616
- export const de_GetLoggingConfigurationCommand = async (output, context) => {
617
- if (output.statusCode >= 300) {
618
- return de_CommandError(output, context);
619
- }
620
- const data = await parseBody(output.body, context);
621
- let contents = {};
622
- contents = _json(data);
623
- const response = {
624
- $metadata: deserializeMetadata(output),
625
- ...contents,
626
- };
627
- return response;
628
- };
629
- export const de_GetManagedRuleSetCommand = async (output, context) => {
630
- if (output.statusCode >= 300) {
631
- return de_CommandError(output, context);
632
- }
633
- const data = await parseBody(output.body, context);
634
- let contents = {};
635
- contents = de_GetManagedRuleSetResponse(data, context);
636
- const response = {
637
- $metadata: deserializeMetadata(output),
638
- ...contents,
639
- };
640
- return response;
641
- };
642
- export const de_GetMobileSdkReleaseCommand = async (output, context) => {
643
- if (output.statusCode >= 300) {
644
- return de_CommandError(output, context);
645
- }
646
- const data = await parseBody(output.body, context);
647
- let contents = {};
648
- contents = de_GetMobileSdkReleaseResponse(data, context);
649
- const response = {
650
- $metadata: deserializeMetadata(output),
651
- ...contents,
652
- };
653
- return response;
654
- };
655
- export const de_GetPermissionPolicyCommand = async (output, context) => {
656
- if (output.statusCode >= 300) {
657
- return de_CommandError(output, context);
658
- }
659
- const data = await parseBody(output.body, context);
660
- let contents = {};
661
- contents = _json(data);
662
- const response = {
663
- $metadata: deserializeMetadata(output),
664
- ...contents,
665
- };
666
- return response;
667
- };
668
- export const de_GetRateBasedStatementManagedKeysCommand = async (output, context) => {
669
- if (output.statusCode >= 300) {
670
- return de_CommandError(output, context);
671
- }
672
- const data = await parseBody(output.body, context);
673
- let contents = {};
674
- contents = _json(data);
675
- const response = {
676
- $metadata: deserializeMetadata(output),
677
- ...contents,
678
- };
679
- return response;
680
- };
681
- export const de_GetRegexPatternSetCommand = async (output, context) => {
682
- if (output.statusCode >= 300) {
683
- return de_CommandError(output, context);
684
- }
685
- const data = await parseBody(output.body, context);
686
- let contents = {};
687
- contents = _json(data);
688
- const response = {
689
- $metadata: deserializeMetadata(output),
690
- ...contents,
691
- };
692
- return response;
693
- };
694
- export const de_GetRuleGroupCommand = async (output, context) => {
695
- if (output.statusCode >= 300) {
696
- return de_CommandError(output, context);
697
- }
698
- const data = await parseBody(output.body, context);
699
- let contents = {};
700
- contents = de_GetRuleGroupResponse(data, context);
701
- const response = {
702
- $metadata: deserializeMetadata(output),
703
- ...contents,
704
- };
705
- return response;
706
- };
707
- export const de_GetSampledRequestsCommand = async (output, context) => {
708
- if (output.statusCode >= 300) {
709
- return de_CommandError(output, context);
710
- }
711
- const data = await parseBody(output.body, context);
712
- let contents = {};
713
- contents = de_GetSampledRequestsResponse(data, context);
714
- const response = {
715
- $metadata: deserializeMetadata(output),
716
- ...contents,
717
- };
718
- return response;
719
- };
720
- export const de_GetWebACLCommand = async (output, context) => {
721
- if (output.statusCode >= 300) {
722
- return de_CommandError(output, context);
723
- }
724
- const data = await parseBody(output.body, context);
725
- let contents = {};
726
- contents = de_GetWebACLResponse(data, context);
727
- const response = {
728
- $metadata: deserializeMetadata(output),
729
- ...contents,
730
- };
731
- return response;
732
- };
733
- export const de_GetWebACLForResourceCommand = async (output, context) => {
734
- if (output.statusCode >= 300) {
735
- return de_CommandError(output, context);
736
- }
737
- const data = await parseBody(output.body, context);
738
- let contents = {};
739
- contents = de_GetWebACLForResourceResponse(data, context);
740
- const response = {
741
- $metadata: deserializeMetadata(output),
742
- ...contents,
743
- };
744
- return response;
745
- };
746
- export const de_ListAPIKeysCommand = async (output, context) => {
747
- if (output.statusCode >= 300) {
748
- return de_CommandError(output, context);
749
- }
750
- const data = await parseBody(output.body, context);
751
- let contents = {};
752
- contents = de_ListAPIKeysResponse(data, context);
753
- const response = {
754
- $metadata: deserializeMetadata(output),
755
- ...contents,
756
- };
757
- return response;
758
- };
759
- export const de_ListAvailableManagedRuleGroupsCommand = async (output, context) => {
760
- if (output.statusCode >= 300) {
761
- return de_CommandError(output, context);
762
- }
763
- const data = await parseBody(output.body, context);
764
- let contents = {};
765
- contents = _json(data);
766
- const response = {
767
- $metadata: deserializeMetadata(output),
768
- ...contents,
769
- };
770
- return response;
771
- };
772
- export const de_ListAvailableManagedRuleGroupVersionsCommand = async (output, context) => {
773
- if (output.statusCode >= 300) {
774
- return de_CommandError(output, context);
775
- }
776
- const data = await parseBody(output.body, context);
777
- let contents = {};
778
- contents = de_ListAvailableManagedRuleGroupVersionsResponse(data, context);
779
- const response = {
780
- $metadata: deserializeMetadata(output),
781
- ...contents,
782
- };
783
- return response;
784
- };
785
- export const de_ListIPSetsCommand = async (output, context) => {
786
- if (output.statusCode >= 300) {
787
- return de_CommandError(output, context);
788
- }
789
- const data = await parseBody(output.body, context);
790
- let contents = {};
791
- contents = _json(data);
792
- const response = {
793
- $metadata: deserializeMetadata(output),
794
- ...contents,
795
- };
796
- return response;
797
- };
798
- export const de_ListLoggingConfigurationsCommand = async (output, context) => {
799
- if (output.statusCode >= 300) {
800
- return de_CommandError(output, context);
801
- }
802
- const data = await parseBody(output.body, context);
803
- let contents = {};
804
- contents = _json(data);
805
- const response = {
806
- $metadata: deserializeMetadata(output),
807
- ...contents,
808
- };
809
- return response;
810
- };
811
- export const de_ListManagedRuleSetsCommand = async (output, context) => {
812
- if (output.statusCode >= 300) {
813
- return de_CommandError(output, context);
814
- }
815
- const data = await parseBody(output.body, context);
816
- let contents = {};
817
- contents = _json(data);
818
- const response = {
819
- $metadata: deserializeMetadata(output),
820
- ...contents,
821
- };
822
- return response;
823
- };
824
- export const de_ListMobileSdkReleasesCommand = async (output, context) => {
825
- if (output.statusCode >= 300) {
826
- return de_CommandError(output, context);
827
- }
828
- const data = await parseBody(output.body, context);
829
- let contents = {};
830
- contents = de_ListMobileSdkReleasesResponse(data, context);
831
- const response = {
832
- $metadata: deserializeMetadata(output),
833
- ...contents,
834
- };
835
- return response;
836
- };
837
- export const de_ListRegexPatternSetsCommand = async (output, context) => {
838
- if (output.statusCode >= 300) {
839
- return de_CommandError(output, context);
840
- }
841
- const data = await parseBody(output.body, context);
842
- let contents = {};
843
- contents = _json(data);
844
- const response = {
845
- $metadata: deserializeMetadata(output),
846
- ...contents,
847
- };
848
- return response;
849
- };
850
- export const de_ListResourcesForWebACLCommand = async (output, context) => {
851
- if (output.statusCode >= 300) {
852
- return de_CommandError(output, context);
853
- }
854
- const data = await parseBody(output.body, context);
855
- let contents = {};
856
- contents = _json(data);
857
- const response = {
858
- $metadata: deserializeMetadata(output),
859
- ...contents,
860
- };
861
- return response;
862
- };
863
- export const de_ListRuleGroupsCommand = async (output, context) => {
864
- if (output.statusCode >= 300) {
865
- return de_CommandError(output, context);
866
- }
867
- const data = await parseBody(output.body, context);
868
- let contents = {};
869
- contents = _json(data);
870
- const response = {
871
- $metadata: deserializeMetadata(output),
872
- ...contents,
873
- };
874
- return response;
875
- };
876
- export const de_ListTagsForResourceCommand = async (output, context) => {
877
- if (output.statusCode >= 300) {
878
- return de_CommandError(output, context);
879
- }
880
- const data = await parseBody(output.body, context);
881
- let contents = {};
882
- contents = _json(data);
883
- const response = {
884
- $metadata: deserializeMetadata(output),
885
- ...contents,
886
- };
887
- return response;
888
- };
889
- export const de_ListWebACLsCommand = async (output, context) => {
890
- if (output.statusCode >= 300) {
891
- return de_CommandError(output, context);
892
- }
893
- const data = await parseBody(output.body, context);
894
- let contents = {};
895
- contents = _json(data);
896
- const response = {
897
- $metadata: deserializeMetadata(output),
898
- ...contents,
899
- };
900
- return response;
901
- };
902
- export const de_PutLoggingConfigurationCommand = async (output, context) => {
903
- if (output.statusCode >= 300) {
904
- return de_CommandError(output, context);
905
- }
906
- const data = await parseBody(output.body, context);
907
- let contents = {};
908
- contents = _json(data);
909
- const response = {
910
- $metadata: deserializeMetadata(output),
911
- ...contents,
912
- };
913
- return response;
914
- };
915
- export const de_PutManagedRuleSetVersionsCommand = async (output, context) => {
916
- if (output.statusCode >= 300) {
917
- return de_CommandError(output, context);
918
- }
919
- const data = await parseBody(output.body, context);
920
- let contents = {};
921
- contents = _json(data);
922
- const response = {
923
- $metadata: deserializeMetadata(output),
924
- ...contents,
925
- };
926
- return response;
927
- };
928
- export const de_PutPermissionPolicyCommand = async (output, context) => {
929
- if (output.statusCode >= 300) {
930
- return de_CommandError(output, context);
931
- }
932
- const data = await parseBody(output.body, context);
933
- let contents = {};
934
- contents = _json(data);
935
- const response = {
936
- $metadata: deserializeMetadata(output),
937
- ...contents,
938
- };
939
- return response;
940
- };
941
- export const de_TagResourceCommand = async (output, context) => {
942
- if (output.statusCode >= 300) {
943
- return de_CommandError(output, context);
944
- }
945
- const data = await parseBody(output.body, context);
946
- let contents = {};
947
- contents = _json(data);
948
- const response = {
949
- $metadata: deserializeMetadata(output),
950
- ...contents,
951
- };
952
- return response;
953
- };
954
- export const de_UntagResourceCommand = async (output, context) => {
955
- if (output.statusCode >= 300) {
956
- return de_CommandError(output, context);
957
- }
958
- const data = await parseBody(output.body, context);
959
- let contents = {};
960
- contents = _json(data);
961
- const response = {
962
- $metadata: deserializeMetadata(output),
963
- ...contents,
964
- };
965
- return response;
966
- };
967
- export const de_UpdateIPSetCommand = async (output, context) => {
968
- if (output.statusCode >= 300) {
969
- return de_CommandError(output, context);
970
- }
971
- const data = await parseBody(output.body, context);
972
- let contents = {};
973
- contents = _json(data);
974
- const response = {
975
- $metadata: deserializeMetadata(output),
976
- ...contents,
977
- };
978
- return response;
979
- };
980
- export const de_UpdateManagedRuleSetVersionExpiryDateCommand = async (output, context) => {
981
- if (output.statusCode >= 300) {
982
- return de_CommandError(output, context);
983
- }
984
- const data = await parseBody(output.body, context);
985
- let contents = {};
986
- contents = de_UpdateManagedRuleSetVersionExpiryDateResponse(data, context);
987
- const response = {
988
- $metadata: deserializeMetadata(output),
989
- ...contents,
990
- };
991
- return response;
992
- };
993
- export const de_UpdateRegexPatternSetCommand = async (output, context) => {
994
- if (output.statusCode >= 300) {
995
- return de_CommandError(output, context);
996
- }
997
- const data = await parseBody(output.body, context);
998
- let contents = {};
999
- contents = _json(data);
1000
- const response = {
1001
- $metadata: deserializeMetadata(output),
1002
- ...contents,
1003
- };
1004
- return response;
1005
- };
1006
- export const de_UpdateRuleGroupCommand = async (output, context) => {
1007
- if (output.statusCode >= 300) {
1008
- return de_CommandError(output, context);
1009
- }
1010
- const data = await parseBody(output.body, context);
1011
- let contents = {};
1012
- contents = _json(data);
1013
- const response = {
1014
- $metadata: deserializeMetadata(output),
1015
- ...contents,
1016
- };
1017
- return response;
1018
- };
1019
- export const de_UpdateWebACLCommand = async (output, context) => {
1020
- if (output.statusCode >= 300) {
1021
- return de_CommandError(output, context);
1022
- }
1023
- const data = await parseBody(output.body, context);
1024
- let contents = {};
1025
- contents = _json(data);
1026
- const response = {
1027
- $metadata: deserializeMetadata(output),
1028
- ...contents,
1029
- };
1030
- return response;
1031
- };
1032
- const de_CommandError = async (output, context) => {
1033
- const parsedOutput = {
1034
- ...output,
1035
- body: await parseErrorBody(output.body, context),
1036
- };
1037
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1038
- switch (errorCode) {
1039
- case "WAFInternalErrorException":
1040
- case "com.amazonaws.wafv2#WAFInternalErrorException":
1041
- throw await de_WAFInternalErrorExceptionRes(parsedOutput, context);
1042
- case "WAFInvalidOperationException":
1043
- case "com.amazonaws.wafv2#WAFInvalidOperationException":
1044
- throw await de_WAFInvalidOperationExceptionRes(parsedOutput, context);
1045
- case "WAFInvalidParameterException":
1046
- case "com.amazonaws.wafv2#WAFInvalidParameterException":
1047
- throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context);
1048
- case "WAFLimitsExceededException":
1049
- case "com.amazonaws.wafv2#WAFLimitsExceededException":
1050
- throw await de_WAFLimitsExceededExceptionRes(parsedOutput, context);
1051
- case "WAFNonexistentItemException":
1052
- case "com.amazonaws.wafv2#WAFNonexistentItemException":
1053
- throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context);
1054
- case "WAFUnavailableEntityException":
1055
- case "com.amazonaws.wafv2#WAFUnavailableEntityException":
1056
- throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context);
1057
- case "WAFExpiredManagedRuleGroupVersionException":
1058
- case "com.amazonaws.wafv2#WAFExpiredManagedRuleGroupVersionException":
1059
- throw await de_WAFExpiredManagedRuleGroupVersionExceptionRes(parsedOutput, context);
1060
- case "WAFInvalidResourceException":
1061
- case "com.amazonaws.wafv2#WAFInvalidResourceException":
1062
- throw await de_WAFInvalidResourceExceptionRes(parsedOutput, context);
1063
- case "WAFSubscriptionNotFoundException":
1064
- case "com.amazonaws.wafv2#WAFSubscriptionNotFoundException":
1065
- throw await de_WAFSubscriptionNotFoundExceptionRes(parsedOutput, context);
1066
- case "WAFDuplicateItemException":
1067
- case "com.amazonaws.wafv2#WAFDuplicateItemException":
1068
- throw await de_WAFDuplicateItemExceptionRes(parsedOutput, context);
1069
- case "WAFOptimisticLockException":
1070
- case "com.amazonaws.wafv2#WAFOptimisticLockException":
1071
- throw await de_WAFOptimisticLockExceptionRes(parsedOutput, context);
1072
- case "WAFTagOperationException":
1073
- case "com.amazonaws.wafv2#WAFTagOperationException":
1074
- throw await de_WAFTagOperationExceptionRes(parsedOutput, context);
1075
- case "WAFTagOperationInternalErrorException":
1076
- case "com.amazonaws.wafv2#WAFTagOperationInternalErrorException":
1077
- throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context);
1078
- case "WAFConfigurationWarningException":
1079
- case "com.amazonaws.wafv2#WAFConfigurationWarningException":
1080
- throw await de_WAFConfigurationWarningExceptionRes(parsedOutput, context);
1081
- case "WAFAssociatedItemException":
1082
- case "com.amazonaws.wafv2#WAFAssociatedItemException":
1083
- throw await de_WAFAssociatedItemExceptionRes(parsedOutput, context);
1084
- case "WAFUnsupportedAggregateKeyTypeException":
1085
- case "com.amazonaws.wafv2#WAFUnsupportedAggregateKeyTypeException":
1086
- throw await de_WAFUnsupportedAggregateKeyTypeExceptionRes(parsedOutput, context);
1087
- case "WAFLogDestinationPermissionIssueException":
1088
- case "com.amazonaws.wafv2#WAFLogDestinationPermissionIssueException":
1089
- throw await de_WAFLogDestinationPermissionIssueExceptionRes(parsedOutput, context);
1090
- case "WAFServiceLinkedRoleErrorException":
1091
- case "com.amazonaws.wafv2#WAFServiceLinkedRoleErrorException":
1092
- throw await de_WAFServiceLinkedRoleErrorExceptionRes(parsedOutput, context);
1093
- case "WAFInvalidPermissionPolicyException":
1094
- case "com.amazonaws.wafv2#WAFInvalidPermissionPolicyException":
1095
- throw await de_WAFInvalidPermissionPolicyExceptionRes(parsedOutput, context);
1096
- default:
1097
- const parsedBody = parsedOutput.body;
1098
- return throwDefaultError({
1099
- output,
1100
- parsedBody,
1101
- errorCode,
1102
- });
1103
- }
1104
- };
1105
- const de_WAFAssociatedItemExceptionRes = async (parsedOutput, context) => {
1106
- const body = parsedOutput.body;
1107
- const deserialized = _json(body);
1108
- const exception = new WAFAssociatedItemException({
1109
- $metadata: deserializeMetadata(parsedOutput),
1110
- ...deserialized,
1111
- });
1112
- return __decorateServiceException(exception, body);
1113
- };
1114
- const de_WAFConfigurationWarningExceptionRes = async (parsedOutput, context) => {
1115
- const body = parsedOutput.body;
1116
- const deserialized = _json(body);
1117
- const exception = new WAFConfigurationWarningException({
1118
- $metadata: deserializeMetadata(parsedOutput),
1119
- ...deserialized,
1120
- });
1121
- return __decorateServiceException(exception, body);
1122
- };
1123
- const de_WAFDuplicateItemExceptionRes = async (parsedOutput, context) => {
1124
- const body = parsedOutput.body;
1125
- const deserialized = _json(body);
1126
- const exception = new WAFDuplicateItemException({
1127
- $metadata: deserializeMetadata(parsedOutput),
1128
- ...deserialized,
1129
- });
1130
- return __decorateServiceException(exception, body);
1131
- };
1132
- const de_WAFExpiredManagedRuleGroupVersionExceptionRes = async (parsedOutput, context) => {
1133
- const body = parsedOutput.body;
1134
- const deserialized = _json(body);
1135
- const exception = new WAFExpiredManagedRuleGroupVersionException({
1136
- $metadata: deserializeMetadata(parsedOutput),
1137
- ...deserialized,
1138
- });
1139
- return __decorateServiceException(exception, body);
1140
- };
1141
- const de_WAFInternalErrorExceptionRes = async (parsedOutput, context) => {
1142
- const body = parsedOutput.body;
1143
- const deserialized = _json(body);
1144
- const exception = new WAFInternalErrorException({
1145
- $metadata: deserializeMetadata(parsedOutput),
1146
- ...deserialized,
1147
- });
1148
- return __decorateServiceException(exception, body);
1149
- };
1150
- const de_WAFInvalidOperationExceptionRes = async (parsedOutput, context) => {
1151
- const body = parsedOutput.body;
1152
- const deserialized = _json(body);
1153
- const exception = new WAFInvalidOperationException({
1154
- $metadata: deserializeMetadata(parsedOutput),
1155
- ...deserialized,
1156
- });
1157
- return __decorateServiceException(exception, body);
1158
- };
1159
- const de_WAFInvalidParameterExceptionRes = async (parsedOutput, context) => {
1160
- const body = parsedOutput.body;
1161
- const deserialized = _json(body);
1162
- const exception = new WAFInvalidParameterException({
1163
- $metadata: deserializeMetadata(parsedOutput),
1164
- ...deserialized,
1165
- });
1166
- return __decorateServiceException(exception, body);
1167
- };
1168
- const de_WAFInvalidPermissionPolicyExceptionRes = async (parsedOutput, context) => {
1169
- const body = parsedOutput.body;
1170
- const deserialized = _json(body);
1171
- const exception = new WAFInvalidPermissionPolicyException({
1172
- $metadata: deserializeMetadata(parsedOutput),
1173
- ...deserialized,
1174
- });
1175
- return __decorateServiceException(exception, body);
1176
- };
1177
- const de_WAFInvalidResourceExceptionRes = async (parsedOutput, context) => {
1178
- const body = parsedOutput.body;
1179
- const deserialized = _json(body);
1180
- const exception = new WAFInvalidResourceException({
1181
- $metadata: deserializeMetadata(parsedOutput),
1182
- ...deserialized,
1183
- });
1184
- return __decorateServiceException(exception, body);
1185
- };
1186
- const de_WAFLimitsExceededExceptionRes = async (parsedOutput, context) => {
1187
- const body = parsedOutput.body;
1188
- const deserialized = _json(body);
1189
- const exception = new WAFLimitsExceededException({
1190
- $metadata: deserializeMetadata(parsedOutput),
1191
- ...deserialized,
1192
- });
1193
- return __decorateServiceException(exception, body);
1194
- };
1195
- const de_WAFLogDestinationPermissionIssueExceptionRes = async (parsedOutput, context) => {
1196
- const body = parsedOutput.body;
1197
- const deserialized = _json(body);
1198
- const exception = new WAFLogDestinationPermissionIssueException({
1199
- $metadata: deserializeMetadata(parsedOutput),
1200
- ...deserialized,
1201
- });
1202
- return __decorateServiceException(exception, body);
1203
- };
1204
- const de_WAFNonexistentItemExceptionRes = async (parsedOutput, context) => {
1205
- const body = parsedOutput.body;
1206
- const deserialized = _json(body);
1207
- const exception = new WAFNonexistentItemException({
1208
- $metadata: deserializeMetadata(parsedOutput),
1209
- ...deserialized,
1210
- });
1211
- return __decorateServiceException(exception, body);
1212
- };
1213
- const de_WAFOptimisticLockExceptionRes = async (parsedOutput, context) => {
1214
- const body = parsedOutput.body;
1215
- const deserialized = _json(body);
1216
- const exception = new WAFOptimisticLockException({
1217
- $metadata: deserializeMetadata(parsedOutput),
1218
- ...deserialized,
1219
- });
1220
- return __decorateServiceException(exception, body);
1221
- };
1222
- const de_WAFServiceLinkedRoleErrorExceptionRes = async (parsedOutput, context) => {
1223
- const body = parsedOutput.body;
1224
- const deserialized = _json(body);
1225
- const exception = new WAFServiceLinkedRoleErrorException({
1226
- $metadata: deserializeMetadata(parsedOutput),
1227
- ...deserialized,
1228
- });
1229
- return __decorateServiceException(exception, body);
1230
- };
1231
- const de_WAFSubscriptionNotFoundExceptionRes = async (parsedOutput, context) => {
1232
- const body = parsedOutput.body;
1233
- const deserialized = _json(body);
1234
- const exception = new WAFSubscriptionNotFoundException({
1235
- $metadata: deserializeMetadata(parsedOutput),
1236
- ...deserialized,
1237
- });
1238
- return __decorateServiceException(exception, body);
1239
- };
1240
- const de_WAFTagOperationExceptionRes = async (parsedOutput, context) => {
1241
- const body = parsedOutput.body;
1242
- const deserialized = _json(body);
1243
- const exception = new WAFTagOperationException({
1244
- $metadata: deserializeMetadata(parsedOutput),
1245
- ...deserialized,
1246
- });
1247
- return __decorateServiceException(exception, body);
1248
- };
1249
- const de_WAFTagOperationInternalErrorExceptionRes = async (parsedOutput, context) => {
1250
- const body = parsedOutput.body;
1251
- const deserialized = _json(body);
1252
- const exception = new WAFTagOperationInternalErrorException({
1253
- $metadata: deserializeMetadata(parsedOutput),
1254
- ...deserialized,
1255
- });
1256
- return __decorateServiceException(exception, body);
1257
- };
1258
- const de_WAFUnavailableEntityExceptionRes = async (parsedOutput, context) => {
1259
- const body = parsedOutput.body;
1260
- const deserialized = _json(body);
1261
- const exception = new WAFUnavailableEntityException({
1262
- $metadata: deserializeMetadata(parsedOutput),
1263
- ...deserialized,
1264
- });
1265
- return __decorateServiceException(exception, body);
1266
- };
1267
- const de_WAFUnsupportedAggregateKeyTypeExceptionRes = async (parsedOutput, context) => {
1268
- const body = parsedOutput.body;
1269
- const deserialized = _json(body);
1270
- const exception = new WAFUnsupportedAggregateKeyTypeException({
1271
- $metadata: deserializeMetadata(parsedOutput),
1272
- ...deserialized,
1273
- });
1274
- return __decorateServiceException(exception, body);
1275
- };
1276
- const se_AndStatement = (input, context) => {
1277
- return take(input, {
1278
- Statements: (_) => se_Statements(_, context),
1279
- });
1280
- };
1281
- const se_ByteMatchStatement = (input, context) => {
1282
- return take(input, {
1283
- FieldToMatch: _json,
1284
- PositionalConstraint: [],
1285
- SearchString: context.base64Encoder,
1286
- TextTransformations: _json,
1287
- });
1288
- };
1289
- const se_CheckCapacityRequest = (input, context) => {
1290
- return take(input, {
1291
- Rules: (_) => se_Rules(_, context),
1292
- Scope: [],
1293
- });
1294
- };
1295
- const se_CreateRuleGroupRequest = (input, context) => {
1296
- return take(input, {
1297
- Capacity: [],
1298
- CustomResponseBodies: _json,
1299
- Description: [],
1300
- Name: [],
1301
- Rules: (_) => se_Rules(_, context),
1302
- Scope: [],
1303
- Tags: _json,
1304
- VisibilityConfig: _json,
1305
- });
1306
- };
1307
- const se_CreateWebACLRequest = (input, context) => {
1308
- return take(input, {
1309
- ApplicationConfig: _json,
1310
- AssociationConfig: _json,
1311
- CaptchaConfig: _json,
1312
- ChallengeConfig: _json,
1313
- CustomResponseBodies: _json,
1314
- DataProtectionConfig: _json,
1315
- DefaultAction: _json,
1316
- Description: [],
1317
- Name: [],
1318
- OnSourceDDoSProtectionConfig: _json,
1319
- Rules: (_) => se_Rules(_, context),
1320
- Scope: [],
1321
- Tags: _json,
1322
- TokenDomains: _json,
1323
- VisibilityConfig: _json,
1324
- });
1325
- };
1326
- const se_GetSampledRequestsRequest = (input, context) => {
1327
- return take(input, {
1328
- MaxItems: [],
1329
- RuleMetricName: [],
1330
- Scope: [],
1331
- TimeWindow: (_) => se_TimeWindow(_, context),
1332
- WebAclArn: [],
1333
- });
1334
- };
1335
- const se_ManagedRuleGroupStatement = (input, context) => {
1336
- return take(input, {
1337
- ExcludedRules: _json,
1338
- ManagedRuleGroupConfigs: _json,
1339
- Name: [],
1340
- RuleActionOverrides: _json,
1341
- ScopeDownStatement: (_) => se_Statement(_, context),
1342
- VendorName: [],
1343
- Version: [],
1344
- });
1345
- };
1346
- const se_NotStatement = (input, context) => {
1347
- return take(input, {
1348
- Statement: (_) => se_Statement(_, context),
1349
- });
1350
- };
1351
- const se_OrStatement = (input, context) => {
1352
- return take(input, {
1353
- Statements: (_) => se_Statements(_, context),
1354
- });
1355
- };
1356
- const se_RateBasedStatement = (input, context) => {
1357
- return take(input, {
1358
- AggregateKeyType: [],
1359
- CustomKeys: _json,
1360
- EvaluationWindowSec: [],
1361
- ForwardedIPConfig: _json,
1362
- Limit: [],
1363
- ScopeDownStatement: (_) => se_Statement(_, context),
1364
- });
1365
- };
1366
- const se_Rule = (input, context) => {
1367
- return take(input, {
1368
- Action: _json,
1369
- CaptchaConfig: _json,
1370
- ChallengeConfig: _json,
1371
- Name: [],
1372
- OverrideAction: _json,
1373
- Priority: [],
1374
- RuleLabels: _json,
1375
- Statement: (_) => se_Statement(_, context),
1376
- VisibilityConfig: _json,
1377
- });
1378
- };
1379
- const se_Rules = (input, context) => {
1380
- return input
1381
- .filter((e) => e != null)
1382
- .map((entry) => {
1383
- return se_Rule(entry, context);
1384
- });
1385
- };
1386
- const se_Statement = (input, context) => {
1387
- return take(input, {
1388
- AndStatement: (_) => se_AndStatement(_, context),
1389
- AsnMatchStatement: _json,
1390
- ByteMatchStatement: (_) => se_ByteMatchStatement(_, context),
1391
- GeoMatchStatement: _json,
1392
- IPSetReferenceStatement: _json,
1393
- LabelMatchStatement: _json,
1394
- ManagedRuleGroupStatement: (_) => se_ManagedRuleGroupStatement(_, context),
1395
- NotStatement: (_) => se_NotStatement(_, context),
1396
- OrStatement: (_) => se_OrStatement(_, context),
1397
- RateBasedStatement: (_) => se_RateBasedStatement(_, context),
1398
- RegexMatchStatement: _json,
1399
- RegexPatternSetReferenceStatement: _json,
1400
- RuleGroupReferenceStatement: _json,
1401
- SizeConstraintStatement: _json,
1402
- SqliMatchStatement: _json,
1403
- XssMatchStatement: _json,
1404
- });
1405
- };
1406
- const se_Statements = (input, context) => {
1407
- return input
1408
- .filter((e) => e != null)
1409
- .map((entry) => {
1410
- return se_Statement(entry, context);
1411
- });
1412
- };
1413
- const se_TimeWindow = (input, context) => {
1414
- return take(input, {
1415
- EndTime: (_) => _.getTime() / 1_000,
1416
- StartTime: (_) => _.getTime() / 1_000,
1417
- });
1418
- };
1419
- const se_UpdateManagedRuleSetVersionExpiryDateRequest = (input, context) => {
1420
- return take(input, {
1421
- ExpiryTimestamp: (_) => _.getTime() / 1_000,
1422
- Id: [],
1423
- LockToken: [],
1424
- Name: [],
1425
- Scope: [],
1426
- VersionToExpire: [],
1427
- });
1428
- };
1429
- const se_UpdateRuleGroupRequest = (input, context) => {
1430
- return take(input, {
1431
- CustomResponseBodies: _json,
1432
- Description: [],
1433
- Id: [],
1434
- LockToken: [],
1435
- Name: [],
1436
- Rules: (_) => se_Rules(_, context),
1437
- Scope: [],
1438
- VisibilityConfig: _json,
1439
- });
1440
- };
1441
- const se_UpdateWebACLRequest = (input, context) => {
1442
- return take(input, {
1443
- ApplicationConfig: _json,
1444
- AssociationConfig: _json,
1445
- CaptchaConfig: _json,
1446
- ChallengeConfig: _json,
1447
- CustomResponseBodies: _json,
1448
- DataProtectionConfig: _json,
1449
- DefaultAction: _json,
1450
- Description: [],
1451
- Id: [],
1452
- LockToken: [],
1453
- Name: [],
1454
- OnSourceDDoSProtectionConfig: _json,
1455
- Rules: (_) => se_Rules(_, context),
1456
- Scope: [],
1457
- TokenDomains: _json,
1458
- VisibilityConfig: _json,
1459
- });
1460
- };
1461
- const de_AndStatement = (output, context) => {
1462
- return take(output, {
1463
- Statements: (_) => de_Statements(_, context),
1464
- });
1465
- };
1466
- const de_APIKeySummaries = (output, context) => {
1467
- const retVal = (output || [])
1468
- .filter((e) => e != null)
1469
- .map((entry) => {
1470
- return de_APIKeySummary(entry, context);
1471
- });
1472
- return retVal;
1473
- };
1474
- const de_APIKeySummary = (output, context) => {
1475
- return take(output, {
1476
- APIKey: __expectString,
1477
- CreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1478
- TokenDomains: _json,
1479
- Version: __expectInt32,
1480
- });
1481
- };
1482
- const de_ByteMatchStatement = (output, context) => {
1483
- return take(output, {
1484
- FieldToMatch: _json,
1485
- PositionalConstraint: __expectString,
1486
- SearchString: context.base64Decoder,
1487
- TextTransformations: _json,
1488
- });
1489
- };
1490
- const de_FirewallManagerRuleGroup = (output, context) => {
1491
- return take(output, {
1492
- FirewallManagerStatement: (_) => de_FirewallManagerStatement(_, context),
1493
- Name: __expectString,
1494
- OverrideAction: _json,
1495
- Priority: __expectInt32,
1496
- VisibilityConfig: _json,
1497
- });
1498
- };
1499
- const de_FirewallManagerRuleGroups = (output, context) => {
1500
- const retVal = (output || [])
1501
- .filter((e) => e != null)
1502
- .map((entry) => {
1503
- return de_FirewallManagerRuleGroup(entry, context);
1504
- });
1505
- return retVal;
1506
- };
1507
- const de_FirewallManagerStatement = (output, context) => {
1508
- return take(output, {
1509
- ManagedRuleGroupStatement: (_) => de_ManagedRuleGroupStatement(_, context),
1510
- RuleGroupReferenceStatement: _json,
1511
- });
1512
- };
1513
- const de_GetDecryptedAPIKeyResponse = (output, context) => {
1514
- return take(output, {
1515
- CreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1516
- TokenDomains: _json,
1517
- });
1518
- };
1519
- const de_GetManagedRuleSetResponse = (output, context) => {
1520
- return take(output, {
1521
- LockToken: __expectString,
1522
- ManagedRuleSet: (_) => de_ManagedRuleSet(_, context),
1523
- });
1524
- };
1525
- const de_GetMobileSdkReleaseResponse = (output, context) => {
1526
- return take(output, {
1527
- MobileSdkRelease: (_) => de_MobileSdkRelease(_, context),
1528
- });
1529
- };
1530
- const de_GetRuleGroupResponse = (output, context) => {
1531
- return take(output, {
1532
- LockToken: __expectString,
1533
- RuleGroup: (_) => de_RuleGroup(_, context),
1534
- });
1535
- };
1536
- const de_GetSampledRequestsResponse = (output, context) => {
1537
- return take(output, {
1538
- PopulationSize: __expectLong,
1539
- SampledRequests: (_) => de_SampledHTTPRequests(_, context),
1540
- TimeWindow: (_) => de_TimeWindow(_, context),
1541
- });
1542
- };
1543
- const de_GetWebACLForResourceResponse = (output, context) => {
1544
- return take(output, {
1545
- WebACL: (_) => de_WebACL(_, context),
1546
- });
1547
- };
1548
- const de_GetWebACLResponse = (output, context) => {
1549
- return take(output, {
1550
- ApplicationIntegrationURL: __expectString,
1551
- LockToken: __expectString,
1552
- WebACL: (_) => de_WebACL(_, context),
1553
- });
1554
- };
1555
- const de_ListAPIKeysResponse = (output, context) => {
1556
- return take(output, {
1557
- APIKeySummaries: (_) => de_APIKeySummaries(_, context),
1558
- ApplicationIntegrationURL: __expectString,
1559
- NextMarker: __expectString,
1560
- });
1561
- };
1562
- const de_ListAvailableManagedRuleGroupVersionsResponse = (output, context) => {
1563
- return take(output, {
1564
- CurrentDefaultVersion: __expectString,
1565
- NextMarker: __expectString,
1566
- Versions: (_) => de_ManagedRuleGroupVersions(_, context),
1567
- });
1568
- };
1569
- const de_ListMobileSdkReleasesResponse = (output, context) => {
1570
- return take(output, {
1571
- NextMarker: __expectString,
1572
- ReleaseSummaries: (_) => de_ReleaseSummaries(_, context),
1573
- });
1574
- };
1575
- const de_ManagedRuleGroupStatement = (output, context) => {
1576
- return take(output, {
1577
- ExcludedRules: _json,
1578
- ManagedRuleGroupConfigs: _json,
1579
- Name: __expectString,
1580
- RuleActionOverrides: _json,
1581
- ScopeDownStatement: (_) => de_Statement(_, context),
1582
- VendorName: __expectString,
1583
- Version: __expectString,
1584
- });
1585
- };
1586
- const de_ManagedRuleGroupVersion = (output, context) => {
1587
- return take(output, {
1588
- LastUpdateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1589
- Name: __expectString,
1590
- });
1591
- };
1592
- const de_ManagedRuleGroupVersions = (output, context) => {
1593
- const retVal = (output || [])
1594
- .filter((e) => e != null)
1595
- .map((entry) => {
1596
- return de_ManagedRuleGroupVersion(entry, context);
1597
- });
1598
- return retVal;
1599
- };
1600
- const de_ManagedRuleSet = (output, context) => {
1601
- return take(output, {
1602
- ARN: __expectString,
1603
- Description: __expectString,
1604
- Id: __expectString,
1605
- LabelNamespace: __expectString,
1606
- Name: __expectString,
1607
- PublishedVersions: (_) => de_PublishedVersions(_, context),
1608
- RecommendedVersion: __expectString,
1609
- });
1610
- };
1611
- const de_ManagedRuleSetVersion = (output, context) => {
1612
- return take(output, {
1613
- AssociatedRuleGroupArn: __expectString,
1614
- Capacity: __expectLong,
1615
- ExpiryTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1616
- ForecastedLifetime: __expectInt32,
1617
- LastUpdateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1618
- PublishTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1619
- });
1620
- };
1621
- const de_MobileSdkRelease = (output, context) => {
1622
- return take(output, {
1623
- ReleaseNotes: __expectString,
1624
- ReleaseVersion: __expectString,
1625
- Tags: _json,
1626
- Timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1627
- });
1628
- };
1629
- const de_NotStatement = (output, context) => {
1630
- return take(output, {
1631
- Statement: (_) => de_Statement(_, context),
1632
- });
1633
- };
1634
- const de_OrStatement = (output, context) => {
1635
- return take(output, {
1636
- Statements: (_) => de_Statements(_, context),
1637
- });
1638
- };
1639
- const de_PublishedVersions = (output, context) => {
1640
- return Object.entries(output).reduce((acc, [key, value]) => {
1641
- if (value === null) {
1642
- return acc;
1643
- }
1644
- acc[key] = de_ManagedRuleSetVersion(value, context);
1645
- return acc;
1646
- }, {});
1647
- };
1648
- const de_RateBasedStatement = (output, context) => {
1649
- return take(output, {
1650
- AggregateKeyType: __expectString,
1651
- CustomKeys: _json,
1652
- EvaluationWindowSec: __expectLong,
1653
- ForwardedIPConfig: _json,
1654
- Limit: __expectLong,
1655
- ScopeDownStatement: (_) => de_Statement(_, context),
1656
- });
1657
- };
1658
- const de_ReleaseSummaries = (output, context) => {
1659
- const retVal = (output || [])
1660
- .filter((e) => e != null)
1661
- .map((entry) => {
1662
- return de_ReleaseSummary(entry, context);
1663
- });
1664
- return retVal;
1665
- };
1666
- const de_ReleaseSummary = (output, context) => {
1667
- return take(output, {
1668
- ReleaseVersion: __expectString,
1669
- Timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1670
- });
1671
- };
1672
- const de_Rule = (output, context) => {
1673
- return take(output, {
1674
- Action: _json,
1675
- CaptchaConfig: _json,
1676
- ChallengeConfig: _json,
1677
- Name: __expectString,
1678
- OverrideAction: _json,
1679
- Priority: __expectInt32,
1680
- RuleLabels: _json,
1681
- Statement: (_) => de_Statement(_, context),
1682
- VisibilityConfig: _json,
1683
- });
1684
- };
1685
- const de_RuleGroup = (output, context) => {
1686
- return take(output, {
1687
- ARN: __expectString,
1688
- AvailableLabels: _json,
1689
- Capacity: __expectLong,
1690
- ConsumedLabels: _json,
1691
- CustomResponseBodies: _json,
1692
- Description: __expectString,
1693
- Id: __expectString,
1694
- LabelNamespace: __expectString,
1695
- Name: __expectString,
1696
- Rules: (_) => de_Rules(_, context),
1697
- VisibilityConfig: _json,
1698
- });
1699
- };
1700
- const de_Rules = (output, context) => {
1701
- const retVal = (output || [])
1702
- .filter((e) => e != null)
1703
- .map((entry) => {
1704
- return de_Rule(entry, context);
1705
- });
1706
- return retVal;
1707
- };
1708
- const de_SampledHTTPRequest = (output, context) => {
1709
- return take(output, {
1710
- Action: __expectString,
1711
- CaptchaResponse: _json,
1712
- ChallengeResponse: _json,
1713
- Labels: _json,
1714
- OverriddenAction: __expectString,
1715
- Request: _json,
1716
- RequestHeadersInserted: _json,
1717
- ResponseCodeSent: __expectInt32,
1718
- RuleNameWithinRuleGroup: __expectString,
1719
- Timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1720
- Weight: __expectLong,
1721
- });
1722
- };
1723
- const de_SampledHTTPRequests = (output, context) => {
1724
- const retVal = (output || [])
1725
- .filter((e) => e != null)
1726
- .map((entry) => {
1727
- return de_SampledHTTPRequest(entry, context);
1728
- });
1729
- return retVal;
1730
- };
1731
- const de_Statement = (output, context) => {
1732
- return take(output, {
1733
- AndStatement: (_) => de_AndStatement(_, context),
1734
- AsnMatchStatement: _json,
1735
- ByteMatchStatement: (_) => de_ByteMatchStatement(_, context),
1736
- GeoMatchStatement: _json,
1737
- IPSetReferenceStatement: _json,
1738
- LabelMatchStatement: _json,
1739
- ManagedRuleGroupStatement: (_) => de_ManagedRuleGroupStatement(_, context),
1740
- NotStatement: (_) => de_NotStatement(_, context),
1741
- OrStatement: (_) => de_OrStatement(_, context),
1742
- RateBasedStatement: (_) => de_RateBasedStatement(_, context),
1743
- RegexMatchStatement: _json,
1744
- RegexPatternSetReferenceStatement: _json,
1745
- RuleGroupReferenceStatement: _json,
1746
- SizeConstraintStatement: _json,
1747
- SqliMatchStatement: _json,
1748
- XssMatchStatement: _json,
1749
- });
1750
- };
1751
- const de_Statements = (output, context) => {
1752
- const retVal = (output || [])
1753
- .filter((e) => e != null)
1754
- .map((entry) => {
1755
- return de_Statement(entry, context);
1756
- });
1757
- return retVal;
1758
- };
1759
- const de_TimeWindow = (output, context) => {
1760
- return take(output, {
1761
- EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1762
- StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1763
- });
1764
- };
1765
- const de_UpdateManagedRuleSetVersionExpiryDateResponse = (output, context) => {
1766
- return take(output, {
1767
- ExpiringVersion: __expectString,
1768
- ExpiryTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1769
- NextLockToken: __expectString,
1770
- });
1771
- };
1772
- const de_WebACL = (output, context) => {
1773
- return take(output, {
1774
- ARN: __expectString,
1775
- ApplicationConfig: _json,
1776
- AssociationConfig: _json,
1777
- Capacity: __expectLong,
1778
- CaptchaConfig: _json,
1779
- ChallengeConfig: _json,
1780
- CustomResponseBodies: _json,
1781
- DataProtectionConfig: _json,
1782
- DefaultAction: _json,
1783
- Description: __expectString,
1784
- Id: __expectString,
1785
- LabelNamespace: __expectString,
1786
- ManagedByFirewallManager: __expectBoolean,
1787
- Name: __expectString,
1788
- OnSourceDDoSProtectionConfig: _json,
1789
- PostProcessFirewallManagerRuleGroups: (_) => de_FirewallManagerRuleGroups(_, context),
1790
- PreProcessFirewallManagerRuleGroups: (_) => de_FirewallManagerRuleGroups(_, context),
1791
- RetrofittedByFirewallManager: __expectBoolean,
1792
- Rules: (_) => de_Rules(_, context),
1793
- TokenDomains: _json,
1794
- VisibilityConfig: _json,
1795
- });
1796
- };
1797
- const deserializeMetadata = (output) => ({
1798
- httpStatusCode: output.statusCode,
1799
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1800
- extendedRequestId: output.headers["x-amz-id-2"],
1801
- cfId: output.headers["x-amz-cf-id"],
1802
- });
1803
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1804
- const throwDefaultError = withBaseException(__BaseException);
1805
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1806
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1807
- const contents = {
1808
- protocol,
1809
- hostname,
1810
- port,
1811
- method: "POST",
1812
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1813
- headers,
1814
- };
1815
- if (resolvedHostname !== undefined) {
1816
- contents.hostname = resolvedHostname;
1817
- }
1818
- if (body !== undefined) {
1819
- contents.body = body;
1820
- }
1821
- return new __HttpRequest(contents);
1822
- };
1823
- function sharedHeaders(operation) {
1824
- return {
1825
- "content-type": "application/x-amz-json-1.1",
1826
- "x-amz-target": `AWSWAF_20190729.${operation}`,
1827
- };
1828
- }