@aws-sdk/client-rum 3.928.0 → 3.930.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist-cjs/index.js +987 -992
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/RUMClient.js +2 -0
  4. package/dist-es/commands/BatchCreateRumMetricDefinitionsCommand.js +3 -9
  5. package/dist-es/commands/BatchDeleteRumMetricDefinitionsCommand.js +3 -9
  6. package/dist-es/commands/BatchGetRumMetricDefinitionsCommand.js +3 -9
  7. package/dist-es/commands/CreateAppMonitorCommand.js +3 -9
  8. package/dist-es/commands/DeleteAppMonitorCommand.js +3 -9
  9. package/dist-es/commands/DeleteResourcePolicyCommand.js +3 -9
  10. package/dist-es/commands/DeleteRumMetricsDestinationCommand.js +3 -9
  11. package/dist-es/commands/GetAppMonitorCommand.js +3 -9
  12. package/dist-es/commands/GetAppMonitorDataCommand.js +3 -9
  13. package/dist-es/commands/GetResourcePolicyCommand.js +3 -9
  14. package/dist-es/commands/ListAppMonitorsCommand.js +3 -9
  15. package/dist-es/commands/ListRumMetricsDestinationsCommand.js +3 -9
  16. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  17. package/dist-es/commands/PutResourcePolicyCommand.js +3 -9
  18. package/dist-es/commands/PutRumEventsCommand.js +3 -9
  19. package/dist-es/commands/PutRumMetricsDestinationCommand.js +3 -9
  20. package/dist-es/commands/TagResourceCommand.js +3 -9
  21. package/dist-es/commands/UntagResourceCommand.js +3 -9
  22. package/dist-es/commands/UpdateAppMonitorCommand.js +3 -9
  23. package/dist-es/commands/UpdateRumMetricDefinitionCommand.js +3 -9
  24. package/dist-es/runtimeConfig.shared.js +2 -0
  25. package/dist-es/schemas/schemas_0.js +935 -0
  26. package/dist-types/RUMClient.d.ts +10 -1
  27. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  28. package/dist-types/runtimeConfig.d.ts +1 -0
  29. package/dist-types/runtimeConfig.native.d.ts +1 -0
  30. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  31. package/dist-types/schemas/schemas_0.d.ts +110 -0
  32. package/dist-types/ts3.4/RUMClient.d.ts +4 -0
  33. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  34. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  35. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  36. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  37. package/dist-types/ts3.4/schemas/schemas_0.d.ts +116 -0
  38. package/package.json +33 -33
  39. package/dist-es/protocols/Aws_restJson1.js +0 -834
  40. package/dist-types/protocols/Aws_restJson1.d.ts +0 -182
  41. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -245
@@ -1,834 +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 { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
4
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, map, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
5
- import { AccessDeniedException, ConflictException, InternalServerException, InvalidPolicyRevisionIdException, MalformedPolicyDocumentException, PolicyNotFoundException, PolicySizeLimitExceededException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- import { RUMServiceException as __BaseException } from "../models/RUMServiceException";
7
- export const se_BatchCreateRumMetricDefinitionsCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/rummetrics/{AppMonitorName}/metrics");
13
- b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
14
- let body;
15
- body = JSON.stringify(take(input, {
16
- Destination: [],
17
- DestinationArn: [],
18
- MetricDefinitions: (_) => _json(_),
19
- }));
20
- b.m("POST").h(headers).b(body);
21
- return b.build();
22
- };
23
- export const se_BatchDeleteRumMetricDefinitionsCommand = async (input, context) => {
24
- const b = rb(input, context);
25
- const headers = {};
26
- b.bp("/rummetrics/{AppMonitorName}/metrics");
27
- b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
28
- const query = map({
29
- [_d]: [, __expectNonNull(input[_D], `Destination`)],
30
- [_dA]: [, input[_DA]],
31
- [_mDI]: [__expectNonNull(input.MetricDefinitionIds, `MetricDefinitionIds`) != null, () => input[_MDI] || []],
32
- });
33
- let body;
34
- b.m("DELETE").h(headers).q(query).b(body);
35
- return b.build();
36
- };
37
- export const se_BatchGetRumMetricDefinitionsCommand = async (input, context) => {
38
- const b = rb(input, context);
39
- const headers = {};
40
- b.bp("/rummetrics/{AppMonitorName}/metrics");
41
- b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
42
- const query = map({
43
- [_d]: [, __expectNonNull(input[_D], `Destination`)],
44
- [_dA]: [, input[_DA]],
45
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
46
- [_nT]: [, input[_NT]],
47
- });
48
- let body;
49
- b.m("GET").h(headers).q(query).b(body);
50
- return b.build();
51
- };
52
- export const se_CreateAppMonitorCommand = async (input, context) => {
53
- const b = rb(input, context);
54
- const headers = {
55
- "content-type": "application/json",
56
- };
57
- b.bp("/appmonitor");
58
- let body;
59
- body = JSON.stringify(take(input, {
60
- AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context),
61
- CustomEvents: (_) => _json(_),
62
- CwLogEnabled: [],
63
- DeobfuscationConfiguration: (_) => _json(_),
64
- Domain: [],
65
- DomainList: (_) => _json(_),
66
- Name: [],
67
- Tags: (_) => _json(_),
68
- }));
69
- b.m("POST").h(headers).b(body);
70
- return b.build();
71
- };
72
- export const se_DeleteAppMonitorCommand = async (input, context) => {
73
- const b = rb(input, context);
74
- const headers = {};
75
- b.bp("/appmonitor/{Name}");
76
- b.p("Name", () => input.Name, "{Name}", false);
77
- let body;
78
- b.m("DELETE").h(headers).b(body);
79
- return b.build();
80
- };
81
- export const se_DeleteResourcePolicyCommand = async (input, context) => {
82
- const b = rb(input, context);
83
- const headers = {};
84
- b.bp("/appmonitor/{Name}/policy");
85
- b.p("Name", () => input.Name, "{Name}", false);
86
- const query = map({
87
- [_pRI]: [, input[_PRI]],
88
- });
89
- let body;
90
- b.m("DELETE").h(headers).q(query).b(body);
91
- return b.build();
92
- };
93
- export const se_DeleteRumMetricsDestinationCommand = async (input, context) => {
94
- const b = rb(input, context);
95
- const headers = {};
96
- b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
97
- b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
98
- const query = map({
99
- [_d]: [, __expectNonNull(input[_D], `Destination`)],
100
- [_dA]: [, input[_DA]],
101
- });
102
- let body;
103
- b.m("DELETE").h(headers).q(query).b(body);
104
- return b.build();
105
- };
106
- export const se_GetAppMonitorCommand = async (input, context) => {
107
- const b = rb(input, context);
108
- const headers = {};
109
- b.bp("/appmonitor/{Name}");
110
- b.p("Name", () => input.Name, "{Name}", false);
111
- let body;
112
- b.m("GET").h(headers).b(body);
113
- return b.build();
114
- };
115
- export const se_GetAppMonitorDataCommand = async (input, context) => {
116
- const b = rb(input, context);
117
- const headers = {
118
- "content-type": "application/json",
119
- };
120
- b.bp("/appmonitor/{Name}/data");
121
- b.p("Name", () => input.Name, "{Name}", false);
122
- let body;
123
- body = JSON.stringify(take(input, {
124
- Filters: (_) => _json(_),
125
- MaxResults: [],
126
- NextToken: [],
127
- TimeRange: (_) => _json(_),
128
- }));
129
- b.m("POST").h(headers).b(body);
130
- return b.build();
131
- };
132
- export const se_GetResourcePolicyCommand = async (input, context) => {
133
- const b = rb(input, context);
134
- const headers = {};
135
- b.bp("/appmonitor/{Name}/policy");
136
- b.p("Name", () => input.Name, "{Name}", false);
137
- let body;
138
- b.m("GET").h(headers).b(body);
139
- return b.build();
140
- };
141
- export const se_ListAppMonitorsCommand = async (input, context) => {
142
- const b = rb(input, context);
143
- const headers = {};
144
- b.bp("/appmonitors");
145
- const query = map({
146
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
147
- [_nT]: [, input[_NT]],
148
- });
149
- let body;
150
- b.m("POST").h(headers).q(query).b(body);
151
- return b.build();
152
- };
153
- export const se_ListRumMetricsDestinationsCommand = async (input, context) => {
154
- const b = rb(input, context);
155
- const headers = {};
156
- b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
157
- b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
158
- const query = map({
159
- [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
160
- [_nT]: [, input[_NT]],
161
- });
162
- let body;
163
- b.m("GET").h(headers).q(query).b(body);
164
- return b.build();
165
- };
166
- export const se_ListTagsForResourceCommand = async (input, context) => {
167
- const b = rb(input, context);
168
- const headers = {};
169
- b.bp("/tags/{ResourceArn}");
170
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
171
- let body;
172
- b.m("GET").h(headers).b(body);
173
- return b.build();
174
- };
175
- export const se_PutResourcePolicyCommand = async (input, context) => {
176
- const b = rb(input, context);
177
- const headers = {
178
- "content-type": "application/json",
179
- };
180
- b.bp("/appmonitor/{Name}/policy");
181
- b.p("Name", () => input.Name, "{Name}", false);
182
- let body;
183
- body = JSON.stringify(take(input, {
184
- PolicyDocument: [],
185
- PolicyRevisionId: [],
186
- }));
187
- b.m("PUT").h(headers).b(body);
188
- return b.build();
189
- };
190
- export const se_PutRumEventsCommand = async (input, context) => {
191
- const b = rb(input, context);
192
- const headers = {
193
- "content-type": "application/json",
194
- };
195
- b.bp("/appmonitors/{Id}");
196
- b.p("Id", () => input.Id, "{Id}", false);
197
- let body;
198
- body = JSON.stringify(take(input, {
199
- Alias: [],
200
- AppMonitorDetails: (_) => _json(_),
201
- BatchId: [],
202
- RumEvents: (_) => se_RumEventList(_, context),
203
- UserDetails: (_) => _json(_),
204
- }));
205
- let { hostname: resolvedHostname } = await context.endpoint();
206
- if (context.disableHostPrefix !== true) {
207
- resolvedHostname = "dataplane." + resolvedHostname;
208
- if (!__isValidHostname(resolvedHostname)) {
209
- throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
210
- }
211
- }
212
- b.hn(resolvedHostname);
213
- b.m("POST").h(headers).b(body);
214
- return b.build();
215
- };
216
- export const se_PutRumMetricsDestinationCommand = async (input, context) => {
217
- const b = rb(input, context);
218
- const headers = {
219
- "content-type": "application/json",
220
- };
221
- b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
222
- b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
223
- let body;
224
- body = JSON.stringify(take(input, {
225
- Destination: [],
226
- DestinationArn: [],
227
- IamRoleArn: [],
228
- }));
229
- b.m("POST").h(headers).b(body);
230
- return b.build();
231
- };
232
- export const se_TagResourceCommand = async (input, context) => {
233
- const b = rb(input, context);
234
- const headers = {
235
- "content-type": "application/json",
236
- };
237
- b.bp("/tags/{ResourceArn}");
238
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
239
- let body;
240
- body = JSON.stringify(take(input, {
241
- Tags: (_) => _json(_),
242
- }));
243
- b.m("POST").h(headers).b(body);
244
- return b.build();
245
- };
246
- export const se_UntagResourceCommand = async (input, context) => {
247
- const b = rb(input, context);
248
- const headers = {};
249
- b.bp("/tags/{ResourceArn}");
250
- b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
251
- const query = map({
252
- [_tK]: [__expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
253
- });
254
- let body;
255
- b.m("DELETE").h(headers).q(query).b(body);
256
- return b.build();
257
- };
258
- export const se_UpdateAppMonitorCommand = async (input, context) => {
259
- const b = rb(input, context);
260
- const headers = {
261
- "content-type": "application/json",
262
- };
263
- b.bp("/appmonitor/{Name}");
264
- b.p("Name", () => input.Name, "{Name}", false);
265
- let body;
266
- body = JSON.stringify(take(input, {
267
- AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context),
268
- CustomEvents: (_) => _json(_),
269
- CwLogEnabled: [],
270
- DeobfuscationConfiguration: (_) => _json(_),
271
- Domain: [],
272
- DomainList: (_) => _json(_),
273
- }));
274
- b.m("PATCH").h(headers).b(body);
275
- return b.build();
276
- };
277
- export const se_UpdateRumMetricDefinitionCommand = async (input, context) => {
278
- const b = rb(input, context);
279
- const headers = {
280
- "content-type": "application/json",
281
- };
282
- b.bp("/rummetrics/{AppMonitorName}/metrics");
283
- b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
284
- let body;
285
- body = JSON.stringify(take(input, {
286
- Destination: [],
287
- DestinationArn: [],
288
- MetricDefinition: (_) => _json(_),
289
- MetricDefinitionId: [],
290
- }));
291
- b.m("PATCH").h(headers).b(body);
292
- return b.build();
293
- };
294
- export const de_BatchCreateRumMetricDefinitionsCommand = 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
- Errors: _json,
304
- MetricDefinitions: _json,
305
- });
306
- Object.assign(contents, doc);
307
- return contents;
308
- };
309
- export const de_BatchDeleteRumMetricDefinitionsCommand = async (output, context) => {
310
- if (output.statusCode !== 200 && output.statusCode >= 300) {
311
- return de_CommandError(output, context);
312
- }
313
- const contents = map({
314
- $metadata: deserializeMetadata(output),
315
- });
316
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
317
- const doc = take(data, {
318
- Errors: _json,
319
- MetricDefinitionIds: _json,
320
- });
321
- Object.assign(contents, doc);
322
- return contents;
323
- };
324
- export const de_BatchGetRumMetricDefinitionsCommand = async (output, context) => {
325
- if (output.statusCode !== 200 && output.statusCode >= 300) {
326
- return de_CommandError(output, context);
327
- }
328
- const contents = map({
329
- $metadata: deserializeMetadata(output),
330
- });
331
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
332
- const doc = take(data, {
333
- MetricDefinitions: _json,
334
- NextToken: __expectString,
335
- });
336
- Object.assign(contents, doc);
337
- return contents;
338
- };
339
- export const de_CreateAppMonitorCommand = async (output, context) => {
340
- if (output.statusCode !== 200 && output.statusCode >= 300) {
341
- return de_CommandError(output, context);
342
- }
343
- const contents = map({
344
- $metadata: deserializeMetadata(output),
345
- });
346
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
347
- const doc = take(data, {
348
- Id: __expectString,
349
- });
350
- Object.assign(contents, doc);
351
- return contents;
352
- };
353
- export const de_DeleteAppMonitorCommand = async (output, context) => {
354
- if (output.statusCode !== 200 && output.statusCode >= 300) {
355
- return de_CommandError(output, context);
356
- }
357
- const contents = map({
358
- $metadata: deserializeMetadata(output),
359
- });
360
- await collectBody(output.body, context);
361
- return contents;
362
- };
363
- export const de_DeleteResourcePolicyCommand = async (output, context) => {
364
- if (output.statusCode !== 200 && output.statusCode >= 300) {
365
- return de_CommandError(output, context);
366
- }
367
- const contents = map({
368
- $metadata: deserializeMetadata(output),
369
- });
370
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
371
- const doc = take(data, {
372
- PolicyRevisionId: __expectString,
373
- });
374
- Object.assign(contents, doc);
375
- return contents;
376
- };
377
- export const de_DeleteRumMetricsDestinationCommand = async (output, context) => {
378
- if (output.statusCode !== 200 && output.statusCode >= 300) {
379
- return de_CommandError(output, context);
380
- }
381
- const contents = map({
382
- $metadata: deserializeMetadata(output),
383
- });
384
- await collectBody(output.body, context);
385
- return contents;
386
- };
387
- export const de_GetAppMonitorCommand = async (output, context) => {
388
- if (output.statusCode !== 200 && output.statusCode >= 300) {
389
- return de_CommandError(output, context);
390
- }
391
- const contents = map({
392
- $metadata: deserializeMetadata(output),
393
- });
394
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
395
- const doc = take(data, {
396
- AppMonitor: (_) => de_AppMonitor(_, context),
397
- });
398
- Object.assign(contents, doc);
399
- return contents;
400
- };
401
- export const de_GetAppMonitorDataCommand = async (output, context) => {
402
- if (output.statusCode !== 200 && output.statusCode >= 300) {
403
- return de_CommandError(output, context);
404
- }
405
- const contents = map({
406
- $metadata: deserializeMetadata(output),
407
- });
408
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
409
- const doc = take(data, {
410
- Events: _json,
411
- NextToken: __expectString,
412
- });
413
- Object.assign(contents, doc);
414
- return contents;
415
- };
416
- export const de_GetResourcePolicyCommand = async (output, context) => {
417
- if (output.statusCode !== 200 && output.statusCode >= 300) {
418
- return de_CommandError(output, context);
419
- }
420
- const contents = map({
421
- $metadata: deserializeMetadata(output),
422
- });
423
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
424
- const doc = take(data, {
425
- PolicyDocument: __expectString,
426
- PolicyRevisionId: __expectString,
427
- });
428
- Object.assign(contents, doc);
429
- return contents;
430
- };
431
- export const de_ListAppMonitorsCommand = async (output, context) => {
432
- if (output.statusCode !== 200 && output.statusCode >= 300) {
433
- return de_CommandError(output, context);
434
- }
435
- const contents = map({
436
- $metadata: deserializeMetadata(output),
437
- });
438
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
439
- const doc = take(data, {
440
- AppMonitorSummaries: _json,
441
- NextToken: __expectString,
442
- });
443
- Object.assign(contents, doc);
444
- return contents;
445
- };
446
- export const de_ListRumMetricsDestinationsCommand = async (output, context) => {
447
- if (output.statusCode !== 200 && output.statusCode >= 300) {
448
- return de_CommandError(output, context);
449
- }
450
- const contents = map({
451
- $metadata: deserializeMetadata(output),
452
- });
453
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
454
- const doc = take(data, {
455
- Destinations: _json,
456
- NextToken: __expectString,
457
- });
458
- Object.assign(contents, doc);
459
- return contents;
460
- };
461
- export const de_ListTagsForResourceCommand = async (output, context) => {
462
- if (output.statusCode !== 200 && output.statusCode >= 300) {
463
- return de_CommandError(output, context);
464
- }
465
- const contents = map({
466
- $metadata: deserializeMetadata(output),
467
- });
468
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
469
- const doc = take(data, {
470
- ResourceArn: __expectString,
471
- Tags: _json,
472
- });
473
- Object.assign(contents, doc);
474
- return contents;
475
- };
476
- export const de_PutResourcePolicyCommand = async (output, context) => {
477
- if (output.statusCode !== 200 && output.statusCode >= 300) {
478
- return de_CommandError(output, context);
479
- }
480
- const contents = map({
481
- $metadata: deserializeMetadata(output),
482
- });
483
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
484
- const doc = take(data, {
485
- PolicyDocument: __expectString,
486
- PolicyRevisionId: __expectString,
487
- });
488
- Object.assign(contents, doc);
489
- return contents;
490
- };
491
- export const de_PutRumEventsCommand = async (output, context) => {
492
- if (output.statusCode !== 200 && output.statusCode >= 300) {
493
- return de_CommandError(output, context);
494
- }
495
- const contents = map({
496
- $metadata: deserializeMetadata(output),
497
- });
498
- await collectBody(output.body, context);
499
- return contents;
500
- };
501
- export const de_PutRumMetricsDestinationCommand = async (output, context) => {
502
- if (output.statusCode !== 200 && output.statusCode >= 300) {
503
- return de_CommandError(output, context);
504
- }
505
- const contents = map({
506
- $metadata: deserializeMetadata(output),
507
- });
508
- await collectBody(output.body, context);
509
- return contents;
510
- };
511
- export const de_TagResourceCommand = async (output, context) => {
512
- if (output.statusCode !== 200 && output.statusCode >= 300) {
513
- return de_CommandError(output, context);
514
- }
515
- const contents = map({
516
- $metadata: deserializeMetadata(output),
517
- });
518
- await collectBody(output.body, context);
519
- return contents;
520
- };
521
- export const de_UntagResourceCommand = async (output, context) => {
522
- if (output.statusCode !== 200 && output.statusCode >= 300) {
523
- return de_CommandError(output, context);
524
- }
525
- const contents = map({
526
- $metadata: deserializeMetadata(output),
527
- });
528
- await collectBody(output.body, context);
529
- return contents;
530
- };
531
- export const de_UpdateAppMonitorCommand = async (output, context) => {
532
- if (output.statusCode !== 200 && output.statusCode >= 300) {
533
- return de_CommandError(output, context);
534
- }
535
- const contents = map({
536
- $metadata: deserializeMetadata(output),
537
- });
538
- await collectBody(output.body, context);
539
- return contents;
540
- };
541
- export const de_UpdateRumMetricDefinitionCommand = async (output, context) => {
542
- if (output.statusCode !== 200 && output.statusCode >= 300) {
543
- return de_CommandError(output, context);
544
- }
545
- const contents = map({
546
- $metadata: deserializeMetadata(output),
547
- });
548
- await collectBody(output.body, context);
549
- return contents;
550
- };
551
- const de_CommandError = async (output, context) => {
552
- const parsedOutput = {
553
- ...output,
554
- body: await parseErrorBody(output.body, context),
555
- };
556
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
557
- switch (errorCode) {
558
- case "AccessDeniedException":
559
- case "com.amazonaws.rum#AccessDeniedException":
560
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
561
- case "ConflictException":
562
- case "com.amazonaws.rum#ConflictException":
563
- throw await de_ConflictExceptionRes(parsedOutput, context);
564
- case "InternalServerException":
565
- case "com.amazonaws.rum#InternalServerException":
566
- throw await de_InternalServerExceptionRes(parsedOutput, context);
567
- case "ResourceNotFoundException":
568
- case "com.amazonaws.rum#ResourceNotFoundException":
569
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
570
- case "ServiceQuotaExceededException":
571
- case "com.amazonaws.rum#ServiceQuotaExceededException":
572
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
573
- case "ThrottlingException":
574
- case "com.amazonaws.rum#ThrottlingException":
575
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
576
- case "ValidationException":
577
- case "com.amazonaws.rum#ValidationException":
578
- throw await de_ValidationExceptionRes(parsedOutput, context);
579
- case "InvalidPolicyRevisionIdException":
580
- case "com.amazonaws.rum#InvalidPolicyRevisionIdException":
581
- throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
582
- case "PolicyNotFoundException":
583
- case "com.amazonaws.rum#PolicyNotFoundException":
584
- throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
585
- case "MalformedPolicyDocumentException":
586
- case "com.amazonaws.rum#MalformedPolicyDocumentException":
587
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
588
- case "PolicySizeLimitExceededException":
589
- case "com.amazonaws.rum#PolicySizeLimitExceededException":
590
- throw await de_PolicySizeLimitExceededExceptionRes(parsedOutput, context);
591
- default:
592
- const parsedBody = parsedOutput.body;
593
- return throwDefaultError({
594
- output,
595
- parsedBody,
596
- errorCode,
597
- });
598
- }
599
- };
600
- const throwDefaultError = withBaseException(__BaseException);
601
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
602
- const contents = map({});
603
- const data = parsedOutput.body;
604
- const doc = take(data, {
605
- message: __expectString,
606
- });
607
- Object.assign(contents, doc);
608
- const exception = new AccessDeniedException({
609
- $metadata: deserializeMetadata(parsedOutput),
610
- ...contents,
611
- });
612
- return __decorateServiceException(exception, parsedOutput.body);
613
- };
614
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
615
- const contents = map({});
616
- const data = parsedOutput.body;
617
- const doc = take(data, {
618
- message: __expectString,
619
- resourceName: __expectString,
620
- resourceType: __expectString,
621
- });
622
- Object.assign(contents, doc);
623
- const exception = new ConflictException({
624
- $metadata: deserializeMetadata(parsedOutput),
625
- ...contents,
626
- });
627
- return __decorateServiceException(exception, parsedOutput.body);
628
- };
629
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
630
- const contents = map({
631
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
632
- });
633
- const data = parsedOutput.body;
634
- const doc = take(data, {
635
- message: __expectString,
636
- });
637
- Object.assign(contents, doc);
638
- const exception = new InternalServerException({
639
- $metadata: deserializeMetadata(parsedOutput),
640
- ...contents,
641
- });
642
- return __decorateServiceException(exception, parsedOutput.body);
643
- };
644
- const de_InvalidPolicyRevisionIdExceptionRes = async (parsedOutput, context) => {
645
- const contents = map({});
646
- const data = parsedOutput.body;
647
- const doc = take(data, {
648
- message: __expectString,
649
- });
650
- Object.assign(contents, doc);
651
- const exception = new InvalidPolicyRevisionIdException({
652
- $metadata: deserializeMetadata(parsedOutput),
653
- ...contents,
654
- });
655
- return __decorateServiceException(exception, parsedOutput.body);
656
- };
657
- const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
658
- const contents = map({});
659
- const data = parsedOutput.body;
660
- const doc = take(data, {
661
- message: __expectString,
662
- });
663
- Object.assign(contents, doc);
664
- const exception = new MalformedPolicyDocumentException({
665
- $metadata: deserializeMetadata(parsedOutput),
666
- ...contents,
667
- });
668
- return __decorateServiceException(exception, parsedOutput.body);
669
- };
670
- const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
671
- const contents = map({});
672
- const data = parsedOutput.body;
673
- const doc = take(data, {
674
- message: __expectString,
675
- });
676
- Object.assign(contents, doc);
677
- const exception = new PolicyNotFoundException({
678
- $metadata: deserializeMetadata(parsedOutput),
679
- ...contents,
680
- });
681
- return __decorateServiceException(exception, parsedOutput.body);
682
- };
683
- const de_PolicySizeLimitExceededExceptionRes = async (parsedOutput, context) => {
684
- const contents = map({});
685
- const data = parsedOutput.body;
686
- const doc = take(data, {
687
- message: __expectString,
688
- });
689
- Object.assign(contents, doc);
690
- const exception = new PolicySizeLimitExceededException({
691
- $metadata: deserializeMetadata(parsedOutput),
692
- ...contents,
693
- });
694
- return __decorateServiceException(exception, parsedOutput.body);
695
- };
696
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
697
- const contents = map({});
698
- const data = parsedOutput.body;
699
- const doc = take(data, {
700
- message: __expectString,
701
- resourceName: __expectString,
702
- resourceType: __expectString,
703
- });
704
- Object.assign(contents, doc);
705
- const exception = new ResourceNotFoundException({
706
- $metadata: deserializeMetadata(parsedOutput),
707
- ...contents,
708
- });
709
- return __decorateServiceException(exception, parsedOutput.body);
710
- };
711
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
712
- const contents = map({});
713
- const data = parsedOutput.body;
714
- const doc = take(data, {
715
- message: __expectString,
716
- });
717
- Object.assign(contents, doc);
718
- const exception = new ServiceQuotaExceededException({
719
- $metadata: deserializeMetadata(parsedOutput),
720
- ...contents,
721
- });
722
- return __decorateServiceException(exception, parsedOutput.body);
723
- };
724
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
725
- const contents = map({
726
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
727
- });
728
- const data = parsedOutput.body;
729
- const doc = take(data, {
730
- message: __expectString,
731
- quotaCode: __expectString,
732
- serviceCode: __expectString,
733
- });
734
- Object.assign(contents, doc);
735
- const exception = new ThrottlingException({
736
- $metadata: deserializeMetadata(parsedOutput),
737
- ...contents,
738
- });
739
- return __decorateServiceException(exception, parsedOutput.body);
740
- };
741
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
742
- const contents = map({});
743
- const data = parsedOutput.body;
744
- const doc = take(data, {
745
- message: __expectString,
746
- });
747
- Object.assign(contents, doc);
748
- const exception = new ValidationException({
749
- $metadata: deserializeMetadata(parsedOutput),
750
- ...contents,
751
- });
752
- return __decorateServiceException(exception, parsedOutput.body);
753
- };
754
- const se_AppMonitorConfiguration = (input, context) => {
755
- return take(input, {
756
- AllowCookies: [],
757
- EnableXRay: [],
758
- ExcludedPages: _json,
759
- FavoritePages: _json,
760
- GuestRoleArn: [],
761
- IdentityPoolId: [],
762
- IncludedPages: _json,
763
- SessionSampleRate: __serializeFloat,
764
- Telemetries: _json,
765
- });
766
- };
767
- const se_RumEvent = (input, context) => {
768
- return take(input, {
769
- details: __LazyJsonString.from,
770
- id: [],
771
- metadata: __LazyJsonString.from,
772
- timestamp: (_) => _.getTime() / 1_000,
773
- type: [],
774
- });
775
- };
776
- const se_RumEventList = (input, context) => {
777
- return input
778
- .filter((e) => e != null)
779
- .map((entry) => {
780
- return se_RumEvent(entry, context);
781
- });
782
- };
783
- const de_AppMonitor = (output, context) => {
784
- return take(output, {
785
- AppMonitorConfiguration: (_) => de_AppMonitorConfiguration(_, context),
786
- Created: __expectString,
787
- CustomEvents: _json,
788
- DataStorage: _json,
789
- DeobfuscationConfiguration: _json,
790
- Domain: __expectString,
791
- DomainList: _json,
792
- Id: __expectString,
793
- LastModified: __expectString,
794
- Name: __expectString,
795
- State: __expectString,
796
- Tags: _json,
797
- });
798
- };
799
- const de_AppMonitorConfiguration = (output, context) => {
800
- return take(output, {
801
- AllowCookies: __expectBoolean,
802
- EnableXRay: __expectBoolean,
803
- ExcludedPages: _json,
804
- FavoritePages: _json,
805
- GuestRoleArn: __expectString,
806
- IdentityPoolId: __expectString,
807
- IncludedPages: _json,
808
- SessionSampleRate: __limitedParseDouble,
809
- Telemetries: _json,
810
- });
811
- };
812
- const deserializeMetadata = (output) => ({
813
- httpStatusCode: output.statusCode,
814
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
815
- extendedRequestId: output.headers["x-amz-id-2"],
816
- cfId: output.headers["x-amz-cf-id"],
817
- });
818
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
819
- const _D = "Destination";
820
- const _DA = "DestinationArn";
821
- const _MDI = "MetricDefinitionIds";
822
- const _MR = "MaxResults";
823
- const _NT = "NextToken";
824
- const _PRI = "PolicyRevisionId";
825
- const _TK = "TagKeys";
826
- const _d = "destination";
827
- const _dA = "destinationArn";
828
- const _mDI = "metricDefinitionIds";
829
- const _mR = "maxResults";
830
- const _nT = "nextToken";
831
- const _pRI = "policyRevisionId";
832
- const _rAS = "retryAfterSeconds";
833
- const _ra = "retry-after";
834
- const _tK = "tagKeys";