@aws-sdk/client-internetmonitor 3.928.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 (37) hide show
  1. package/dist-cjs/index.js +905 -953
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/InternetMonitorClient.js +2 -0
  4. package/dist-es/commands/CreateMonitorCommand.js +3 -9
  5. package/dist-es/commands/DeleteMonitorCommand.js +3 -9
  6. package/dist-es/commands/GetHealthEventCommand.js +3 -9
  7. package/dist-es/commands/GetInternetEventCommand.js +3 -9
  8. package/dist-es/commands/GetMonitorCommand.js +3 -9
  9. package/dist-es/commands/GetQueryResultsCommand.js +3 -9
  10. package/dist-es/commands/GetQueryStatusCommand.js +3 -9
  11. package/dist-es/commands/ListHealthEventsCommand.js +3 -9
  12. package/dist-es/commands/ListInternetEventsCommand.js +3 -9
  13. package/dist-es/commands/ListMonitorsCommand.js +3 -9
  14. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  15. package/dist-es/commands/StartQueryCommand.js +3 -9
  16. package/dist-es/commands/StopQueryCommand.js +3 -9
  17. package/dist-es/commands/TagResourceCommand.js +3 -9
  18. package/dist-es/commands/UntagResourceCommand.js +3 -9
  19. package/dist-es/commands/UpdateMonitorCommand.js +3 -9
  20. package/dist-es/runtimeConfig.shared.js +2 -0
  21. package/dist-es/schemas/schemas_0.js +854 -0
  22. package/dist-types/InternetMonitorClient.d.ts +10 -1
  23. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  24. package/dist-types/runtimeConfig.d.ts +1 -0
  25. package/dist-types/runtimeConfig.native.d.ts +1 -0
  26. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  27. package/dist-types/schemas/schemas_0.d.ts +92 -0
  28. package/dist-types/ts3.4/InternetMonitorClient.d.ts +4 -0
  29. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  30. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  31. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  32. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  33. package/dist-types/ts3.4/schemas/schemas_0.d.ts +97 -0
  34. package/package.json +2 -3
  35. package/dist-es/protocols/Aws_restJson1.js +0 -818
  36. package/dist-types/protocols/Aws_restJson1.d.ts +0 -146
  37. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -197
@@ -1,818 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { InternetMonitorServiceException as __BaseException } from "../models/InternetMonitorServiceException";
6
- import { AccessDeniedException, BadRequestException, ConflictException, InternalServerErrorException, InternalServerException, LimitExceededException, NotFoundException, ResourceNotFoundException, ThrottlingException, TooManyRequestsException, ValidationException, } from "../models/models_0";
7
- export const se_CreateMonitorCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/v20210603/Monitors");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
16
- HealthEventsConfig: (_) => se_HealthEventsConfig(_, context),
17
- InternetMeasurementsLogDelivery: (_) => _json(_),
18
- MaxCityNetworksToMonitor: [],
19
- MonitorName: [],
20
- Resources: (_) => _json(_),
21
- Tags: (_) => _json(_),
22
- TrafficPercentageToMonitor: [],
23
- }));
24
- b.m("POST").h(headers).b(body);
25
- return b.build();
26
- };
27
- export const se_DeleteMonitorCommand = async (input, context) => {
28
- const b = rb(input, context);
29
- const headers = {};
30
- b.bp("/v20210603/Monitors/{MonitorName}");
31
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
32
- let body;
33
- b.m("DELETE").h(headers).b(body);
34
- return b.build();
35
- };
36
- export const se_GetHealthEventCommand = async (input, context) => {
37
- const b = rb(input, context);
38
- const headers = {};
39
- b.bp("/v20210603/Monitors/{MonitorName}/HealthEvents/{EventId}");
40
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
41
- b.p("EventId", () => input.EventId, "{EventId}", false);
42
- const query = map({
43
- [_LAI]: [, input[_LAI]],
44
- });
45
- let body;
46
- b.m("GET").h(headers).q(query).b(body);
47
- return b.build();
48
- };
49
- export const se_GetInternetEventCommand = async (input, context) => {
50
- const b = rb(input, context);
51
- const headers = {};
52
- b.bp("/v20210603/InternetEvents/{EventId}");
53
- b.p("EventId", () => input.EventId, "{EventId}", false);
54
- let body;
55
- b.m("GET").h(headers).b(body);
56
- return b.build();
57
- };
58
- export const se_GetMonitorCommand = async (input, context) => {
59
- const b = rb(input, context);
60
- const headers = {};
61
- b.bp("/v20210603/Monitors/{MonitorName}");
62
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
63
- const query = map({
64
- [_LAI]: [, input[_LAI]],
65
- });
66
- let body;
67
- b.m("GET").h(headers).q(query).b(body);
68
- return b.build();
69
- };
70
- export const se_GetQueryResultsCommand = async (input, context) => {
71
- const b = rb(input, context);
72
- const headers = {};
73
- b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Results");
74
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
75
- b.p("QueryId", () => input.QueryId, "{QueryId}", false);
76
- const query = map({
77
- [_NT]: [, input[_NT]],
78
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
79
- });
80
- let body;
81
- b.m("GET").h(headers).q(query).b(body);
82
- return b.build();
83
- };
84
- export const se_GetQueryStatusCommand = async (input, context) => {
85
- const b = rb(input, context);
86
- const headers = {};
87
- b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Status");
88
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
89
- b.p("QueryId", () => input.QueryId, "{QueryId}", false);
90
- let body;
91
- b.m("GET").h(headers).b(body);
92
- return b.build();
93
- };
94
- export const se_ListHealthEventsCommand = async (input, context) => {
95
- const b = rb(input, context);
96
- const headers = {};
97
- b.bp("/v20210603/Monitors/{MonitorName}/HealthEvents");
98
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
99
- const query = map({
100
- [_ST]: [() => input.StartTime !== void 0, () => __serializeDateTime(input[_ST]).toString()],
101
- [_ET]: [() => input.EndTime !== void 0, () => __serializeDateTime(input[_ET]).toString()],
102
- [_NT]: [, input[_NT]],
103
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
104
- [_ES]: [, input[_ES]],
105
- [_LAI]: [, input[_LAI]],
106
- });
107
- let body;
108
- b.m("GET").h(headers).q(query).b(body);
109
- return b.build();
110
- };
111
- export const se_ListInternetEventsCommand = async (input, context) => {
112
- const b = rb(input, context);
113
- const headers = {};
114
- b.bp("/v20210603/InternetEvents");
115
- const query = map({
116
- [_NT]: [, input[_NT]],
117
- [_IEMR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
118
- [_ST]: [() => input.StartTime !== void 0, () => __serializeDateTime(input[_ST]).toString()],
119
- [_ET]: [() => input.EndTime !== void 0, () => __serializeDateTime(input[_ET]).toString()],
120
- [_ES]: [, input[_ES]],
121
- [_ETv]: [, input[_ETv]],
122
- });
123
- let body;
124
- b.m("GET").h(headers).q(query).b(body);
125
- return b.build();
126
- };
127
- export const se_ListMonitorsCommand = async (input, context) => {
128
- const b = rb(input, context);
129
- const headers = {};
130
- b.bp("/v20210603/Monitors");
131
- const query = map({
132
- [_NT]: [, input[_NT]],
133
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
134
- [_MS]: [, input[_MS]],
135
- [_ILA]: [() => input.IncludeLinkedAccounts !== void 0, () => input[_ILA].toString()],
136
- });
137
- let body;
138
- b.m("GET").h(headers).q(query).b(body);
139
- return b.build();
140
- };
141
- export const se_ListTagsForResourceCommand = async (input, context) => {
142
- const b = rb(input, context);
143
- const headers = {};
144
- b.bp("/tags/{ResourceArn}");
145
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
146
- let body;
147
- b.m("GET").h(headers).b(body);
148
- return b.build();
149
- };
150
- export const se_StartQueryCommand = async (input, context) => {
151
- const b = rb(input, context);
152
- const headers = {
153
- "content-type": "application/json",
154
- };
155
- b.bp("/v20210603/Monitors/{MonitorName}/Queries");
156
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
157
- let body;
158
- body = JSON.stringify(take(input, {
159
- EndTime: (_) => __serializeDateTime(_),
160
- FilterParameters: (_) => _json(_),
161
- LinkedAccountId: [],
162
- QueryType: [],
163
- StartTime: (_) => __serializeDateTime(_),
164
- }));
165
- b.m("POST").h(headers).b(body);
166
- return b.build();
167
- };
168
- export const se_StopQueryCommand = async (input, context) => {
169
- const b = rb(input, context);
170
- const headers = {};
171
- b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}");
172
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
173
- b.p("QueryId", () => input.QueryId, "{QueryId}", false);
174
- let body;
175
- b.m("DELETE").h(headers).b(body);
176
- return b.build();
177
- };
178
- export const se_TagResourceCommand = async (input, context) => {
179
- const b = rb(input, context);
180
- const headers = {
181
- "content-type": "application/json",
182
- };
183
- b.bp("/tags/{ResourceArn}");
184
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
185
- let body;
186
- body = JSON.stringify(take(input, {
187
- Tags: (_) => _json(_),
188
- }));
189
- b.m("POST").h(headers).b(body);
190
- return b.build();
191
- };
192
- export const se_UntagResourceCommand = async (input, context) => {
193
- const b = rb(input, context);
194
- const headers = {};
195
- b.bp("/tags/{ResourceArn}");
196
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
197
- const query = map({
198
- [_tK]: [__expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
199
- });
200
- let body;
201
- b.m("DELETE").h(headers).q(query).b(body);
202
- return b.build();
203
- };
204
- export const se_UpdateMonitorCommand = async (input, context) => {
205
- const b = rb(input, context);
206
- const headers = {
207
- "content-type": "application/json",
208
- };
209
- b.bp("/v20210603/Monitors/{MonitorName}");
210
- b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
211
- let body;
212
- body = JSON.stringify(take(input, {
213
- ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
214
- HealthEventsConfig: (_) => se_HealthEventsConfig(_, context),
215
- InternetMeasurementsLogDelivery: (_) => _json(_),
216
- MaxCityNetworksToMonitor: [],
217
- ResourcesToAdd: (_) => _json(_),
218
- ResourcesToRemove: (_) => _json(_),
219
- Status: [],
220
- TrafficPercentageToMonitor: [],
221
- }));
222
- b.m("PATCH").h(headers).b(body);
223
- return b.build();
224
- };
225
- export const de_CreateMonitorCommand = async (output, context) => {
226
- if (output.statusCode !== 200 && output.statusCode >= 300) {
227
- return de_CommandError(output, context);
228
- }
229
- const contents = map({
230
- $metadata: deserializeMetadata(output),
231
- });
232
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
233
- const doc = take(data, {
234
- Arn: __expectString,
235
- Status: __expectString,
236
- });
237
- Object.assign(contents, doc);
238
- return contents;
239
- };
240
- export const de_DeleteMonitorCommand = async (output, context) => {
241
- if (output.statusCode !== 200 && output.statusCode >= 300) {
242
- return de_CommandError(output, context);
243
- }
244
- const contents = map({
245
- $metadata: deserializeMetadata(output),
246
- });
247
- await collectBody(output.body, context);
248
- return contents;
249
- };
250
- export const de_GetHealthEventCommand = async (output, context) => {
251
- if (output.statusCode !== 200 && output.statusCode >= 300) {
252
- return de_CommandError(output, context);
253
- }
254
- const contents = map({
255
- $metadata: deserializeMetadata(output),
256
- });
257
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
258
- const doc = take(data, {
259
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
260
- EndedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
261
- EventArn: __expectString,
262
- EventId: __expectString,
263
- HealthScoreThreshold: __limitedParseDouble,
264
- ImpactType: __expectString,
265
- ImpactedLocations: (_) => de_ImpactedLocationsList(_, context),
266
- LastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
267
- PercentOfTotalTrafficImpacted: __limitedParseDouble,
268
- StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
269
- Status: __expectString,
270
- });
271
- Object.assign(contents, doc);
272
- return contents;
273
- };
274
- export const de_GetInternetEventCommand = async (output, context) => {
275
- if (output.statusCode !== 200 && output.statusCode >= 300) {
276
- return de_CommandError(output, context);
277
- }
278
- const contents = map({
279
- $metadata: deserializeMetadata(output),
280
- });
281
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
282
- const doc = take(data, {
283
- ClientLocation: (_) => de_ClientLocation(_, context),
284
- EndedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
285
- EventArn: __expectString,
286
- EventId: __expectString,
287
- EventStatus: __expectString,
288
- EventType: __expectString,
289
- StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
290
- });
291
- Object.assign(contents, doc);
292
- return contents;
293
- };
294
- export const de_GetMonitorCommand = async (output, context) => {
295
- if (output.statusCode !== 200 && output.statusCode >= 300) {
296
- return de_CommandError(output, context);
297
- }
298
- const contents = map({
299
- $metadata: deserializeMetadata(output),
300
- });
301
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
302
- const doc = take(data, {
303
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
304
- HealthEventsConfig: (_) => de_HealthEventsConfig(_, context),
305
- InternetMeasurementsLogDelivery: _json,
306
- MaxCityNetworksToMonitor: __expectInt32,
307
- ModifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
308
- MonitorArn: __expectString,
309
- MonitorName: __expectString,
310
- ProcessingStatus: __expectString,
311
- ProcessingStatusInfo: __expectString,
312
- Resources: _json,
313
- Status: __expectString,
314
- Tags: _json,
315
- TrafficPercentageToMonitor: __expectInt32,
316
- });
317
- Object.assign(contents, doc);
318
- return contents;
319
- };
320
- export const de_GetQueryResultsCommand = async (output, context) => {
321
- if (output.statusCode !== 200 && output.statusCode >= 300) {
322
- return de_CommandError(output, context);
323
- }
324
- const contents = map({
325
- $metadata: deserializeMetadata(output),
326
- });
327
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
328
- const doc = take(data, {
329
- Data: _json,
330
- Fields: _json,
331
- NextToken: __expectString,
332
- });
333
- Object.assign(contents, doc);
334
- return contents;
335
- };
336
- export const de_GetQueryStatusCommand = async (output, context) => {
337
- if (output.statusCode !== 200 && output.statusCode >= 300) {
338
- return de_CommandError(output, context);
339
- }
340
- const contents = map({
341
- $metadata: deserializeMetadata(output),
342
- });
343
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
344
- const doc = take(data, {
345
- Status: __expectString,
346
- });
347
- Object.assign(contents, doc);
348
- return contents;
349
- };
350
- export const de_ListHealthEventsCommand = async (output, context) => {
351
- if (output.statusCode !== 200 && output.statusCode >= 300) {
352
- return de_CommandError(output, context);
353
- }
354
- const contents = map({
355
- $metadata: deserializeMetadata(output),
356
- });
357
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
358
- const doc = take(data, {
359
- HealthEvents: (_) => de_HealthEventList(_, context),
360
- NextToken: __expectString,
361
- });
362
- Object.assign(contents, doc);
363
- return contents;
364
- };
365
- export const de_ListInternetEventsCommand = async (output, context) => {
366
- if (output.statusCode !== 200 && output.statusCode >= 300) {
367
- return de_CommandError(output, context);
368
- }
369
- const contents = map({
370
- $metadata: deserializeMetadata(output),
371
- });
372
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
373
- const doc = take(data, {
374
- InternetEvents: (_) => de_InternetEventsList(_, context),
375
- NextToken: __expectString,
376
- });
377
- Object.assign(contents, doc);
378
- return contents;
379
- };
380
- export const de_ListMonitorsCommand = async (output, context) => {
381
- if (output.statusCode !== 200 && output.statusCode >= 300) {
382
- return de_CommandError(output, context);
383
- }
384
- const contents = map({
385
- $metadata: deserializeMetadata(output),
386
- });
387
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
388
- const doc = take(data, {
389
- Monitors: _json,
390
- NextToken: __expectString,
391
- });
392
- Object.assign(contents, doc);
393
- return contents;
394
- };
395
- export const de_ListTagsForResourceCommand = async (output, context) => {
396
- if (output.statusCode !== 200 && output.statusCode >= 300) {
397
- return de_CommandError(output, context);
398
- }
399
- const contents = map({
400
- $metadata: deserializeMetadata(output),
401
- });
402
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
403
- const doc = take(data, {
404
- Tags: _json,
405
- });
406
- Object.assign(contents, doc);
407
- return contents;
408
- };
409
- export const de_StartQueryCommand = async (output, context) => {
410
- if (output.statusCode !== 200 && output.statusCode >= 300) {
411
- return de_CommandError(output, context);
412
- }
413
- const contents = map({
414
- $metadata: deserializeMetadata(output),
415
- });
416
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
417
- const doc = take(data, {
418
- QueryId: __expectString,
419
- });
420
- Object.assign(contents, doc);
421
- return contents;
422
- };
423
- export const de_StopQueryCommand = async (output, context) => {
424
- if (output.statusCode !== 200 && output.statusCode >= 300) {
425
- return de_CommandError(output, context);
426
- }
427
- const contents = map({
428
- $metadata: deserializeMetadata(output),
429
- });
430
- await collectBody(output.body, context);
431
- return contents;
432
- };
433
- export const de_TagResourceCommand = async (output, context) => {
434
- if (output.statusCode !== 204 && output.statusCode >= 300) {
435
- return de_CommandError(output, context);
436
- }
437
- const contents = map({
438
- $metadata: deserializeMetadata(output),
439
- });
440
- await collectBody(output.body, context);
441
- return contents;
442
- };
443
- export const de_UntagResourceCommand = async (output, context) => {
444
- if (output.statusCode !== 204 && output.statusCode >= 300) {
445
- return de_CommandError(output, context);
446
- }
447
- const contents = map({
448
- $metadata: deserializeMetadata(output),
449
- });
450
- await collectBody(output.body, context);
451
- return contents;
452
- };
453
- export const de_UpdateMonitorCommand = async (output, context) => {
454
- if (output.statusCode !== 200 && output.statusCode >= 300) {
455
- return de_CommandError(output, context);
456
- }
457
- const contents = map({
458
- $metadata: deserializeMetadata(output),
459
- });
460
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
461
- const doc = take(data, {
462
- MonitorArn: __expectString,
463
- Status: __expectString,
464
- });
465
- Object.assign(contents, doc);
466
- return contents;
467
- };
468
- const de_CommandError = async (output, context) => {
469
- const parsedOutput = {
470
- ...output,
471
- body: await parseErrorBody(output.body, context),
472
- };
473
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
474
- switch (errorCode) {
475
- case "AccessDeniedException":
476
- case "com.amazonaws.internetmonitor#AccessDeniedException":
477
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
478
- case "ConflictException":
479
- case "com.amazonaws.internetmonitor#ConflictException":
480
- throw await de_ConflictExceptionRes(parsedOutput, context);
481
- case "InternalServerException":
482
- case "com.amazonaws.internetmonitor#InternalServerException":
483
- throw await de_InternalServerExceptionRes(parsedOutput, context);
484
- case "LimitExceededException":
485
- case "com.amazonaws.internetmonitor#LimitExceededException":
486
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
487
- case "ThrottlingException":
488
- case "com.amazonaws.internetmonitor#ThrottlingException":
489
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
490
- case "ValidationException":
491
- case "com.amazonaws.internetmonitor#ValidationException":
492
- throw await de_ValidationExceptionRes(parsedOutput, context);
493
- case "BadRequestException":
494
- case "com.amazonaws.internetmonitor#BadRequestException":
495
- throw await de_BadRequestExceptionRes(parsedOutput, context);
496
- case "InternalServerErrorException":
497
- case "com.amazonaws.internetmonitor#InternalServerErrorException":
498
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
499
- case "NotFoundException":
500
- case "com.amazonaws.internetmonitor#NotFoundException":
501
- throw await de_NotFoundExceptionRes(parsedOutput, context);
502
- case "TooManyRequestsException":
503
- case "com.amazonaws.internetmonitor#TooManyRequestsException":
504
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
505
- case "ResourceNotFoundException":
506
- case "com.amazonaws.internetmonitor#ResourceNotFoundException":
507
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
508
- default:
509
- const parsedBody = parsedOutput.body;
510
- return throwDefaultError({
511
- output,
512
- parsedBody,
513
- errorCode,
514
- });
515
- }
516
- };
517
- const throwDefaultError = withBaseException(__BaseException);
518
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
519
- const contents = map({});
520
- const data = parsedOutput.body;
521
- const doc = take(data, {
522
- message: __expectString,
523
- });
524
- Object.assign(contents, doc);
525
- const exception = new AccessDeniedException({
526
- $metadata: deserializeMetadata(parsedOutput),
527
- ...contents,
528
- });
529
- return __decorateServiceException(exception, parsedOutput.body);
530
- };
531
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
532
- const contents = map({});
533
- const data = parsedOutput.body;
534
- const doc = take(data, {
535
- message: __expectString,
536
- });
537
- Object.assign(contents, doc);
538
- const exception = new BadRequestException({
539
- $metadata: deserializeMetadata(parsedOutput),
540
- ...contents,
541
- });
542
- return __decorateServiceException(exception, parsedOutput.body);
543
- };
544
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
545
- const contents = map({});
546
- const data = parsedOutput.body;
547
- const doc = take(data, {
548
- message: __expectString,
549
- });
550
- Object.assign(contents, doc);
551
- const exception = new ConflictException({
552
- $metadata: deserializeMetadata(parsedOutput),
553
- ...contents,
554
- });
555
- return __decorateServiceException(exception, parsedOutput.body);
556
- };
557
- const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
558
- const contents = map({});
559
- const data = parsedOutput.body;
560
- const doc = take(data, {
561
- message: __expectString,
562
- });
563
- Object.assign(contents, doc);
564
- const exception = new InternalServerErrorException({
565
- $metadata: deserializeMetadata(parsedOutput),
566
- ...contents,
567
- });
568
- return __decorateServiceException(exception, parsedOutput.body);
569
- };
570
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
571
- const contents = map({});
572
- const data = parsedOutput.body;
573
- const doc = take(data, {
574
- message: __expectString,
575
- });
576
- Object.assign(contents, doc);
577
- const exception = new InternalServerException({
578
- $metadata: deserializeMetadata(parsedOutput),
579
- ...contents,
580
- });
581
- return __decorateServiceException(exception, parsedOutput.body);
582
- };
583
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
584
- const contents = map({});
585
- const data = parsedOutput.body;
586
- const doc = take(data, {
587
- message: __expectString,
588
- });
589
- Object.assign(contents, doc);
590
- const exception = new LimitExceededException({
591
- $metadata: deserializeMetadata(parsedOutput),
592
- ...contents,
593
- });
594
- return __decorateServiceException(exception, parsedOutput.body);
595
- };
596
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
597
- const contents = map({});
598
- const data = parsedOutput.body;
599
- const doc = take(data, {
600
- message: __expectString,
601
- });
602
- Object.assign(contents, doc);
603
- const exception = new NotFoundException({
604
- $metadata: deserializeMetadata(parsedOutput),
605
- ...contents,
606
- });
607
- return __decorateServiceException(exception, parsedOutput.body);
608
- };
609
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
610
- const contents = map({});
611
- const data = parsedOutput.body;
612
- const doc = take(data, {
613
- message: __expectString,
614
- });
615
- Object.assign(contents, doc);
616
- const exception = new ResourceNotFoundException({
617
- $metadata: deserializeMetadata(parsedOutput),
618
- ...contents,
619
- });
620
- return __decorateServiceException(exception, parsedOutput.body);
621
- };
622
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
623
- const contents = map({});
624
- const data = parsedOutput.body;
625
- const doc = take(data, {
626
- message: __expectString,
627
- });
628
- Object.assign(contents, doc);
629
- const exception = new ThrottlingException({
630
- $metadata: deserializeMetadata(parsedOutput),
631
- ...contents,
632
- });
633
- return __decorateServiceException(exception, parsedOutput.body);
634
- };
635
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
636
- const contents = map({});
637
- const data = parsedOutput.body;
638
- const doc = take(data, {
639
- message: __expectString,
640
- });
641
- Object.assign(contents, doc);
642
- const exception = new TooManyRequestsException({
643
- $metadata: deserializeMetadata(parsedOutput),
644
- ...contents,
645
- });
646
- return __decorateServiceException(exception, parsedOutput.body);
647
- };
648
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
649
- const contents = map({});
650
- const data = parsedOutput.body;
651
- const doc = take(data, {
652
- message: __expectString,
653
- });
654
- Object.assign(contents, doc);
655
- const exception = new ValidationException({
656
- $metadata: deserializeMetadata(parsedOutput),
657
- ...contents,
658
- });
659
- return __decorateServiceException(exception, parsedOutput.body);
660
- };
661
- const se_HealthEventsConfig = (input, context) => {
662
- return take(input, {
663
- AvailabilityLocalHealthEventsConfig: (_) => se_LocalHealthEventsConfig(_, context),
664
- AvailabilityScoreThreshold: __serializeFloat,
665
- PerformanceLocalHealthEventsConfig: (_) => se_LocalHealthEventsConfig(_, context),
666
- PerformanceScoreThreshold: __serializeFloat,
667
- });
668
- };
669
- const se_LocalHealthEventsConfig = (input, context) => {
670
- return take(input, {
671
- HealthScoreThreshold: __serializeFloat,
672
- MinTrafficImpact: __serializeFloat,
673
- Status: [],
674
- });
675
- };
676
- const de_AvailabilityMeasurement = (output, context) => {
677
- return take(output, {
678
- ExperienceScore: __limitedParseDouble,
679
- PercentOfClientLocationImpacted: __limitedParseDouble,
680
- PercentOfTotalTrafficImpacted: __limitedParseDouble,
681
- });
682
- };
683
- const de_ClientLocation = (output, context) => {
684
- return take(output, {
685
- ASName: __expectString,
686
- ASNumber: __expectLong,
687
- City: __expectString,
688
- Country: __expectString,
689
- Latitude: __limitedParseDouble,
690
- Longitude: __limitedParseDouble,
691
- Metro: __expectString,
692
- Subdivision: __expectString,
693
- });
694
- };
695
- const de_HealthEvent = (output, context) => {
696
- return take(output, {
697
- CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
698
- EndedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
699
- EventArn: __expectString,
700
- EventId: __expectString,
701
- HealthScoreThreshold: __limitedParseDouble,
702
- ImpactType: __expectString,
703
- ImpactedLocations: (_) => de_ImpactedLocationsList(_, context),
704
- LastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
705
- PercentOfTotalTrafficImpacted: __limitedParseDouble,
706
- StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
707
- Status: __expectString,
708
- });
709
- };
710
- const de_HealthEventList = (output, context) => {
711
- const retVal = (output || [])
712
- .filter((e) => e != null)
713
- .map((entry) => {
714
- return de_HealthEvent(entry, context);
715
- });
716
- return retVal;
717
- };
718
- const de_HealthEventsConfig = (output, context) => {
719
- return take(output, {
720
- AvailabilityLocalHealthEventsConfig: (_) => de_LocalHealthEventsConfig(_, context),
721
- AvailabilityScoreThreshold: __limitedParseDouble,
722
- PerformanceLocalHealthEventsConfig: (_) => de_LocalHealthEventsConfig(_, context),
723
- PerformanceScoreThreshold: __limitedParseDouble,
724
- });
725
- };
726
- const de_ImpactedLocation = (output, context) => {
727
- return take(output, {
728
- ASName: __expectString,
729
- ASNumber: __expectLong,
730
- CausedBy: _json,
731
- City: __expectString,
732
- Country: __expectString,
733
- CountryCode: __expectString,
734
- InternetHealth: (_) => de_InternetHealth(_, context),
735
- Ipv4Prefixes: _json,
736
- Latitude: __limitedParseDouble,
737
- Longitude: __limitedParseDouble,
738
- Metro: __expectString,
739
- ServiceLocation: __expectString,
740
- Status: __expectString,
741
- Subdivision: __expectString,
742
- SubdivisionCode: __expectString,
743
- });
744
- };
745
- const de_ImpactedLocationsList = (output, context) => {
746
- const retVal = (output || [])
747
- .filter((e) => e != null)
748
- .map((entry) => {
749
- return de_ImpactedLocation(entry, context);
750
- });
751
- return retVal;
752
- };
753
- const de_InternetEventsList = (output, context) => {
754
- const retVal = (output || [])
755
- .filter((e) => e != null)
756
- .map((entry) => {
757
- return de_InternetEventSummary(entry, context);
758
- });
759
- return retVal;
760
- };
761
- const de_InternetEventSummary = (output, context) => {
762
- return take(output, {
763
- ClientLocation: (_) => de_ClientLocation(_, context),
764
- EndedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
765
- EventArn: __expectString,
766
- EventId: __expectString,
767
- EventStatus: __expectString,
768
- EventType: __expectString,
769
- StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
770
- });
771
- };
772
- const de_InternetHealth = (output, context) => {
773
- return take(output, {
774
- Availability: (_) => de_AvailabilityMeasurement(_, context),
775
- Performance: (_) => de_PerformanceMeasurement(_, context),
776
- });
777
- };
778
- const de_LocalHealthEventsConfig = (output, context) => {
779
- return take(output, {
780
- HealthScoreThreshold: __limitedParseDouble,
781
- MinTrafficImpact: __limitedParseDouble,
782
- Status: __expectString,
783
- });
784
- };
785
- const de_PerformanceMeasurement = (output, context) => {
786
- return take(output, {
787
- ExperienceScore: __limitedParseDouble,
788
- PercentOfClientLocationImpacted: __limitedParseDouble,
789
- PercentOfTotalTrafficImpacted: __limitedParseDouble,
790
- RoundTripTime: (_) => de_RoundTripTime(_, context),
791
- });
792
- };
793
- const de_RoundTripTime = (output, context) => {
794
- return take(output, {
795
- P50: __limitedParseDouble,
796
- P90: __limitedParseDouble,
797
- P95: __limitedParseDouble,
798
- });
799
- };
800
- const deserializeMetadata = (output) => ({
801
- httpStatusCode: output.statusCode,
802
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
803
- extendedRequestId: output.headers["x-amz-id-2"],
804
- cfId: output.headers["x-amz-cf-id"],
805
- });
806
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
807
- const _ES = "EventStatus";
808
- const _ET = "EndTime";
809
- const _ETv = "EventType";
810
- const _IEMR = "InternetEventMaxResults";
811
- const _ILA = "IncludeLinkedAccounts";
812
- const _LAI = "LinkedAccountId";
813
- const _MR = "MaxResults";
814
- const _MS = "MonitorStatus";
815
- const _NT = "NextToken";
816
- const _ST = "StartTime";
817
- const _TK = "TagKeys";
818
- const _tK = "tagKeys";