@aws-sdk/client-wafv2 3.310.0 → 3.312.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.
@@ -3,433 +3,289 @@ import { decorateServiceException as __decorateServiceException, expectBoolean a
3
3
  import { WAFAssociatedItemException, WAFConfigurationWarningException, WAFDuplicateItemException, WAFExpiredManagedRuleGroupVersionException, WAFInternalErrorException, WAFInvalidOperationException, WAFInvalidParameterException, WAFInvalidPermissionPolicyException, WAFInvalidResourceException, WAFLimitsExceededException, WAFLogDestinationPermissionIssueException, WAFNonexistentItemException, WAFOptimisticLockException, WAFServiceLinkedRoleErrorException, WAFSubscriptionNotFoundException, WAFTagOperationException, WAFTagOperationInternalErrorException, WAFUnavailableEntityException, } from "../models/models_0";
4
4
  import { WAFV2ServiceException as __BaseException } from "../models/WAFV2ServiceException";
5
5
  export const se_AssociateWebACLCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "AWSWAF_20190729.AssociateWebACL",
9
- };
6
+ const headers = sharedHeaders("AssociateWebACL");
10
7
  let body;
11
8
  body = JSON.stringify(se_AssociateWebACLRequest(input, context));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_CheckCapacityCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "AWSWAF_20190729.CheckCapacity",
18
- };
12
+ const headers = sharedHeaders("CheckCapacity");
19
13
  let body;
20
14
  body = JSON.stringify(se_CheckCapacityRequest(input, context));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_CreateIPSetCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "AWSWAF_20190729.CreateIPSet",
27
- };
18
+ const headers = sharedHeaders("CreateIPSet");
28
19
  let body;
29
20
  body = JSON.stringify(se_CreateIPSetRequest(input, context));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_CreateRegexPatternSetCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "AWSWAF_20190729.CreateRegexPatternSet",
36
- };
24
+ const headers = sharedHeaders("CreateRegexPatternSet");
37
25
  let body;
38
26
  body = JSON.stringify(se_CreateRegexPatternSetRequest(input, context));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_CreateRuleGroupCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AWSWAF_20190729.CreateRuleGroup",
45
- };
30
+ const headers = sharedHeaders("CreateRuleGroup");
46
31
  let body;
47
32
  body = JSON.stringify(se_CreateRuleGroupRequest(input, context));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
34
  };
50
35
  export const se_CreateWebACLCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "AWSWAF_20190729.CreateWebACL",
54
- };
36
+ const headers = sharedHeaders("CreateWebACL");
55
37
  let body;
56
38
  body = JSON.stringify(se_CreateWebACLRequest(input, context));
57
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
40
  };
59
41
  export const se_DeleteFirewallManagerRuleGroupsCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "AWSWAF_20190729.DeleteFirewallManagerRuleGroups",
63
- };
42
+ const headers = sharedHeaders("DeleteFirewallManagerRuleGroups");
64
43
  let body;
65
44
  body = JSON.stringify(se_DeleteFirewallManagerRuleGroupsRequest(input, context));
66
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
46
  };
68
47
  export const se_DeleteIPSetCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "AWSWAF_20190729.DeleteIPSet",
72
- };
48
+ const headers = sharedHeaders("DeleteIPSet");
73
49
  let body;
74
50
  body = JSON.stringify(se_DeleteIPSetRequest(input, context));
75
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
52
  };
77
53
  export const se_DeleteLoggingConfigurationCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "AWSWAF_20190729.DeleteLoggingConfiguration",
81
- };
54
+ const headers = sharedHeaders("DeleteLoggingConfiguration");
82
55
  let body;
83
56
  body = JSON.stringify(se_DeleteLoggingConfigurationRequest(input, context));
84
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
58
  };
86
59
  export const se_DeletePermissionPolicyCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "AWSWAF_20190729.DeletePermissionPolicy",
90
- };
60
+ const headers = sharedHeaders("DeletePermissionPolicy");
91
61
  let body;
92
62
  body = JSON.stringify(se_DeletePermissionPolicyRequest(input, context));
93
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
64
  };
95
65
  export const se_DeleteRegexPatternSetCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "AWSWAF_20190729.DeleteRegexPatternSet",
99
- };
66
+ const headers = sharedHeaders("DeleteRegexPatternSet");
100
67
  let body;
101
68
  body = JSON.stringify(se_DeleteRegexPatternSetRequest(input, context));
102
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
70
  };
104
71
  export const se_DeleteRuleGroupCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "AWSWAF_20190729.DeleteRuleGroup",
108
- };
72
+ const headers = sharedHeaders("DeleteRuleGroup");
109
73
  let body;
110
74
  body = JSON.stringify(se_DeleteRuleGroupRequest(input, context));
111
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
76
  };
113
77
  export const se_DeleteWebACLCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "AWSWAF_20190729.DeleteWebACL",
117
- };
78
+ const headers = sharedHeaders("DeleteWebACL");
118
79
  let body;
119
80
  body = JSON.stringify(se_DeleteWebACLRequest(input, context));
120
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
82
  };
122
83
  export const se_DescribeManagedRuleGroupCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "AWSWAF_20190729.DescribeManagedRuleGroup",
126
- };
84
+ const headers = sharedHeaders("DescribeManagedRuleGroup");
127
85
  let body;
128
86
  body = JSON.stringify(se_DescribeManagedRuleGroupRequest(input, context));
129
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
88
  };
131
89
  export const se_DisassociateWebACLCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "AWSWAF_20190729.DisassociateWebACL",
135
- };
90
+ const headers = sharedHeaders("DisassociateWebACL");
136
91
  let body;
137
92
  body = JSON.stringify(se_DisassociateWebACLRequest(input, context));
138
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
94
  };
140
95
  export const se_GenerateMobileSdkReleaseUrlCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AWSWAF_20190729.GenerateMobileSdkReleaseUrl",
144
- };
96
+ const headers = sharedHeaders("GenerateMobileSdkReleaseUrl");
145
97
  let body;
146
98
  body = JSON.stringify(se_GenerateMobileSdkReleaseUrlRequest(input, context));
147
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
100
  };
149
101
  export const se_GetIPSetCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AWSWAF_20190729.GetIPSet",
153
- };
102
+ const headers = sharedHeaders("GetIPSet");
154
103
  let body;
155
104
  body = JSON.stringify(se_GetIPSetRequest(input, context));
156
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
106
  };
158
107
  export const se_GetLoggingConfigurationCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AWSWAF_20190729.GetLoggingConfiguration",
162
- };
108
+ const headers = sharedHeaders("GetLoggingConfiguration");
163
109
  let body;
164
110
  body = JSON.stringify(se_GetLoggingConfigurationRequest(input, context));
165
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
112
  };
167
113
  export const se_GetManagedRuleSetCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "AWSWAF_20190729.GetManagedRuleSet",
171
- };
114
+ const headers = sharedHeaders("GetManagedRuleSet");
172
115
  let body;
173
116
  body = JSON.stringify(se_GetManagedRuleSetRequest(input, context));
174
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
118
  };
176
119
  export const se_GetMobileSdkReleaseCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "AWSWAF_20190729.GetMobileSdkRelease",
180
- };
120
+ const headers = sharedHeaders("GetMobileSdkRelease");
181
121
  let body;
182
122
  body = JSON.stringify(se_GetMobileSdkReleaseRequest(input, context));
183
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
124
  };
185
125
  export const se_GetPermissionPolicyCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "AWSWAF_20190729.GetPermissionPolicy",
189
- };
126
+ const headers = sharedHeaders("GetPermissionPolicy");
190
127
  let body;
191
128
  body = JSON.stringify(se_GetPermissionPolicyRequest(input, context));
192
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
130
  };
194
131
  export const se_GetRateBasedStatementManagedKeysCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "AWSWAF_20190729.GetRateBasedStatementManagedKeys",
198
- };
132
+ const headers = sharedHeaders("GetRateBasedStatementManagedKeys");
199
133
  let body;
200
134
  body = JSON.stringify(se_GetRateBasedStatementManagedKeysRequest(input, context));
201
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
136
  };
203
137
  export const se_GetRegexPatternSetCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "AWSWAF_20190729.GetRegexPatternSet",
207
- };
138
+ const headers = sharedHeaders("GetRegexPatternSet");
208
139
  let body;
209
140
  body = JSON.stringify(se_GetRegexPatternSetRequest(input, context));
210
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
142
  };
212
143
  export const se_GetRuleGroupCommand = async (input, context) => {
213
- const headers = {
214
- "content-type": "application/x-amz-json-1.1",
215
- "x-amz-target": "AWSWAF_20190729.GetRuleGroup",
216
- };
144
+ const headers = sharedHeaders("GetRuleGroup");
217
145
  let body;
218
146
  body = JSON.stringify(se_GetRuleGroupRequest(input, context));
219
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
148
  };
221
149
  export const se_GetSampledRequestsCommand = async (input, context) => {
222
- const headers = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "AWSWAF_20190729.GetSampledRequests",
225
- };
150
+ const headers = sharedHeaders("GetSampledRequests");
226
151
  let body;
227
152
  body = JSON.stringify(se_GetSampledRequestsRequest(input, context));
228
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
154
  };
230
155
  export const se_GetWebACLCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "AWSWAF_20190729.GetWebACL",
234
- };
156
+ const headers = sharedHeaders("GetWebACL");
235
157
  let body;
236
158
  body = JSON.stringify(se_GetWebACLRequest(input, context));
237
159
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
160
  };
239
161
  export const se_GetWebACLForResourceCommand = async (input, context) => {
240
- const headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "AWSWAF_20190729.GetWebACLForResource",
243
- };
162
+ const headers = sharedHeaders("GetWebACLForResource");
244
163
  let body;
245
164
  body = JSON.stringify(se_GetWebACLForResourceRequest(input, context));
246
165
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
166
  };
248
167
  export const se_ListAvailableManagedRuleGroupsCommand = async (input, context) => {
249
- const headers = {
250
- "content-type": "application/x-amz-json-1.1",
251
- "x-amz-target": "AWSWAF_20190729.ListAvailableManagedRuleGroups",
252
- };
168
+ const headers = sharedHeaders("ListAvailableManagedRuleGroups");
253
169
  let body;
254
170
  body = JSON.stringify(se_ListAvailableManagedRuleGroupsRequest(input, context));
255
171
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
256
172
  };
257
173
  export const se_ListAvailableManagedRuleGroupVersionsCommand = async (input, context) => {
258
- const headers = {
259
- "content-type": "application/x-amz-json-1.1",
260
- "x-amz-target": "AWSWAF_20190729.ListAvailableManagedRuleGroupVersions",
261
- };
174
+ const headers = sharedHeaders("ListAvailableManagedRuleGroupVersions");
262
175
  let body;
263
176
  body = JSON.stringify(se_ListAvailableManagedRuleGroupVersionsRequest(input, context));
264
177
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
265
178
  };
266
179
  export const se_ListIPSetsCommand = async (input, context) => {
267
- const headers = {
268
- "content-type": "application/x-amz-json-1.1",
269
- "x-amz-target": "AWSWAF_20190729.ListIPSets",
270
- };
180
+ const headers = sharedHeaders("ListIPSets");
271
181
  let body;
272
182
  body = JSON.stringify(se_ListIPSetsRequest(input, context));
273
183
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
184
  };
275
185
  export const se_ListLoggingConfigurationsCommand = async (input, context) => {
276
- const headers = {
277
- "content-type": "application/x-amz-json-1.1",
278
- "x-amz-target": "AWSWAF_20190729.ListLoggingConfigurations",
279
- };
186
+ const headers = sharedHeaders("ListLoggingConfigurations");
280
187
  let body;
281
188
  body = JSON.stringify(se_ListLoggingConfigurationsRequest(input, context));
282
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
283
190
  };
284
191
  export const se_ListManagedRuleSetsCommand = async (input, context) => {
285
- const headers = {
286
- "content-type": "application/x-amz-json-1.1",
287
- "x-amz-target": "AWSWAF_20190729.ListManagedRuleSets",
288
- };
192
+ const headers = sharedHeaders("ListManagedRuleSets");
289
193
  let body;
290
194
  body = JSON.stringify(se_ListManagedRuleSetsRequest(input, context));
291
195
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
292
196
  };
293
197
  export const se_ListMobileSdkReleasesCommand = async (input, context) => {
294
- const headers = {
295
- "content-type": "application/x-amz-json-1.1",
296
- "x-amz-target": "AWSWAF_20190729.ListMobileSdkReleases",
297
- };
198
+ const headers = sharedHeaders("ListMobileSdkReleases");
298
199
  let body;
299
200
  body = JSON.stringify(se_ListMobileSdkReleasesRequest(input, context));
300
201
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
301
202
  };
302
203
  export const se_ListRegexPatternSetsCommand = async (input, context) => {
303
- const headers = {
304
- "content-type": "application/x-amz-json-1.1",
305
- "x-amz-target": "AWSWAF_20190729.ListRegexPatternSets",
306
- };
204
+ const headers = sharedHeaders("ListRegexPatternSets");
307
205
  let body;
308
206
  body = JSON.stringify(se_ListRegexPatternSetsRequest(input, context));
309
207
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
310
208
  };
311
209
  export const se_ListResourcesForWebACLCommand = async (input, context) => {
312
- const headers = {
313
- "content-type": "application/x-amz-json-1.1",
314
- "x-amz-target": "AWSWAF_20190729.ListResourcesForWebACL",
315
- };
210
+ const headers = sharedHeaders("ListResourcesForWebACL");
316
211
  let body;
317
212
  body = JSON.stringify(se_ListResourcesForWebACLRequest(input, context));
318
213
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
319
214
  };
320
215
  export const se_ListRuleGroupsCommand = async (input, context) => {
321
- const headers = {
322
- "content-type": "application/x-amz-json-1.1",
323
- "x-amz-target": "AWSWAF_20190729.ListRuleGroups",
324
- };
216
+ const headers = sharedHeaders("ListRuleGroups");
325
217
  let body;
326
218
  body = JSON.stringify(se_ListRuleGroupsRequest(input, context));
327
219
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
328
220
  };
329
221
  export const se_ListTagsForResourceCommand = async (input, context) => {
330
- const headers = {
331
- "content-type": "application/x-amz-json-1.1",
332
- "x-amz-target": "AWSWAF_20190729.ListTagsForResource",
333
- };
222
+ const headers = sharedHeaders("ListTagsForResource");
334
223
  let body;
335
224
  body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
336
225
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
337
226
  };
338
227
  export const se_ListWebACLsCommand = async (input, context) => {
339
- const headers = {
340
- "content-type": "application/x-amz-json-1.1",
341
- "x-amz-target": "AWSWAF_20190729.ListWebACLs",
342
- };
228
+ const headers = sharedHeaders("ListWebACLs");
343
229
  let body;
344
230
  body = JSON.stringify(se_ListWebACLsRequest(input, context));
345
231
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
346
232
  };
347
233
  export const se_PutLoggingConfigurationCommand = async (input, context) => {
348
- const headers = {
349
- "content-type": "application/x-amz-json-1.1",
350
- "x-amz-target": "AWSWAF_20190729.PutLoggingConfiguration",
351
- };
234
+ const headers = sharedHeaders("PutLoggingConfiguration");
352
235
  let body;
353
236
  body = JSON.stringify(se_PutLoggingConfigurationRequest(input, context));
354
237
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
355
238
  };
356
239
  export const se_PutManagedRuleSetVersionsCommand = async (input, context) => {
357
- const headers = {
358
- "content-type": "application/x-amz-json-1.1",
359
- "x-amz-target": "AWSWAF_20190729.PutManagedRuleSetVersions",
360
- };
240
+ const headers = sharedHeaders("PutManagedRuleSetVersions");
361
241
  let body;
362
242
  body = JSON.stringify(se_PutManagedRuleSetVersionsRequest(input, context));
363
243
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
364
244
  };
365
245
  export const se_PutPermissionPolicyCommand = async (input, context) => {
366
- const headers = {
367
- "content-type": "application/x-amz-json-1.1",
368
- "x-amz-target": "AWSWAF_20190729.PutPermissionPolicy",
369
- };
246
+ const headers = sharedHeaders("PutPermissionPolicy");
370
247
  let body;
371
248
  body = JSON.stringify(se_PutPermissionPolicyRequest(input, context));
372
249
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
373
250
  };
374
251
  export const se_TagResourceCommand = async (input, context) => {
375
- const headers = {
376
- "content-type": "application/x-amz-json-1.1",
377
- "x-amz-target": "AWSWAF_20190729.TagResource",
378
- };
252
+ const headers = sharedHeaders("TagResource");
379
253
  let body;
380
254
  body = JSON.stringify(se_TagResourceRequest(input, context));
381
255
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
382
256
  };
383
257
  export const se_UntagResourceCommand = async (input, context) => {
384
- const headers = {
385
- "content-type": "application/x-amz-json-1.1",
386
- "x-amz-target": "AWSWAF_20190729.UntagResource",
387
- };
258
+ const headers = sharedHeaders("UntagResource");
388
259
  let body;
389
260
  body = JSON.stringify(se_UntagResourceRequest(input, context));
390
261
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
391
262
  };
392
263
  export const se_UpdateIPSetCommand = async (input, context) => {
393
- const headers = {
394
- "content-type": "application/x-amz-json-1.1",
395
- "x-amz-target": "AWSWAF_20190729.UpdateIPSet",
396
- };
264
+ const headers = sharedHeaders("UpdateIPSet");
397
265
  let body;
398
266
  body = JSON.stringify(se_UpdateIPSetRequest(input, context));
399
267
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
400
268
  };
401
269
  export const se_UpdateManagedRuleSetVersionExpiryDateCommand = async (input, context) => {
402
- const headers = {
403
- "content-type": "application/x-amz-json-1.1",
404
- "x-amz-target": "AWSWAF_20190729.UpdateManagedRuleSetVersionExpiryDate",
405
- };
270
+ const headers = sharedHeaders("UpdateManagedRuleSetVersionExpiryDate");
406
271
  let body;
407
272
  body = JSON.stringify(se_UpdateManagedRuleSetVersionExpiryDateRequest(input, context));
408
273
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
409
274
  };
410
275
  export const se_UpdateRegexPatternSetCommand = async (input, context) => {
411
- const headers = {
412
- "content-type": "application/x-amz-json-1.1",
413
- "x-amz-target": "AWSWAF_20190729.UpdateRegexPatternSet",
414
- };
276
+ const headers = sharedHeaders("UpdateRegexPatternSet");
415
277
  let body;
416
278
  body = JSON.stringify(se_UpdateRegexPatternSetRequest(input, context));
417
279
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
418
280
  };
419
281
  export const se_UpdateRuleGroupCommand = async (input, context) => {
420
- const headers = {
421
- "content-type": "application/x-amz-json-1.1",
422
- "x-amz-target": "AWSWAF_20190729.UpdateRuleGroup",
423
- };
282
+ const headers = sharedHeaders("UpdateRuleGroup");
424
283
  let body;
425
284
  body = JSON.stringify(se_UpdateRuleGroupRequest(input, context));
426
285
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
427
286
  };
428
287
  export const se_UpdateWebACLCommand = async (input, context) => {
429
- const headers = {
430
- "content-type": "application/x-amz-json-1.1",
431
- "x-amz-target": "AWSWAF_20190729.UpdateWebACL",
432
- };
288
+ const headers = sharedHeaders("UpdateWebACL");
433
289
  let body;
434
290
  body = JSON.stringify(se_UpdateWebACLRequest(input, context));
435
291
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -2863,6 +2719,11 @@ const se_AssociateWebACLRequest = (input, context) => {
2863
2719
  ...(input.WebACLArn != null && { WebACLArn: input.WebACLArn }),
2864
2720
  };
2865
2721
  };
2722
+ const se_AssociationConfig = (input, context) => {
2723
+ return {
2724
+ ...(input.RequestBody != null && { RequestBody: se_RequestBody(input.RequestBody, context) }),
2725
+ };
2726
+ };
2866
2727
  const se_AWSManagedRulesATPRuleSet = (input, context) => {
2867
2728
  return {
2868
2729
  ...(input.LoginPath != null && { LoginPath: input.LoginPath }),
@@ -3020,6 +2881,9 @@ const se_CreateRuleGroupRequest = (input, context) => {
3020
2881
  };
3021
2882
  const se_CreateWebACLRequest = (input, context) => {
3022
2883
  return {
2884
+ ...(input.AssociationConfig != null && {
2885
+ AssociationConfig: se_AssociationConfig(input.AssociationConfig, context),
2886
+ }),
3023
2887
  ...(input.CaptchaConfig != null && { CaptchaConfig: se_CaptchaConfig(input.CaptchaConfig, context) }),
3024
2888
  ...(input.ChallengeConfig != null && { ChallengeConfig: se_ChallengeConfig(input.ChallengeConfig, context) }),
3025
2889
  ...(input.CustomResponseBodies != null && {
@@ -3613,6 +3477,20 @@ const se_RegularExpressionList = (input, context) => {
3613
3477
  return se_Regex(entry, context);
3614
3478
  });
3615
3479
  };
3480
+ const se_RequestBody = (input, context) => {
3481
+ return Object.entries(input).reduce((acc, [key, value]) => {
3482
+ if (value === null) {
3483
+ return acc;
3484
+ }
3485
+ acc[key] = se_RequestBodyAssociatedResourceTypeConfig(value, context);
3486
+ return acc;
3487
+ }, {});
3488
+ };
3489
+ const se_RequestBodyAssociatedResourceTypeConfig = (input, context) => {
3490
+ return {
3491
+ ...(input.DefaultSizeInspectionLimit != null && { DefaultSizeInspectionLimit: input.DefaultSizeInspectionLimit }),
3492
+ };
3493
+ };
3616
3494
  const se_RequestInspection = (input, context) => {
3617
3495
  return {
3618
3496
  ...(input.PasswordField != null && { PasswordField: se_PasswordField(input.PasswordField, context) }),
@@ -3962,6 +3840,9 @@ const se_UpdateRuleGroupRequest = (input, context) => {
3962
3840
  };
3963
3841
  const se_UpdateWebACLRequest = (input, context) => {
3964
3842
  return {
3843
+ ...(input.AssociationConfig != null && {
3844
+ AssociationConfig: se_AssociationConfig(input.AssociationConfig, context),
3845
+ }),
3965
3846
  ...(input.CaptchaConfig != null && { CaptchaConfig: se_CaptchaConfig(input.CaptchaConfig, context) }),
3966
3847
  ...(input.ChallengeConfig != null && { ChallengeConfig: se_ChallengeConfig(input.ChallengeConfig, context) }),
3967
3848
  ...(input.CustomResponseBodies != null && {
@@ -4042,6 +3923,11 @@ const de_AndStatement = (output, context) => {
4042
3923
  const de_AssociateWebACLResponse = (output, context) => {
4043
3924
  return {};
4044
3925
  };
3926
+ const de_AssociationConfig = (output, context) => {
3927
+ return {
3928
+ RequestBody: output.RequestBody != null ? de_RequestBody(output.RequestBody, context) : undefined,
3929
+ };
3930
+ };
4045
3931
  const de_AWSManagedRulesATPRuleSet = (output, context) => {
4046
3932
  return {
4047
3933
  LoginPath: __expectString(output.LoginPath),
@@ -5022,6 +4908,20 @@ const de_ReleaseSummary = (output, context) => {
5022
4908
  Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
5023
4909
  };
5024
4910
  };
4911
+ const de_RequestBody = (output, context) => {
4912
+ return Object.entries(output).reduce((acc, [key, value]) => {
4913
+ if (value === null) {
4914
+ return acc;
4915
+ }
4916
+ acc[key] = de_RequestBodyAssociatedResourceTypeConfig(value, context);
4917
+ return acc;
4918
+ }, {});
4919
+ };
4920
+ const de_RequestBodyAssociatedResourceTypeConfig = (output, context) => {
4921
+ return {
4922
+ DefaultSizeInspectionLimit: __expectString(output.DefaultSizeInspectionLimit),
4923
+ };
4924
+ };
5025
4925
  const de_RequestInspection = (output, context) => {
5026
4926
  return {
5027
4927
  PasswordField: output.PasswordField != null ? de_PasswordField(output.PasswordField, context) : undefined,
@@ -5577,6 +5477,7 @@ const de_WAFUnavailableEntityException = (output, context) => {
5577
5477
  const de_WebACL = (output, context) => {
5578
5478
  return {
5579
5479
  ARN: __expectString(output.ARN),
5480
+ AssociationConfig: output.AssociationConfig != null ? de_AssociationConfig(output.AssociationConfig, context) : undefined,
5580
5481
  Capacity: __expectLong(output.Capacity),
5581
5482
  CaptchaConfig: output.CaptchaConfig != null ? de_CaptchaConfig(output.CaptchaConfig, context) : undefined,
5582
5483
  ChallengeConfig: output.ChallengeConfig != null ? de_ChallengeConfig(output.ChallengeConfig, context) : undefined,
@@ -5655,6 +5556,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
5655
5556
  }
5656
5557
  return new __HttpRequest(contents);
5657
5558
  };
5559
+ function sharedHeaders(operation) {
5560
+ return {
5561
+ "content-type": "application/x-amz-json-1.1",
5562
+ "x-amz-target": `AWSWAF_20190729.${operation}`,
5563
+ };
5564
+ }
5658
5565
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
5659
5566
  if (encoded.length) {
5660
5567
  return JSON.parse(encoded);