@aws-sdk/client-devops-guru 3.490.0 → 3.495.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 (59) hide show
  1. package/dist-cjs/DevOpsGuru.js +1 -73
  2. package/dist-cjs/DevOpsGuruClient.js +1 -43
  3. package/dist-cjs/commands/AddNotificationChannelCommand.js +1 -28
  4. package/dist-cjs/commands/DeleteInsightCommand.js +1 -28
  5. package/dist-cjs/commands/DescribeAccountHealthCommand.js +1 -28
  6. package/dist-cjs/commands/DescribeAccountOverviewCommand.js +1 -28
  7. package/dist-cjs/commands/DescribeAnomalyCommand.js +1 -28
  8. package/dist-cjs/commands/DescribeEventSourcesConfigCommand.js +1 -28
  9. package/dist-cjs/commands/DescribeFeedbackCommand.js +1 -28
  10. package/dist-cjs/commands/DescribeInsightCommand.js +1 -28
  11. package/dist-cjs/commands/DescribeOrganizationHealthCommand.js +1 -28
  12. package/dist-cjs/commands/DescribeOrganizationOverviewCommand.js +1 -28
  13. package/dist-cjs/commands/DescribeOrganizationResourceCollectionHealthCommand.js +1 -28
  14. package/dist-cjs/commands/DescribeResourceCollectionHealthCommand.js +1 -28
  15. package/dist-cjs/commands/DescribeServiceIntegrationCommand.js +1 -28
  16. package/dist-cjs/commands/GetCostEstimationCommand.js +1 -28
  17. package/dist-cjs/commands/GetResourceCollectionCommand.js +1 -28
  18. package/dist-cjs/commands/ListAnomaliesForInsightCommand.js +1 -28
  19. package/dist-cjs/commands/ListAnomalousLogGroupsCommand.js +1 -28
  20. package/dist-cjs/commands/ListEventsCommand.js +1 -28
  21. package/dist-cjs/commands/ListInsightsCommand.js +1 -28
  22. package/dist-cjs/commands/ListMonitoredResourcesCommand.js +1 -28
  23. package/dist-cjs/commands/ListNotificationChannelsCommand.js +1 -28
  24. package/dist-cjs/commands/ListOrganizationInsightsCommand.js +1 -28
  25. package/dist-cjs/commands/ListRecommendationsCommand.js +1 -28
  26. package/dist-cjs/commands/PutFeedbackCommand.js +1 -28
  27. package/dist-cjs/commands/RemoveNotificationChannelCommand.js +1 -28
  28. package/dist-cjs/commands/SearchInsightsCommand.js +1 -28
  29. package/dist-cjs/commands/SearchOrganizationInsightsCommand.js +1 -28
  30. package/dist-cjs/commands/StartCostEstimationCommand.js +1 -28
  31. package/dist-cjs/commands/UpdateEventSourcesConfigCommand.js +1 -28
  32. package/dist-cjs/commands/UpdateResourceCollectionCommand.js +1 -28
  33. package/dist-cjs/commands/UpdateServiceIntegrationCommand.js +1 -28
  34. package/dist-cjs/commands/index.js +1 -34
  35. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  36. package/dist-cjs/extensionConfiguration.js +1 -2
  37. package/dist-cjs/index.js +3706 -11
  38. package/dist-cjs/models/DevOpsGuruServiceException.js +1 -12
  39. package/dist-cjs/models/index.js +1 -4
  40. package/dist-cjs/models/models_0.js +1 -304
  41. package/dist-cjs/pagination/DescribeOrganizationResourceCollectionHealthPaginator.js +1 -7
  42. package/dist-cjs/pagination/DescribeResourceCollectionHealthPaginator.js +1 -7
  43. package/dist-cjs/pagination/GetCostEstimationPaginator.js +1 -7
  44. package/dist-cjs/pagination/GetResourceCollectionPaginator.js +1 -7
  45. package/dist-cjs/pagination/Interfaces.js +1 -2
  46. package/dist-cjs/pagination/ListAnomaliesForInsightPaginator.js +1 -7
  47. package/dist-cjs/pagination/ListAnomalousLogGroupsPaginator.js +1 -7
  48. package/dist-cjs/pagination/ListEventsPaginator.js +1 -7
  49. package/dist-cjs/pagination/ListInsightsPaginator.js +1 -7
  50. package/dist-cjs/pagination/ListMonitoredResourcesPaginator.js +1 -7
  51. package/dist-cjs/pagination/ListNotificationChannelsPaginator.js +1 -7
  52. package/dist-cjs/pagination/ListOrganizationInsightsPaginator.js +1 -7
  53. package/dist-cjs/pagination/ListRecommendationsPaginator.js +1 -7
  54. package/dist-cjs/pagination/SearchInsightsPaginator.js +1 -7
  55. package/dist-cjs/pagination/SearchOrganizationInsightsPaginator.js +1 -7
  56. package/dist-cjs/pagination/index.js +1 -18
  57. package/dist-cjs/protocols/Aws_restJson1.js +1 -2516
  58. package/dist-cjs/runtimeExtensions.js +1 -22
  59. package/package.json +40 -40
@@ -1,2516 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListInsightsCommand = exports.de_ListEventsCommand = exports.de_ListAnomalousLogGroupsCommand = exports.de_ListAnomaliesForInsightCommand = exports.de_GetResourceCollectionCommand = exports.de_GetCostEstimationCommand = exports.de_DescribeServiceIntegrationCommand = exports.de_DescribeResourceCollectionHealthCommand = exports.de_DescribeOrganizationResourceCollectionHealthCommand = exports.de_DescribeOrganizationOverviewCommand = exports.de_DescribeOrganizationHealthCommand = exports.de_DescribeInsightCommand = exports.de_DescribeFeedbackCommand = exports.de_DescribeEventSourcesConfigCommand = exports.de_DescribeAnomalyCommand = exports.de_DescribeAccountOverviewCommand = exports.de_DescribeAccountHealthCommand = exports.de_DeleteInsightCommand = exports.de_AddNotificationChannelCommand = exports.se_UpdateServiceIntegrationCommand = exports.se_UpdateResourceCollectionCommand = exports.se_UpdateEventSourcesConfigCommand = exports.se_StartCostEstimationCommand = exports.se_SearchOrganizationInsightsCommand = exports.se_SearchInsightsCommand = exports.se_RemoveNotificationChannelCommand = exports.se_PutFeedbackCommand = exports.se_ListRecommendationsCommand = exports.se_ListOrganizationInsightsCommand = exports.se_ListNotificationChannelsCommand = exports.se_ListMonitoredResourcesCommand = exports.se_ListInsightsCommand = exports.se_ListEventsCommand = exports.se_ListAnomalousLogGroupsCommand = exports.se_ListAnomaliesForInsightCommand = exports.se_GetResourceCollectionCommand = exports.se_GetCostEstimationCommand = exports.se_DescribeServiceIntegrationCommand = exports.se_DescribeResourceCollectionHealthCommand = exports.se_DescribeOrganizationResourceCollectionHealthCommand = exports.se_DescribeOrganizationOverviewCommand = exports.se_DescribeOrganizationHealthCommand = exports.se_DescribeInsightCommand = exports.se_DescribeFeedbackCommand = exports.se_DescribeEventSourcesConfigCommand = exports.se_DescribeAnomalyCommand = exports.se_DescribeAccountOverviewCommand = exports.se_DescribeAccountHealthCommand = exports.se_DeleteInsightCommand = exports.se_AddNotificationChannelCommand = void 0;
4
- exports.de_UpdateServiceIntegrationCommand = exports.de_UpdateResourceCollectionCommand = exports.de_UpdateEventSourcesConfigCommand = exports.de_StartCostEstimationCommand = exports.de_SearchOrganizationInsightsCommand = exports.de_SearchInsightsCommand = exports.de_RemoveNotificationChannelCommand = exports.de_PutFeedbackCommand = exports.de_ListRecommendationsCommand = exports.de_ListOrganizationInsightsCommand = exports.de_ListNotificationChannelsCommand = exports.de_ListMonitoredResourcesCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const uuid_1 = require("uuid");
8
- const DevOpsGuruServiceException_1 = require("../models/DevOpsGuruServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_AddNotificationChannelCommand = async (input, context) => {
11
- const b = (0, core_1.requestBuilder)(input, context);
12
- const headers = {
13
- "content-type": "application/json",
14
- };
15
- b.bp("/channels");
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- Config: (_) => (0, smithy_client_1._json)(_),
19
- }));
20
- b.m("PUT").h(headers).b(body);
21
- return b.build();
22
- };
23
- exports.se_AddNotificationChannelCommand = se_AddNotificationChannelCommand;
24
- const se_DeleteInsightCommand = async (input, context) => {
25
- const b = (0, core_1.requestBuilder)(input, context);
26
- const headers = {};
27
- b.bp("/insights/{Id}");
28
- b.p("Id", () => input.Id, "{Id}", false);
29
- let body;
30
- b.m("DELETE").h(headers).b(body);
31
- return b.build();
32
- };
33
- exports.se_DeleteInsightCommand = se_DeleteInsightCommand;
34
- const se_DescribeAccountHealthCommand = async (input, context) => {
35
- const b = (0, core_1.requestBuilder)(input, context);
36
- const headers = {
37
- "content-type": "application/json",
38
- };
39
- b.bp("/accounts/health");
40
- let body;
41
- body = "";
42
- b.m("GET").h(headers).b(body);
43
- return b.build();
44
- };
45
- exports.se_DescribeAccountHealthCommand = se_DescribeAccountHealthCommand;
46
- const se_DescribeAccountOverviewCommand = async (input, context) => {
47
- const b = (0, core_1.requestBuilder)(input, context);
48
- const headers = {
49
- "content-type": "application/json",
50
- };
51
- b.bp("/accounts/overview");
52
- let body;
53
- body = JSON.stringify((0, smithy_client_1.take)(input, {
54
- FromTime: (_) => Math.round(_.getTime() / 1000),
55
- ToTime: (_) => Math.round(_.getTime() / 1000),
56
- }));
57
- b.m("POST").h(headers).b(body);
58
- return b.build();
59
- };
60
- exports.se_DescribeAccountOverviewCommand = se_DescribeAccountOverviewCommand;
61
- const se_DescribeAnomalyCommand = async (input, context) => {
62
- const b = (0, core_1.requestBuilder)(input, context);
63
- const headers = {};
64
- b.bp("/anomalies/{Id}");
65
- b.p("Id", () => input.Id, "{Id}", false);
66
- const query = (0, smithy_client_1.map)({
67
- [_AI]: [, input[_AI]],
68
- });
69
- let body;
70
- b.m("GET").h(headers).q(query).b(body);
71
- return b.build();
72
- };
73
- exports.se_DescribeAnomalyCommand = se_DescribeAnomalyCommand;
74
- const se_DescribeEventSourcesConfigCommand = async (input, context) => {
75
- const b = (0, core_1.requestBuilder)(input, context);
76
- const headers = {
77
- "content-type": "application/json",
78
- };
79
- b.bp("/event-sources");
80
- let body;
81
- body = "";
82
- b.m("POST").h(headers).b(body);
83
- return b.build();
84
- };
85
- exports.se_DescribeEventSourcesConfigCommand = se_DescribeEventSourcesConfigCommand;
86
- const se_DescribeFeedbackCommand = async (input, context) => {
87
- const b = (0, core_1.requestBuilder)(input, context);
88
- const headers = {
89
- "content-type": "application/json",
90
- };
91
- b.bp("/feedback");
92
- let body;
93
- body = JSON.stringify((0, smithy_client_1.take)(input, {
94
- InsightId: [],
95
- }));
96
- b.m("POST").h(headers).b(body);
97
- return b.build();
98
- };
99
- exports.se_DescribeFeedbackCommand = se_DescribeFeedbackCommand;
100
- const se_DescribeInsightCommand = async (input, context) => {
101
- const b = (0, core_1.requestBuilder)(input, context);
102
- const headers = {};
103
- b.bp("/insights/{Id}");
104
- b.p("Id", () => input.Id, "{Id}", false);
105
- const query = (0, smithy_client_1.map)({
106
- [_AI]: [, input[_AI]],
107
- });
108
- let body;
109
- b.m("GET").h(headers).q(query).b(body);
110
- return b.build();
111
- };
112
- exports.se_DescribeInsightCommand = se_DescribeInsightCommand;
113
- const se_DescribeOrganizationHealthCommand = async (input, context) => {
114
- const b = (0, core_1.requestBuilder)(input, context);
115
- const headers = {
116
- "content-type": "application/json",
117
- };
118
- b.bp("/organization/health");
119
- let body;
120
- body = JSON.stringify((0, smithy_client_1.take)(input, {
121
- AccountIds: (_) => (0, smithy_client_1._json)(_),
122
- OrganizationalUnitIds: (_) => (0, smithy_client_1._json)(_),
123
- }));
124
- b.m("POST").h(headers).b(body);
125
- return b.build();
126
- };
127
- exports.se_DescribeOrganizationHealthCommand = se_DescribeOrganizationHealthCommand;
128
- const se_DescribeOrganizationOverviewCommand = async (input, context) => {
129
- const b = (0, core_1.requestBuilder)(input, context);
130
- const headers = {
131
- "content-type": "application/json",
132
- };
133
- b.bp("/organization/overview");
134
- let body;
135
- body = JSON.stringify((0, smithy_client_1.take)(input, {
136
- AccountIds: (_) => (0, smithy_client_1._json)(_),
137
- FromTime: (_) => Math.round(_.getTime() / 1000),
138
- OrganizationalUnitIds: (_) => (0, smithy_client_1._json)(_),
139
- ToTime: (_) => Math.round(_.getTime() / 1000),
140
- }));
141
- b.m("POST").h(headers).b(body);
142
- return b.build();
143
- };
144
- exports.se_DescribeOrganizationOverviewCommand = se_DescribeOrganizationOverviewCommand;
145
- const se_DescribeOrganizationResourceCollectionHealthCommand = async (input, context) => {
146
- const b = (0, core_1.requestBuilder)(input, context);
147
- const headers = {
148
- "content-type": "application/json",
149
- };
150
- b.bp("/organization/health/resource-collection");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1.take)(input, {
153
- AccountIds: (_) => (0, smithy_client_1._json)(_),
154
- MaxResults: [],
155
- NextToken: [],
156
- OrganizationResourceCollectionType: [],
157
- OrganizationalUnitIds: (_) => (0, smithy_client_1._json)(_),
158
- }));
159
- b.m("POST").h(headers).b(body);
160
- return b.build();
161
- };
162
- exports.se_DescribeOrganizationResourceCollectionHealthCommand = se_DescribeOrganizationResourceCollectionHealthCommand;
163
- const se_DescribeResourceCollectionHealthCommand = async (input, context) => {
164
- const b = (0, core_1.requestBuilder)(input, context);
165
- const headers = {};
166
- b.bp("/accounts/health/resource-collection/{ResourceCollectionType}");
167
- b.p("ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
168
- const query = (0, smithy_client_1.map)({
169
- [_NT]: [, input[_NT]],
170
- });
171
- let body;
172
- b.m("GET").h(headers).q(query).b(body);
173
- return b.build();
174
- };
175
- exports.se_DescribeResourceCollectionHealthCommand = se_DescribeResourceCollectionHealthCommand;
176
- const se_DescribeServiceIntegrationCommand = async (input, context) => {
177
- const b = (0, core_1.requestBuilder)(input, context);
178
- const headers = {
179
- "content-type": "application/json",
180
- };
181
- b.bp("/service-integrations");
182
- let body;
183
- body = "";
184
- b.m("GET").h(headers).b(body);
185
- return b.build();
186
- };
187
- exports.se_DescribeServiceIntegrationCommand = se_DescribeServiceIntegrationCommand;
188
- const se_GetCostEstimationCommand = async (input, context) => {
189
- const b = (0, core_1.requestBuilder)(input, context);
190
- const headers = {};
191
- b.bp("/cost-estimation");
192
- const query = (0, smithy_client_1.map)({
193
- [_NT]: [, input[_NT]],
194
- });
195
- let body;
196
- b.m("GET").h(headers).q(query).b(body);
197
- return b.build();
198
- };
199
- exports.se_GetCostEstimationCommand = se_GetCostEstimationCommand;
200
- const se_GetResourceCollectionCommand = async (input, context) => {
201
- const b = (0, core_1.requestBuilder)(input, context);
202
- const headers = {};
203
- b.bp("/resource-collections/{ResourceCollectionType}");
204
- b.p("ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
205
- const query = (0, smithy_client_1.map)({
206
- [_NT]: [, input[_NT]],
207
- });
208
- let body;
209
- b.m("GET").h(headers).q(query).b(body);
210
- return b.build();
211
- };
212
- exports.se_GetResourceCollectionCommand = se_GetResourceCollectionCommand;
213
- const se_ListAnomaliesForInsightCommand = async (input, context) => {
214
- const b = (0, core_1.requestBuilder)(input, context);
215
- const headers = {
216
- "content-type": "application/json",
217
- };
218
- b.bp("/anomalies/insight/{InsightId}");
219
- b.p("InsightId", () => input.InsightId, "{InsightId}", false);
220
- let body;
221
- body = JSON.stringify((0, smithy_client_1.take)(input, {
222
- AccountId: [],
223
- Filters: (_) => (0, smithy_client_1._json)(_),
224
- MaxResults: [],
225
- NextToken: [],
226
- StartTimeRange: (_) => se_StartTimeRange(_, context),
227
- }));
228
- b.m("POST").h(headers).b(body);
229
- return b.build();
230
- };
231
- exports.se_ListAnomaliesForInsightCommand = se_ListAnomaliesForInsightCommand;
232
- const se_ListAnomalousLogGroupsCommand = async (input, context) => {
233
- const b = (0, core_1.requestBuilder)(input, context);
234
- const headers = {
235
- "content-type": "application/json",
236
- };
237
- b.bp("/list-log-anomalies");
238
- let body;
239
- body = JSON.stringify((0, smithy_client_1.take)(input, {
240
- InsightId: [],
241
- MaxResults: [],
242
- NextToken: [],
243
- }));
244
- b.m("POST").h(headers).b(body);
245
- return b.build();
246
- };
247
- exports.se_ListAnomalousLogGroupsCommand = se_ListAnomalousLogGroupsCommand;
248
- const se_ListEventsCommand = async (input, context) => {
249
- const b = (0, core_1.requestBuilder)(input, context);
250
- const headers = {
251
- "content-type": "application/json",
252
- };
253
- b.bp("/events");
254
- let body;
255
- body = JSON.stringify((0, smithy_client_1.take)(input, {
256
- AccountId: [],
257
- Filters: (_) => se_ListEventsFilters(_, context),
258
- MaxResults: [],
259
- NextToken: [],
260
- }));
261
- b.m("POST").h(headers).b(body);
262
- return b.build();
263
- };
264
- exports.se_ListEventsCommand = se_ListEventsCommand;
265
- const se_ListInsightsCommand = async (input, context) => {
266
- const b = (0, core_1.requestBuilder)(input, context);
267
- const headers = {
268
- "content-type": "application/json",
269
- };
270
- b.bp("/insights");
271
- let body;
272
- body = JSON.stringify((0, smithy_client_1.take)(input, {
273
- MaxResults: [],
274
- NextToken: [],
275
- StatusFilter: (_) => se_ListInsightsStatusFilter(_, context),
276
- }));
277
- b.m("POST").h(headers).b(body);
278
- return b.build();
279
- };
280
- exports.se_ListInsightsCommand = se_ListInsightsCommand;
281
- const se_ListMonitoredResourcesCommand = async (input, context) => {
282
- const b = (0, core_1.requestBuilder)(input, context);
283
- const headers = {
284
- "content-type": "application/json",
285
- };
286
- b.bp("/monitoredResources");
287
- let body;
288
- body = JSON.stringify((0, smithy_client_1.take)(input, {
289
- Filters: (_) => (0, smithy_client_1._json)(_),
290
- MaxResults: [],
291
- NextToken: [],
292
- }));
293
- b.m("POST").h(headers).b(body);
294
- return b.build();
295
- };
296
- exports.se_ListMonitoredResourcesCommand = se_ListMonitoredResourcesCommand;
297
- const se_ListNotificationChannelsCommand = async (input, context) => {
298
- const b = (0, core_1.requestBuilder)(input, context);
299
- const headers = {
300
- "content-type": "application/json",
301
- };
302
- b.bp("/channels");
303
- let body;
304
- body = JSON.stringify((0, smithy_client_1.take)(input, {
305
- NextToken: [],
306
- }));
307
- b.m("POST").h(headers).b(body);
308
- return b.build();
309
- };
310
- exports.se_ListNotificationChannelsCommand = se_ListNotificationChannelsCommand;
311
- const se_ListOrganizationInsightsCommand = async (input, context) => {
312
- const b = (0, core_1.requestBuilder)(input, context);
313
- const headers = {
314
- "content-type": "application/json",
315
- };
316
- b.bp("/organization/insights");
317
- let body;
318
- body = JSON.stringify((0, smithy_client_1.take)(input, {
319
- AccountIds: (_) => (0, smithy_client_1._json)(_),
320
- MaxResults: [],
321
- NextToken: [],
322
- OrganizationalUnitIds: (_) => (0, smithy_client_1._json)(_),
323
- StatusFilter: (_) => se_ListInsightsStatusFilter(_, context),
324
- }));
325
- b.m("POST").h(headers).b(body);
326
- return b.build();
327
- };
328
- exports.se_ListOrganizationInsightsCommand = se_ListOrganizationInsightsCommand;
329
- const se_ListRecommendationsCommand = async (input, context) => {
330
- const b = (0, core_1.requestBuilder)(input, context);
331
- const headers = {
332
- "content-type": "application/json",
333
- };
334
- b.bp("/recommendations");
335
- let body;
336
- body = JSON.stringify((0, smithy_client_1.take)(input, {
337
- AccountId: [],
338
- InsightId: [],
339
- Locale: [],
340
- NextToken: [],
341
- }));
342
- b.m("POST").h(headers).b(body);
343
- return b.build();
344
- };
345
- exports.se_ListRecommendationsCommand = se_ListRecommendationsCommand;
346
- const se_PutFeedbackCommand = async (input, context) => {
347
- const b = (0, core_1.requestBuilder)(input, context);
348
- const headers = {
349
- "content-type": "application/json",
350
- };
351
- b.bp("/feedback");
352
- let body;
353
- body = JSON.stringify((0, smithy_client_1.take)(input, {
354
- InsightFeedback: (_) => (0, smithy_client_1._json)(_),
355
- }));
356
- b.m("PUT").h(headers).b(body);
357
- return b.build();
358
- };
359
- exports.se_PutFeedbackCommand = se_PutFeedbackCommand;
360
- const se_RemoveNotificationChannelCommand = async (input, context) => {
361
- const b = (0, core_1.requestBuilder)(input, context);
362
- const headers = {};
363
- b.bp("/channels/{Id}");
364
- b.p("Id", () => input.Id, "{Id}", false);
365
- let body;
366
- b.m("DELETE").h(headers).b(body);
367
- return b.build();
368
- };
369
- exports.se_RemoveNotificationChannelCommand = se_RemoveNotificationChannelCommand;
370
- const se_SearchInsightsCommand = async (input, context) => {
371
- const b = (0, core_1.requestBuilder)(input, context);
372
- const headers = {
373
- "content-type": "application/json",
374
- };
375
- b.bp("/insights/search");
376
- let body;
377
- body = JSON.stringify((0, smithy_client_1.take)(input, {
378
- Filters: (_) => (0, smithy_client_1._json)(_),
379
- MaxResults: [],
380
- NextToken: [],
381
- StartTimeRange: (_) => se_StartTimeRange(_, context),
382
- Type: [],
383
- }));
384
- b.m("POST").h(headers).b(body);
385
- return b.build();
386
- };
387
- exports.se_SearchInsightsCommand = se_SearchInsightsCommand;
388
- const se_SearchOrganizationInsightsCommand = async (input, context) => {
389
- const b = (0, core_1.requestBuilder)(input, context);
390
- const headers = {
391
- "content-type": "application/json",
392
- };
393
- b.bp("/organization/insights/search");
394
- let body;
395
- body = JSON.stringify((0, smithy_client_1.take)(input, {
396
- AccountIds: (_) => (0, smithy_client_1._json)(_),
397
- Filters: (_) => (0, smithy_client_1._json)(_),
398
- MaxResults: [],
399
- NextToken: [],
400
- StartTimeRange: (_) => se_StartTimeRange(_, context),
401
- Type: [],
402
- }));
403
- b.m("POST").h(headers).b(body);
404
- return b.build();
405
- };
406
- exports.se_SearchOrganizationInsightsCommand = se_SearchOrganizationInsightsCommand;
407
- const se_StartCostEstimationCommand = async (input, context) => {
408
- const b = (0, core_1.requestBuilder)(input, context);
409
- const headers = {
410
- "content-type": "application/json",
411
- };
412
- b.bp("/cost-estimation");
413
- let body;
414
- body = JSON.stringify((0, smithy_client_1.take)(input, {
415
- ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
416
- ResourceCollection: (_) => (0, smithy_client_1._json)(_),
417
- }));
418
- b.m("PUT").h(headers).b(body);
419
- return b.build();
420
- };
421
- exports.se_StartCostEstimationCommand = se_StartCostEstimationCommand;
422
- const se_UpdateEventSourcesConfigCommand = async (input, context) => {
423
- const b = (0, core_1.requestBuilder)(input, context);
424
- const headers = {
425
- "content-type": "application/json",
426
- };
427
- b.bp("/event-sources");
428
- let body;
429
- body = JSON.stringify((0, smithy_client_1.take)(input, {
430
- EventSources: (_) => (0, smithy_client_1._json)(_),
431
- }));
432
- b.m("PUT").h(headers).b(body);
433
- return b.build();
434
- };
435
- exports.se_UpdateEventSourcesConfigCommand = se_UpdateEventSourcesConfigCommand;
436
- const se_UpdateResourceCollectionCommand = async (input, context) => {
437
- const b = (0, core_1.requestBuilder)(input, context);
438
- const headers = {
439
- "content-type": "application/json",
440
- };
441
- b.bp("/resource-collections");
442
- let body;
443
- body = JSON.stringify((0, smithy_client_1.take)(input, {
444
- Action: [],
445
- ResourceCollection: (_) => (0, smithy_client_1._json)(_),
446
- }));
447
- b.m("PUT").h(headers).b(body);
448
- return b.build();
449
- };
450
- exports.se_UpdateResourceCollectionCommand = se_UpdateResourceCollectionCommand;
451
- const se_UpdateServiceIntegrationCommand = async (input, context) => {
452
- const b = (0, core_1.requestBuilder)(input, context);
453
- const headers = {
454
- "content-type": "application/json",
455
- };
456
- b.bp("/service-integrations");
457
- let body;
458
- body = JSON.stringify((0, smithy_client_1.take)(input, {
459
- ServiceIntegration: (_) => (0, smithy_client_1._json)(_),
460
- }));
461
- b.m("PUT").h(headers).b(body);
462
- return b.build();
463
- };
464
- exports.se_UpdateServiceIntegrationCommand = se_UpdateServiceIntegrationCommand;
465
- const de_AddNotificationChannelCommand = async (output, context) => {
466
- if (output.statusCode !== 200 && output.statusCode >= 300) {
467
- return de_AddNotificationChannelCommandError(output, context);
468
- }
469
- const contents = (0, smithy_client_1.map)({
470
- $metadata: deserializeMetadata(output),
471
- });
472
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
473
- const doc = (0, smithy_client_1.take)(data, {
474
- Id: smithy_client_1.expectString,
475
- });
476
- Object.assign(contents, doc);
477
- return contents;
478
- };
479
- exports.de_AddNotificationChannelCommand = de_AddNotificationChannelCommand;
480
- const de_AddNotificationChannelCommandError = async (output, context) => {
481
- const parsedOutput = {
482
- ...output,
483
- body: await parseErrorBody(output.body, context),
484
- };
485
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
486
- switch (errorCode) {
487
- case "AccessDeniedException":
488
- case "com.amazonaws.devopsguru#AccessDeniedException":
489
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
490
- case "ConflictException":
491
- case "com.amazonaws.devopsguru#ConflictException":
492
- throw await de_ConflictExceptionRes(parsedOutput, context);
493
- case "InternalServerException":
494
- case "com.amazonaws.devopsguru#InternalServerException":
495
- throw await de_InternalServerExceptionRes(parsedOutput, context);
496
- case "ResourceNotFoundException":
497
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
498
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
499
- case "ServiceQuotaExceededException":
500
- case "com.amazonaws.devopsguru#ServiceQuotaExceededException":
501
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
502
- case "ThrottlingException":
503
- case "com.amazonaws.devopsguru#ThrottlingException":
504
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
505
- case "ValidationException":
506
- case "com.amazonaws.devopsguru#ValidationException":
507
- throw await de_ValidationExceptionRes(parsedOutput, context);
508
- default:
509
- const parsedBody = parsedOutput.body;
510
- return throwDefaultError({
511
- output,
512
- parsedBody,
513
- errorCode,
514
- });
515
- }
516
- };
517
- const de_DeleteInsightCommand = async (output, context) => {
518
- if (output.statusCode !== 200 && output.statusCode >= 300) {
519
- return de_DeleteInsightCommandError(output, context);
520
- }
521
- const contents = (0, smithy_client_1.map)({
522
- $metadata: deserializeMetadata(output),
523
- });
524
- await (0, smithy_client_1.collectBody)(output.body, context);
525
- return contents;
526
- };
527
- exports.de_DeleteInsightCommand = de_DeleteInsightCommand;
528
- const de_DeleteInsightCommandError = async (output, context) => {
529
- const parsedOutput = {
530
- ...output,
531
- body: await parseErrorBody(output.body, context),
532
- };
533
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
534
- switch (errorCode) {
535
- case "AccessDeniedException":
536
- case "com.amazonaws.devopsguru#AccessDeniedException":
537
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
538
- case "ConflictException":
539
- case "com.amazonaws.devopsguru#ConflictException":
540
- throw await de_ConflictExceptionRes(parsedOutput, context);
541
- case "InternalServerException":
542
- case "com.amazonaws.devopsguru#InternalServerException":
543
- throw await de_InternalServerExceptionRes(parsedOutput, context);
544
- case "ResourceNotFoundException":
545
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
546
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
547
- case "ThrottlingException":
548
- case "com.amazonaws.devopsguru#ThrottlingException":
549
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
550
- case "ValidationException":
551
- case "com.amazonaws.devopsguru#ValidationException":
552
- throw await de_ValidationExceptionRes(parsedOutput, context);
553
- default:
554
- const parsedBody = parsedOutput.body;
555
- return throwDefaultError({
556
- output,
557
- parsedBody,
558
- errorCode,
559
- });
560
- }
561
- };
562
- const de_DescribeAccountHealthCommand = async (output, context) => {
563
- if (output.statusCode !== 200 && output.statusCode >= 300) {
564
- return de_DescribeAccountHealthCommandError(output, context);
565
- }
566
- const contents = (0, smithy_client_1.map)({
567
- $metadata: deserializeMetadata(output),
568
- });
569
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
570
- const doc = (0, smithy_client_1.take)(data, {
571
- AnalyzedResourceCount: smithy_client_1.expectLong,
572
- MetricsAnalyzed: smithy_client_1.expectInt32,
573
- OpenProactiveInsights: smithy_client_1.expectInt32,
574
- OpenReactiveInsights: smithy_client_1.expectInt32,
575
- ResourceHours: smithy_client_1.expectLong,
576
- });
577
- Object.assign(contents, doc);
578
- return contents;
579
- };
580
- exports.de_DescribeAccountHealthCommand = de_DescribeAccountHealthCommand;
581
- const de_DescribeAccountHealthCommandError = async (output, context) => {
582
- const parsedOutput = {
583
- ...output,
584
- body: await parseErrorBody(output.body, context),
585
- };
586
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
587
- switch (errorCode) {
588
- case "AccessDeniedException":
589
- case "com.amazonaws.devopsguru#AccessDeniedException":
590
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
591
- case "InternalServerException":
592
- case "com.amazonaws.devopsguru#InternalServerException":
593
- throw await de_InternalServerExceptionRes(parsedOutput, context);
594
- case "ThrottlingException":
595
- case "com.amazonaws.devopsguru#ThrottlingException":
596
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
597
- case "ValidationException":
598
- case "com.amazonaws.devopsguru#ValidationException":
599
- throw await de_ValidationExceptionRes(parsedOutput, context);
600
- default:
601
- const parsedBody = parsedOutput.body;
602
- return throwDefaultError({
603
- output,
604
- parsedBody,
605
- errorCode,
606
- });
607
- }
608
- };
609
- const de_DescribeAccountOverviewCommand = async (output, context) => {
610
- if (output.statusCode !== 200 && output.statusCode >= 300) {
611
- return de_DescribeAccountOverviewCommandError(output, context);
612
- }
613
- const contents = (0, smithy_client_1.map)({
614
- $metadata: deserializeMetadata(output),
615
- });
616
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
617
- const doc = (0, smithy_client_1.take)(data, {
618
- MeanTimeToRecoverInMilliseconds: smithy_client_1.expectLong,
619
- ProactiveInsights: smithy_client_1.expectInt32,
620
- ReactiveInsights: smithy_client_1.expectInt32,
621
- });
622
- Object.assign(contents, doc);
623
- return contents;
624
- };
625
- exports.de_DescribeAccountOverviewCommand = de_DescribeAccountOverviewCommand;
626
- const de_DescribeAccountOverviewCommandError = async (output, context) => {
627
- const parsedOutput = {
628
- ...output,
629
- body: await parseErrorBody(output.body, context),
630
- };
631
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
632
- switch (errorCode) {
633
- case "AccessDeniedException":
634
- case "com.amazonaws.devopsguru#AccessDeniedException":
635
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
636
- case "InternalServerException":
637
- case "com.amazonaws.devopsguru#InternalServerException":
638
- throw await de_InternalServerExceptionRes(parsedOutput, context);
639
- case "ThrottlingException":
640
- case "com.amazonaws.devopsguru#ThrottlingException":
641
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
642
- case "ValidationException":
643
- case "com.amazonaws.devopsguru#ValidationException":
644
- throw await de_ValidationExceptionRes(parsedOutput, context);
645
- default:
646
- const parsedBody = parsedOutput.body;
647
- return throwDefaultError({
648
- output,
649
- parsedBody,
650
- errorCode,
651
- });
652
- }
653
- };
654
- const de_DescribeAnomalyCommand = async (output, context) => {
655
- if (output.statusCode !== 200 && output.statusCode >= 300) {
656
- return de_DescribeAnomalyCommandError(output, context);
657
- }
658
- const contents = (0, smithy_client_1.map)({
659
- $metadata: deserializeMetadata(output),
660
- });
661
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
662
- const doc = (0, smithy_client_1.take)(data, {
663
- ProactiveAnomaly: (_) => de_ProactiveAnomaly(_, context),
664
- ReactiveAnomaly: (_) => de_ReactiveAnomaly(_, context),
665
- });
666
- Object.assign(contents, doc);
667
- return contents;
668
- };
669
- exports.de_DescribeAnomalyCommand = de_DescribeAnomalyCommand;
670
- const de_DescribeAnomalyCommandError = async (output, context) => {
671
- const parsedOutput = {
672
- ...output,
673
- body: await parseErrorBody(output.body, context),
674
- };
675
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
676
- switch (errorCode) {
677
- case "AccessDeniedException":
678
- case "com.amazonaws.devopsguru#AccessDeniedException":
679
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
680
- case "InternalServerException":
681
- case "com.amazonaws.devopsguru#InternalServerException":
682
- throw await de_InternalServerExceptionRes(parsedOutput, context);
683
- case "ResourceNotFoundException":
684
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
685
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
686
- case "ThrottlingException":
687
- case "com.amazonaws.devopsguru#ThrottlingException":
688
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
689
- case "ValidationException":
690
- case "com.amazonaws.devopsguru#ValidationException":
691
- throw await de_ValidationExceptionRes(parsedOutput, context);
692
- default:
693
- const parsedBody = parsedOutput.body;
694
- return throwDefaultError({
695
- output,
696
- parsedBody,
697
- errorCode,
698
- });
699
- }
700
- };
701
- const de_DescribeEventSourcesConfigCommand = async (output, context) => {
702
- if (output.statusCode !== 200 && output.statusCode >= 300) {
703
- return de_DescribeEventSourcesConfigCommandError(output, context);
704
- }
705
- const contents = (0, smithy_client_1.map)({
706
- $metadata: deserializeMetadata(output),
707
- });
708
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
709
- const doc = (0, smithy_client_1.take)(data, {
710
- EventSources: smithy_client_1._json,
711
- });
712
- Object.assign(contents, doc);
713
- return contents;
714
- };
715
- exports.de_DescribeEventSourcesConfigCommand = de_DescribeEventSourcesConfigCommand;
716
- const de_DescribeEventSourcesConfigCommandError = async (output, context) => {
717
- const parsedOutput = {
718
- ...output,
719
- body: await parseErrorBody(output.body, context),
720
- };
721
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
722
- switch (errorCode) {
723
- case "AccessDeniedException":
724
- case "com.amazonaws.devopsguru#AccessDeniedException":
725
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
726
- case "InternalServerException":
727
- case "com.amazonaws.devopsguru#InternalServerException":
728
- throw await de_InternalServerExceptionRes(parsedOutput, context);
729
- case "ThrottlingException":
730
- case "com.amazonaws.devopsguru#ThrottlingException":
731
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
732
- case "ValidationException":
733
- case "com.amazonaws.devopsguru#ValidationException":
734
- throw await de_ValidationExceptionRes(parsedOutput, context);
735
- default:
736
- const parsedBody = parsedOutput.body;
737
- return throwDefaultError({
738
- output,
739
- parsedBody,
740
- errorCode,
741
- });
742
- }
743
- };
744
- const de_DescribeFeedbackCommand = async (output, context) => {
745
- if (output.statusCode !== 200 && output.statusCode >= 300) {
746
- return de_DescribeFeedbackCommandError(output, context);
747
- }
748
- const contents = (0, smithy_client_1.map)({
749
- $metadata: deserializeMetadata(output),
750
- });
751
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
752
- const doc = (0, smithy_client_1.take)(data, {
753
- InsightFeedback: smithy_client_1._json,
754
- });
755
- Object.assign(contents, doc);
756
- return contents;
757
- };
758
- exports.de_DescribeFeedbackCommand = de_DescribeFeedbackCommand;
759
- const de_DescribeFeedbackCommandError = async (output, context) => {
760
- const parsedOutput = {
761
- ...output,
762
- body: await parseErrorBody(output.body, context),
763
- };
764
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
765
- switch (errorCode) {
766
- case "AccessDeniedException":
767
- case "com.amazonaws.devopsguru#AccessDeniedException":
768
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
769
- case "InternalServerException":
770
- case "com.amazonaws.devopsguru#InternalServerException":
771
- throw await de_InternalServerExceptionRes(parsedOutput, context);
772
- case "ResourceNotFoundException":
773
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
774
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
775
- case "ThrottlingException":
776
- case "com.amazonaws.devopsguru#ThrottlingException":
777
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
778
- case "ValidationException":
779
- case "com.amazonaws.devopsguru#ValidationException":
780
- throw await de_ValidationExceptionRes(parsedOutput, context);
781
- default:
782
- const parsedBody = parsedOutput.body;
783
- return throwDefaultError({
784
- output,
785
- parsedBody,
786
- errorCode,
787
- });
788
- }
789
- };
790
- const de_DescribeInsightCommand = async (output, context) => {
791
- if (output.statusCode !== 200 && output.statusCode >= 300) {
792
- return de_DescribeInsightCommandError(output, context);
793
- }
794
- const contents = (0, smithy_client_1.map)({
795
- $metadata: deserializeMetadata(output),
796
- });
797
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
798
- const doc = (0, smithy_client_1.take)(data, {
799
- ProactiveInsight: (_) => de_ProactiveInsight(_, context),
800
- ReactiveInsight: (_) => de_ReactiveInsight(_, context),
801
- });
802
- Object.assign(contents, doc);
803
- return contents;
804
- };
805
- exports.de_DescribeInsightCommand = de_DescribeInsightCommand;
806
- const de_DescribeInsightCommandError = async (output, context) => {
807
- const parsedOutput = {
808
- ...output,
809
- body: await parseErrorBody(output.body, context),
810
- };
811
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
812
- switch (errorCode) {
813
- case "AccessDeniedException":
814
- case "com.amazonaws.devopsguru#AccessDeniedException":
815
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
816
- case "InternalServerException":
817
- case "com.amazonaws.devopsguru#InternalServerException":
818
- throw await de_InternalServerExceptionRes(parsedOutput, context);
819
- case "ResourceNotFoundException":
820
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
821
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
822
- case "ThrottlingException":
823
- case "com.amazonaws.devopsguru#ThrottlingException":
824
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
825
- case "ValidationException":
826
- case "com.amazonaws.devopsguru#ValidationException":
827
- throw await de_ValidationExceptionRes(parsedOutput, context);
828
- default:
829
- const parsedBody = parsedOutput.body;
830
- return throwDefaultError({
831
- output,
832
- parsedBody,
833
- errorCode,
834
- });
835
- }
836
- };
837
- const de_DescribeOrganizationHealthCommand = async (output, context) => {
838
- if (output.statusCode !== 200 && output.statusCode >= 300) {
839
- return de_DescribeOrganizationHealthCommandError(output, context);
840
- }
841
- const contents = (0, smithy_client_1.map)({
842
- $metadata: deserializeMetadata(output),
843
- });
844
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
845
- const doc = (0, smithy_client_1.take)(data, {
846
- MetricsAnalyzed: smithy_client_1.expectInt32,
847
- OpenProactiveInsights: smithy_client_1.expectInt32,
848
- OpenReactiveInsights: smithy_client_1.expectInt32,
849
- ResourceHours: smithy_client_1.expectLong,
850
- });
851
- Object.assign(contents, doc);
852
- return contents;
853
- };
854
- exports.de_DescribeOrganizationHealthCommand = de_DescribeOrganizationHealthCommand;
855
- const de_DescribeOrganizationHealthCommandError = async (output, context) => {
856
- const parsedOutput = {
857
- ...output,
858
- body: await parseErrorBody(output.body, context),
859
- };
860
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
861
- switch (errorCode) {
862
- case "AccessDeniedException":
863
- case "com.amazonaws.devopsguru#AccessDeniedException":
864
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
865
- case "InternalServerException":
866
- case "com.amazonaws.devopsguru#InternalServerException":
867
- throw await de_InternalServerExceptionRes(parsedOutput, context);
868
- case "ThrottlingException":
869
- case "com.amazonaws.devopsguru#ThrottlingException":
870
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
871
- case "ValidationException":
872
- case "com.amazonaws.devopsguru#ValidationException":
873
- throw await de_ValidationExceptionRes(parsedOutput, context);
874
- default:
875
- const parsedBody = parsedOutput.body;
876
- return throwDefaultError({
877
- output,
878
- parsedBody,
879
- errorCode,
880
- });
881
- }
882
- };
883
- const de_DescribeOrganizationOverviewCommand = async (output, context) => {
884
- if (output.statusCode !== 200 && output.statusCode >= 300) {
885
- return de_DescribeOrganizationOverviewCommandError(output, context);
886
- }
887
- const contents = (0, smithy_client_1.map)({
888
- $metadata: deserializeMetadata(output),
889
- });
890
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
891
- const doc = (0, smithy_client_1.take)(data, {
892
- ProactiveInsights: smithy_client_1.expectInt32,
893
- ReactiveInsights: smithy_client_1.expectInt32,
894
- });
895
- Object.assign(contents, doc);
896
- return contents;
897
- };
898
- exports.de_DescribeOrganizationOverviewCommand = de_DescribeOrganizationOverviewCommand;
899
- const de_DescribeOrganizationOverviewCommandError = async (output, context) => {
900
- const parsedOutput = {
901
- ...output,
902
- body: await parseErrorBody(output.body, context),
903
- };
904
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
905
- switch (errorCode) {
906
- case "AccessDeniedException":
907
- case "com.amazonaws.devopsguru#AccessDeniedException":
908
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
909
- case "InternalServerException":
910
- case "com.amazonaws.devopsguru#InternalServerException":
911
- throw await de_InternalServerExceptionRes(parsedOutput, context);
912
- case "ThrottlingException":
913
- case "com.amazonaws.devopsguru#ThrottlingException":
914
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
915
- case "ValidationException":
916
- case "com.amazonaws.devopsguru#ValidationException":
917
- throw await de_ValidationExceptionRes(parsedOutput, context);
918
- default:
919
- const parsedBody = parsedOutput.body;
920
- return throwDefaultError({
921
- output,
922
- parsedBody,
923
- errorCode,
924
- });
925
- }
926
- };
927
- const de_DescribeOrganizationResourceCollectionHealthCommand = async (output, context) => {
928
- if (output.statusCode !== 200 && output.statusCode >= 300) {
929
- return de_DescribeOrganizationResourceCollectionHealthCommandError(output, context);
930
- }
931
- const contents = (0, smithy_client_1.map)({
932
- $metadata: deserializeMetadata(output),
933
- });
934
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
935
- const doc = (0, smithy_client_1.take)(data, {
936
- Account: smithy_client_1._json,
937
- CloudFormation: smithy_client_1._json,
938
- NextToken: smithy_client_1.expectString,
939
- Service: smithy_client_1._json,
940
- Tags: smithy_client_1._json,
941
- });
942
- Object.assign(contents, doc);
943
- return contents;
944
- };
945
- exports.de_DescribeOrganizationResourceCollectionHealthCommand = de_DescribeOrganizationResourceCollectionHealthCommand;
946
- const de_DescribeOrganizationResourceCollectionHealthCommandError = async (output, context) => {
947
- const parsedOutput = {
948
- ...output,
949
- body: await parseErrorBody(output.body, context),
950
- };
951
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
952
- switch (errorCode) {
953
- case "AccessDeniedException":
954
- case "com.amazonaws.devopsguru#AccessDeniedException":
955
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
956
- case "InternalServerException":
957
- case "com.amazonaws.devopsguru#InternalServerException":
958
- throw await de_InternalServerExceptionRes(parsedOutput, context);
959
- case "ThrottlingException":
960
- case "com.amazonaws.devopsguru#ThrottlingException":
961
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
962
- case "ValidationException":
963
- case "com.amazonaws.devopsguru#ValidationException":
964
- throw await de_ValidationExceptionRes(parsedOutput, context);
965
- default:
966
- const parsedBody = parsedOutput.body;
967
- return throwDefaultError({
968
- output,
969
- parsedBody,
970
- errorCode,
971
- });
972
- }
973
- };
974
- const de_DescribeResourceCollectionHealthCommand = async (output, context) => {
975
- if (output.statusCode !== 200 && output.statusCode >= 300) {
976
- return de_DescribeResourceCollectionHealthCommandError(output, context);
977
- }
978
- const contents = (0, smithy_client_1.map)({
979
- $metadata: deserializeMetadata(output),
980
- });
981
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
982
- const doc = (0, smithy_client_1.take)(data, {
983
- CloudFormation: smithy_client_1._json,
984
- NextToken: smithy_client_1.expectString,
985
- Service: smithy_client_1._json,
986
- Tags: smithy_client_1._json,
987
- });
988
- Object.assign(contents, doc);
989
- return contents;
990
- };
991
- exports.de_DescribeResourceCollectionHealthCommand = de_DescribeResourceCollectionHealthCommand;
992
- const de_DescribeResourceCollectionHealthCommandError = async (output, context) => {
993
- const parsedOutput = {
994
- ...output,
995
- body: await parseErrorBody(output.body, context),
996
- };
997
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
998
- switch (errorCode) {
999
- case "AccessDeniedException":
1000
- case "com.amazonaws.devopsguru#AccessDeniedException":
1001
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1002
- case "InternalServerException":
1003
- case "com.amazonaws.devopsguru#InternalServerException":
1004
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1005
- case "ThrottlingException":
1006
- case "com.amazonaws.devopsguru#ThrottlingException":
1007
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1008
- case "ValidationException":
1009
- case "com.amazonaws.devopsguru#ValidationException":
1010
- throw await de_ValidationExceptionRes(parsedOutput, context);
1011
- default:
1012
- const parsedBody = parsedOutput.body;
1013
- return throwDefaultError({
1014
- output,
1015
- parsedBody,
1016
- errorCode,
1017
- });
1018
- }
1019
- };
1020
- const de_DescribeServiceIntegrationCommand = async (output, context) => {
1021
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1022
- return de_DescribeServiceIntegrationCommandError(output, context);
1023
- }
1024
- const contents = (0, smithy_client_1.map)({
1025
- $metadata: deserializeMetadata(output),
1026
- });
1027
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1028
- const doc = (0, smithy_client_1.take)(data, {
1029
- ServiceIntegration: smithy_client_1._json,
1030
- });
1031
- Object.assign(contents, doc);
1032
- return contents;
1033
- };
1034
- exports.de_DescribeServiceIntegrationCommand = de_DescribeServiceIntegrationCommand;
1035
- const de_DescribeServiceIntegrationCommandError = async (output, context) => {
1036
- const parsedOutput = {
1037
- ...output,
1038
- body: await parseErrorBody(output.body, context),
1039
- };
1040
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1041
- switch (errorCode) {
1042
- case "AccessDeniedException":
1043
- case "com.amazonaws.devopsguru#AccessDeniedException":
1044
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1045
- case "InternalServerException":
1046
- case "com.amazonaws.devopsguru#InternalServerException":
1047
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1048
- case "ResourceNotFoundException":
1049
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1050
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1051
- case "ThrottlingException":
1052
- case "com.amazonaws.devopsguru#ThrottlingException":
1053
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1054
- case "ValidationException":
1055
- case "com.amazonaws.devopsguru#ValidationException":
1056
- throw await de_ValidationExceptionRes(parsedOutput, context);
1057
- default:
1058
- const parsedBody = parsedOutput.body;
1059
- return throwDefaultError({
1060
- output,
1061
- parsedBody,
1062
- errorCode,
1063
- });
1064
- }
1065
- };
1066
- const de_GetCostEstimationCommand = async (output, context) => {
1067
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1068
- return de_GetCostEstimationCommandError(output, context);
1069
- }
1070
- const contents = (0, smithy_client_1.map)({
1071
- $metadata: deserializeMetadata(output),
1072
- });
1073
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1074
- const doc = (0, smithy_client_1.take)(data, {
1075
- Costs: (_) => de_ServiceResourceCosts(_, context),
1076
- NextToken: smithy_client_1.expectString,
1077
- ResourceCollection: smithy_client_1._json,
1078
- Status: smithy_client_1.expectString,
1079
- TimeRange: (_) => de_CostEstimationTimeRange(_, context),
1080
- TotalCost: smithy_client_1.limitedParseDouble,
1081
- });
1082
- Object.assign(contents, doc);
1083
- return contents;
1084
- };
1085
- exports.de_GetCostEstimationCommand = de_GetCostEstimationCommand;
1086
- const de_GetCostEstimationCommandError = async (output, context) => {
1087
- const parsedOutput = {
1088
- ...output,
1089
- body: await parseErrorBody(output.body, context),
1090
- };
1091
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1092
- switch (errorCode) {
1093
- case "AccessDeniedException":
1094
- case "com.amazonaws.devopsguru#AccessDeniedException":
1095
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1096
- case "InternalServerException":
1097
- case "com.amazonaws.devopsguru#InternalServerException":
1098
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1099
- case "ResourceNotFoundException":
1100
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1101
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1102
- case "ThrottlingException":
1103
- case "com.amazonaws.devopsguru#ThrottlingException":
1104
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1105
- case "ValidationException":
1106
- case "com.amazonaws.devopsguru#ValidationException":
1107
- throw await de_ValidationExceptionRes(parsedOutput, context);
1108
- default:
1109
- const parsedBody = parsedOutput.body;
1110
- return throwDefaultError({
1111
- output,
1112
- parsedBody,
1113
- errorCode,
1114
- });
1115
- }
1116
- };
1117
- const de_GetResourceCollectionCommand = async (output, context) => {
1118
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
- return de_GetResourceCollectionCommandError(output, context);
1120
- }
1121
- const contents = (0, smithy_client_1.map)({
1122
- $metadata: deserializeMetadata(output),
1123
- });
1124
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1125
- const doc = (0, smithy_client_1.take)(data, {
1126
- NextToken: smithy_client_1.expectString,
1127
- ResourceCollection: smithy_client_1._json,
1128
- });
1129
- Object.assign(contents, doc);
1130
- return contents;
1131
- };
1132
- exports.de_GetResourceCollectionCommand = de_GetResourceCollectionCommand;
1133
- const de_GetResourceCollectionCommandError = async (output, context) => {
1134
- const parsedOutput = {
1135
- ...output,
1136
- body: await parseErrorBody(output.body, context),
1137
- };
1138
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1139
- switch (errorCode) {
1140
- case "AccessDeniedException":
1141
- case "com.amazonaws.devopsguru#AccessDeniedException":
1142
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1143
- case "InternalServerException":
1144
- case "com.amazonaws.devopsguru#InternalServerException":
1145
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1146
- case "ResourceNotFoundException":
1147
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1148
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1149
- case "ThrottlingException":
1150
- case "com.amazonaws.devopsguru#ThrottlingException":
1151
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1152
- case "ValidationException":
1153
- case "com.amazonaws.devopsguru#ValidationException":
1154
- throw await de_ValidationExceptionRes(parsedOutput, context);
1155
- default:
1156
- const parsedBody = parsedOutput.body;
1157
- return throwDefaultError({
1158
- output,
1159
- parsedBody,
1160
- errorCode,
1161
- });
1162
- }
1163
- };
1164
- const de_ListAnomaliesForInsightCommand = async (output, context) => {
1165
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1166
- return de_ListAnomaliesForInsightCommandError(output, context);
1167
- }
1168
- const contents = (0, smithy_client_1.map)({
1169
- $metadata: deserializeMetadata(output),
1170
- });
1171
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1172
- const doc = (0, smithy_client_1.take)(data, {
1173
- NextToken: smithy_client_1.expectString,
1174
- ProactiveAnomalies: (_) => de_ProactiveAnomalies(_, context),
1175
- ReactiveAnomalies: (_) => de_ReactiveAnomalies(_, context),
1176
- });
1177
- Object.assign(contents, doc);
1178
- return contents;
1179
- };
1180
- exports.de_ListAnomaliesForInsightCommand = de_ListAnomaliesForInsightCommand;
1181
- const de_ListAnomaliesForInsightCommandError = async (output, context) => {
1182
- const parsedOutput = {
1183
- ...output,
1184
- body: await parseErrorBody(output.body, context),
1185
- };
1186
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
- switch (errorCode) {
1188
- case "AccessDeniedException":
1189
- case "com.amazonaws.devopsguru#AccessDeniedException":
1190
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1191
- case "InternalServerException":
1192
- case "com.amazonaws.devopsguru#InternalServerException":
1193
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1194
- case "ResourceNotFoundException":
1195
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1196
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1197
- case "ThrottlingException":
1198
- case "com.amazonaws.devopsguru#ThrottlingException":
1199
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1200
- case "ValidationException":
1201
- case "com.amazonaws.devopsguru#ValidationException":
1202
- throw await de_ValidationExceptionRes(parsedOutput, context);
1203
- default:
1204
- const parsedBody = parsedOutput.body;
1205
- return throwDefaultError({
1206
- output,
1207
- parsedBody,
1208
- errorCode,
1209
- });
1210
- }
1211
- };
1212
- const de_ListAnomalousLogGroupsCommand = async (output, context) => {
1213
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1214
- return de_ListAnomalousLogGroupsCommandError(output, context);
1215
- }
1216
- const contents = (0, smithy_client_1.map)({
1217
- $metadata: deserializeMetadata(output),
1218
- });
1219
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1220
- const doc = (0, smithy_client_1.take)(data, {
1221
- AnomalousLogGroups: (_) => de_AnomalousLogGroups(_, context),
1222
- InsightId: smithy_client_1.expectString,
1223
- NextToken: smithy_client_1.expectString,
1224
- });
1225
- Object.assign(contents, doc);
1226
- return contents;
1227
- };
1228
- exports.de_ListAnomalousLogGroupsCommand = de_ListAnomalousLogGroupsCommand;
1229
- const de_ListAnomalousLogGroupsCommandError = async (output, context) => {
1230
- const parsedOutput = {
1231
- ...output,
1232
- body: await parseErrorBody(output.body, context),
1233
- };
1234
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1235
- switch (errorCode) {
1236
- case "AccessDeniedException":
1237
- case "com.amazonaws.devopsguru#AccessDeniedException":
1238
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1239
- case "InternalServerException":
1240
- case "com.amazonaws.devopsguru#InternalServerException":
1241
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1242
- case "ResourceNotFoundException":
1243
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1244
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1245
- case "ThrottlingException":
1246
- case "com.amazonaws.devopsguru#ThrottlingException":
1247
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1248
- case "ValidationException":
1249
- case "com.amazonaws.devopsguru#ValidationException":
1250
- throw await de_ValidationExceptionRes(parsedOutput, context);
1251
- default:
1252
- const parsedBody = parsedOutput.body;
1253
- return throwDefaultError({
1254
- output,
1255
- parsedBody,
1256
- errorCode,
1257
- });
1258
- }
1259
- };
1260
- const de_ListEventsCommand = async (output, context) => {
1261
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1262
- return de_ListEventsCommandError(output, context);
1263
- }
1264
- const contents = (0, smithy_client_1.map)({
1265
- $metadata: deserializeMetadata(output),
1266
- });
1267
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1268
- const doc = (0, smithy_client_1.take)(data, {
1269
- Events: (_) => de_Events(_, context),
1270
- NextToken: smithy_client_1.expectString,
1271
- });
1272
- Object.assign(contents, doc);
1273
- return contents;
1274
- };
1275
- exports.de_ListEventsCommand = de_ListEventsCommand;
1276
- const de_ListEventsCommandError = async (output, context) => {
1277
- const parsedOutput = {
1278
- ...output,
1279
- body: await parseErrorBody(output.body, context),
1280
- };
1281
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1282
- switch (errorCode) {
1283
- case "AccessDeniedException":
1284
- case "com.amazonaws.devopsguru#AccessDeniedException":
1285
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1286
- case "InternalServerException":
1287
- case "com.amazonaws.devopsguru#InternalServerException":
1288
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1289
- case "ResourceNotFoundException":
1290
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1291
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1292
- case "ThrottlingException":
1293
- case "com.amazonaws.devopsguru#ThrottlingException":
1294
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1295
- case "ValidationException":
1296
- case "com.amazonaws.devopsguru#ValidationException":
1297
- throw await de_ValidationExceptionRes(parsedOutput, context);
1298
- default:
1299
- const parsedBody = parsedOutput.body;
1300
- return throwDefaultError({
1301
- output,
1302
- parsedBody,
1303
- errorCode,
1304
- });
1305
- }
1306
- };
1307
- const de_ListInsightsCommand = async (output, context) => {
1308
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1309
- return de_ListInsightsCommandError(output, context);
1310
- }
1311
- const contents = (0, smithy_client_1.map)({
1312
- $metadata: deserializeMetadata(output),
1313
- });
1314
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1315
- const doc = (0, smithy_client_1.take)(data, {
1316
- NextToken: smithy_client_1.expectString,
1317
- ProactiveInsights: (_) => de_ProactiveInsights(_, context),
1318
- ReactiveInsights: (_) => de_ReactiveInsights(_, context),
1319
- });
1320
- Object.assign(contents, doc);
1321
- return contents;
1322
- };
1323
- exports.de_ListInsightsCommand = de_ListInsightsCommand;
1324
- const de_ListInsightsCommandError = async (output, context) => {
1325
- const parsedOutput = {
1326
- ...output,
1327
- body: await parseErrorBody(output.body, context),
1328
- };
1329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1330
- switch (errorCode) {
1331
- case "AccessDeniedException":
1332
- case "com.amazonaws.devopsguru#AccessDeniedException":
1333
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1334
- case "InternalServerException":
1335
- case "com.amazonaws.devopsguru#InternalServerException":
1336
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1337
- case "ThrottlingException":
1338
- case "com.amazonaws.devopsguru#ThrottlingException":
1339
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1340
- case "ValidationException":
1341
- case "com.amazonaws.devopsguru#ValidationException":
1342
- throw await de_ValidationExceptionRes(parsedOutput, context);
1343
- default:
1344
- const parsedBody = parsedOutput.body;
1345
- return throwDefaultError({
1346
- output,
1347
- parsedBody,
1348
- errorCode,
1349
- });
1350
- }
1351
- };
1352
- const de_ListMonitoredResourcesCommand = async (output, context) => {
1353
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1354
- return de_ListMonitoredResourcesCommandError(output, context);
1355
- }
1356
- const contents = (0, smithy_client_1.map)({
1357
- $metadata: deserializeMetadata(output),
1358
- });
1359
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1360
- const doc = (0, smithy_client_1.take)(data, {
1361
- MonitoredResourceIdentifiers: (_) => de_MonitoredResourceIdentifiers(_, context),
1362
- NextToken: smithy_client_1.expectString,
1363
- });
1364
- Object.assign(contents, doc);
1365
- return contents;
1366
- };
1367
- exports.de_ListMonitoredResourcesCommand = de_ListMonitoredResourcesCommand;
1368
- const de_ListMonitoredResourcesCommandError = async (output, context) => {
1369
- const parsedOutput = {
1370
- ...output,
1371
- body: await parseErrorBody(output.body, context),
1372
- };
1373
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1374
- switch (errorCode) {
1375
- case "InternalServerException":
1376
- case "com.amazonaws.devopsguru#InternalServerException":
1377
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1378
- case "ResourceNotFoundException":
1379
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1380
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1381
- case "ThrottlingException":
1382
- case "com.amazonaws.devopsguru#ThrottlingException":
1383
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1384
- case "ValidationException":
1385
- case "com.amazonaws.devopsguru#ValidationException":
1386
- throw await de_ValidationExceptionRes(parsedOutput, context);
1387
- default:
1388
- const parsedBody = parsedOutput.body;
1389
- return throwDefaultError({
1390
- output,
1391
- parsedBody,
1392
- errorCode,
1393
- });
1394
- }
1395
- };
1396
- const de_ListNotificationChannelsCommand = async (output, context) => {
1397
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1398
- return de_ListNotificationChannelsCommandError(output, context);
1399
- }
1400
- const contents = (0, smithy_client_1.map)({
1401
- $metadata: deserializeMetadata(output),
1402
- });
1403
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1404
- const doc = (0, smithy_client_1.take)(data, {
1405
- Channels: smithy_client_1._json,
1406
- NextToken: smithy_client_1.expectString,
1407
- });
1408
- Object.assign(contents, doc);
1409
- return contents;
1410
- };
1411
- exports.de_ListNotificationChannelsCommand = de_ListNotificationChannelsCommand;
1412
- const de_ListNotificationChannelsCommandError = async (output, context) => {
1413
- const parsedOutput = {
1414
- ...output,
1415
- body: await parseErrorBody(output.body, context),
1416
- };
1417
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1418
- switch (errorCode) {
1419
- case "AccessDeniedException":
1420
- case "com.amazonaws.devopsguru#AccessDeniedException":
1421
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1422
- case "InternalServerException":
1423
- case "com.amazonaws.devopsguru#InternalServerException":
1424
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1425
- case "ThrottlingException":
1426
- case "com.amazonaws.devopsguru#ThrottlingException":
1427
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1428
- case "ValidationException":
1429
- case "com.amazonaws.devopsguru#ValidationException":
1430
- throw await de_ValidationExceptionRes(parsedOutput, context);
1431
- default:
1432
- const parsedBody = parsedOutput.body;
1433
- return throwDefaultError({
1434
- output,
1435
- parsedBody,
1436
- errorCode,
1437
- });
1438
- }
1439
- };
1440
- const de_ListOrganizationInsightsCommand = async (output, context) => {
1441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1442
- return de_ListOrganizationInsightsCommandError(output, context);
1443
- }
1444
- const contents = (0, smithy_client_1.map)({
1445
- $metadata: deserializeMetadata(output),
1446
- });
1447
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1448
- const doc = (0, smithy_client_1.take)(data, {
1449
- NextToken: smithy_client_1.expectString,
1450
- ProactiveInsights: (_) => de_ProactiveOrganizationInsights(_, context),
1451
- ReactiveInsights: (_) => de_ReactiveOrganizationInsights(_, context),
1452
- });
1453
- Object.assign(contents, doc);
1454
- return contents;
1455
- };
1456
- exports.de_ListOrganizationInsightsCommand = de_ListOrganizationInsightsCommand;
1457
- const de_ListOrganizationInsightsCommandError = async (output, context) => {
1458
- const parsedOutput = {
1459
- ...output,
1460
- body: await parseErrorBody(output.body, context),
1461
- };
1462
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1463
- switch (errorCode) {
1464
- case "AccessDeniedException":
1465
- case "com.amazonaws.devopsguru#AccessDeniedException":
1466
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1467
- case "InternalServerException":
1468
- case "com.amazonaws.devopsguru#InternalServerException":
1469
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1470
- case "ThrottlingException":
1471
- case "com.amazonaws.devopsguru#ThrottlingException":
1472
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1473
- case "ValidationException":
1474
- case "com.amazonaws.devopsguru#ValidationException":
1475
- throw await de_ValidationExceptionRes(parsedOutput, context);
1476
- default:
1477
- const parsedBody = parsedOutput.body;
1478
- return throwDefaultError({
1479
- output,
1480
- parsedBody,
1481
- errorCode,
1482
- });
1483
- }
1484
- };
1485
- const de_ListRecommendationsCommand = async (output, context) => {
1486
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1487
- return de_ListRecommendationsCommandError(output, context);
1488
- }
1489
- const contents = (0, smithy_client_1.map)({
1490
- $metadata: deserializeMetadata(output),
1491
- });
1492
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1493
- const doc = (0, smithy_client_1.take)(data, {
1494
- NextToken: smithy_client_1.expectString,
1495
- Recommendations: smithy_client_1._json,
1496
- });
1497
- Object.assign(contents, doc);
1498
- return contents;
1499
- };
1500
- exports.de_ListRecommendationsCommand = de_ListRecommendationsCommand;
1501
- const de_ListRecommendationsCommandError = async (output, context) => {
1502
- const parsedOutput = {
1503
- ...output,
1504
- body: await parseErrorBody(output.body, context),
1505
- };
1506
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1507
- switch (errorCode) {
1508
- case "AccessDeniedException":
1509
- case "com.amazonaws.devopsguru#AccessDeniedException":
1510
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1511
- case "InternalServerException":
1512
- case "com.amazonaws.devopsguru#InternalServerException":
1513
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1514
- case "ResourceNotFoundException":
1515
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1516
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1517
- case "ThrottlingException":
1518
- case "com.amazonaws.devopsguru#ThrottlingException":
1519
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1520
- case "ValidationException":
1521
- case "com.amazonaws.devopsguru#ValidationException":
1522
- throw await de_ValidationExceptionRes(parsedOutput, context);
1523
- default:
1524
- const parsedBody = parsedOutput.body;
1525
- return throwDefaultError({
1526
- output,
1527
- parsedBody,
1528
- errorCode,
1529
- });
1530
- }
1531
- };
1532
- const de_PutFeedbackCommand = async (output, context) => {
1533
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1534
- return de_PutFeedbackCommandError(output, context);
1535
- }
1536
- const contents = (0, smithy_client_1.map)({
1537
- $metadata: deserializeMetadata(output),
1538
- });
1539
- await (0, smithy_client_1.collectBody)(output.body, context);
1540
- return contents;
1541
- };
1542
- exports.de_PutFeedbackCommand = de_PutFeedbackCommand;
1543
- const de_PutFeedbackCommandError = async (output, context) => {
1544
- const parsedOutput = {
1545
- ...output,
1546
- body: await parseErrorBody(output.body, context),
1547
- };
1548
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1549
- switch (errorCode) {
1550
- case "AccessDeniedException":
1551
- case "com.amazonaws.devopsguru#AccessDeniedException":
1552
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1553
- case "ConflictException":
1554
- case "com.amazonaws.devopsguru#ConflictException":
1555
- throw await de_ConflictExceptionRes(parsedOutput, context);
1556
- case "InternalServerException":
1557
- case "com.amazonaws.devopsguru#InternalServerException":
1558
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1559
- case "ResourceNotFoundException":
1560
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1561
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1562
- case "ThrottlingException":
1563
- case "com.amazonaws.devopsguru#ThrottlingException":
1564
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1565
- case "ValidationException":
1566
- case "com.amazonaws.devopsguru#ValidationException":
1567
- throw await de_ValidationExceptionRes(parsedOutput, context);
1568
- default:
1569
- const parsedBody = parsedOutput.body;
1570
- return throwDefaultError({
1571
- output,
1572
- parsedBody,
1573
- errorCode,
1574
- });
1575
- }
1576
- };
1577
- const de_RemoveNotificationChannelCommand = async (output, context) => {
1578
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1579
- return de_RemoveNotificationChannelCommandError(output, context);
1580
- }
1581
- const contents = (0, smithy_client_1.map)({
1582
- $metadata: deserializeMetadata(output),
1583
- });
1584
- await (0, smithy_client_1.collectBody)(output.body, context);
1585
- return contents;
1586
- };
1587
- exports.de_RemoveNotificationChannelCommand = de_RemoveNotificationChannelCommand;
1588
- const de_RemoveNotificationChannelCommandError = async (output, context) => {
1589
- const parsedOutput = {
1590
- ...output,
1591
- body: await parseErrorBody(output.body, context),
1592
- };
1593
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1594
- switch (errorCode) {
1595
- case "AccessDeniedException":
1596
- case "com.amazonaws.devopsguru#AccessDeniedException":
1597
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1598
- case "ConflictException":
1599
- case "com.amazonaws.devopsguru#ConflictException":
1600
- throw await de_ConflictExceptionRes(parsedOutput, context);
1601
- case "InternalServerException":
1602
- case "com.amazonaws.devopsguru#InternalServerException":
1603
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1604
- case "ResourceNotFoundException":
1605
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1606
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1607
- case "ThrottlingException":
1608
- case "com.amazonaws.devopsguru#ThrottlingException":
1609
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1610
- case "ValidationException":
1611
- case "com.amazonaws.devopsguru#ValidationException":
1612
- throw await de_ValidationExceptionRes(parsedOutput, context);
1613
- default:
1614
- const parsedBody = parsedOutput.body;
1615
- return throwDefaultError({
1616
- output,
1617
- parsedBody,
1618
- errorCode,
1619
- });
1620
- }
1621
- };
1622
- const de_SearchInsightsCommand = async (output, context) => {
1623
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1624
- return de_SearchInsightsCommandError(output, context);
1625
- }
1626
- const contents = (0, smithy_client_1.map)({
1627
- $metadata: deserializeMetadata(output),
1628
- });
1629
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1630
- const doc = (0, smithy_client_1.take)(data, {
1631
- NextToken: smithy_client_1.expectString,
1632
- ProactiveInsights: (_) => de_ProactiveInsights(_, context),
1633
- ReactiveInsights: (_) => de_ReactiveInsights(_, context),
1634
- });
1635
- Object.assign(contents, doc);
1636
- return contents;
1637
- };
1638
- exports.de_SearchInsightsCommand = de_SearchInsightsCommand;
1639
- const de_SearchInsightsCommandError = async (output, context) => {
1640
- const parsedOutput = {
1641
- ...output,
1642
- body: await parseErrorBody(output.body, context),
1643
- };
1644
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1645
- switch (errorCode) {
1646
- case "AccessDeniedException":
1647
- case "com.amazonaws.devopsguru#AccessDeniedException":
1648
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1649
- case "InternalServerException":
1650
- case "com.amazonaws.devopsguru#InternalServerException":
1651
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1652
- case "ThrottlingException":
1653
- case "com.amazonaws.devopsguru#ThrottlingException":
1654
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1655
- case "ValidationException":
1656
- case "com.amazonaws.devopsguru#ValidationException":
1657
- throw await de_ValidationExceptionRes(parsedOutput, context);
1658
- default:
1659
- const parsedBody = parsedOutput.body;
1660
- return throwDefaultError({
1661
- output,
1662
- parsedBody,
1663
- errorCode,
1664
- });
1665
- }
1666
- };
1667
- const de_SearchOrganizationInsightsCommand = async (output, context) => {
1668
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1669
- return de_SearchOrganizationInsightsCommandError(output, context);
1670
- }
1671
- const contents = (0, smithy_client_1.map)({
1672
- $metadata: deserializeMetadata(output),
1673
- });
1674
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1675
- const doc = (0, smithy_client_1.take)(data, {
1676
- NextToken: smithy_client_1.expectString,
1677
- ProactiveInsights: (_) => de_ProactiveInsights(_, context),
1678
- ReactiveInsights: (_) => de_ReactiveInsights(_, context),
1679
- });
1680
- Object.assign(contents, doc);
1681
- return contents;
1682
- };
1683
- exports.de_SearchOrganizationInsightsCommand = de_SearchOrganizationInsightsCommand;
1684
- const de_SearchOrganizationInsightsCommandError = async (output, context) => {
1685
- const parsedOutput = {
1686
- ...output,
1687
- body: await parseErrorBody(output.body, context),
1688
- };
1689
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1690
- switch (errorCode) {
1691
- case "AccessDeniedException":
1692
- case "com.amazonaws.devopsguru#AccessDeniedException":
1693
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1694
- case "InternalServerException":
1695
- case "com.amazonaws.devopsguru#InternalServerException":
1696
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1697
- case "ThrottlingException":
1698
- case "com.amazonaws.devopsguru#ThrottlingException":
1699
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1700
- case "ValidationException":
1701
- case "com.amazonaws.devopsguru#ValidationException":
1702
- throw await de_ValidationExceptionRes(parsedOutput, context);
1703
- default:
1704
- const parsedBody = parsedOutput.body;
1705
- return throwDefaultError({
1706
- output,
1707
- parsedBody,
1708
- errorCode,
1709
- });
1710
- }
1711
- };
1712
- const de_StartCostEstimationCommand = async (output, context) => {
1713
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1714
- return de_StartCostEstimationCommandError(output, context);
1715
- }
1716
- const contents = (0, smithy_client_1.map)({
1717
- $metadata: deserializeMetadata(output),
1718
- });
1719
- await (0, smithy_client_1.collectBody)(output.body, context);
1720
- return contents;
1721
- };
1722
- exports.de_StartCostEstimationCommand = de_StartCostEstimationCommand;
1723
- const de_StartCostEstimationCommandError = async (output, context) => {
1724
- const parsedOutput = {
1725
- ...output,
1726
- body: await parseErrorBody(output.body, context),
1727
- };
1728
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1729
- switch (errorCode) {
1730
- case "AccessDeniedException":
1731
- case "com.amazonaws.devopsguru#AccessDeniedException":
1732
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1733
- case "ConflictException":
1734
- case "com.amazonaws.devopsguru#ConflictException":
1735
- throw await de_ConflictExceptionRes(parsedOutput, context);
1736
- case "InternalServerException":
1737
- case "com.amazonaws.devopsguru#InternalServerException":
1738
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1739
- case "ResourceNotFoundException":
1740
- case "com.amazonaws.devopsguru#ResourceNotFoundException":
1741
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1742
- case "ThrottlingException":
1743
- case "com.amazonaws.devopsguru#ThrottlingException":
1744
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1745
- case "ValidationException":
1746
- case "com.amazonaws.devopsguru#ValidationException":
1747
- throw await de_ValidationExceptionRes(parsedOutput, context);
1748
- default:
1749
- const parsedBody = parsedOutput.body;
1750
- return throwDefaultError({
1751
- output,
1752
- parsedBody,
1753
- errorCode,
1754
- });
1755
- }
1756
- };
1757
- const de_UpdateEventSourcesConfigCommand = async (output, context) => {
1758
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1759
- return de_UpdateEventSourcesConfigCommandError(output, context);
1760
- }
1761
- const contents = (0, smithy_client_1.map)({
1762
- $metadata: deserializeMetadata(output),
1763
- });
1764
- await (0, smithy_client_1.collectBody)(output.body, context);
1765
- return contents;
1766
- };
1767
- exports.de_UpdateEventSourcesConfigCommand = de_UpdateEventSourcesConfigCommand;
1768
- const de_UpdateEventSourcesConfigCommandError = async (output, context) => {
1769
- const parsedOutput = {
1770
- ...output,
1771
- body: await parseErrorBody(output.body, context),
1772
- };
1773
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1774
- switch (errorCode) {
1775
- case "AccessDeniedException":
1776
- case "com.amazonaws.devopsguru#AccessDeniedException":
1777
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1778
- case "InternalServerException":
1779
- case "com.amazonaws.devopsguru#InternalServerException":
1780
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1781
- case "ThrottlingException":
1782
- case "com.amazonaws.devopsguru#ThrottlingException":
1783
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1784
- case "ValidationException":
1785
- case "com.amazonaws.devopsguru#ValidationException":
1786
- throw await de_ValidationExceptionRes(parsedOutput, context);
1787
- default:
1788
- const parsedBody = parsedOutput.body;
1789
- return throwDefaultError({
1790
- output,
1791
- parsedBody,
1792
- errorCode,
1793
- });
1794
- }
1795
- };
1796
- const de_UpdateResourceCollectionCommand = async (output, context) => {
1797
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1798
- return de_UpdateResourceCollectionCommandError(output, context);
1799
- }
1800
- const contents = (0, smithy_client_1.map)({
1801
- $metadata: deserializeMetadata(output),
1802
- });
1803
- await (0, smithy_client_1.collectBody)(output.body, context);
1804
- return contents;
1805
- };
1806
- exports.de_UpdateResourceCollectionCommand = de_UpdateResourceCollectionCommand;
1807
- const de_UpdateResourceCollectionCommandError = async (output, context) => {
1808
- const parsedOutput = {
1809
- ...output,
1810
- body: await parseErrorBody(output.body, context),
1811
- };
1812
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1813
- switch (errorCode) {
1814
- case "AccessDeniedException":
1815
- case "com.amazonaws.devopsguru#AccessDeniedException":
1816
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1817
- case "ConflictException":
1818
- case "com.amazonaws.devopsguru#ConflictException":
1819
- throw await de_ConflictExceptionRes(parsedOutput, context);
1820
- case "InternalServerException":
1821
- case "com.amazonaws.devopsguru#InternalServerException":
1822
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1823
- case "ThrottlingException":
1824
- case "com.amazonaws.devopsguru#ThrottlingException":
1825
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1826
- case "ValidationException":
1827
- case "com.amazonaws.devopsguru#ValidationException":
1828
- throw await de_ValidationExceptionRes(parsedOutput, context);
1829
- default:
1830
- const parsedBody = parsedOutput.body;
1831
- return throwDefaultError({
1832
- output,
1833
- parsedBody,
1834
- errorCode,
1835
- });
1836
- }
1837
- };
1838
- const de_UpdateServiceIntegrationCommand = async (output, context) => {
1839
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1840
- return de_UpdateServiceIntegrationCommandError(output, context);
1841
- }
1842
- const contents = (0, smithy_client_1.map)({
1843
- $metadata: deserializeMetadata(output),
1844
- });
1845
- await (0, smithy_client_1.collectBody)(output.body, context);
1846
- return contents;
1847
- };
1848
- exports.de_UpdateServiceIntegrationCommand = de_UpdateServiceIntegrationCommand;
1849
- const de_UpdateServiceIntegrationCommandError = async (output, context) => {
1850
- const parsedOutput = {
1851
- ...output,
1852
- body: await parseErrorBody(output.body, context),
1853
- };
1854
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1855
- switch (errorCode) {
1856
- case "AccessDeniedException":
1857
- case "com.amazonaws.devopsguru#AccessDeniedException":
1858
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1859
- case "ConflictException":
1860
- case "com.amazonaws.devopsguru#ConflictException":
1861
- throw await de_ConflictExceptionRes(parsedOutput, context);
1862
- case "InternalServerException":
1863
- case "com.amazonaws.devopsguru#InternalServerException":
1864
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1865
- case "ThrottlingException":
1866
- case "com.amazonaws.devopsguru#ThrottlingException":
1867
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1868
- case "ValidationException":
1869
- case "com.amazonaws.devopsguru#ValidationException":
1870
- throw await de_ValidationExceptionRes(parsedOutput, context);
1871
- default:
1872
- const parsedBody = parsedOutput.body;
1873
- return throwDefaultError({
1874
- output,
1875
- parsedBody,
1876
- errorCode,
1877
- });
1878
- }
1879
- };
1880
- const throwDefaultError = (0, smithy_client_1.withBaseException)(DevOpsGuruServiceException_1.DevOpsGuruServiceException);
1881
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1882
- const contents = (0, smithy_client_1.map)({});
1883
- const data = parsedOutput.body;
1884
- const doc = (0, smithy_client_1.take)(data, {
1885
- Message: smithy_client_1.expectString,
1886
- });
1887
- Object.assign(contents, doc);
1888
- const exception = new models_0_1.AccessDeniedException({
1889
- $metadata: deserializeMetadata(parsedOutput),
1890
- ...contents,
1891
- });
1892
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1893
- };
1894
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1895
- const contents = (0, smithy_client_1.map)({});
1896
- const data = parsedOutput.body;
1897
- const doc = (0, smithy_client_1.take)(data, {
1898
- Message: smithy_client_1.expectString,
1899
- ResourceId: smithy_client_1.expectString,
1900
- ResourceType: smithy_client_1.expectString,
1901
- });
1902
- Object.assign(contents, doc);
1903
- const exception = new models_0_1.ConflictException({
1904
- $metadata: deserializeMetadata(parsedOutput),
1905
- ...contents,
1906
- });
1907
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1908
- };
1909
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1910
- const contents = (0, smithy_client_1.map)({
1911
- [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1912
- });
1913
- const data = parsedOutput.body;
1914
- const doc = (0, smithy_client_1.take)(data, {
1915
- Message: smithy_client_1.expectString,
1916
- });
1917
- Object.assign(contents, doc);
1918
- const exception = new models_0_1.InternalServerException({
1919
- $metadata: deserializeMetadata(parsedOutput),
1920
- ...contents,
1921
- });
1922
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1923
- };
1924
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1925
- const contents = (0, smithy_client_1.map)({});
1926
- const data = parsedOutput.body;
1927
- const doc = (0, smithy_client_1.take)(data, {
1928
- Message: smithy_client_1.expectString,
1929
- ResourceId: smithy_client_1.expectString,
1930
- ResourceType: smithy_client_1.expectString,
1931
- });
1932
- Object.assign(contents, doc);
1933
- const exception = new models_0_1.ResourceNotFoundException({
1934
- $metadata: deserializeMetadata(parsedOutput),
1935
- ...contents,
1936
- });
1937
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1938
- };
1939
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1940
- const contents = (0, smithy_client_1.map)({});
1941
- const data = parsedOutput.body;
1942
- const doc = (0, smithy_client_1.take)(data, {
1943
- Message: smithy_client_1.expectString,
1944
- });
1945
- Object.assign(contents, doc);
1946
- const exception = new models_0_1.ServiceQuotaExceededException({
1947
- $metadata: deserializeMetadata(parsedOutput),
1948
- ...contents,
1949
- });
1950
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1951
- };
1952
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1953
- const contents = (0, smithy_client_1.map)({
1954
- [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1955
- });
1956
- const data = parsedOutput.body;
1957
- const doc = (0, smithy_client_1.take)(data, {
1958
- Message: smithy_client_1.expectString,
1959
- QuotaCode: smithy_client_1.expectString,
1960
- ServiceCode: smithy_client_1.expectString,
1961
- });
1962
- Object.assign(contents, doc);
1963
- const exception = new models_0_1.ThrottlingException({
1964
- $metadata: deserializeMetadata(parsedOutput),
1965
- ...contents,
1966
- });
1967
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1968
- };
1969
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1970
- const contents = (0, smithy_client_1.map)({});
1971
- const data = parsedOutput.body;
1972
- const doc = (0, smithy_client_1.take)(data, {
1973
- Fields: smithy_client_1._json,
1974
- Message: smithy_client_1.expectString,
1975
- Reason: smithy_client_1.expectString,
1976
- });
1977
- Object.assign(contents, doc);
1978
- const exception = new models_0_1.ValidationException({
1979
- $metadata: deserializeMetadata(parsedOutput),
1980
- ...contents,
1981
- });
1982
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1983
- };
1984
- const se_EndTimeRange = (input, context) => {
1985
- return (0, smithy_client_1.take)(input, {
1986
- FromTime: (_) => Math.round(_.getTime() / 1000),
1987
- ToTime: (_) => Math.round(_.getTime() / 1000),
1988
- });
1989
- };
1990
- const se_EventTimeRange = (input, context) => {
1991
- return (0, smithy_client_1.take)(input, {
1992
- FromTime: (_) => Math.round(_.getTime() / 1000),
1993
- ToTime: (_) => Math.round(_.getTime() / 1000),
1994
- });
1995
- };
1996
- const se_ListEventsFilters = (input, context) => {
1997
- return (0, smithy_client_1.take)(input, {
1998
- DataSource: [],
1999
- EventClass: [],
2000
- EventSource: [],
2001
- EventTimeRange: (_) => se_EventTimeRange(_, context),
2002
- InsightId: [],
2003
- ResourceCollection: smithy_client_1._json,
2004
- });
2005
- };
2006
- const se_ListInsightsAnyStatusFilter = (input, context) => {
2007
- return (0, smithy_client_1.take)(input, {
2008
- StartTimeRange: (_) => se_StartTimeRange(_, context),
2009
- Type: [],
2010
- });
2011
- };
2012
- const se_ListInsightsClosedStatusFilter = (input, context) => {
2013
- return (0, smithy_client_1.take)(input, {
2014
- EndTimeRange: (_) => se_EndTimeRange(_, context),
2015
- Type: [],
2016
- });
2017
- };
2018
- const se_ListInsightsStatusFilter = (input, context) => {
2019
- return (0, smithy_client_1.take)(input, {
2020
- Any: (_) => se_ListInsightsAnyStatusFilter(_, context),
2021
- Closed: (_) => se_ListInsightsClosedStatusFilter(_, context),
2022
- Ongoing: smithy_client_1._json,
2023
- });
2024
- };
2025
- const se_StartTimeRange = (input, context) => {
2026
- return (0, smithy_client_1.take)(input, {
2027
- FromTime: (_) => Math.round(_.getTime() / 1000),
2028
- ToTime: (_) => Math.round(_.getTime() / 1000),
2029
- });
2030
- };
2031
- const de_AnomalousLogGroup = (output, context) => {
2032
- return (0, smithy_client_1.take)(output, {
2033
- ImpactEndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2034
- ImpactStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2035
- LogAnomalyShowcases: (_) => de_LogAnomalyShowcases(_, context),
2036
- LogGroupName: smithy_client_1.expectString,
2037
- NumberOfLogLinesScanned: smithy_client_1.expectInt32,
2038
- });
2039
- };
2040
- const de_AnomalousLogGroups = (output, context) => {
2041
- const retVal = (output || [])
2042
- .filter((e) => e != null)
2043
- .map((entry) => {
2044
- return de_AnomalousLogGroup(entry, context);
2045
- });
2046
- return retVal;
2047
- };
2048
- const de_AnomalyReportedTimeRange = (output, context) => {
2049
- return (0, smithy_client_1.take)(output, {
2050
- CloseTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2051
- OpenTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2052
- });
2053
- };
2054
- const de_AnomalySourceDetails = (output, context) => {
2055
- return (0, smithy_client_1.take)(output, {
2056
- CloudWatchMetrics: (_) => de_CloudWatchMetricsDetails(_, context),
2057
- PerformanceInsightsMetrics: (_) => de_PerformanceInsightsMetricsDetails(_, context),
2058
- });
2059
- };
2060
- const de_AnomalyTimeRange = (output, context) => {
2061
- return (0, smithy_client_1.take)(output, {
2062
- EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2063
- StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2064
- });
2065
- };
2066
- const de_CloudWatchMetricsDataSummary = (output, context) => {
2067
- return (0, smithy_client_1.take)(output, {
2068
- StatusCode: smithy_client_1.expectString,
2069
- TimestampMetricValuePairList: (_) => de_TimestampMetricValuePairList(_, context),
2070
- });
2071
- };
2072
- const de_CloudWatchMetricsDetail = (output, context) => {
2073
- return (0, smithy_client_1.take)(output, {
2074
- Dimensions: smithy_client_1._json,
2075
- MetricDataSummary: (_) => de_CloudWatchMetricsDataSummary(_, context),
2076
- MetricName: smithy_client_1.expectString,
2077
- Namespace: smithy_client_1.expectString,
2078
- Period: smithy_client_1.expectInt32,
2079
- Stat: smithy_client_1.expectString,
2080
- Unit: smithy_client_1.expectString,
2081
- });
2082
- };
2083
- const de_CloudWatchMetricsDetails = (output, context) => {
2084
- const retVal = (output || [])
2085
- .filter((e) => e != null)
2086
- .map((entry) => {
2087
- return de_CloudWatchMetricsDetail(entry, context);
2088
- });
2089
- return retVal;
2090
- };
2091
- const de_CostEstimationTimeRange = (output, context) => {
2092
- return (0, smithy_client_1.take)(output, {
2093
- EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2094
- StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2095
- });
2096
- };
2097
- const de_Event = (output, context) => {
2098
- return (0, smithy_client_1.take)(output, {
2099
- DataSource: smithy_client_1.expectString,
2100
- EventClass: smithy_client_1.expectString,
2101
- EventSource: smithy_client_1.expectString,
2102
- Id: smithy_client_1.expectString,
2103
- Name: smithy_client_1.expectString,
2104
- ResourceCollection: smithy_client_1._json,
2105
- Resources: smithy_client_1._json,
2106
- Time: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2107
- });
2108
- };
2109
- const de_Events = (output, context) => {
2110
- const retVal = (output || [])
2111
- .filter((e) => e != null)
2112
- .map((entry) => {
2113
- return de_Event(entry, context);
2114
- });
2115
- return retVal;
2116
- };
2117
- const de_InsightTimeRange = (output, context) => {
2118
- return (0, smithy_client_1.take)(output, {
2119
- EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2120
- StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2121
- });
2122
- };
2123
- const de_LogAnomalyClass = (output, context) => {
2124
- return (0, smithy_client_1.take)(output, {
2125
- Explanation: smithy_client_1.expectString,
2126
- LogAnomalyToken: smithy_client_1.expectString,
2127
- LogAnomalyType: smithy_client_1.expectString,
2128
- LogEventId: smithy_client_1.expectString,
2129
- LogEventTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2130
- LogStreamName: smithy_client_1.expectString,
2131
- NumberOfLogLinesOccurrences: smithy_client_1.expectInt32,
2132
- });
2133
- };
2134
- const de_LogAnomalyClasses = (output, context) => {
2135
- const retVal = (output || [])
2136
- .filter((e) => e != null)
2137
- .map((entry) => {
2138
- return de_LogAnomalyClass(entry, context);
2139
- });
2140
- return retVal;
2141
- };
2142
- const de_LogAnomalyShowcase = (output, context) => {
2143
- return (0, smithy_client_1.take)(output, {
2144
- LogAnomalyClasses: (_) => de_LogAnomalyClasses(_, context),
2145
- });
2146
- };
2147
- const de_LogAnomalyShowcases = (output, context) => {
2148
- const retVal = (output || [])
2149
- .filter((e) => e != null)
2150
- .map((entry) => {
2151
- return de_LogAnomalyShowcase(entry, context);
2152
- });
2153
- return retVal;
2154
- };
2155
- const de_MonitoredResourceIdentifier = (output, context) => {
2156
- return (0, smithy_client_1.take)(output, {
2157
- LastUpdated: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2158
- MonitoredResourceName: smithy_client_1.expectString,
2159
- ResourceCollection: smithy_client_1._json,
2160
- ResourcePermission: smithy_client_1.expectString,
2161
- Type: smithy_client_1.expectString,
2162
- });
2163
- };
2164
- const de_MonitoredResourceIdentifiers = (output, context) => {
2165
- const retVal = (output || [])
2166
- .filter((e) => e != null)
2167
- .map((entry) => {
2168
- return de_MonitoredResourceIdentifier(entry, context);
2169
- });
2170
- return retVal;
2171
- };
2172
- const de_PerformanceInsightsMetricsDetail = (output, context) => {
2173
- return (0, smithy_client_1.take)(output, {
2174
- MetricDisplayName: smithy_client_1.expectString,
2175
- MetricQuery: smithy_client_1._json,
2176
- ReferenceData: (_) => de_PerformanceInsightsReferenceDataList(_, context),
2177
- StatsAtAnomaly: (_) => de_PerformanceInsightsStats(_, context),
2178
- StatsAtBaseline: (_) => de_PerformanceInsightsStats(_, context),
2179
- Unit: smithy_client_1.expectString,
2180
- });
2181
- };
2182
- const de_PerformanceInsightsMetricsDetails = (output, context) => {
2183
- const retVal = (output || [])
2184
- .filter((e) => e != null)
2185
- .map((entry) => {
2186
- return de_PerformanceInsightsMetricsDetail(entry, context);
2187
- });
2188
- return retVal;
2189
- };
2190
- const de_PerformanceInsightsReferenceComparisonValues = (output, context) => {
2191
- return (0, smithy_client_1.take)(output, {
2192
- ReferenceMetric: smithy_client_1._json,
2193
- ReferenceScalar: (_) => de_PerformanceInsightsReferenceScalar(_, context),
2194
- });
2195
- };
2196
- const de_PerformanceInsightsReferenceData = (output, context) => {
2197
- return (0, smithy_client_1.take)(output, {
2198
- ComparisonValues: (_) => de_PerformanceInsightsReferenceComparisonValues(_, context),
2199
- Name: smithy_client_1.expectString,
2200
- });
2201
- };
2202
- const de_PerformanceInsightsReferenceDataList = (output, context) => {
2203
- const retVal = (output || [])
2204
- .filter((e) => e != null)
2205
- .map((entry) => {
2206
- return de_PerformanceInsightsReferenceData(entry, context);
2207
- });
2208
- return retVal;
2209
- };
2210
- const de_PerformanceInsightsReferenceScalar = (output, context) => {
2211
- return (0, smithy_client_1.take)(output, {
2212
- Value: smithy_client_1.limitedParseDouble,
2213
- });
2214
- };
2215
- const de_PerformanceInsightsStat = (output, context) => {
2216
- return (0, smithy_client_1.take)(output, {
2217
- Type: smithy_client_1.expectString,
2218
- Value: smithy_client_1.limitedParseDouble,
2219
- });
2220
- };
2221
- const de_PerformanceInsightsStats = (output, context) => {
2222
- const retVal = (output || [])
2223
- .filter((e) => e != null)
2224
- .map((entry) => {
2225
- return de_PerformanceInsightsStat(entry, context);
2226
- });
2227
- return retVal;
2228
- };
2229
- const de_PredictionTimeRange = (output, context) => {
2230
- return (0, smithy_client_1.take)(output, {
2231
- EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2232
- StartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2233
- });
2234
- };
2235
- const de_ProactiveAnomalies = (output, context) => {
2236
- const retVal = (output || [])
2237
- .filter((e) => e != null)
2238
- .map((entry) => {
2239
- return de_ProactiveAnomalySummary(entry, context);
2240
- });
2241
- return retVal;
2242
- };
2243
- const de_ProactiveAnomaly = (output, context) => {
2244
- return (0, smithy_client_1.take)(output, {
2245
- AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2246
- AnomalyResources: smithy_client_1._json,
2247
- AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2248
- AssociatedInsightId: smithy_client_1.expectString,
2249
- Description: smithy_client_1.expectString,
2250
- Id: smithy_client_1.expectString,
2251
- Limit: smithy_client_1.limitedParseDouble,
2252
- PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2253
- ResourceCollection: smithy_client_1._json,
2254
- Severity: smithy_client_1.expectString,
2255
- SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2256
- SourceMetadata: smithy_client_1._json,
2257
- Status: smithy_client_1.expectString,
2258
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2259
- });
2260
- };
2261
- const de_ProactiveAnomalySummary = (output, context) => {
2262
- return (0, smithy_client_1.take)(output, {
2263
- AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2264
- AnomalyResources: smithy_client_1._json,
2265
- AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2266
- AssociatedInsightId: smithy_client_1.expectString,
2267
- Description: smithy_client_1.expectString,
2268
- Id: smithy_client_1.expectString,
2269
- Limit: smithy_client_1.limitedParseDouble,
2270
- PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2271
- ResourceCollection: smithy_client_1._json,
2272
- Severity: smithy_client_1.expectString,
2273
- SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2274
- SourceMetadata: smithy_client_1._json,
2275
- Status: smithy_client_1.expectString,
2276
- UpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2277
- });
2278
- };
2279
- const de_ProactiveInsight = (output, context) => {
2280
- return (0, smithy_client_1.take)(output, {
2281
- Description: smithy_client_1.expectString,
2282
- Id: smithy_client_1.expectString,
2283
- InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2284
- Name: smithy_client_1.expectString,
2285
- PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2286
- ResourceCollection: smithy_client_1._json,
2287
- Severity: smithy_client_1.expectString,
2288
- SsmOpsItemId: smithy_client_1.expectString,
2289
- Status: smithy_client_1.expectString,
2290
- });
2291
- };
2292
- const de_ProactiveInsights = (output, context) => {
2293
- const retVal = (output || [])
2294
- .filter((e) => e != null)
2295
- .map((entry) => {
2296
- return de_ProactiveInsightSummary(entry, context);
2297
- });
2298
- return retVal;
2299
- };
2300
- const de_ProactiveInsightSummary = (output, context) => {
2301
- return (0, smithy_client_1.take)(output, {
2302
- AssociatedResourceArns: smithy_client_1._json,
2303
- Id: smithy_client_1.expectString,
2304
- InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2305
- Name: smithy_client_1.expectString,
2306
- PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2307
- ResourceCollection: smithy_client_1._json,
2308
- ServiceCollection: smithy_client_1._json,
2309
- Severity: smithy_client_1.expectString,
2310
- Status: smithy_client_1.expectString,
2311
- });
2312
- };
2313
- const de_ProactiveOrganizationInsights = (output, context) => {
2314
- const retVal = (output || [])
2315
- .filter((e) => e != null)
2316
- .map((entry) => {
2317
- return de_ProactiveOrganizationInsightSummary(entry, context);
2318
- });
2319
- return retVal;
2320
- };
2321
- const de_ProactiveOrganizationInsightSummary = (output, context) => {
2322
- return (0, smithy_client_1.take)(output, {
2323
- AccountId: smithy_client_1.expectString,
2324
- Id: smithy_client_1.expectString,
2325
- InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2326
- Name: smithy_client_1.expectString,
2327
- OrganizationalUnitId: smithy_client_1.expectString,
2328
- PredictionTimeRange: (_) => de_PredictionTimeRange(_, context),
2329
- ResourceCollection: smithy_client_1._json,
2330
- ServiceCollection: smithy_client_1._json,
2331
- Severity: smithy_client_1.expectString,
2332
- Status: smithy_client_1.expectString,
2333
- });
2334
- };
2335
- const de_ReactiveAnomalies = (output, context) => {
2336
- const retVal = (output || [])
2337
- .filter((e) => e != null)
2338
- .map((entry) => {
2339
- return de_ReactiveAnomalySummary(entry, context);
2340
- });
2341
- return retVal;
2342
- };
2343
- const de_ReactiveAnomaly = (output, context) => {
2344
- return (0, smithy_client_1.take)(output, {
2345
- AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2346
- AnomalyResources: smithy_client_1._json,
2347
- AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2348
- AssociatedInsightId: smithy_client_1.expectString,
2349
- CausalAnomalyId: smithy_client_1.expectString,
2350
- Description: smithy_client_1.expectString,
2351
- Id: smithy_client_1.expectString,
2352
- Name: smithy_client_1.expectString,
2353
- ResourceCollection: smithy_client_1._json,
2354
- Severity: smithy_client_1.expectString,
2355
- SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2356
- Status: smithy_client_1.expectString,
2357
- Type: smithy_client_1.expectString,
2358
- });
2359
- };
2360
- const de_ReactiveAnomalySummary = (output, context) => {
2361
- return (0, smithy_client_1.take)(output, {
2362
- AnomalyReportedTimeRange: (_) => de_AnomalyReportedTimeRange(_, context),
2363
- AnomalyResources: smithy_client_1._json,
2364
- AnomalyTimeRange: (_) => de_AnomalyTimeRange(_, context),
2365
- AssociatedInsightId: smithy_client_1.expectString,
2366
- CausalAnomalyId: smithy_client_1.expectString,
2367
- Description: smithy_client_1.expectString,
2368
- Id: smithy_client_1.expectString,
2369
- Name: smithy_client_1.expectString,
2370
- ResourceCollection: smithy_client_1._json,
2371
- Severity: smithy_client_1.expectString,
2372
- SourceDetails: (_) => de_AnomalySourceDetails(_, context),
2373
- Status: smithy_client_1.expectString,
2374
- Type: smithy_client_1.expectString,
2375
- });
2376
- };
2377
- const de_ReactiveInsight = (output, context) => {
2378
- return (0, smithy_client_1.take)(output, {
2379
- Description: smithy_client_1.expectString,
2380
- Id: smithy_client_1.expectString,
2381
- InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2382
- Name: smithy_client_1.expectString,
2383
- ResourceCollection: smithy_client_1._json,
2384
- Severity: smithy_client_1.expectString,
2385
- SsmOpsItemId: smithy_client_1.expectString,
2386
- Status: smithy_client_1.expectString,
2387
- });
2388
- };
2389
- const de_ReactiveInsights = (output, context) => {
2390
- const retVal = (output || [])
2391
- .filter((e) => e != null)
2392
- .map((entry) => {
2393
- return de_ReactiveInsightSummary(entry, context);
2394
- });
2395
- return retVal;
2396
- };
2397
- const de_ReactiveInsightSummary = (output, context) => {
2398
- return (0, smithy_client_1.take)(output, {
2399
- AssociatedResourceArns: smithy_client_1._json,
2400
- Id: smithy_client_1.expectString,
2401
- InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2402
- Name: smithy_client_1.expectString,
2403
- ResourceCollection: smithy_client_1._json,
2404
- ServiceCollection: smithy_client_1._json,
2405
- Severity: smithy_client_1.expectString,
2406
- Status: smithy_client_1.expectString,
2407
- });
2408
- };
2409
- const de_ReactiveOrganizationInsights = (output, context) => {
2410
- const retVal = (output || [])
2411
- .filter((e) => e != null)
2412
- .map((entry) => {
2413
- return de_ReactiveOrganizationInsightSummary(entry, context);
2414
- });
2415
- return retVal;
2416
- };
2417
- const de_ReactiveOrganizationInsightSummary = (output, context) => {
2418
- return (0, smithy_client_1.take)(output, {
2419
- AccountId: smithy_client_1.expectString,
2420
- Id: smithy_client_1.expectString,
2421
- InsightTimeRange: (_) => de_InsightTimeRange(_, context),
2422
- Name: smithy_client_1.expectString,
2423
- OrganizationalUnitId: smithy_client_1.expectString,
2424
- ResourceCollection: smithy_client_1._json,
2425
- ServiceCollection: smithy_client_1._json,
2426
- Severity: smithy_client_1.expectString,
2427
- Status: smithy_client_1.expectString,
2428
- });
2429
- };
2430
- const de_ServiceResourceCost = (output, context) => {
2431
- return (0, smithy_client_1.take)(output, {
2432
- Cost: smithy_client_1.limitedParseDouble,
2433
- Count: smithy_client_1.expectInt32,
2434
- State: smithy_client_1.expectString,
2435
- Type: smithy_client_1.expectString,
2436
- UnitCost: smithy_client_1.limitedParseDouble,
2437
- });
2438
- };
2439
- const de_ServiceResourceCosts = (output, context) => {
2440
- const retVal = (output || [])
2441
- .filter((e) => e != null)
2442
- .map((entry) => {
2443
- return de_ServiceResourceCost(entry, context);
2444
- });
2445
- return retVal;
2446
- };
2447
- const de_TimestampMetricValuePair = (output, context) => {
2448
- return (0, smithy_client_1.take)(output, {
2449
- MetricValue: smithy_client_1.limitedParseDouble,
2450
- Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2451
- });
2452
- };
2453
- const de_TimestampMetricValuePairList = (output, context) => {
2454
- const retVal = (output || [])
2455
- .filter((e) => e != null)
2456
- .map((entry) => {
2457
- return de_TimestampMetricValuePair(entry, context);
2458
- });
2459
- return retVal;
2460
- };
2461
- const deserializeMetadata = (output) => ({
2462
- httpStatusCode: output.statusCode,
2463
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2464
- extendedRequestId: output.headers["x-amz-id-2"],
2465
- cfId: output.headers["x-amz-cf-id"],
2466
- });
2467
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2468
- const isSerializableHeaderValue = (value) => value !== undefined &&
2469
- value !== null &&
2470
- value !== "" &&
2471
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2472
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2473
- const _AI = "AccountId";
2474
- const _NT = "NextToken";
2475
- const _RAS = "RetryAfterSeconds";
2476
- const _ra = "retry-after";
2477
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2478
- if (encoded.length) {
2479
- return JSON.parse(encoded);
2480
- }
2481
- return {};
2482
- });
2483
- const parseErrorBody = async (errorBody, context) => {
2484
- const value = await parseBody(errorBody, context);
2485
- value.message = value.message ?? value.Message;
2486
- return value;
2487
- };
2488
- const loadRestJsonErrorCode = (output, data) => {
2489
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2490
- const sanitizeErrorCode = (rawValue) => {
2491
- let cleanValue = rawValue;
2492
- if (typeof cleanValue === "number") {
2493
- cleanValue = cleanValue.toString();
2494
- }
2495
- if (cleanValue.indexOf(",") >= 0) {
2496
- cleanValue = cleanValue.split(",")[0];
2497
- }
2498
- if (cleanValue.indexOf(":") >= 0) {
2499
- cleanValue = cleanValue.split(":")[0];
2500
- }
2501
- if (cleanValue.indexOf("#") >= 0) {
2502
- cleanValue = cleanValue.split("#")[1];
2503
- }
2504
- return cleanValue;
2505
- };
2506
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2507
- if (headerKey !== undefined) {
2508
- return sanitizeErrorCode(output.headers[headerKey]);
2509
- }
2510
- if (data.code !== undefined) {
2511
- return sanitizeErrorCode(data.code);
2512
- }
2513
- if (data["__type"] !== undefined) {
2514
- return sanitizeErrorCode(data["__type"]);
2515
- }
2516
- };
1
+ module.exports = require("../index.js");