@aws-sdk/client-shield 3.927.0 → 3.928.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 (57) hide show
  1. package/dist-cjs/index.js +1129 -1338
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/ShieldClient.js +2 -0
  4. package/dist-es/commands/AssociateDRTLogBucketCommand.js +3 -9
  5. package/dist-es/commands/AssociateDRTRoleCommand.js +3 -9
  6. package/dist-es/commands/AssociateHealthCheckCommand.js +3 -9
  7. package/dist-es/commands/AssociateProactiveEngagementDetailsCommand.js +3 -9
  8. package/dist-es/commands/CreateProtectionCommand.js +3 -9
  9. package/dist-es/commands/CreateProtectionGroupCommand.js +3 -9
  10. package/dist-es/commands/CreateSubscriptionCommand.js +3 -9
  11. package/dist-es/commands/DeleteProtectionCommand.js +3 -9
  12. package/dist-es/commands/DeleteProtectionGroupCommand.js +3 -9
  13. package/dist-es/commands/DeleteSubscriptionCommand.js +3 -9
  14. package/dist-es/commands/DescribeAttackCommand.js +3 -9
  15. package/dist-es/commands/DescribeAttackStatisticsCommand.js +3 -9
  16. package/dist-es/commands/DescribeDRTAccessCommand.js +3 -9
  17. package/dist-es/commands/DescribeEmergencyContactSettingsCommand.js +3 -9
  18. package/dist-es/commands/DescribeProtectionCommand.js +3 -9
  19. package/dist-es/commands/DescribeProtectionGroupCommand.js +3 -9
  20. package/dist-es/commands/DescribeSubscriptionCommand.js +3 -9
  21. package/dist-es/commands/DisableApplicationLayerAutomaticResponseCommand.js +3 -9
  22. package/dist-es/commands/DisableProactiveEngagementCommand.js +3 -9
  23. package/dist-es/commands/DisassociateDRTLogBucketCommand.js +3 -9
  24. package/dist-es/commands/DisassociateDRTRoleCommand.js +3 -9
  25. package/dist-es/commands/DisassociateHealthCheckCommand.js +3 -9
  26. package/dist-es/commands/EnableApplicationLayerAutomaticResponseCommand.js +3 -9
  27. package/dist-es/commands/EnableProactiveEngagementCommand.js +3 -9
  28. package/dist-es/commands/GetSubscriptionStateCommand.js +3 -9
  29. package/dist-es/commands/ListAttacksCommand.js +3 -9
  30. package/dist-es/commands/ListProtectionGroupsCommand.js +3 -9
  31. package/dist-es/commands/ListProtectionsCommand.js +3 -9
  32. package/dist-es/commands/ListResourcesInProtectionGroupCommand.js +3 -9
  33. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  34. package/dist-es/commands/TagResourceCommand.js +3 -9
  35. package/dist-es/commands/UntagResourceCommand.js +3 -9
  36. package/dist-es/commands/UpdateApplicationLayerAutomaticResponseCommand.js +3 -9
  37. package/dist-es/commands/UpdateEmergencyContactSettingsCommand.js +3 -9
  38. package/dist-es/commands/UpdateProtectionGroupCommand.js +3 -9
  39. package/dist-es/commands/UpdateSubscriptionCommand.js +3 -9
  40. package/dist-es/runtimeConfig.shared.js +7 -0
  41. package/dist-es/schemas/schemas_0.js +1029 -0
  42. package/dist-types/ShieldClient.d.ts +10 -1
  43. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  44. package/dist-types/runtimeConfig.d.ts +1 -0
  45. package/dist-types/runtimeConfig.native.d.ts +1 -0
  46. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  47. package/dist-types/schemas/schemas_0.d.ts +182 -0
  48. package/dist-types/ts3.4/ShieldClient.d.ts +4 -0
  49. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  50. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  51. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  52. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  53. package/dist-types/ts3.4/schemas/schemas_0.d.ts +187 -0
  54. package/package.json +5 -5
  55. package/dist-es/protocols/Aws_json1_1.js +0 -1051
  56. package/dist-types/protocols/Aws_json1_1.d.ts +0 -326
  57. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -437
@@ -1,1051 +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, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AccessDeniedException, AccessDeniedForDependencyException, InternalErrorException, InvalidOperationException, InvalidPaginationTokenException, InvalidParameterException, InvalidResourceException, LimitsExceededException, LockedSubscriptionException, NoAssociatedRoleException, OptimisticLockException, ResourceAlreadyExistsException, ResourceNotFoundException, } from "../models/models_0";
5
- import { ShieldServiceException as __BaseException } from "../models/ShieldServiceException";
6
- export const se_AssociateDRTLogBucketCommand = async (input, context) => {
7
- const headers = sharedHeaders("AssociateDRTLogBucket");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_AssociateDRTRoleCommand = async (input, context) => {
13
- const headers = sharedHeaders("AssociateDRTRole");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_AssociateHealthCheckCommand = async (input, context) => {
19
- const headers = sharedHeaders("AssociateHealthCheck");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_AssociateProactiveEngagementDetailsCommand = async (input, context) => {
25
- const headers = sharedHeaders("AssociateProactiveEngagementDetails");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_CreateProtectionCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateProtection");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_CreateProtectionGroupCommand = async (input, context) => {
37
- const headers = sharedHeaders("CreateProtectionGroup");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_CreateSubscriptionCommand = async (input, context) => {
43
- const headers = sharedHeaders("CreateSubscription");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DeleteProtectionCommand = async (input, context) => {
49
- const headers = sharedHeaders("DeleteProtection");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_DeleteProtectionGroupCommand = async (input, context) => {
55
- const headers = sharedHeaders("DeleteProtectionGroup");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_DeleteSubscriptionCommand = async (input, context) => {
61
- const headers = sharedHeaders("DeleteSubscription");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_DescribeAttackCommand = async (input, context) => {
67
- const headers = sharedHeaders("DescribeAttack");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_DescribeAttackStatisticsCommand = async (input, context) => {
73
- const headers = sharedHeaders("DescribeAttackStatistics");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_DescribeDRTAccessCommand = async (input, context) => {
79
- const headers = sharedHeaders("DescribeDRTAccess");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_DescribeEmergencyContactSettingsCommand = async (input, context) => {
85
- const headers = sharedHeaders("DescribeEmergencyContactSettings");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_DescribeProtectionCommand = async (input, context) => {
91
- const headers = sharedHeaders("DescribeProtection");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_DescribeProtectionGroupCommand = async (input, context) => {
97
- const headers = sharedHeaders("DescribeProtectionGroup");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_DescribeSubscriptionCommand = async (input, context) => {
103
- const headers = sharedHeaders("DescribeSubscription");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_DisableApplicationLayerAutomaticResponseCommand = async (input, context) => {
109
- const headers = sharedHeaders("DisableApplicationLayerAutomaticResponse");
110
- let body;
111
- body = JSON.stringify(_json(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_DisableProactiveEngagementCommand = async (input, context) => {
115
- const headers = sharedHeaders("DisableProactiveEngagement");
116
- let body;
117
- body = JSON.stringify(_json(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_DisassociateDRTLogBucketCommand = async (input, context) => {
121
- const headers = sharedHeaders("DisassociateDRTLogBucket");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_DisassociateDRTRoleCommand = async (input, context) => {
127
- const headers = sharedHeaders("DisassociateDRTRole");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_DisassociateHealthCheckCommand = async (input, context) => {
133
- const headers = sharedHeaders("DisassociateHealthCheck");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_EnableApplicationLayerAutomaticResponseCommand = async (input, context) => {
139
- const headers = sharedHeaders("EnableApplicationLayerAutomaticResponse");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_EnableProactiveEngagementCommand = async (input, context) => {
145
- const headers = sharedHeaders("EnableProactiveEngagement");
146
- let body;
147
- body = JSON.stringify(_json(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_GetSubscriptionStateCommand = async (input, context) => {
151
- const headers = sharedHeaders("GetSubscriptionState");
152
- let body;
153
- body = JSON.stringify(_json(input));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const se_ListAttacksCommand = async (input, context) => {
157
- const headers = sharedHeaders("ListAttacks");
158
- let body;
159
- body = JSON.stringify(se_ListAttacksRequest(input, context));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- export const se_ListProtectionGroupsCommand = async (input, context) => {
163
- const headers = sharedHeaders("ListProtectionGroups");
164
- let body;
165
- body = JSON.stringify(_json(input));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const se_ListProtectionsCommand = async (input, context) => {
169
- const headers = sharedHeaders("ListProtections");
170
- let body;
171
- body = JSON.stringify(_json(input));
172
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
173
- };
174
- export const se_ListResourcesInProtectionGroupCommand = async (input, context) => {
175
- const headers = sharedHeaders("ListResourcesInProtectionGroup");
176
- let body;
177
- body = JSON.stringify(_json(input));
178
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
179
- };
180
- export const se_ListTagsForResourceCommand = async (input, context) => {
181
- const headers = sharedHeaders("ListTagsForResource");
182
- let body;
183
- body = JSON.stringify(_json(input));
184
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
- };
186
- export const se_TagResourceCommand = async (input, context) => {
187
- const headers = sharedHeaders("TagResource");
188
- let body;
189
- body = JSON.stringify(_json(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- export const se_UntagResourceCommand = async (input, context) => {
193
- const headers = sharedHeaders("UntagResource");
194
- let body;
195
- body = JSON.stringify(_json(input));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
- export const se_UpdateApplicationLayerAutomaticResponseCommand = async (input, context) => {
199
- const headers = sharedHeaders("UpdateApplicationLayerAutomaticResponse");
200
- let body;
201
- body = JSON.stringify(_json(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- export const se_UpdateEmergencyContactSettingsCommand = async (input, context) => {
205
- const headers = sharedHeaders("UpdateEmergencyContactSettings");
206
- let body;
207
- body = JSON.stringify(_json(input));
208
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
209
- };
210
- export const se_UpdateProtectionGroupCommand = async (input, context) => {
211
- const headers = sharedHeaders("UpdateProtectionGroup");
212
- let body;
213
- body = JSON.stringify(_json(input));
214
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
- };
216
- export const se_UpdateSubscriptionCommand = async (input, context) => {
217
- const headers = sharedHeaders("UpdateSubscription");
218
- let body;
219
- body = JSON.stringify(_json(input));
220
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
221
- };
222
- export const de_AssociateDRTLogBucketCommand = async (output, context) => {
223
- if (output.statusCode >= 300) {
224
- return de_CommandError(output, context);
225
- }
226
- const data = await parseBody(output.body, context);
227
- let contents = {};
228
- contents = _json(data);
229
- const response = {
230
- $metadata: deserializeMetadata(output),
231
- ...contents,
232
- };
233
- return response;
234
- };
235
- export const de_AssociateDRTRoleCommand = async (output, context) => {
236
- if (output.statusCode >= 300) {
237
- return de_CommandError(output, context);
238
- }
239
- const data = await parseBody(output.body, context);
240
- let contents = {};
241
- contents = _json(data);
242
- const response = {
243
- $metadata: deserializeMetadata(output),
244
- ...contents,
245
- };
246
- return response;
247
- };
248
- export const de_AssociateHealthCheckCommand = async (output, context) => {
249
- if (output.statusCode >= 300) {
250
- return de_CommandError(output, context);
251
- }
252
- const data = await parseBody(output.body, context);
253
- let contents = {};
254
- contents = _json(data);
255
- const response = {
256
- $metadata: deserializeMetadata(output),
257
- ...contents,
258
- };
259
- return response;
260
- };
261
- export const de_AssociateProactiveEngagementDetailsCommand = async (output, context) => {
262
- if (output.statusCode >= 300) {
263
- return de_CommandError(output, context);
264
- }
265
- const data = await parseBody(output.body, context);
266
- let contents = {};
267
- contents = _json(data);
268
- const response = {
269
- $metadata: deserializeMetadata(output),
270
- ...contents,
271
- };
272
- return response;
273
- };
274
- export const de_CreateProtectionCommand = async (output, context) => {
275
- if (output.statusCode >= 300) {
276
- return de_CommandError(output, context);
277
- }
278
- const data = await parseBody(output.body, context);
279
- let contents = {};
280
- contents = _json(data);
281
- const response = {
282
- $metadata: deserializeMetadata(output),
283
- ...contents,
284
- };
285
- return response;
286
- };
287
- export const de_CreateProtectionGroupCommand = async (output, context) => {
288
- if (output.statusCode >= 300) {
289
- return de_CommandError(output, context);
290
- }
291
- const data = await parseBody(output.body, context);
292
- let contents = {};
293
- contents = _json(data);
294
- const response = {
295
- $metadata: deserializeMetadata(output),
296
- ...contents,
297
- };
298
- return response;
299
- };
300
- export const de_CreateSubscriptionCommand = async (output, context) => {
301
- if (output.statusCode >= 300) {
302
- return de_CommandError(output, context);
303
- }
304
- const data = await parseBody(output.body, context);
305
- let contents = {};
306
- contents = _json(data);
307
- const response = {
308
- $metadata: deserializeMetadata(output),
309
- ...contents,
310
- };
311
- return response;
312
- };
313
- export const de_DeleteProtectionCommand = async (output, context) => {
314
- if (output.statusCode >= 300) {
315
- return de_CommandError(output, context);
316
- }
317
- const data = await parseBody(output.body, context);
318
- let contents = {};
319
- contents = _json(data);
320
- const response = {
321
- $metadata: deserializeMetadata(output),
322
- ...contents,
323
- };
324
- return response;
325
- };
326
- export const de_DeleteProtectionGroupCommand = async (output, context) => {
327
- if (output.statusCode >= 300) {
328
- return de_CommandError(output, context);
329
- }
330
- const data = await parseBody(output.body, context);
331
- let contents = {};
332
- contents = _json(data);
333
- const response = {
334
- $metadata: deserializeMetadata(output),
335
- ...contents,
336
- };
337
- return response;
338
- };
339
- export const de_DeleteSubscriptionCommand = async (output, context) => {
340
- if (output.statusCode >= 300) {
341
- return de_CommandError(output, context);
342
- }
343
- const data = await parseBody(output.body, context);
344
- let contents = {};
345
- contents = _json(data);
346
- const response = {
347
- $metadata: deserializeMetadata(output),
348
- ...contents,
349
- };
350
- return response;
351
- };
352
- export const de_DescribeAttackCommand = async (output, context) => {
353
- if (output.statusCode >= 300) {
354
- return de_CommandError(output, context);
355
- }
356
- const data = await parseBody(output.body, context);
357
- let contents = {};
358
- contents = de_DescribeAttackResponse(data, context);
359
- const response = {
360
- $metadata: deserializeMetadata(output),
361
- ...contents,
362
- };
363
- return response;
364
- };
365
- export const de_DescribeAttackStatisticsCommand = async (output, context) => {
366
- if (output.statusCode >= 300) {
367
- return de_CommandError(output, context);
368
- }
369
- const data = await parseBody(output.body, context);
370
- let contents = {};
371
- contents = de_DescribeAttackStatisticsResponse(data, context);
372
- const response = {
373
- $metadata: deserializeMetadata(output),
374
- ...contents,
375
- };
376
- return response;
377
- };
378
- export const de_DescribeDRTAccessCommand = async (output, context) => {
379
- if (output.statusCode >= 300) {
380
- return de_CommandError(output, context);
381
- }
382
- const data = await parseBody(output.body, context);
383
- let contents = {};
384
- contents = _json(data);
385
- const response = {
386
- $metadata: deserializeMetadata(output),
387
- ...contents,
388
- };
389
- return response;
390
- };
391
- export const de_DescribeEmergencyContactSettingsCommand = async (output, context) => {
392
- if (output.statusCode >= 300) {
393
- return de_CommandError(output, context);
394
- }
395
- const data = await parseBody(output.body, context);
396
- let contents = {};
397
- contents = _json(data);
398
- const response = {
399
- $metadata: deserializeMetadata(output),
400
- ...contents,
401
- };
402
- return response;
403
- };
404
- export const de_DescribeProtectionCommand = async (output, context) => {
405
- if (output.statusCode >= 300) {
406
- return de_CommandError(output, context);
407
- }
408
- const data = await parseBody(output.body, context);
409
- let contents = {};
410
- contents = _json(data);
411
- const response = {
412
- $metadata: deserializeMetadata(output),
413
- ...contents,
414
- };
415
- return response;
416
- };
417
- export const de_DescribeProtectionGroupCommand = async (output, context) => {
418
- if (output.statusCode >= 300) {
419
- return de_CommandError(output, context);
420
- }
421
- const data = await parseBody(output.body, context);
422
- let contents = {};
423
- contents = _json(data);
424
- const response = {
425
- $metadata: deserializeMetadata(output),
426
- ...contents,
427
- };
428
- return response;
429
- };
430
- export const de_DescribeSubscriptionCommand = async (output, context) => {
431
- if (output.statusCode >= 300) {
432
- return de_CommandError(output, context);
433
- }
434
- const data = await parseBody(output.body, context);
435
- let contents = {};
436
- contents = de_DescribeSubscriptionResponse(data, context);
437
- const response = {
438
- $metadata: deserializeMetadata(output),
439
- ...contents,
440
- };
441
- return response;
442
- };
443
- export const de_DisableApplicationLayerAutomaticResponseCommand = async (output, context) => {
444
- if (output.statusCode >= 300) {
445
- return de_CommandError(output, context);
446
- }
447
- const data = await parseBody(output.body, context);
448
- let contents = {};
449
- contents = _json(data);
450
- const response = {
451
- $metadata: deserializeMetadata(output),
452
- ...contents,
453
- };
454
- return response;
455
- };
456
- export const de_DisableProactiveEngagementCommand = async (output, context) => {
457
- if (output.statusCode >= 300) {
458
- return de_CommandError(output, context);
459
- }
460
- const data = await parseBody(output.body, context);
461
- let contents = {};
462
- contents = _json(data);
463
- const response = {
464
- $metadata: deserializeMetadata(output),
465
- ...contents,
466
- };
467
- return response;
468
- };
469
- export const de_DisassociateDRTLogBucketCommand = async (output, context) => {
470
- if (output.statusCode >= 300) {
471
- return de_CommandError(output, context);
472
- }
473
- const data = await parseBody(output.body, context);
474
- let contents = {};
475
- contents = _json(data);
476
- const response = {
477
- $metadata: deserializeMetadata(output),
478
- ...contents,
479
- };
480
- return response;
481
- };
482
- export const de_DisassociateDRTRoleCommand = async (output, context) => {
483
- if (output.statusCode >= 300) {
484
- return de_CommandError(output, context);
485
- }
486
- const data = await parseBody(output.body, context);
487
- let contents = {};
488
- contents = _json(data);
489
- const response = {
490
- $metadata: deserializeMetadata(output),
491
- ...contents,
492
- };
493
- return response;
494
- };
495
- export const de_DisassociateHealthCheckCommand = async (output, context) => {
496
- if (output.statusCode >= 300) {
497
- return de_CommandError(output, context);
498
- }
499
- const data = await parseBody(output.body, context);
500
- let contents = {};
501
- contents = _json(data);
502
- const response = {
503
- $metadata: deserializeMetadata(output),
504
- ...contents,
505
- };
506
- return response;
507
- };
508
- export const de_EnableApplicationLayerAutomaticResponseCommand = async (output, context) => {
509
- if (output.statusCode >= 300) {
510
- return de_CommandError(output, context);
511
- }
512
- const data = await parseBody(output.body, context);
513
- let contents = {};
514
- contents = _json(data);
515
- const response = {
516
- $metadata: deserializeMetadata(output),
517
- ...contents,
518
- };
519
- return response;
520
- };
521
- export const de_EnableProactiveEngagementCommand = async (output, context) => {
522
- if (output.statusCode >= 300) {
523
- return de_CommandError(output, context);
524
- }
525
- const data = await parseBody(output.body, context);
526
- let contents = {};
527
- contents = _json(data);
528
- const response = {
529
- $metadata: deserializeMetadata(output),
530
- ...contents,
531
- };
532
- return response;
533
- };
534
- export const de_GetSubscriptionStateCommand = async (output, context) => {
535
- if (output.statusCode >= 300) {
536
- return de_CommandError(output, context);
537
- }
538
- const data = await parseBody(output.body, context);
539
- let contents = {};
540
- contents = _json(data);
541
- const response = {
542
- $metadata: deserializeMetadata(output),
543
- ...contents,
544
- };
545
- return response;
546
- };
547
- export const de_ListAttacksCommand = async (output, context) => {
548
- if (output.statusCode >= 300) {
549
- return de_CommandError(output, context);
550
- }
551
- const data = await parseBody(output.body, context);
552
- let contents = {};
553
- contents = de_ListAttacksResponse(data, context);
554
- const response = {
555
- $metadata: deserializeMetadata(output),
556
- ...contents,
557
- };
558
- return response;
559
- };
560
- export const de_ListProtectionGroupsCommand = async (output, context) => {
561
- if (output.statusCode >= 300) {
562
- return de_CommandError(output, context);
563
- }
564
- const data = await parseBody(output.body, context);
565
- let contents = {};
566
- contents = _json(data);
567
- const response = {
568
- $metadata: deserializeMetadata(output),
569
- ...contents,
570
- };
571
- return response;
572
- };
573
- export const de_ListProtectionsCommand = async (output, context) => {
574
- if (output.statusCode >= 300) {
575
- return de_CommandError(output, context);
576
- }
577
- const data = await parseBody(output.body, context);
578
- let contents = {};
579
- contents = _json(data);
580
- const response = {
581
- $metadata: deserializeMetadata(output),
582
- ...contents,
583
- };
584
- return response;
585
- };
586
- export const de_ListResourcesInProtectionGroupCommand = async (output, context) => {
587
- if (output.statusCode >= 300) {
588
- return de_CommandError(output, context);
589
- }
590
- const data = await parseBody(output.body, context);
591
- let contents = {};
592
- contents = _json(data);
593
- const response = {
594
- $metadata: deserializeMetadata(output),
595
- ...contents,
596
- };
597
- return response;
598
- };
599
- export const de_ListTagsForResourceCommand = async (output, context) => {
600
- if (output.statusCode >= 300) {
601
- return de_CommandError(output, context);
602
- }
603
- const data = await parseBody(output.body, context);
604
- let contents = {};
605
- contents = _json(data);
606
- const response = {
607
- $metadata: deserializeMetadata(output),
608
- ...contents,
609
- };
610
- return response;
611
- };
612
- export const de_TagResourceCommand = async (output, context) => {
613
- if (output.statusCode >= 300) {
614
- return de_CommandError(output, context);
615
- }
616
- const data = await parseBody(output.body, context);
617
- let contents = {};
618
- contents = _json(data);
619
- const response = {
620
- $metadata: deserializeMetadata(output),
621
- ...contents,
622
- };
623
- return response;
624
- };
625
- export const de_UntagResourceCommand = async (output, context) => {
626
- if (output.statusCode >= 300) {
627
- return de_CommandError(output, context);
628
- }
629
- const data = await parseBody(output.body, context);
630
- let contents = {};
631
- contents = _json(data);
632
- const response = {
633
- $metadata: deserializeMetadata(output),
634
- ...contents,
635
- };
636
- return response;
637
- };
638
- export const de_UpdateApplicationLayerAutomaticResponseCommand = async (output, context) => {
639
- if (output.statusCode >= 300) {
640
- return de_CommandError(output, context);
641
- }
642
- const data = await parseBody(output.body, context);
643
- let contents = {};
644
- contents = _json(data);
645
- const response = {
646
- $metadata: deserializeMetadata(output),
647
- ...contents,
648
- };
649
- return response;
650
- };
651
- export const de_UpdateEmergencyContactSettingsCommand = async (output, context) => {
652
- if (output.statusCode >= 300) {
653
- return de_CommandError(output, context);
654
- }
655
- const data = await parseBody(output.body, context);
656
- let contents = {};
657
- contents = _json(data);
658
- const response = {
659
- $metadata: deserializeMetadata(output),
660
- ...contents,
661
- };
662
- return response;
663
- };
664
- export const de_UpdateProtectionGroupCommand = async (output, context) => {
665
- if (output.statusCode >= 300) {
666
- return de_CommandError(output, context);
667
- }
668
- const data = await parseBody(output.body, context);
669
- let contents = {};
670
- contents = _json(data);
671
- const response = {
672
- $metadata: deserializeMetadata(output),
673
- ...contents,
674
- };
675
- return response;
676
- };
677
- export const de_UpdateSubscriptionCommand = async (output, context) => {
678
- if (output.statusCode >= 300) {
679
- return de_CommandError(output, context);
680
- }
681
- const data = await parseBody(output.body, context);
682
- let contents = {};
683
- contents = _json(data);
684
- const response = {
685
- $metadata: deserializeMetadata(output),
686
- ...contents,
687
- };
688
- return response;
689
- };
690
- const de_CommandError = async (output, context) => {
691
- const parsedOutput = {
692
- ...output,
693
- body: await parseErrorBody(output.body, context),
694
- };
695
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
696
- switch (errorCode) {
697
- case "AccessDeniedForDependencyException":
698
- case "com.amazonaws.shield#AccessDeniedForDependencyException":
699
- throw await de_AccessDeniedForDependencyExceptionRes(parsedOutput, context);
700
- case "InternalErrorException":
701
- case "com.amazonaws.shield#InternalErrorException":
702
- throw await de_InternalErrorExceptionRes(parsedOutput, context);
703
- case "InvalidOperationException":
704
- case "com.amazonaws.shield#InvalidOperationException":
705
- throw await de_InvalidOperationExceptionRes(parsedOutput, context);
706
- case "InvalidParameterException":
707
- case "com.amazonaws.shield#InvalidParameterException":
708
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
709
- case "LimitsExceededException":
710
- case "com.amazonaws.shield#LimitsExceededException":
711
- throw await de_LimitsExceededExceptionRes(parsedOutput, context);
712
- case "NoAssociatedRoleException":
713
- case "com.amazonaws.shield#NoAssociatedRoleException":
714
- throw await de_NoAssociatedRoleExceptionRes(parsedOutput, context);
715
- case "OptimisticLockException":
716
- case "com.amazonaws.shield#OptimisticLockException":
717
- throw await de_OptimisticLockExceptionRes(parsedOutput, context);
718
- case "ResourceNotFoundException":
719
- case "com.amazonaws.shield#ResourceNotFoundException":
720
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
721
- case "InvalidResourceException":
722
- case "com.amazonaws.shield#InvalidResourceException":
723
- throw await de_InvalidResourceExceptionRes(parsedOutput, context);
724
- case "ResourceAlreadyExistsException":
725
- case "com.amazonaws.shield#ResourceAlreadyExistsException":
726
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
727
- case "LockedSubscriptionException":
728
- case "com.amazonaws.shield#LockedSubscriptionException":
729
- throw await de_LockedSubscriptionExceptionRes(parsedOutput, context);
730
- case "AccessDeniedException":
731
- case "com.amazonaws.shield#AccessDeniedException":
732
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
733
- case "InvalidPaginationTokenException":
734
- case "com.amazonaws.shield#InvalidPaginationTokenException":
735
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
736
- default:
737
- const parsedBody = parsedOutput.body;
738
- return throwDefaultError({
739
- output,
740
- parsedBody,
741
- errorCode,
742
- });
743
- }
744
- };
745
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
746
- const body = parsedOutput.body;
747
- const deserialized = _json(body);
748
- const exception = new AccessDeniedException({
749
- $metadata: deserializeMetadata(parsedOutput),
750
- ...deserialized,
751
- });
752
- return __decorateServiceException(exception, body);
753
- };
754
- const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) => {
755
- const body = parsedOutput.body;
756
- const deserialized = _json(body);
757
- const exception = new AccessDeniedForDependencyException({
758
- $metadata: deserializeMetadata(parsedOutput),
759
- ...deserialized,
760
- });
761
- return __decorateServiceException(exception, body);
762
- };
763
- const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
764
- const body = parsedOutput.body;
765
- const deserialized = _json(body);
766
- const exception = new InternalErrorException({
767
- $metadata: deserializeMetadata(parsedOutput),
768
- ...deserialized,
769
- });
770
- return __decorateServiceException(exception, body);
771
- };
772
- const de_InvalidOperationExceptionRes = async (parsedOutput, context) => {
773
- const body = parsedOutput.body;
774
- const deserialized = _json(body);
775
- const exception = new InvalidOperationException({
776
- $metadata: deserializeMetadata(parsedOutput),
777
- ...deserialized,
778
- });
779
- return __decorateServiceException(exception, body);
780
- };
781
- const de_InvalidPaginationTokenExceptionRes = async (parsedOutput, context) => {
782
- const body = parsedOutput.body;
783
- const deserialized = _json(body);
784
- const exception = new InvalidPaginationTokenException({
785
- $metadata: deserializeMetadata(parsedOutput),
786
- ...deserialized,
787
- });
788
- return __decorateServiceException(exception, body);
789
- };
790
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
791
- const body = parsedOutput.body;
792
- const deserialized = _json(body);
793
- const exception = new InvalidParameterException({
794
- $metadata: deserializeMetadata(parsedOutput),
795
- ...deserialized,
796
- });
797
- return __decorateServiceException(exception, body);
798
- };
799
- const de_InvalidResourceExceptionRes = async (parsedOutput, context) => {
800
- const body = parsedOutput.body;
801
- const deserialized = _json(body);
802
- const exception = new InvalidResourceException({
803
- $metadata: deserializeMetadata(parsedOutput),
804
- ...deserialized,
805
- });
806
- return __decorateServiceException(exception, body);
807
- };
808
- const de_LimitsExceededExceptionRes = async (parsedOutput, context) => {
809
- const body = parsedOutput.body;
810
- const deserialized = _json(body);
811
- const exception = new LimitsExceededException({
812
- $metadata: deserializeMetadata(parsedOutput),
813
- ...deserialized,
814
- });
815
- return __decorateServiceException(exception, body);
816
- };
817
- const de_LockedSubscriptionExceptionRes = async (parsedOutput, context) => {
818
- const body = parsedOutput.body;
819
- const deserialized = _json(body);
820
- const exception = new LockedSubscriptionException({
821
- $metadata: deserializeMetadata(parsedOutput),
822
- ...deserialized,
823
- });
824
- return __decorateServiceException(exception, body);
825
- };
826
- const de_NoAssociatedRoleExceptionRes = async (parsedOutput, context) => {
827
- const body = parsedOutput.body;
828
- const deserialized = _json(body);
829
- const exception = new NoAssociatedRoleException({
830
- $metadata: deserializeMetadata(parsedOutput),
831
- ...deserialized,
832
- });
833
- return __decorateServiceException(exception, body);
834
- };
835
- const de_OptimisticLockExceptionRes = async (parsedOutput, context) => {
836
- const body = parsedOutput.body;
837
- const deserialized = _json(body);
838
- const exception = new OptimisticLockException({
839
- $metadata: deserializeMetadata(parsedOutput),
840
- ...deserialized,
841
- });
842
- return __decorateServiceException(exception, body);
843
- };
844
- const de_ResourceAlreadyExistsExceptionRes = async (parsedOutput, context) => {
845
- const body = parsedOutput.body;
846
- const deserialized = _json(body);
847
- const exception = new ResourceAlreadyExistsException({
848
- $metadata: deserializeMetadata(parsedOutput),
849
- ...deserialized,
850
- });
851
- return __decorateServiceException(exception, body);
852
- };
853
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
854
- const body = parsedOutput.body;
855
- const deserialized = _json(body);
856
- const exception = new ResourceNotFoundException({
857
- $metadata: deserializeMetadata(parsedOutput),
858
- ...deserialized,
859
- });
860
- return __decorateServiceException(exception, body);
861
- };
862
- const se_ListAttacksRequest = (input, context) => {
863
- return take(input, {
864
- EndTime: (_) => se_TimeRange(_, context),
865
- MaxResults: [],
866
- NextToken: [],
867
- ResourceArns: _json,
868
- StartTime: (_) => se_TimeRange(_, context),
869
- });
870
- };
871
- const se_TimeRange = (input, context) => {
872
- return take(input, {
873
- FromInclusive: (_) => _.getTime() / 1_000,
874
- ToExclusive: (_) => _.getTime() / 1_000,
875
- });
876
- };
877
- const de_AttackDetail = (output, context) => {
878
- return take(output, {
879
- AttackCounters: (_) => de_SummarizedCounterList(_, context),
880
- AttackId: __expectString,
881
- AttackProperties: _json,
882
- EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
883
- Mitigations: _json,
884
- ResourceArn: __expectString,
885
- StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
886
- SubResources: (_) => de_SubResourceSummaryList(_, context),
887
- });
888
- };
889
- const de_AttackStatisticsDataItem = (output, context) => {
890
- return take(output, {
891
- AttackCount: __expectLong,
892
- AttackVolume: (_) => de_AttackVolume(_, context),
893
- });
894
- };
895
- const de_AttackStatisticsDataList = (output, context) => {
896
- const retVal = (output || [])
897
- .filter((e) => e != null)
898
- .map((entry) => {
899
- return de_AttackStatisticsDataItem(entry, context);
900
- });
901
- return retVal;
902
- };
903
- const de_AttackSummaries = (output, context) => {
904
- const retVal = (output || [])
905
- .filter((e) => e != null)
906
- .map((entry) => {
907
- return de_AttackSummary(entry, context);
908
- });
909
- return retVal;
910
- };
911
- const de_AttackSummary = (output, context) => {
912
- return take(output, {
913
- AttackId: __expectString,
914
- AttackVectors: _json,
915
- EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
916
- ResourceArn: __expectString,
917
- StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
918
- });
919
- };
920
- const de_AttackVolume = (output, context) => {
921
- return take(output, {
922
- BitsPerSecond: (_) => de_AttackVolumeStatistics(_, context),
923
- PacketsPerSecond: (_) => de_AttackVolumeStatistics(_, context),
924
- RequestsPerSecond: (_) => de_AttackVolumeStatistics(_, context),
925
- });
926
- };
927
- const de_AttackVolumeStatistics = (output, context) => {
928
- return take(output, {
929
- Max: __limitedParseDouble,
930
- });
931
- };
932
- const de_DescribeAttackResponse = (output, context) => {
933
- return take(output, {
934
- Attack: (_) => de_AttackDetail(_, context),
935
- });
936
- };
937
- const de_DescribeAttackStatisticsResponse = (output, context) => {
938
- return take(output, {
939
- DataItems: (_) => de_AttackStatisticsDataList(_, context),
940
- TimeRange: (_) => de_TimeRange(_, context),
941
- });
942
- };
943
- const de_DescribeSubscriptionResponse = (output, context) => {
944
- return take(output, {
945
- Subscription: (_) => de_Subscription(_, context),
946
- });
947
- };
948
- const de_ListAttacksResponse = (output, context) => {
949
- return take(output, {
950
- AttackSummaries: (_) => de_AttackSummaries(_, context),
951
- NextToken: __expectString,
952
- });
953
- };
954
- const de_SubResourceSummary = (output, context) => {
955
- return take(output, {
956
- AttackVectors: (_) => de_SummarizedAttackVectorList(_, context),
957
- Counters: (_) => de_SummarizedCounterList(_, context),
958
- Id: __expectString,
959
- Type: __expectString,
960
- });
961
- };
962
- const de_SubResourceSummaryList = (output, context) => {
963
- const retVal = (output || [])
964
- .filter((e) => e != null)
965
- .map((entry) => {
966
- return de_SubResourceSummary(entry, context);
967
- });
968
- return retVal;
969
- };
970
- const de_Subscription = (output, context) => {
971
- return take(output, {
972
- AutoRenew: __expectString,
973
- EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
974
- Limits: _json,
975
- ProactiveEngagementStatus: __expectString,
976
- StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
977
- SubscriptionArn: __expectString,
978
- SubscriptionLimits: _json,
979
- TimeCommitmentInSeconds: __expectLong,
980
- });
981
- };
982
- const de_SummarizedAttackVector = (output, context) => {
983
- return take(output, {
984
- VectorCounters: (_) => de_SummarizedCounterList(_, context),
985
- VectorType: __expectString,
986
- });
987
- };
988
- const de_SummarizedAttackVectorList = (output, context) => {
989
- const retVal = (output || [])
990
- .filter((e) => e != null)
991
- .map((entry) => {
992
- return de_SummarizedAttackVector(entry, context);
993
- });
994
- return retVal;
995
- };
996
- const de_SummarizedCounter = (output, context) => {
997
- return take(output, {
998
- Average: __limitedParseDouble,
999
- Max: __limitedParseDouble,
1000
- N: __expectInt32,
1001
- Name: __expectString,
1002
- Sum: __limitedParseDouble,
1003
- Unit: __expectString,
1004
- });
1005
- };
1006
- const de_SummarizedCounterList = (output, context) => {
1007
- const retVal = (output || [])
1008
- .filter((e) => e != null)
1009
- .map((entry) => {
1010
- return de_SummarizedCounter(entry, context);
1011
- });
1012
- return retVal;
1013
- };
1014
- const de_TimeRange = (output, context) => {
1015
- return take(output, {
1016
- FromInclusive: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1017
- ToExclusive: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1018
- });
1019
- };
1020
- const deserializeMetadata = (output) => ({
1021
- httpStatusCode: output.statusCode,
1022
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1023
- extendedRequestId: output.headers["x-amz-id-2"],
1024
- cfId: output.headers["x-amz-cf-id"],
1025
- });
1026
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1027
- const throwDefaultError = withBaseException(__BaseException);
1028
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1029
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1030
- const contents = {
1031
- protocol,
1032
- hostname,
1033
- port,
1034
- method: "POST",
1035
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1036
- headers,
1037
- };
1038
- if (resolvedHostname !== undefined) {
1039
- contents.hostname = resolvedHostname;
1040
- }
1041
- if (body !== undefined) {
1042
- contents.body = body;
1043
- }
1044
- return new __HttpRequest(contents);
1045
- };
1046
- function sharedHeaders(operation) {
1047
- return {
1048
- "content-type": "application/x-amz-json-1.1",
1049
- "x-amz-target": `AWSShield_20160616.${operation}`,
1050
- };
1051
- }