@aws-sdk/client-observabilityadmin 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 (50) hide show
  1. package/dist-cjs/index.js +891 -1129
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/ObservabilityAdminClient.js +2 -0
  4. package/dist-es/commands/CreateCentralizationRuleForOrganizationCommand.js +3 -9
  5. package/dist-es/commands/CreateTelemetryRuleCommand.js +3 -9
  6. package/dist-es/commands/CreateTelemetryRuleForOrganizationCommand.js +3 -9
  7. package/dist-es/commands/DeleteCentralizationRuleForOrganizationCommand.js +3 -9
  8. package/dist-es/commands/DeleteTelemetryRuleCommand.js +3 -9
  9. package/dist-es/commands/DeleteTelemetryRuleForOrganizationCommand.js +3 -9
  10. package/dist-es/commands/GetCentralizationRuleForOrganizationCommand.js +3 -9
  11. package/dist-es/commands/GetTelemetryEnrichmentStatusCommand.js +3 -9
  12. package/dist-es/commands/GetTelemetryEvaluationStatusCommand.js +3 -9
  13. package/dist-es/commands/GetTelemetryEvaluationStatusForOrganizationCommand.js +3 -9
  14. package/dist-es/commands/GetTelemetryRuleCommand.js +3 -9
  15. package/dist-es/commands/GetTelemetryRuleForOrganizationCommand.js +3 -9
  16. package/dist-es/commands/ListCentralizationRulesForOrganizationCommand.js +3 -9
  17. package/dist-es/commands/ListResourceTelemetryCommand.js +3 -9
  18. package/dist-es/commands/ListResourceTelemetryForOrganizationCommand.js +3 -9
  19. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  20. package/dist-es/commands/ListTelemetryRulesCommand.js +3 -9
  21. package/dist-es/commands/ListTelemetryRulesForOrganizationCommand.js +3 -9
  22. package/dist-es/commands/StartTelemetryEnrichmentCommand.js +3 -9
  23. package/dist-es/commands/StartTelemetryEvaluationCommand.js +3 -9
  24. package/dist-es/commands/StartTelemetryEvaluationForOrganizationCommand.js +3 -9
  25. package/dist-es/commands/StopTelemetryEnrichmentCommand.js +3 -9
  26. package/dist-es/commands/StopTelemetryEvaluationCommand.js +3 -9
  27. package/dist-es/commands/StopTelemetryEvaluationForOrganizationCommand.js +3 -9
  28. package/dist-es/commands/TagResourceCommand.js +3 -9
  29. package/dist-es/commands/UntagResourceCommand.js +3 -9
  30. package/dist-es/commands/UpdateCentralizationRuleForOrganizationCommand.js +3 -9
  31. package/dist-es/commands/UpdateTelemetryRuleCommand.js +3 -9
  32. package/dist-es/commands/UpdateTelemetryRuleForOrganizationCommand.js +3 -9
  33. package/dist-es/runtimeConfig.shared.js +2 -0
  34. package/dist-es/schemas/schemas_0.js +819 -0
  35. package/dist-types/ObservabilityAdminClient.d.ts +10 -1
  36. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  37. package/dist-types/runtimeConfig.d.ts +1 -0
  38. package/dist-types/runtimeConfig.native.d.ts +1 -0
  39. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  40. package/dist-types/schemas/schemas_0.d.ts +103 -0
  41. package/dist-types/ts3.4/ObservabilityAdminClient.d.ts +4 -0
  42. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  43. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  44. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  45. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  46. package/dist-types/ts3.4/schemas/schemas_0.d.ts +108 -0
  47. package/package.json +33 -33
  48. package/dist-es/protocols/Aws_restJson1.js +0 -907
  49. package/dist-types/protocols/Aws_restJson1.d.ts +0 -263
  50. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -353
@@ -1,907 +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, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyRequestsException, ValidationException, } from "../models/models_0";
5
- import { ObservabilityAdminServiceException as __BaseException } from "../models/ObservabilityAdminServiceException";
6
- export const se_CreateCentralizationRuleForOrganizationCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/CreateCentralizationRuleForOrganization");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- Rule: (_) => _json(_),
15
- RuleName: [],
16
- Tags: (_) => _json(_),
17
- }));
18
- b.m("POST").h(headers).b(body);
19
- return b.build();
20
- };
21
- export const se_CreateTelemetryRuleCommand = async (input, context) => {
22
- const b = rb(input, context);
23
- const headers = {
24
- "content-type": "application/json",
25
- };
26
- b.bp("/CreateTelemetryRule");
27
- let body;
28
- body = JSON.stringify(take(input, {
29
- Rule: (_) => _json(_),
30
- RuleName: [],
31
- Tags: (_) => _json(_),
32
- }));
33
- b.m("POST").h(headers).b(body);
34
- return b.build();
35
- };
36
- export const se_CreateTelemetryRuleForOrganizationCommand = async (input, context) => {
37
- const b = rb(input, context);
38
- const headers = {
39
- "content-type": "application/json",
40
- };
41
- b.bp("/CreateTelemetryRuleForOrganization");
42
- let body;
43
- body = JSON.stringify(take(input, {
44
- Rule: (_) => _json(_),
45
- RuleName: [],
46
- Tags: (_) => _json(_),
47
- }));
48
- b.m("POST").h(headers).b(body);
49
- return b.build();
50
- };
51
- export const se_DeleteCentralizationRuleForOrganizationCommand = async (input, context) => {
52
- const b = rb(input, context);
53
- const headers = {
54
- "content-type": "application/json",
55
- };
56
- b.bp("/DeleteCentralizationRuleForOrganization");
57
- let body;
58
- body = JSON.stringify(take(input, {
59
- RuleIdentifier: [],
60
- }));
61
- b.m("POST").h(headers).b(body);
62
- return b.build();
63
- };
64
- export const se_DeleteTelemetryRuleCommand = async (input, context) => {
65
- const b = rb(input, context);
66
- const headers = {
67
- "content-type": "application/json",
68
- };
69
- b.bp("/DeleteTelemetryRule");
70
- let body;
71
- body = JSON.stringify(take(input, {
72
- RuleIdentifier: [],
73
- }));
74
- b.m("POST").h(headers).b(body);
75
- return b.build();
76
- };
77
- export const se_DeleteTelemetryRuleForOrganizationCommand = async (input, context) => {
78
- const b = rb(input, context);
79
- const headers = {
80
- "content-type": "application/json",
81
- };
82
- b.bp("/DeleteTelemetryRuleForOrganization");
83
- let body;
84
- body = JSON.stringify(take(input, {
85
- RuleIdentifier: [],
86
- }));
87
- b.m("POST").h(headers).b(body);
88
- return b.build();
89
- };
90
- export const se_GetCentralizationRuleForOrganizationCommand = async (input, context) => {
91
- const b = rb(input, context);
92
- const headers = {
93
- "content-type": "application/json",
94
- };
95
- b.bp("/GetCentralizationRuleForOrganization");
96
- let body;
97
- body = JSON.stringify(take(input, {
98
- RuleIdentifier: [],
99
- }));
100
- b.m("POST").h(headers).b(body);
101
- return b.build();
102
- };
103
- export const se_GetTelemetryEnrichmentStatusCommand = async (input, context) => {
104
- const b = rb(input, context);
105
- const headers = {};
106
- b.bp("/GetTelemetryEnrichmentStatus");
107
- let body;
108
- b.m("POST").h(headers).b(body);
109
- return b.build();
110
- };
111
- export const se_GetTelemetryEvaluationStatusCommand = async (input, context) => {
112
- const b = rb(input, context);
113
- const headers = {};
114
- b.bp("/GetTelemetryEvaluationStatus");
115
- let body;
116
- b.m("POST").h(headers).b(body);
117
- return b.build();
118
- };
119
- export const se_GetTelemetryEvaluationStatusForOrganizationCommand = async (input, context) => {
120
- const b = rb(input, context);
121
- const headers = {};
122
- b.bp("/GetTelemetryEvaluationStatusForOrganization");
123
- let body;
124
- b.m("POST").h(headers).b(body);
125
- return b.build();
126
- };
127
- export const se_GetTelemetryRuleCommand = async (input, context) => {
128
- const b = rb(input, context);
129
- const headers = {
130
- "content-type": "application/json",
131
- };
132
- b.bp("/GetTelemetryRule");
133
- let body;
134
- body = JSON.stringify(take(input, {
135
- RuleIdentifier: [],
136
- }));
137
- b.m("POST").h(headers).b(body);
138
- return b.build();
139
- };
140
- export const se_GetTelemetryRuleForOrganizationCommand = async (input, context) => {
141
- const b = rb(input, context);
142
- const headers = {
143
- "content-type": "application/json",
144
- };
145
- b.bp("/GetTelemetryRuleForOrganization");
146
- let body;
147
- body = JSON.stringify(take(input, {
148
- RuleIdentifier: [],
149
- }));
150
- b.m("POST").h(headers).b(body);
151
- return b.build();
152
- };
153
- export const se_ListCentralizationRulesForOrganizationCommand = async (input, context) => {
154
- const b = rb(input, context);
155
- const headers = {
156
- "content-type": "application/json",
157
- };
158
- b.bp("/ListCentralizationRulesForOrganization");
159
- let body;
160
- body = JSON.stringify(take(input, {
161
- AllRegions: [],
162
- MaxResults: [],
163
- NextToken: [],
164
- RuleNamePrefix: [],
165
- }));
166
- b.m("POST").h(headers).b(body);
167
- return b.build();
168
- };
169
- export const se_ListResourceTelemetryCommand = async (input, context) => {
170
- const b = rb(input, context);
171
- const headers = {
172
- "content-type": "application/json",
173
- };
174
- b.bp("/ListResourceTelemetry");
175
- let body;
176
- body = JSON.stringify(take(input, {
177
- MaxResults: [],
178
- NextToken: [],
179
- ResourceIdentifierPrefix: [],
180
- ResourceTags: (_) => _json(_),
181
- ResourceTypes: (_) => _json(_),
182
- TelemetryConfigurationState: (_) => _json(_),
183
- }));
184
- b.m("POST").h(headers).b(body);
185
- return b.build();
186
- };
187
- export const se_ListResourceTelemetryForOrganizationCommand = async (input, context) => {
188
- const b = rb(input, context);
189
- const headers = {
190
- "content-type": "application/json",
191
- };
192
- b.bp("/ListResourceTelemetryForOrganization");
193
- let body;
194
- body = JSON.stringify(take(input, {
195
- AccountIdentifiers: (_) => _json(_),
196
- MaxResults: [],
197
- NextToken: [],
198
- ResourceIdentifierPrefix: [],
199
- ResourceTags: (_) => _json(_),
200
- ResourceTypes: (_) => _json(_),
201
- TelemetryConfigurationState: (_) => _json(_),
202
- }));
203
- b.m("POST").h(headers).b(body);
204
- return b.build();
205
- };
206
- export const se_ListTagsForResourceCommand = async (input, context) => {
207
- const b = rb(input, context);
208
- const headers = {
209
- "content-type": "application/json",
210
- };
211
- b.bp("/ListTagsForResource");
212
- let body;
213
- body = JSON.stringify(take(input, {
214
- ResourceARN: [],
215
- }));
216
- b.m("POST").h(headers).b(body);
217
- return b.build();
218
- };
219
- export const se_ListTelemetryRulesCommand = async (input, context) => {
220
- const b = rb(input, context);
221
- const headers = {
222
- "content-type": "application/json",
223
- };
224
- b.bp("/ListTelemetryRules");
225
- let body;
226
- body = JSON.stringify(take(input, {
227
- MaxResults: [],
228
- NextToken: [],
229
- RuleNamePrefix: [],
230
- }));
231
- b.m("POST").h(headers).b(body);
232
- return b.build();
233
- };
234
- export const se_ListTelemetryRulesForOrganizationCommand = async (input, context) => {
235
- const b = rb(input, context);
236
- const headers = {
237
- "content-type": "application/json",
238
- };
239
- b.bp("/ListTelemetryRulesForOrganization");
240
- let body;
241
- body = JSON.stringify(take(input, {
242
- MaxResults: [],
243
- NextToken: [],
244
- RuleNamePrefix: [],
245
- SourceAccountIds: (_) => _json(_),
246
- SourceOrganizationUnitIds: (_) => _json(_),
247
- }));
248
- b.m("POST").h(headers).b(body);
249
- return b.build();
250
- };
251
- export const se_StartTelemetryEnrichmentCommand = async (input, context) => {
252
- const b = rb(input, context);
253
- const headers = {};
254
- b.bp("/StartTelemetryEnrichment");
255
- let body;
256
- b.m("POST").h(headers).b(body);
257
- return b.build();
258
- };
259
- export const se_StartTelemetryEvaluationCommand = async (input, context) => {
260
- const b = rb(input, context);
261
- const headers = {};
262
- b.bp("/StartTelemetryEvaluation");
263
- let body;
264
- b.m("POST").h(headers).b(body);
265
- return b.build();
266
- };
267
- export const se_StartTelemetryEvaluationForOrganizationCommand = async (input, context) => {
268
- const b = rb(input, context);
269
- const headers = {};
270
- b.bp("/StartTelemetryEvaluationForOrganization");
271
- let body;
272
- b.m("POST").h(headers).b(body);
273
- return b.build();
274
- };
275
- export const se_StopTelemetryEnrichmentCommand = async (input, context) => {
276
- const b = rb(input, context);
277
- const headers = {};
278
- b.bp("/StopTelemetryEnrichment");
279
- let body;
280
- b.m("POST").h(headers).b(body);
281
- return b.build();
282
- };
283
- export const se_StopTelemetryEvaluationCommand = async (input, context) => {
284
- const b = rb(input, context);
285
- const headers = {};
286
- b.bp("/StopTelemetryEvaluation");
287
- let body;
288
- b.m("POST").h(headers).b(body);
289
- return b.build();
290
- };
291
- export const se_StopTelemetryEvaluationForOrganizationCommand = async (input, context) => {
292
- const b = rb(input, context);
293
- const headers = {};
294
- b.bp("/StopTelemetryEvaluationForOrganization");
295
- let body;
296
- b.m("POST").h(headers).b(body);
297
- return b.build();
298
- };
299
- export const se_TagResourceCommand = async (input, context) => {
300
- const b = rb(input, context);
301
- const headers = {
302
- "content-type": "application/json",
303
- };
304
- b.bp("/TagResource");
305
- let body;
306
- body = JSON.stringify(take(input, {
307
- ResourceARN: [],
308
- Tags: (_) => _json(_),
309
- }));
310
- b.m("POST").h(headers).b(body);
311
- return b.build();
312
- };
313
- export const se_UntagResourceCommand = async (input, context) => {
314
- const b = rb(input, context);
315
- const headers = {
316
- "content-type": "application/json",
317
- };
318
- b.bp("/UntagResource");
319
- let body;
320
- body = JSON.stringify(take(input, {
321
- ResourceARN: [],
322
- TagKeys: (_) => _json(_),
323
- }));
324
- b.m("POST").h(headers).b(body);
325
- return b.build();
326
- };
327
- export const se_UpdateCentralizationRuleForOrganizationCommand = async (input, context) => {
328
- const b = rb(input, context);
329
- const headers = {
330
- "content-type": "application/json",
331
- };
332
- b.bp("/UpdateCentralizationRuleForOrganization");
333
- let body;
334
- body = JSON.stringify(take(input, {
335
- Rule: (_) => _json(_),
336
- RuleIdentifier: [],
337
- }));
338
- b.m("POST").h(headers).b(body);
339
- return b.build();
340
- };
341
- export const se_UpdateTelemetryRuleCommand = async (input, context) => {
342
- const b = rb(input, context);
343
- const headers = {
344
- "content-type": "application/json",
345
- };
346
- b.bp("/UpdateTelemetryRule");
347
- let body;
348
- body = JSON.stringify(take(input, {
349
- Rule: (_) => _json(_),
350
- RuleIdentifier: [],
351
- }));
352
- b.m("POST").h(headers).b(body);
353
- return b.build();
354
- };
355
- export const se_UpdateTelemetryRuleForOrganizationCommand = async (input, context) => {
356
- const b = rb(input, context);
357
- const headers = {
358
- "content-type": "application/json",
359
- };
360
- b.bp("/UpdateTelemetryRuleForOrganization");
361
- let body;
362
- body = JSON.stringify(take(input, {
363
- Rule: (_) => _json(_),
364
- RuleIdentifier: [],
365
- }));
366
- b.m("POST").h(headers).b(body);
367
- return b.build();
368
- };
369
- export const de_CreateCentralizationRuleForOrganizationCommand = async (output, context) => {
370
- if (output.statusCode !== 200 && output.statusCode >= 300) {
371
- return de_CommandError(output, context);
372
- }
373
- const contents = map({
374
- $metadata: deserializeMetadata(output),
375
- });
376
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
377
- const doc = take(data, {
378
- RuleArn: __expectString,
379
- });
380
- Object.assign(contents, doc);
381
- return contents;
382
- };
383
- export const de_CreateTelemetryRuleCommand = async (output, context) => {
384
- if (output.statusCode !== 200 && output.statusCode >= 300) {
385
- return de_CommandError(output, context);
386
- }
387
- const contents = map({
388
- $metadata: deserializeMetadata(output),
389
- });
390
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
391
- const doc = take(data, {
392
- RuleArn: __expectString,
393
- });
394
- Object.assign(contents, doc);
395
- return contents;
396
- };
397
- export const de_CreateTelemetryRuleForOrganizationCommand = async (output, context) => {
398
- if (output.statusCode !== 200 && output.statusCode >= 300) {
399
- return de_CommandError(output, context);
400
- }
401
- const contents = map({
402
- $metadata: deserializeMetadata(output),
403
- });
404
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
405
- const doc = take(data, {
406
- RuleArn: __expectString,
407
- });
408
- Object.assign(contents, doc);
409
- return contents;
410
- };
411
- export const de_DeleteCentralizationRuleForOrganizationCommand = async (output, context) => {
412
- if (output.statusCode !== 200 && output.statusCode >= 300) {
413
- return de_CommandError(output, context);
414
- }
415
- const contents = map({
416
- $metadata: deserializeMetadata(output),
417
- });
418
- await collectBody(output.body, context);
419
- return contents;
420
- };
421
- export const de_DeleteTelemetryRuleCommand = async (output, context) => {
422
- if (output.statusCode !== 200 && output.statusCode >= 300) {
423
- return de_CommandError(output, context);
424
- }
425
- const contents = map({
426
- $metadata: deserializeMetadata(output),
427
- });
428
- await collectBody(output.body, context);
429
- return contents;
430
- };
431
- export const de_DeleteTelemetryRuleForOrganizationCommand = 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
- await collectBody(output.body, context);
439
- return contents;
440
- };
441
- export const de_GetCentralizationRuleForOrganizationCommand = async (output, context) => {
442
- if (output.statusCode !== 200 && output.statusCode >= 300) {
443
- return de_CommandError(output, context);
444
- }
445
- const contents = map({
446
- $metadata: deserializeMetadata(output),
447
- });
448
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
449
- const doc = take(data, {
450
- CentralizationRule: _json,
451
- CreatedRegion: __expectString,
452
- CreatedTimeStamp: __expectLong,
453
- CreatorAccountId: __expectString,
454
- FailureReason: __expectString,
455
- LastUpdateTimeStamp: __expectLong,
456
- RuleArn: __expectString,
457
- RuleHealth: __expectString,
458
- RuleName: __expectString,
459
- });
460
- Object.assign(contents, doc);
461
- return contents;
462
- };
463
- export const de_GetTelemetryEnrichmentStatusCommand = async (output, context) => {
464
- if (output.statusCode !== 200 && output.statusCode >= 300) {
465
- return de_CommandError(output, context);
466
- }
467
- const contents = map({
468
- $metadata: deserializeMetadata(output),
469
- });
470
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
471
- const doc = take(data, {
472
- AwsResourceExplorerManagedViewArn: __expectString,
473
- Status: __expectString,
474
- });
475
- Object.assign(contents, doc);
476
- return contents;
477
- };
478
- export const de_GetTelemetryEvaluationStatusCommand = async (output, context) => {
479
- if (output.statusCode !== 200 && output.statusCode >= 300) {
480
- return de_CommandError(output, context);
481
- }
482
- const contents = map({
483
- $metadata: deserializeMetadata(output),
484
- });
485
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
486
- const doc = take(data, {
487
- FailureReason: __expectString,
488
- Status: __expectString,
489
- });
490
- Object.assign(contents, doc);
491
- return contents;
492
- };
493
- export const de_GetTelemetryEvaluationStatusForOrganizationCommand = async (output, context) => {
494
- if (output.statusCode !== 200 && output.statusCode >= 300) {
495
- return de_CommandError(output, context);
496
- }
497
- const contents = map({
498
- $metadata: deserializeMetadata(output),
499
- });
500
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
501
- const doc = take(data, {
502
- FailureReason: __expectString,
503
- Status: __expectString,
504
- });
505
- Object.assign(contents, doc);
506
- return contents;
507
- };
508
- export const de_GetTelemetryRuleCommand = async (output, context) => {
509
- if (output.statusCode !== 200 && output.statusCode >= 300) {
510
- return de_CommandError(output, context);
511
- }
512
- const contents = map({
513
- $metadata: deserializeMetadata(output),
514
- });
515
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
516
- const doc = take(data, {
517
- CreatedTimeStamp: __expectLong,
518
- LastUpdateTimeStamp: __expectLong,
519
- RuleArn: __expectString,
520
- RuleName: __expectString,
521
- TelemetryRule: _json,
522
- });
523
- Object.assign(contents, doc);
524
- return contents;
525
- };
526
- export const de_GetTelemetryRuleForOrganizationCommand = async (output, context) => {
527
- if (output.statusCode !== 200 && output.statusCode >= 300) {
528
- return de_CommandError(output, context);
529
- }
530
- const contents = map({
531
- $metadata: deserializeMetadata(output),
532
- });
533
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
534
- const doc = take(data, {
535
- CreatedTimeStamp: __expectLong,
536
- LastUpdateTimeStamp: __expectLong,
537
- RuleArn: __expectString,
538
- RuleName: __expectString,
539
- TelemetryRule: _json,
540
- });
541
- Object.assign(contents, doc);
542
- return contents;
543
- };
544
- export const de_ListCentralizationRulesForOrganizationCommand = async (output, context) => {
545
- if (output.statusCode !== 200 && output.statusCode >= 300) {
546
- return de_CommandError(output, context);
547
- }
548
- const contents = map({
549
- $metadata: deserializeMetadata(output),
550
- });
551
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
552
- const doc = take(data, {
553
- CentralizationRuleSummaries: _json,
554
- NextToken: __expectString,
555
- });
556
- Object.assign(contents, doc);
557
- return contents;
558
- };
559
- export const de_ListResourceTelemetryCommand = async (output, context) => {
560
- if (output.statusCode !== 200 && output.statusCode >= 300) {
561
- return de_CommandError(output, context);
562
- }
563
- const contents = map({
564
- $metadata: deserializeMetadata(output),
565
- });
566
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
567
- const doc = take(data, {
568
- NextToken: __expectString,
569
- TelemetryConfigurations: _json,
570
- });
571
- Object.assign(contents, doc);
572
- return contents;
573
- };
574
- export const de_ListResourceTelemetryForOrganizationCommand = async (output, context) => {
575
- if (output.statusCode !== 200 && output.statusCode >= 300) {
576
- return de_CommandError(output, context);
577
- }
578
- const contents = map({
579
- $metadata: deserializeMetadata(output),
580
- });
581
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
582
- const doc = take(data, {
583
- NextToken: __expectString,
584
- TelemetryConfigurations: _json,
585
- });
586
- Object.assign(contents, doc);
587
- return contents;
588
- };
589
- export const de_ListTagsForResourceCommand = async (output, context) => {
590
- if (output.statusCode !== 200 && output.statusCode >= 300) {
591
- return de_CommandError(output, context);
592
- }
593
- const contents = map({
594
- $metadata: deserializeMetadata(output),
595
- });
596
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
597
- const doc = take(data, {
598
- Tags: _json,
599
- });
600
- Object.assign(contents, doc);
601
- return contents;
602
- };
603
- export const de_ListTelemetryRulesCommand = async (output, context) => {
604
- if (output.statusCode !== 200 && output.statusCode >= 300) {
605
- return de_CommandError(output, context);
606
- }
607
- const contents = map({
608
- $metadata: deserializeMetadata(output),
609
- });
610
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
611
- const doc = take(data, {
612
- NextToken: __expectString,
613
- TelemetryRuleSummaries: _json,
614
- });
615
- Object.assign(contents, doc);
616
- return contents;
617
- };
618
- export const de_ListTelemetryRulesForOrganizationCommand = async (output, context) => {
619
- if (output.statusCode !== 200 && output.statusCode >= 300) {
620
- return de_CommandError(output, context);
621
- }
622
- const contents = map({
623
- $metadata: deserializeMetadata(output),
624
- });
625
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
626
- const doc = take(data, {
627
- NextToken: __expectString,
628
- TelemetryRuleSummaries: _json,
629
- });
630
- Object.assign(contents, doc);
631
- return contents;
632
- };
633
- export const de_StartTelemetryEnrichmentCommand = async (output, context) => {
634
- if (output.statusCode !== 202 && output.statusCode >= 300) {
635
- return de_CommandError(output, context);
636
- }
637
- const contents = map({
638
- $metadata: deserializeMetadata(output),
639
- });
640
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
641
- const doc = take(data, {
642
- AwsResourceExplorerManagedViewArn: __expectString,
643
- Status: __expectString,
644
- });
645
- Object.assign(contents, doc);
646
- return contents;
647
- };
648
- export const de_StartTelemetryEvaluationCommand = async (output, context) => {
649
- if (output.statusCode !== 200 && output.statusCode >= 300) {
650
- return de_CommandError(output, context);
651
- }
652
- const contents = map({
653
- $metadata: deserializeMetadata(output),
654
- });
655
- await collectBody(output.body, context);
656
- return contents;
657
- };
658
- export const de_StartTelemetryEvaluationForOrganizationCommand = async (output, context) => {
659
- if (output.statusCode !== 200 && output.statusCode >= 300) {
660
- return de_CommandError(output, context);
661
- }
662
- const contents = map({
663
- $metadata: deserializeMetadata(output),
664
- });
665
- await collectBody(output.body, context);
666
- return contents;
667
- };
668
- export const de_StopTelemetryEnrichmentCommand = async (output, context) => {
669
- if (output.statusCode !== 202 && output.statusCode >= 300) {
670
- return de_CommandError(output, context);
671
- }
672
- const contents = map({
673
- $metadata: deserializeMetadata(output),
674
- });
675
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
676
- const doc = take(data, {
677
- Status: __expectString,
678
- });
679
- Object.assign(contents, doc);
680
- return contents;
681
- };
682
- export const de_StopTelemetryEvaluationCommand = async (output, context) => {
683
- if (output.statusCode !== 200 && output.statusCode >= 300) {
684
- return de_CommandError(output, context);
685
- }
686
- const contents = map({
687
- $metadata: deserializeMetadata(output),
688
- });
689
- await collectBody(output.body, context);
690
- return contents;
691
- };
692
- export const de_StopTelemetryEvaluationForOrganizationCommand = async (output, context) => {
693
- if (output.statusCode !== 200 && output.statusCode >= 300) {
694
- return de_CommandError(output, context);
695
- }
696
- const contents = map({
697
- $metadata: deserializeMetadata(output),
698
- });
699
- await collectBody(output.body, context);
700
- return contents;
701
- };
702
- export const de_TagResourceCommand = async (output, context) => {
703
- if (output.statusCode !== 200 && output.statusCode >= 300) {
704
- return de_CommandError(output, context);
705
- }
706
- const contents = map({
707
- $metadata: deserializeMetadata(output),
708
- });
709
- await collectBody(output.body, context);
710
- return contents;
711
- };
712
- export const de_UntagResourceCommand = async (output, context) => {
713
- if (output.statusCode !== 200 && output.statusCode >= 300) {
714
- return de_CommandError(output, context);
715
- }
716
- const contents = map({
717
- $metadata: deserializeMetadata(output),
718
- });
719
- await collectBody(output.body, context);
720
- return contents;
721
- };
722
- export const de_UpdateCentralizationRuleForOrganizationCommand = async (output, context) => {
723
- if (output.statusCode !== 200 && output.statusCode >= 300) {
724
- return de_CommandError(output, context);
725
- }
726
- const contents = map({
727
- $metadata: deserializeMetadata(output),
728
- });
729
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
730
- const doc = take(data, {
731
- RuleArn: __expectString,
732
- });
733
- Object.assign(contents, doc);
734
- return contents;
735
- };
736
- export const de_UpdateTelemetryRuleCommand = async (output, context) => {
737
- if (output.statusCode !== 200 && output.statusCode >= 300) {
738
- return de_CommandError(output, context);
739
- }
740
- const contents = map({
741
- $metadata: deserializeMetadata(output),
742
- });
743
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
744
- const doc = take(data, {
745
- RuleArn: __expectString,
746
- });
747
- Object.assign(contents, doc);
748
- return contents;
749
- };
750
- export const de_UpdateTelemetryRuleForOrganizationCommand = async (output, context) => {
751
- if (output.statusCode !== 200 && output.statusCode >= 300) {
752
- return de_CommandError(output, context);
753
- }
754
- const contents = map({
755
- $metadata: deserializeMetadata(output),
756
- });
757
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
758
- const doc = take(data, {
759
- RuleArn: __expectString,
760
- });
761
- Object.assign(contents, doc);
762
- return contents;
763
- };
764
- const de_CommandError = async (output, context) => {
765
- const parsedOutput = {
766
- ...output,
767
- body: await parseErrorBody(output.body, context),
768
- };
769
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
770
- switch (errorCode) {
771
- case "AccessDeniedException":
772
- case "com.amazonaws.observabilityadmin#AccessDeniedException":
773
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
774
- case "ConflictException":
775
- case "com.amazonaws.observabilityadmin#ConflictException":
776
- throw await de_ConflictExceptionRes(parsedOutput, context);
777
- case "InternalServerException":
778
- case "com.amazonaws.observabilityadmin#InternalServerException":
779
- throw await de_InternalServerExceptionRes(parsedOutput, context);
780
- case "ServiceQuotaExceededException":
781
- case "com.amazonaws.observabilityadmin#ServiceQuotaExceededException":
782
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
783
- case "TooManyRequestsException":
784
- case "com.amazonaws.observabilityadmin#TooManyRequestsException":
785
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
786
- case "ValidationException":
787
- case "com.amazonaws.observabilityadmin#ValidationException":
788
- throw await de_ValidationExceptionRes(parsedOutput, context);
789
- case "ResourceNotFoundException":
790
- case "com.amazonaws.observabilityadmin#ResourceNotFoundException":
791
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
792
- default:
793
- const parsedBody = parsedOutput.body;
794
- return throwDefaultError({
795
- output,
796
- parsedBody,
797
- errorCode,
798
- });
799
- }
800
- };
801
- const throwDefaultError = withBaseException(__BaseException);
802
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
803
- const contents = map({
804
- [_aET]: [, parsedOutput.headers[_xae]],
805
- });
806
- const data = parsedOutput.body;
807
- const doc = take(data, {
808
- Message: __expectString,
809
- });
810
- Object.assign(contents, doc);
811
- const exception = new AccessDeniedException({
812
- $metadata: deserializeMetadata(parsedOutput),
813
- ...contents,
814
- });
815
- return __decorateServiceException(exception, parsedOutput.body);
816
- };
817
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
818
- const contents = map({});
819
- const data = parsedOutput.body;
820
- const doc = take(data, {
821
- Message: __expectString,
822
- });
823
- Object.assign(contents, doc);
824
- const exception = new ConflictException({
825
- $metadata: deserializeMetadata(parsedOutput),
826
- ...contents,
827
- });
828
- return __decorateServiceException(exception, parsedOutput.body);
829
- };
830
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
831
- const contents = map({
832
- [_aET]: [, parsedOutput.headers[_xae]],
833
- });
834
- const data = parsedOutput.body;
835
- const doc = take(data, {
836
- Message: __expectString,
837
- });
838
- Object.assign(contents, doc);
839
- const exception = new InternalServerException({
840
- $metadata: deserializeMetadata(parsedOutput),
841
- ...contents,
842
- });
843
- return __decorateServiceException(exception, parsedOutput.body);
844
- };
845
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
846
- const contents = map({});
847
- const data = parsedOutput.body;
848
- const doc = take(data, {
849
- Message: __expectString,
850
- });
851
- Object.assign(contents, doc);
852
- const exception = new ResourceNotFoundException({
853
- $metadata: deserializeMetadata(parsedOutput),
854
- ...contents,
855
- });
856
- return __decorateServiceException(exception, parsedOutput.body);
857
- };
858
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
859
- const contents = map({
860
- [_aET]: [, parsedOutput.headers[_xae]],
861
- });
862
- const data = parsedOutput.body;
863
- const doc = take(data, {
864
- Message: __expectString,
865
- });
866
- Object.assign(contents, doc);
867
- const exception = new ServiceQuotaExceededException({
868
- $metadata: deserializeMetadata(parsedOutput),
869
- ...contents,
870
- });
871
- return __decorateServiceException(exception, parsedOutput.body);
872
- };
873
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
874
- const contents = map({});
875
- const data = parsedOutput.body;
876
- const doc = take(data, {
877
- Message: __expectString,
878
- });
879
- Object.assign(contents, doc);
880
- const exception = new TooManyRequestsException({
881
- $metadata: deserializeMetadata(parsedOutput),
882
- ...contents,
883
- });
884
- return __decorateServiceException(exception, parsedOutput.body);
885
- };
886
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
887
- const contents = map({});
888
- const data = parsedOutput.body;
889
- const doc = take(data, {
890
- Message: __expectString,
891
- });
892
- Object.assign(contents, doc);
893
- const exception = new ValidationException({
894
- $metadata: deserializeMetadata(parsedOutput),
895
- ...contents,
896
- });
897
- return __decorateServiceException(exception, parsedOutput.body);
898
- };
899
- const deserializeMetadata = (output) => ({
900
- httpStatusCode: output.statusCode,
901
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
902
- extendedRequestId: output.headers["x-amz-id-2"],
903
- cfId: output.headers["x-amz-cf-id"],
904
- });
905
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
906
- const _aET = "amznErrorType";
907
- const _xae = "x-amzn-errortype";