@aws-sdk/client-compute-optimizer 3.927.0 → 3.928.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist-cjs/index.js +2103 -1875
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/ComputeOptimizerClient.js +2 -0
  4. package/dist-es/commands/DeleteRecommendationPreferencesCommand.js +3 -9
  5. package/dist-es/commands/DescribeRecommendationExportJobsCommand.js +3 -9
  6. package/dist-es/commands/ExportAutoScalingGroupRecommendationsCommand.js +3 -9
  7. package/dist-es/commands/ExportEBSVolumeRecommendationsCommand.js +3 -9
  8. package/dist-es/commands/ExportEC2InstanceRecommendationsCommand.js +3 -9
  9. package/dist-es/commands/ExportECSServiceRecommendationsCommand.js +3 -9
  10. package/dist-es/commands/ExportIdleRecommendationsCommand.js +3 -9
  11. package/dist-es/commands/ExportLambdaFunctionRecommendationsCommand.js +3 -9
  12. package/dist-es/commands/ExportLicenseRecommendationsCommand.js +3 -9
  13. package/dist-es/commands/ExportRDSDatabaseRecommendationsCommand.js +3 -9
  14. package/dist-es/commands/GetAutoScalingGroupRecommendationsCommand.js +3 -9
  15. package/dist-es/commands/GetEBSVolumeRecommendationsCommand.js +3 -9
  16. package/dist-es/commands/GetEC2InstanceRecommendationsCommand.js +3 -9
  17. package/dist-es/commands/GetEC2RecommendationProjectedMetricsCommand.js +3 -9
  18. package/dist-es/commands/GetECSServiceRecommendationProjectedMetricsCommand.js +3 -9
  19. package/dist-es/commands/GetECSServiceRecommendationsCommand.js +3 -9
  20. package/dist-es/commands/GetEffectiveRecommendationPreferencesCommand.js +3 -9
  21. package/dist-es/commands/GetEnrollmentStatusCommand.js +3 -9
  22. package/dist-es/commands/GetEnrollmentStatusesForOrganizationCommand.js +3 -9
  23. package/dist-es/commands/GetIdleRecommendationsCommand.js +3 -9
  24. package/dist-es/commands/GetLambdaFunctionRecommendationsCommand.js +3 -9
  25. package/dist-es/commands/GetLicenseRecommendationsCommand.js +3 -9
  26. package/dist-es/commands/GetRDSDatabaseRecommendationProjectedMetricsCommand.js +3 -9
  27. package/dist-es/commands/GetRDSDatabaseRecommendationsCommand.js +3 -9
  28. package/dist-es/commands/GetRecommendationPreferencesCommand.js +3 -9
  29. package/dist-es/commands/GetRecommendationSummariesCommand.js +3 -9
  30. package/dist-es/commands/PutRecommendationPreferencesCommand.js +3 -9
  31. package/dist-es/commands/UpdateEnrollmentStatusCommand.js +3 -9
  32. package/dist-es/runtimeConfig.shared.js +7 -0
  33. package/dist-es/schemas/schemas_0.js +2050 -0
  34. package/dist-types/ComputeOptimizerClient.d.ts +10 -1
  35. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  36. package/dist-types/runtimeConfig.d.ts +1 -0
  37. package/dist-types/runtimeConfig.native.d.ts +1 -0
  38. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  39. package/dist-types/schemas/schemas_0.d.ts +291 -0
  40. package/dist-types/ts3.4/ComputeOptimizerClient.d.ts +4 -0
  41. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  42. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  43. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  44. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  45. package/dist-types/ts3.4/schemas/schemas_0.d.ts +296 -0
  46. package/package.json +5 -5
  47. package/dist-es/protocols/Aws_json1_0.js +0 -1656
  48. package/dist-types/protocols/Aws_json1_0.d.ts +0 -254
  49. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -341
@@ -1,1656 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { ComputeOptimizerServiceException as __BaseException } from "../models/ComputeOptimizerServiceException";
5
- import { AccessDeniedException, InternalServerException, InvalidParameterValueException, LimitExceededException, MissingAuthenticationToken, OptInRequiredException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
6
- export const se_DeleteRecommendationPreferencesCommand = async (input, context) => {
7
- const headers = sharedHeaders("DeleteRecommendationPreferences");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_DescribeRecommendationExportJobsCommand = async (input, context) => {
13
- const headers = sharedHeaders("DescribeRecommendationExportJobs");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_ExportAutoScalingGroupRecommendationsCommand = async (input, context) => {
19
- const headers = sharedHeaders("ExportAutoScalingGroupRecommendations");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_ExportEBSVolumeRecommendationsCommand = async (input, context) => {
25
- const headers = sharedHeaders("ExportEBSVolumeRecommendations");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_ExportEC2InstanceRecommendationsCommand = async (input, context) => {
31
- const headers = sharedHeaders("ExportEC2InstanceRecommendations");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_ExportECSServiceRecommendationsCommand = async (input, context) => {
37
- const headers = sharedHeaders("ExportECSServiceRecommendations");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_ExportIdleRecommendationsCommand = async (input, context) => {
43
- const headers = sharedHeaders("ExportIdleRecommendations");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_ExportLambdaFunctionRecommendationsCommand = async (input, context) => {
49
- const headers = sharedHeaders("ExportLambdaFunctionRecommendations");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_ExportLicenseRecommendationsCommand = async (input, context) => {
55
- const headers = sharedHeaders("ExportLicenseRecommendations");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_ExportRDSDatabaseRecommendationsCommand = async (input, context) => {
61
- const headers = sharedHeaders("ExportRDSDatabaseRecommendations");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_GetAutoScalingGroupRecommendationsCommand = async (input, context) => {
67
- const headers = sharedHeaders("GetAutoScalingGroupRecommendations");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_GetEBSVolumeRecommendationsCommand = async (input, context) => {
73
- const headers = sharedHeaders("GetEBSVolumeRecommendations");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_GetEC2InstanceRecommendationsCommand = async (input, context) => {
79
- const headers = sharedHeaders("GetEC2InstanceRecommendations");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_GetEC2RecommendationProjectedMetricsCommand = async (input, context) => {
85
- const headers = sharedHeaders("GetEC2RecommendationProjectedMetrics");
86
- let body;
87
- body = JSON.stringify(se_GetEC2RecommendationProjectedMetricsRequest(input, context));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_GetECSServiceRecommendationProjectedMetricsCommand = async (input, context) => {
91
- const headers = sharedHeaders("GetECSServiceRecommendationProjectedMetrics");
92
- let body;
93
- body = JSON.stringify(se_GetECSServiceRecommendationProjectedMetricsRequest(input, context));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_GetECSServiceRecommendationsCommand = async (input, context) => {
97
- const headers = sharedHeaders("GetECSServiceRecommendations");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_GetEffectiveRecommendationPreferencesCommand = async (input, context) => {
103
- const headers = sharedHeaders("GetEffectiveRecommendationPreferences");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_GetEnrollmentStatusCommand = async (input, context) => {
109
- const headers = sharedHeaders("GetEnrollmentStatus");
110
- let body;
111
- body = JSON.stringify(_json(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_GetEnrollmentStatusesForOrganizationCommand = async (input, context) => {
115
- const headers = sharedHeaders("GetEnrollmentStatusesForOrganization");
116
- let body;
117
- body = JSON.stringify(_json(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_GetIdleRecommendationsCommand = async (input, context) => {
121
- const headers = sharedHeaders("GetIdleRecommendations");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_GetLambdaFunctionRecommendationsCommand = async (input, context) => {
127
- const headers = sharedHeaders("GetLambdaFunctionRecommendations");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_GetLicenseRecommendationsCommand = async (input, context) => {
133
- const headers = sharedHeaders("GetLicenseRecommendations");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_GetRDSDatabaseRecommendationProjectedMetricsCommand = async (input, context) => {
139
- const headers = sharedHeaders("GetRDSDatabaseRecommendationProjectedMetrics");
140
- let body;
141
- body = JSON.stringify(se_GetRDSDatabaseRecommendationProjectedMetricsRequest(input, context));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_GetRDSDatabaseRecommendationsCommand = async (input, context) => {
145
- const headers = sharedHeaders("GetRDSDatabaseRecommendations");
146
- let body;
147
- body = JSON.stringify(_json(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_GetRecommendationPreferencesCommand = async (input, context) => {
151
- const headers = sharedHeaders("GetRecommendationPreferences");
152
- let body;
153
- body = JSON.stringify(_json(input));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const se_GetRecommendationSummariesCommand = async (input, context) => {
157
- const headers = sharedHeaders("GetRecommendationSummaries");
158
- let body;
159
- body = JSON.stringify(_json(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- export const se_PutRecommendationPreferencesCommand = async (input, context) => {
163
- const headers = sharedHeaders("PutRecommendationPreferences");
164
- let body;
165
- body = JSON.stringify(_json(input));
166
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
- };
168
- export const se_UpdateEnrollmentStatusCommand = async (input, context) => {
169
- const headers = sharedHeaders("UpdateEnrollmentStatus");
170
- let body;
171
- body = JSON.stringify(_json(input));
172
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
173
- };
174
- export const de_DeleteRecommendationPreferencesCommand = async (output, context) => {
175
- if (output.statusCode >= 300) {
176
- return de_CommandError(output, context);
177
- }
178
- const data = await parseBody(output.body, context);
179
- let contents = {};
180
- contents = _json(data);
181
- const response = {
182
- $metadata: deserializeMetadata(output),
183
- ...contents,
184
- };
185
- return response;
186
- };
187
- export const de_DescribeRecommendationExportJobsCommand = async (output, context) => {
188
- if (output.statusCode >= 300) {
189
- return de_CommandError(output, context);
190
- }
191
- const data = await parseBody(output.body, context);
192
- let contents = {};
193
- contents = de_DescribeRecommendationExportJobsResponse(data, context);
194
- const response = {
195
- $metadata: deserializeMetadata(output),
196
- ...contents,
197
- };
198
- return response;
199
- };
200
- export const de_ExportAutoScalingGroupRecommendationsCommand = async (output, context) => {
201
- if (output.statusCode >= 300) {
202
- return de_CommandError(output, context);
203
- }
204
- const data = await parseBody(output.body, context);
205
- let contents = {};
206
- contents = _json(data);
207
- const response = {
208
- $metadata: deserializeMetadata(output),
209
- ...contents,
210
- };
211
- return response;
212
- };
213
- export const de_ExportEBSVolumeRecommendationsCommand = async (output, context) => {
214
- if (output.statusCode >= 300) {
215
- return de_CommandError(output, context);
216
- }
217
- const data = await parseBody(output.body, context);
218
- let contents = {};
219
- contents = _json(data);
220
- const response = {
221
- $metadata: deserializeMetadata(output),
222
- ...contents,
223
- };
224
- return response;
225
- };
226
- export const de_ExportEC2InstanceRecommendationsCommand = async (output, context) => {
227
- if (output.statusCode >= 300) {
228
- return de_CommandError(output, context);
229
- }
230
- const data = await parseBody(output.body, context);
231
- let contents = {};
232
- contents = _json(data);
233
- const response = {
234
- $metadata: deserializeMetadata(output),
235
- ...contents,
236
- };
237
- return response;
238
- };
239
- export const de_ExportECSServiceRecommendationsCommand = async (output, context) => {
240
- if (output.statusCode >= 300) {
241
- return de_CommandError(output, context);
242
- }
243
- const data = await parseBody(output.body, context);
244
- let contents = {};
245
- contents = _json(data);
246
- const response = {
247
- $metadata: deserializeMetadata(output),
248
- ...contents,
249
- };
250
- return response;
251
- };
252
- export const de_ExportIdleRecommendationsCommand = async (output, context) => {
253
- if (output.statusCode >= 300) {
254
- return de_CommandError(output, context);
255
- }
256
- const data = await parseBody(output.body, context);
257
- let contents = {};
258
- contents = _json(data);
259
- const response = {
260
- $metadata: deserializeMetadata(output),
261
- ...contents,
262
- };
263
- return response;
264
- };
265
- export const de_ExportLambdaFunctionRecommendationsCommand = async (output, context) => {
266
- if (output.statusCode >= 300) {
267
- return de_CommandError(output, context);
268
- }
269
- const data = await parseBody(output.body, context);
270
- let contents = {};
271
- contents = _json(data);
272
- const response = {
273
- $metadata: deserializeMetadata(output),
274
- ...contents,
275
- };
276
- return response;
277
- };
278
- export const de_ExportLicenseRecommendationsCommand = async (output, context) => {
279
- if (output.statusCode >= 300) {
280
- return de_CommandError(output, context);
281
- }
282
- const data = await parseBody(output.body, context);
283
- let contents = {};
284
- contents = _json(data);
285
- const response = {
286
- $metadata: deserializeMetadata(output),
287
- ...contents,
288
- };
289
- return response;
290
- };
291
- export const de_ExportRDSDatabaseRecommendationsCommand = async (output, context) => {
292
- if (output.statusCode >= 300) {
293
- return de_CommandError(output, context);
294
- }
295
- const data = await parseBody(output.body, context);
296
- let contents = {};
297
- contents = _json(data);
298
- const response = {
299
- $metadata: deserializeMetadata(output),
300
- ...contents,
301
- };
302
- return response;
303
- };
304
- export const de_GetAutoScalingGroupRecommendationsCommand = async (output, context) => {
305
- if (output.statusCode >= 300) {
306
- return de_CommandError(output, context);
307
- }
308
- const data = await parseBody(output.body, context);
309
- let contents = {};
310
- contents = de_GetAutoScalingGroupRecommendationsResponse(data, context);
311
- const response = {
312
- $metadata: deserializeMetadata(output),
313
- ...contents,
314
- };
315
- return response;
316
- };
317
- export const de_GetEBSVolumeRecommendationsCommand = async (output, context) => {
318
- if (output.statusCode >= 300) {
319
- return de_CommandError(output, context);
320
- }
321
- const data = await parseBody(output.body, context);
322
- let contents = {};
323
- contents = de_GetEBSVolumeRecommendationsResponse(data, context);
324
- const response = {
325
- $metadata: deserializeMetadata(output),
326
- ...contents,
327
- };
328
- return response;
329
- };
330
- export const de_GetEC2InstanceRecommendationsCommand = async (output, context) => {
331
- if (output.statusCode >= 300) {
332
- return de_CommandError(output, context);
333
- }
334
- const data = await parseBody(output.body, context);
335
- let contents = {};
336
- contents = de_GetEC2InstanceRecommendationsResponse(data, context);
337
- const response = {
338
- $metadata: deserializeMetadata(output),
339
- ...contents,
340
- };
341
- return response;
342
- };
343
- export const de_GetEC2RecommendationProjectedMetricsCommand = async (output, context) => {
344
- if (output.statusCode >= 300) {
345
- return de_CommandError(output, context);
346
- }
347
- const data = await parseBody(output.body, context);
348
- let contents = {};
349
- contents = de_GetEC2RecommendationProjectedMetricsResponse(data, context);
350
- const response = {
351
- $metadata: deserializeMetadata(output),
352
- ...contents,
353
- };
354
- return response;
355
- };
356
- export const de_GetECSServiceRecommendationProjectedMetricsCommand = async (output, context) => {
357
- if (output.statusCode >= 300) {
358
- return de_CommandError(output, context);
359
- }
360
- const data = await parseBody(output.body, context);
361
- let contents = {};
362
- contents = de_GetECSServiceRecommendationProjectedMetricsResponse(data, context);
363
- const response = {
364
- $metadata: deserializeMetadata(output),
365
- ...contents,
366
- };
367
- return response;
368
- };
369
- export const de_GetECSServiceRecommendationsCommand = async (output, context) => {
370
- if (output.statusCode >= 300) {
371
- return de_CommandError(output, context);
372
- }
373
- const data = await parseBody(output.body, context);
374
- let contents = {};
375
- contents = de_GetECSServiceRecommendationsResponse(data, context);
376
- const response = {
377
- $metadata: deserializeMetadata(output),
378
- ...contents,
379
- };
380
- return response;
381
- };
382
- export const de_GetEffectiveRecommendationPreferencesCommand = async (output, context) => {
383
- if (output.statusCode >= 300) {
384
- return de_CommandError(output, context);
385
- }
386
- const data = await parseBody(output.body, context);
387
- let contents = {};
388
- contents = _json(data);
389
- const response = {
390
- $metadata: deserializeMetadata(output),
391
- ...contents,
392
- };
393
- return response;
394
- };
395
- export const de_GetEnrollmentStatusCommand = async (output, context) => {
396
- if (output.statusCode >= 300) {
397
- return de_CommandError(output, context);
398
- }
399
- const data = await parseBody(output.body, context);
400
- let contents = {};
401
- contents = de_GetEnrollmentStatusResponse(data, context);
402
- const response = {
403
- $metadata: deserializeMetadata(output),
404
- ...contents,
405
- };
406
- return response;
407
- };
408
- export const de_GetEnrollmentStatusesForOrganizationCommand = async (output, context) => {
409
- if (output.statusCode >= 300) {
410
- return de_CommandError(output, context);
411
- }
412
- const data = await parseBody(output.body, context);
413
- let contents = {};
414
- contents = de_GetEnrollmentStatusesForOrganizationResponse(data, context);
415
- const response = {
416
- $metadata: deserializeMetadata(output),
417
- ...contents,
418
- };
419
- return response;
420
- };
421
- export const de_GetIdleRecommendationsCommand = async (output, context) => {
422
- if (output.statusCode >= 300) {
423
- return de_CommandError(output, context);
424
- }
425
- const data = await parseBody(output.body, context);
426
- let contents = {};
427
- contents = de_GetIdleRecommendationsResponse(data, context);
428
- const response = {
429
- $metadata: deserializeMetadata(output),
430
- ...contents,
431
- };
432
- return response;
433
- };
434
- export const de_GetLambdaFunctionRecommendationsCommand = async (output, context) => {
435
- if (output.statusCode >= 300) {
436
- return de_CommandError(output, context);
437
- }
438
- const data = await parseBody(output.body, context);
439
- let contents = {};
440
- contents = de_GetLambdaFunctionRecommendationsResponse(data, context);
441
- const response = {
442
- $metadata: deserializeMetadata(output),
443
- ...contents,
444
- };
445
- return response;
446
- };
447
- export const de_GetLicenseRecommendationsCommand = async (output, context) => {
448
- if (output.statusCode >= 300) {
449
- return de_CommandError(output, context);
450
- }
451
- const data = await parseBody(output.body, context);
452
- let contents = {};
453
- contents = de_GetLicenseRecommendationsResponse(data, context);
454
- const response = {
455
- $metadata: deserializeMetadata(output),
456
- ...contents,
457
- };
458
- return response;
459
- };
460
- export const de_GetRDSDatabaseRecommendationProjectedMetricsCommand = async (output, context) => {
461
- if (output.statusCode >= 300) {
462
- return de_CommandError(output, context);
463
- }
464
- const data = await parseBody(output.body, context);
465
- let contents = {};
466
- contents = de_GetRDSDatabaseRecommendationProjectedMetricsResponse(data, context);
467
- const response = {
468
- $metadata: deserializeMetadata(output),
469
- ...contents,
470
- };
471
- return response;
472
- };
473
- export const de_GetRDSDatabaseRecommendationsCommand = async (output, context) => {
474
- if (output.statusCode >= 300) {
475
- return de_CommandError(output, context);
476
- }
477
- const data = await parseBody(output.body, context);
478
- let contents = {};
479
- contents = de_GetRDSDatabaseRecommendationsResponse(data, context);
480
- const response = {
481
- $metadata: deserializeMetadata(output),
482
- ...contents,
483
- };
484
- return response;
485
- };
486
- export const de_GetRecommendationPreferencesCommand = async (output, context) => {
487
- if (output.statusCode >= 300) {
488
- return de_CommandError(output, context);
489
- }
490
- const data = await parseBody(output.body, context);
491
- let contents = {};
492
- contents = _json(data);
493
- const response = {
494
- $metadata: deserializeMetadata(output),
495
- ...contents,
496
- };
497
- return response;
498
- };
499
- export const de_GetRecommendationSummariesCommand = async (output, context) => {
500
- if (output.statusCode >= 300) {
501
- return de_CommandError(output, context);
502
- }
503
- const data = await parseBody(output.body, context);
504
- let contents = {};
505
- contents = de_GetRecommendationSummariesResponse(data, context);
506
- const response = {
507
- $metadata: deserializeMetadata(output),
508
- ...contents,
509
- };
510
- return response;
511
- };
512
- export const de_PutRecommendationPreferencesCommand = async (output, context) => {
513
- if (output.statusCode >= 300) {
514
- return de_CommandError(output, context);
515
- }
516
- const data = await parseBody(output.body, context);
517
- let contents = {};
518
- contents = _json(data);
519
- const response = {
520
- $metadata: deserializeMetadata(output),
521
- ...contents,
522
- };
523
- return response;
524
- };
525
- export const de_UpdateEnrollmentStatusCommand = async (output, context) => {
526
- if (output.statusCode >= 300) {
527
- return de_CommandError(output, context);
528
- }
529
- const data = await parseBody(output.body, context);
530
- let contents = {};
531
- contents = _json(data);
532
- const response = {
533
- $metadata: deserializeMetadata(output),
534
- ...contents,
535
- };
536
- return response;
537
- };
538
- const de_CommandError = async (output, context) => {
539
- const parsedOutput = {
540
- ...output,
541
- body: await parseErrorBody(output.body, context),
542
- };
543
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
544
- switch (errorCode) {
545
- case "AccessDeniedException":
546
- case "com.amazonaws.computeoptimizer#AccessDeniedException":
547
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
548
- case "InternalServerException":
549
- case "com.amazonaws.computeoptimizer#InternalServerException":
550
- throw await de_InternalServerExceptionRes(parsedOutput, context);
551
- case "InvalidParameterValueException":
552
- case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
553
- throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
554
- case "MissingAuthenticationToken":
555
- case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
556
- throw await de_MissingAuthenticationTokenRes(parsedOutput, context);
557
- case "OptInRequiredException":
558
- case "com.amazonaws.computeoptimizer#OptInRequiredException":
559
- throw await de_OptInRequiredExceptionRes(parsedOutput, context);
560
- case "ResourceNotFoundException":
561
- case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
562
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
563
- case "ServiceUnavailableException":
564
- case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
565
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
566
- case "ThrottlingException":
567
- case "com.amazonaws.computeoptimizer#ThrottlingException":
568
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
569
- case "LimitExceededException":
570
- case "com.amazonaws.computeoptimizer#LimitExceededException":
571
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
572
- default:
573
- const parsedBody = parsedOutput.body;
574
- return throwDefaultError({
575
- output,
576
- parsedBody,
577
- errorCode,
578
- });
579
- }
580
- };
581
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
582
- const body = parsedOutput.body;
583
- const deserialized = _json(body);
584
- const exception = new AccessDeniedException({
585
- $metadata: deserializeMetadata(parsedOutput),
586
- ...deserialized,
587
- });
588
- return __decorateServiceException(exception, body);
589
- };
590
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
591
- const body = parsedOutput.body;
592
- const deserialized = _json(body);
593
- const exception = new InternalServerException({
594
- $metadata: deserializeMetadata(parsedOutput),
595
- ...deserialized,
596
- });
597
- return __decorateServiceException(exception, body);
598
- };
599
- const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
600
- const body = parsedOutput.body;
601
- const deserialized = _json(body);
602
- const exception = new InvalidParameterValueException({
603
- $metadata: deserializeMetadata(parsedOutput),
604
- ...deserialized,
605
- });
606
- return __decorateServiceException(exception, body);
607
- };
608
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
609
- const body = parsedOutput.body;
610
- const deserialized = _json(body);
611
- const exception = new LimitExceededException({
612
- $metadata: deserializeMetadata(parsedOutput),
613
- ...deserialized,
614
- });
615
- return __decorateServiceException(exception, body);
616
- };
617
- const de_MissingAuthenticationTokenRes = async (parsedOutput, context) => {
618
- const body = parsedOutput.body;
619
- const deserialized = _json(body);
620
- const exception = new MissingAuthenticationToken({
621
- $metadata: deserializeMetadata(parsedOutput),
622
- ...deserialized,
623
- });
624
- return __decorateServiceException(exception, body);
625
- };
626
- const de_OptInRequiredExceptionRes = async (parsedOutput, context) => {
627
- const body = parsedOutput.body;
628
- const deserialized = _json(body);
629
- const exception = new OptInRequiredException({
630
- $metadata: deserializeMetadata(parsedOutput),
631
- ...deserialized,
632
- });
633
- return __decorateServiceException(exception, body);
634
- };
635
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
636
- const body = parsedOutput.body;
637
- const deserialized = _json(body);
638
- const exception = new ResourceNotFoundException({
639
- $metadata: deserializeMetadata(parsedOutput),
640
- ...deserialized,
641
- });
642
- return __decorateServiceException(exception, body);
643
- };
644
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
645
- const body = parsedOutput.body;
646
- const deserialized = _json(body);
647
- const exception = new ServiceUnavailableException({
648
- $metadata: deserializeMetadata(parsedOutput),
649
- ...deserialized,
650
- });
651
- return __decorateServiceException(exception, body);
652
- };
653
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
654
- const body = parsedOutput.body;
655
- const deserialized = _json(body);
656
- const exception = new ThrottlingException({
657
- $metadata: deserializeMetadata(parsedOutput),
658
- ...deserialized,
659
- });
660
- return __decorateServiceException(exception, body);
661
- };
662
- const se_GetEC2RecommendationProjectedMetricsRequest = (input, context) => {
663
- return take(input, {
664
- endTime: (_) => _.getTime() / 1_000,
665
- instanceArn: [],
666
- period: [],
667
- recommendationPreferences: _json,
668
- startTime: (_) => _.getTime() / 1_000,
669
- stat: [],
670
- });
671
- };
672
- const se_GetECSServiceRecommendationProjectedMetricsRequest = (input, context) => {
673
- return take(input, {
674
- endTime: (_) => _.getTime() / 1_000,
675
- period: [],
676
- serviceArn: [],
677
- startTime: (_) => _.getTime() / 1_000,
678
- stat: [],
679
- });
680
- };
681
- const se_GetRDSDatabaseRecommendationProjectedMetricsRequest = (input, context) => {
682
- return take(input, {
683
- endTime: (_) => _.getTime() / 1_000,
684
- period: [],
685
- recommendationPreferences: _json,
686
- resourceArn: [],
687
- startTime: (_) => _.getTime() / 1_000,
688
- stat: [],
689
- });
690
- };
691
- const de_AccountEnrollmentStatus = (output, context) => {
692
- return take(output, {
693
- accountId: __expectString,
694
- lastUpdatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
695
- status: __expectString,
696
- statusReason: __expectString,
697
- });
698
- };
699
- const de_AccountEnrollmentStatuses = (output, context) => {
700
- const retVal = (output || [])
701
- .filter((e) => e != null)
702
- .map((entry) => {
703
- return de_AccountEnrollmentStatus(entry, context);
704
- });
705
- return retVal;
706
- };
707
- const de_AutoScalingGroupConfiguration = (output, context) => {
708
- return take(output, {
709
- allocationStrategy: __expectString,
710
- desiredCapacity: __expectInt32,
711
- estimatedInstanceHourReductionPercentage: __limitedParseDouble,
712
- instanceType: __expectString,
713
- maxSize: __expectInt32,
714
- minSize: __expectInt32,
715
- mixedInstanceTypes: _json,
716
- type: __expectString,
717
- });
718
- };
719
- const de_AutoScalingGroupEstimatedMonthlySavings = (output, context) => {
720
- return take(output, {
721
- currency: __expectString,
722
- value: __limitedParseDouble,
723
- });
724
- };
725
- const de_AutoScalingGroupRecommendation = (output, context) => {
726
- return take(output, {
727
- accountId: __expectString,
728
- autoScalingGroupArn: __expectString,
729
- autoScalingGroupName: __expectString,
730
- currentConfiguration: (_) => de_AutoScalingGroupConfiguration(_, context),
731
- currentInstanceGpuInfo: _json,
732
- currentPerformanceRisk: __expectString,
733
- effectiveRecommendationPreferences: _json,
734
- finding: __expectString,
735
- inferredWorkloadTypes: _json,
736
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
737
- lookBackPeriodInDays: __limitedParseDouble,
738
- recommendationOptions: (_) => de_AutoScalingGroupRecommendationOptions(_, context),
739
- utilizationMetrics: (_) => de_UtilizationMetrics(_, context),
740
- });
741
- };
742
- const de_AutoScalingGroupRecommendationOption = (output, context) => {
743
- return take(output, {
744
- configuration: (_) => de_AutoScalingGroupConfiguration(_, context),
745
- instanceGpuInfo: _json,
746
- migrationEffort: __expectString,
747
- performanceRisk: __limitedParseDouble,
748
- projectedUtilizationMetrics: (_) => de_ProjectedUtilizationMetrics(_, context),
749
- rank: __expectInt32,
750
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
751
- savingsOpportunityAfterDiscounts: (_) => de_AutoScalingGroupSavingsOpportunityAfterDiscounts(_, context),
752
- });
753
- };
754
- const de_AutoScalingGroupRecommendationOptions = (output, context) => {
755
- const retVal = (output || [])
756
- .filter((e) => e != null)
757
- .map((entry) => {
758
- return de_AutoScalingGroupRecommendationOption(entry, context);
759
- });
760
- return retVal;
761
- };
762
- const de_AutoScalingGroupRecommendations = (output, context) => {
763
- const retVal = (output || [])
764
- .filter((e) => e != null)
765
- .map((entry) => {
766
- return de_AutoScalingGroupRecommendation(entry, context);
767
- });
768
- return retVal;
769
- };
770
- const de_AutoScalingGroupSavingsOpportunityAfterDiscounts = (output, context) => {
771
- return take(output, {
772
- estimatedMonthlySavings: (_) => de_AutoScalingGroupEstimatedMonthlySavings(_, context),
773
- savingsOpportunityPercentage: __limitedParseDouble,
774
- });
775
- };
776
- const de_DescribeRecommendationExportJobsResponse = (output, context) => {
777
- return take(output, {
778
- nextToken: __expectString,
779
- recommendationExportJobs: (_) => de_RecommendationExportJobs(_, context),
780
- });
781
- };
782
- const de_EBSEstimatedMonthlySavings = (output, context) => {
783
- return take(output, {
784
- currency: __expectString,
785
- value: __limitedParseDouble,
786
- });
787
- };
788
- const de_EBSSavingsOpportunityAfterDiscounts = (output, context) => {
789
- return take(output, {
790
- estimatedMonthlySavings: (_) => de_EBSEstimatedMonthlySavings(_, context),
791
- savingsOpportunityPercentage: __limitedParseDouble,
792
- });
793
- };
794
- const de_EBSUtilizationMetric = (output, context) => {
795
- return take(output, {
796
- name: __expectString,
797
- statistic: __expectString,
798
- value: __limitedParseDouble,
799
- });
800
- };
801
- const de_EBSUtilizationMetrics = (output, context) => {
802
- const retVal = (output || [])
803
- .filter((e) => e != null)
804
- .map((entry) => {
805
- return de_EBSUtilizationMetric(entry, context);
806
- });
807
- return retVal;
808
- };
809
- const de_ECSEstimatedMonthlySavings = (output, context) => {
810
- return take(output, {
811
- currency: __expectString,
812
- value: __limitedParseDouble,
813
- });
814
- };
815
- const de_ECSSavingsOpportunityAfterDiscounts = (output, context) => {
816
- return take(output, {
817
- estimatedMonthlySavings: (_) => de_ECSEstimatedMonthlySavings(_, context),
818
- savingsOpportunityPercentage: __limitedParseDouble,
819
- });
820
- };
821
- const de_ECSServiceProjectedMetric = (output, context) => {
822
- return take(output, {
823
- lowerBoundValues: (_) => de_MetricValues(_, context),
824
- name: __expectString,
825
- timestamps: (_) => de_Timestamps(_, context),
826
- upperBoundValues: (_) => de_MetricValues(_, context),
827
- });
828
- };
829
- const de_ECSServiceProjectedMetrics = (output, context) => {
830
- const retVal = (output || [])
831
- .filter((e) => e != null)
832
- .map((entry) => {
833
- return de_ECSServiceProjectedMetric(entry, context);
834
- });
835
- return retVal;
836
- };
837
- const de_ECSServiceProjectedUtilizationMetric = (output, context) => {
838
- return take(output, {
839
- lowerBoundValue: __limitedParseDouble,
840
- name: __expectString,
841
- statistic: __expectString,
842
- upperBoundValue: __limitedParseDouble,
843
- });
844
- };
845
- const de_ECSServiceProjectedUtilizationMetrics = (output, context) => {
846
- const retVal = (output || [])
847
- .filter((e) => e != null)
848
- .map((entry) => {
849
- return de_ECSServiceProjectedUtilizationMetric(entry, context);
850
- });
851
- return retVal;
852
- };
853
- const de_ECSServiceRecommendation = (output, context) => {
854
- return take(output, {
855
- accountId: __expectString,
856
- currentPerformanceRisk: __expectString,
857
- currentServiceConfiguration: _json,
858
- effectiveRecommendationPreferences: _json,
859
- finding: __expectString,
860
- findingReasonCodes: _json,
861
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
862
- launchType: __expectString,
863
- lookbackPeriodInDays: __limitedParseDouble,
864
- serviceArn: __expectString,
865
- serviceRecommendationOptions: (_) => de_ECSServiceRecommendationOptions(_, context),
866
- tags: _json,
867
- utilizationMetrics: (_) => de_ECSServiceUtilizationMetrics(_, context),
868
- });
869
- };
870
- const de_ECSServiceRecommendationOption = (output, context) => {
871
- return take(output, {
872
- containerRecommendations: _json,
873
- cpu: __expectInt32,
874
- memory: __expectInt32,
875
- projectedUtilizationMetrics: (_) => de_ECSServiceProjectedUtilizationMetrics(_, context),
876
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
877
- savingsOpportunityAfterDiscounts: (_) => de_ECSSavingsOpportunityAfterDiscounts(_, context),
878
- });
879
- };
880
- const de_ECSServiceRecommendationOptions = (output, context) => {
881
- const retVal = (output || [])
882
- .filter((e) => e != null)
883
- .map((entry) => {
884
- return de_ECSServiceRecommendationOption(entry, context);
885
- });
886
- return retVal;
887
- };
888
- const de_ECSServiceRecommendations = (output, context) => {
889
- const retVal = (output || [])
890
- .filter((e) => e != null)
891
- .map((entry) => {
892
- return de_ECSServiceRecommendation(entry, context);
893
- });
894
- return retVal;
895
- };
896
- const de_ECSServiceRecommendedOptionProjectedMetric = (output, context) => {
897
- return take(output, {
898
- projectedMetrics: (_) => de_ECSServiceProjectedMetrics(_, context),
899
- recommendedCpuUnits: __expectInt32,
900
- recommendedMemorySize: __expectInt32,
901
- });
902
- };
903
- const de_ECSServiceRecommendedOptionProjectedMetrics = (output, context) => {
904
- const retVal = (output || [])
905
- .filter((e) => e != null)
906
- .map((entry) => {
907
- return de_ECSServiceRecommendedOptionProjectedMetric(entry, context);
908
- });
909
- return retVal;
910
- };
911
- const de_ECSServiceUtilizationMetric = (output, context) => {
912
- return take(output, {
913
- name: __expectString,
914
- statistic: __expectString,
915
- value: __limitedParseDouble,
916
- });
917
- };
918
- const de_ECSServiceUtilizationMetrics = (output, context) => {
919
- const retVal = (output || [])
920
- .filter((e) => e != null)
921
- .map((entry) => {
922
- return de_ECSServiceUtilizationMetric(entry, context);
923
- });
924
- return retVal;
925
- };
926
- const de_EstimatedMonthlySavings = (output, context) => {
927
- return take(output, {
928
- currency: __expectString,
929
- value: __limitedParseDouble,
930
- });
931
- };
932
- const de_GetAutoScalingGroupRecommendationsResponse = (output, context) => {
933
- return take(output, {
934
- autoScalingGroupRecommendations: (_) => de_AutoScalingGroupRecommendations(_, context),
935
- errors: _json,
936
- nextToken: __expectString,
937
- });
938
- };
939
- const de_GetEBSVolumeRecommendationsResponse = (output, context) => {
940
- return take(output, {
941
- errors: _json,
942
- nextToken: __expectString,
943
- volumeRecommendations: (_) => de_VolumeRecommendations(_, context),
944
- });
945
- };
946
- const de_GetEC2InstanceRecommendationsResponse = (output, context) => {
947
- return take(output, {
948
- errors: _json,
949
- instanceRecommendations: (_) => de_InstanceRecommendations(_, context),
950
- nextToken: __expectString,
951
- });
952
- };
953
- const de_GetEC2RecommendationProjectedMetricsResponse = (output, context) => {
954
- return take(output, {
955
- recommendedOptionProjectedMetrics: (_) => de_RecommendedOptionProjectedMetrics(_, context),
956
- });
957
- };
958
- const de_GetECSServiceRecommendationProjectedMetricsResponse = (output, context) => {
959
- return take(output, {
960
- recommendedOptionProjectedMetrics: (_) => de_ECSServiceRecommendedOptionProjectedMetrics(_, context),
961
- });
962
- };
963
- const de_GetECSServiceRecommendationsResponse = (output, context) => {
964
- return take(output, {
965
- ecsServiceRecommendations: (_) => de_ECSServiceRecommendations(_, context),
966
- errors: _json,
967
- nextToken: __expectString,
968
- });
969
- };
970
- const de_GetEnrollmentStatusesForOrganizationResponse = (output, context) => {
971
- return take(output, {
972
- accountEnrollmentStatuses: (_) => de_AccountEnrollmentStatuses(_, context),
973
- nextToken: __expectString,
974
- });
975
- };
976
- const de_GetEnrollmentStatusResponse = (output, context) => {
977
- return take(output, {
978
- lastUpdatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
979
- memberAccountsEnrolled: __expectBoolean,
980
- numberOfMemberAccountsOptedIn: __expectInt32,
981
- status: __expectString,
982
- statusReason: __expectString,
983
- });
984
- };
985
- const de_GetIdleRecommendationsResponse = (output, context) => {
986
- return take(output, {
987
- errors: _json,
988
- idleRecommendations: (_) => de_IdleRecommendations(_, context),
989
- nextToken: __expectString,
990
- });
991
- };
992
- const de_GetLambdaFunctionRecommendationsResponse = (output, context) => {
993
- return take(output, {
994
- lambdaFunctionRecommendations: (_) => de_LambdaFunctionRecommendations(_, context),
995
- nextToken: __expectString,
996
- });
997
- };
998
- const de_GetLicenseRecommendationsResponse = (output, context) => {
999
- return take(output, {
1000
- errors: _json,
1001
- licenseRecommendations: (_) => de_LicenseRecommendations(_, context),
1002
- nextToken: __expectString,
1003
- });
1004
- };
1005
- const de_GetRDSDatabaseRecommendationProjectedMetricsResponse = (output, context) => {
1006
- return take(output, {
1007
- recommendedOptionProjectedMetrics: (_) => de_RDSDatabaseRecommendedOptionProjectedMetrics(_, context),
1008
- });
1009
- };
1010
- const de_GetRDSDatabaseRecommendationsResponse = (output, context) => {
1011
- return take(output, {
1012
- errors: _json,
1013
- nextToken: __expectString,
1014
- rdsDBRecommendations: (_) => de_RDSDBRecommendations(_, context),
1015
- });
1016
- };
1017
- const de_GetRecommendationSummariesResponse = (output, context) => {
1018
- return take(output, {
1019
- nextToken: __expectString,
1020
- recommendationSummaries: (_) => de_RecommendationSummaries(_, context),
1021
- });
1022
- };
1023
- const de_IdleEstimatedMonthlySavings = (output, context) => {
1024
- return take(output, {
1025
- currency: __expectString,
1026
- value: __limitedParseDouble,
1027
- });
1028
- };
1029
- const de_IdleRecommendation = (output, context) => {
1030
- return take(output, {
1031
- accountId: __expectString,
1032
- finding: __expectString,
1033
- findingDescription: __expectString,
1034
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1035
- lookBackPeriodInDays: __limitedParseDouble,
1036
- resourceArn: __expectString,
1037
- resourceId: __expectString,
1038
- resourceType: __expectString,
1039
- savingsOpportunity: (_) => de_IdleSavingsOpportunity(_, context),
1040
- savingsOpportunityAfterDiscounts: (_) => de_IdleSavingsOpportunityAfterDiscounts(_, context),
1041
- tags: _json,
1042
- utilizationMetrics: (_) => de_IdleUtilizationMetrics(_, context),
1043
- });
1044
- };
1045
- const de_IdleRecommendations = (output, context) => {
1046
- const retVal = (output || [])
1047
- .filter((e) => e != null)
1048
- .map((entry) => {
1049
- return de_IdleRecommendation(entry, context);
1050
- });
1051
- return retVal;
1052
- };
1053
- const de_IdleSavingsOpportunity = (output, context) => {
1054
- return take(output, {
1055
- estimatedMonthlySavings: (_) => de_IdleEstimatedMonthlySavings(_, context),
1056
- savingsOpportunityPercentage: __limitedParseDouble,
1057
- });
1058
- };
1059
- const de_IdleSavingsOpportunityAfterDiscounts = (output, context) => {
1060
- return take(output, {
1061
- estimatedMonthlySavings: (_) => de_IdleEstimatedMonthlySavings(_, context),
1062
- savingsOpportunityPercentage: __limitedParseDouble,
1063
- });
1064
- };
1065
- const de_IdleSummaries = (output, context) => {
1066
- const retVal = (output || [])
1067
- .filter((e) => e != null)
1068
- .map((entry) => {
1069
- return de_IdleSummary(entry, context);
1070
- });
1071
- return retVal;
1072
- };
1073
- const de_IdleSummary = (output, context) => {
1074
- return take(output, {
1075
- name: __expectString,
1076
- value: __limitedParseDouble,
1077
- });
1078
- };
1079
- const de_IdleUtilizationMetric = (output, context) => {
1080
- return take(output, {
1081
- name: __expectString,
1082
- statistic: __expectString,
1083
- value: __limitedParseDouble,
1084
- });
1085
- };
1086
- const de_IdleUtilizationMetrics = (output, context) => {
1087
- const retVal = (output || [])
1088
- .filter((e) => e != null)
1089
- .map((entry) => {
1090
- return de_IdleUtilizationMetric(entry, context);
1091
- });
1092
- return retVal;
1093
- };
1094
- const de_InferredWorkloadSaving = (output, context) => {
1095
- return take(output, {
1096
- estimatedMonthlySavings: (_) => de_EstimatedMonthlySavings(_, context),
1097
- inferredWorkloadTypes: _json,
1098
- });
1099
- };
1100
- const de_InferredWorkloadSavings = (output, context) => {
1101
- const retVal = (output || [])
1102
- .filter((e) => e != null)
1103
- .map((entry) => {
1104
- return de_InferredWorkloadSaving(entry, context);
1105
- });
1106
- return retVal;
1107
- };
1108
- const de_InstanceEstimatedMonthlySavings = (output, context) => {
1109
- return take(output, {
1110
- currency: __expectString,
1111
- value: __limitedParseDouble,
1112
- });
1113
- };
1114
- const de_InstanceRecommendation = (output, context) => {
1115
- return take(output, {
1116
- accountId: __expectString,
1117
- currentInstanceGpuInfo: _json,
1118
- currentInstanceType: __expectString,
1119
- currentPerformanceRisk: __expectString,
1120
- effectiveRecommendationPreferences: _json,
1121
- externalMetricStatus: _json,
1122
- finding: __expectString,
1123
- findingReasonCodes: _json,
1124
- idle: __expectString,
1125
- inferredWorkloadTypes: _json,
1126
- instanceArn: __expectString,
1127
- instanceName: __expectString,
1128
- instanceState: __expectString,
1129
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1130
- lookBackPeriodInDays: __limitedParseDouble,
1131
- recommendationOptions: (_) => de_RecommendationOptions(_, context),
1132
- recommendationSources: _json,
1133
- tags: _json,
1134
- utilizationMetrics: (_) => de_UtilizationMetrics(_, context),
1135
- });
1136
- };
1137
- const de_InstanceRecommendationOption = (output, context) => {
1138
- return take(output, {
1139
- instanceGpuInfo: _json,
1140
- instanceType: __expectString,
1141
- migrationEffort: __expectString,
1142
- performanceRisk: __limitedParseDouble,
1143
- platformDifferences: _json,
1144
- projectedUtilizationMetrics: (_) => de_ProjectedUtilizationMetrics(_, context),
1145
- rank: __expectInt32,
1146
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1147
- savingsOpportunityAfterDiscounts: (_) => de_InstanceSavingsOpportunityAfterDiscounts(_, context),
1148
- });
1149
- };
1150
- const de_InstanceRecommendations = (output, context) => {
1151
- const retVal = (output || [])
1152
- .filter((e) => e != null)
1153
- .map((entry) => {
1154
- return de_InstanceRecommendation(entry, context);
1155
- });
1156
- return retVal;
1157
- };
1158
- const de_InstanceSavingsOpportunityAfterDiscounts = (output, context) => {
1159
- return take(output, {
1160
- estimatedMonthlySavings: (_) => de_InstanceEstimatedMonthlySavings(_, context),
1161
- savingsOpportunityPercentage: __limitedParseDouble,
1162
- });
1163
- };
1164
- const de_LambdaEstimatedMonthlySavings = (output, context) => {
1165
- return take(output, {
1166
- currency: __expectString,
1167
- value: __limitedParseDouble,
1168
- });
1169
- };
1170
- const de_LambdaFunctionMemoryProjectedMetric = (output, context) => {
1171
- return take(output, {
1172
- name: __expectString,
1173
- statistic: __expectString,
1174
- value: __limitedParseDouble,
1175
- });
1176
- };
1177
- const de_LambdaFunctionMemoryProjectedMetrics = (output, context) => {
1178
- const retVal = (output || [])
1179
- .filter((e) => e != null)
1180
- .map((entry) => {
1181
- return de_LambdaFunctionMemoryProjectedMetric(entry, context);
1182
- });
1183
- return retVal;
1184
- };
1185
- const de_LambdaFunctionMemoryRecommendationOption = (output, context) => {
1186
- return take(output, {
1187
- memorySize: __expectInt32,
1188
- projectedUtilizationMetrics: (_) => de_LambdaFunctionMemoryProjectedMetrics(_, context),
1189
- rank: __expectInt32,
1190
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1191
- savingsOpportunityAfterDiscounts: (_) => de_LambdaSavingsOpportunityAfterDiscounts(_, context),
1192
- });
1193
- };
1194
- const de_LambdaFunctionMemoryRecommendationOptions = (output, context) => {
1195
- const retVal = (output || [])
1196
- .filter((e) => e != null)
1197
- .map((entry) => {
1198
- return de_LambdaFunctionMemoryRecommendationOption(entry, context);
1199
- });
1200
- return retVal;
1201
- };
1202
- const de_LambdaFunctionRecommendation = (output, context) => {
1203
- return take(output, {
1204
- accountId: __expectString,
1205
- currentMemorySize: __expectInt32,
1206
- currentPerformanceRisk: __expectString,
1207
- effectiveRecommendationPreferences: _json,
1208
- finding: __expectString,
1209
- findingReasonCodes: _json,
1210
- functionArn: __expectString,
1211
- functionVersion: __expectString,
1212
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1213
- lookbackPeriodInDays: __limitedParseDouble,
1214
- memorySizeRecommendationOptions: (_) => de_LambdaFunctionMemoryRecommendationOptions(_, context),
1215
- numberOfInvocations: __expectLong,
1216
- tags: _json,
1217
- utilizationMetrics: (_) => de_LambdaFunctionUtilizationMetrics(_, context),
1218
- });
1219
- };
1220
- const de_LambdaFunctionRecommendations = (output, context) => {
1221
- const retVal = (output || [])
1222
- .filter((e) => e != null)
1223
- .map((entry) => {
1224
- return de_LambdaFunctionRecommendation(entry, context);
1225
- });
1226
- return retVal;
1227
- };
1228
- const de_LambdaFunctionUtilizationMetric = (output, context) => {
1229
- return take(output, {
1230
- name: __expectString,
1231
- statistic: __expectString,
1232
- value: __limitedParseDouble,
1233
- });
1234
- };
1235
- const de_LambdaFunctionUtilizationMetrics = (output, context) => {
1236
- const retVal = (output || [])
1237
- .filter((e) => e != null)
1238
- .map((entry) => {
1239
- return de_LambdaFunctionUtilizationMetric(entry, context);
1240
- });
1241
- return retVal;
1242
- };
1243
- const de_LambdaSavingsOpportunityAfterDiscounts = (output, context) => {
1244
- return take(output, {
1245
- estimatedMonthlySavings: (_) => de_LambdaEstimatedMonthlySavings(_, context),
1246
- savingsOpportunityPercentage: __limitedParseDouble,
1247
- });
1248
- };
1249
- const de_LicenseRecommendation = (output, context) => {
1250
- return take(output, {
1251
- accountId: __expectString,
1252
- currentLicenseConfiguration: _json,
1253
- finding: __expectString,
1254
- findingReasonCodes: _json,
1255
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1256
- licenseRecommendationOptions: (_) => de_LicenseRecommendationOptions(_, context),
1257
- lookbackPeriodInDays: __limitedParseDouble,
1258
- resourceArn: __expectString,
1259
- tags: _json,
1260
- });
1261
- };
1262
- const de_LicenseRecommendationOption = (output, context) => {
1263
- return take(output, {
1264
- licenseEdition: __expectString,
1265
- licenseModel: __expectString,
1266
- operatingSystem: __expectString,
1267
- rank: __expectInt32,
1268
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1269
- });
1270
- };
1271
- const de_LicenseRecommendationOptions = (output, context) => {
1272
- const retVal = (output || [])
1273
- .filter((e) => e != null)
1274
- .map((entry) => {
1275
- return de_LicenseRecommendationOption(entry, context);
1276
- });
1277
- return retVal;
1278
- };
1279
- const de_LicenseRecommendations = (output, context) => {
1280
- const retVal = (output || [])
1281
- .filter((e) => e != null)
1282
- .map((entry) => {
1283
- return de_LicenseRecommendation(entry, context);
1284
- });
1285
- return retVal;
1286
- };
1287
- const de_MetricValues = (output, context) => {
1288
- const retVal = (output || [])
1289
- .filter((e) => e != null)
1290
- .map((entry) => {
1291
- return __limitedParseDouble(entry);
1292
- });
1293
- return retVal;
1294
- };
1295
- const de_ProjectedMetric = (output, context) => {
1296
- return take(output, {
1297
- name: __expectString,
1298
- timestamps: (_) => de_Timestamps(_, context),
1299
- values: (_) => de_MetricValues(_, context),
1300
- });
1301
- };
1302
- const de_ProjectedMetrics = (output, context) => {
1303
- const retVal = (output || [])
1304
- .filter((e) => e != null)
1305
- .map((entry) => {
1306
- return de_ProjectedMetric(entry, context);
1307
- });
1308
- return retVal;
1309
- };
1310
- const de_ProjectedUtilizationMetrics = (output, context) => {
1311
- const retVal = (output || [])
1312
- .filter((e) => e != null)
1313
- .map((entry) => {
1314
- return de_UtilizationMetric(entry, context);
1315
- });
1316
- return retVal;
1317
- };
1318
- const de_RDSDatabaseProjectedMetric = (output, context) => {
1319
- return take(output, {
1320
- name: __expectString,
1321
- timestamps: (_) => de_Timestamps(_, context),
1322
- values: (_) => de_MetricValues(_, context),
1323
- });
1324
- };
1325
- const de_RDSDatabaseProjectedMetrics = (output, context) => {
1326
- const retVal = (output || [])
1327
- .filter((e) => e != null)
1328
- .map((entry) => {
1329
- return de_RDSDatabaseProjectedMetric(entry, context);
1330
- });
1331
- return retVal;
1332
- };
1333
- const de_RDSDatabaseRecommendedOptionProjectedMetric = (output, context) => {
1334
- return take(output, {
1335
- projectedMetrics: (_) => de_RDSDatabaseProjectedMetrics(_, context),
1336
- rank: __expectInt32,
1337
- recommendedDBInstanceClass: __expectString,
1338
- });
1339
- };
1340
- const de_RDSDatabaseRecommendedOptionProjectedMetrics = (output, context) => {
1341
- const retVal = (output || [])
1342
- .filter((e) => e != null)
1343
- .map((entry) => {
1344
- return de_RDSDatabaseRecommendedOptionProjectedMetric(entry, context);
1345
- });
1346
- return retVal;
1347
- };
1348
- const de_RDSDBInstanceRecommendationOption = (output, context) => {
1349
- return take(output, {
1350
- dbInstanceClass: __expectString,
1351
- performanceRisk: __limitedParseDouble,
1352
- projectedUtilizationMetrics: (_) => de_RDSDBProjectedUtilizationMetrics(_, context),
1353
- rank: __expectInt32,
1354
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1355
- savingsOpportunityAfterDiscounts: (_) => de_RDSInstanceSavingsOpportunityAfterDiscounts(_, context),
1356
- });
1357
- };
1358
- const de_RDSDBInstanceRecommendationOptions = (output, context) => {
1359
- const retVal = (output || [])
1360
- .filter((e) => e != null)
1361
- .map((entry) => {
1362
- return de_RDSDBInstanceRecommendationOption(entry, context);
1363
- });
1364
- return retVal;
1365
- };
1366
- const de_RDSDBProjectedUtilizationMetrics = (output, context) => {
1367
- const retVal = (output || [])
1368
- .filter((e) => e != null)
1369
- .map((entry) => {
1370
- return de_RDSDBUtilizationMetric(entry, context);
1371
- });
1372
- return retVal;
1373
- };
1374
- const de_RDSDBRecommendation = (output, context) => {
1375
- return take(output, {
1376
- accountId: __expectString,
1377
- currentDBInstanceClass: __expectString,
1378
- currentInstancePerformanceRisk: __expectString,
1379
- currentStorageConfiguration: _json,
1380
- currentStorageEstimatedMonthlyVolumeIOPsCostVariation: __expectString,
1381
- dbClusterIdentifier: __expectString,
1382
- effectiveRecommendationPreferences: _json,
1383
- engine: __expectString,
1384
- engineVersion: __expectString,
1385
- idle: __expectString,
1386
- instanceFinding: __expectString,
1387
- instanceFindingReasonCodes: _json,
1388
- instanceRecommendationOptions: (_) => de_RDSDBInstanceRecommendationOptions(_, context),
1389
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1390
- lookbackPeriodInDays: __limitedParseDouble,
1391
- promotionTier: __expectInt32,
1392
- resourceArn: __expectString,
1393
- storageFinding: __expectString,
1394
- storageFindingReasonCodes: _json,
1395
- storageRecommendationOptions: (_) => de_RDSDBStorageRecommendationOptions(_, context),
1396
- tags: _json,
1397
- utilizationMetrics: (_) => de_RDSDBUtilizationMetrics(_, context),
1398
- });
1399
- };
1400
- const de_RDSDBRecommendations = (output, context) => {
1401
- const retVal = (output || [])
1402
- .filter((e) => e != null)
1403
- .map((entry) => {
1404
- return de_RDSDBRecommendation(entry, context);
1405
- });
1406
- return retVal;
1407
- };
1408
- const de_RDSDBStorageRecommendationOption = (output, context) => {
1409
- return take(output, {
1410
- estimatedMonthlyVolumeIOPsCostVariation: __expectString,
1411
- rank: __expectInt32,
1412
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1413
- savingsOpportunityAfterDiscounts: (_) => de_RDSStorageSavingsOpportunityAfterDiscounts(_, context),
1414
- storageConfiguration: _json,
1415
- });
1416
- };
1417
- const de_RDSDBStorageRecommendationOptions = (output, context) => {
1418
- const retVal = (output || [])
1419
- .filter((e) => e != null)
1420
- .map((entry) => {
1421
- return de_RDSDBStorageRecommendationOption(entry, context);
1422
- });
1423
- return retVal;
1424
- };
1425
- const de_RDSDBUtilizationMetric = (output, context) => {
1426
- return take(output, {
1427
- name: __expectString,
1428
- statistic: __expectString,
1429
- value: __limitedParseDouble,
1430
- });
1431
- };
1432
- const de_RDSDBUtilizationMetrics = (output, context) => {
1433
- const retVal = (output || [])
1434
- .filter((e) => e != null)
1435
- .map((entry) => {
1436
- return de_RDSDBUtilizationMetric(entry, context);
1437
- });
1438
- return retVal;
1439
- };
1440
- const de_RDSInstanceEstimatedMonthlySavings = (output, context) => {
1441
- return take(output, {
1442
- currency: __expectString,
1443
- value: __limitedParseDouble,
1444
- });
1445
- };
1446
- const de_RDSInstanceSavingsOpportunityAfterDiscounts = (output, context) => {
1447
- return take(output, {
1448
- estimatedMonthlySavings: (_) => de_RDSInstanceEstimatedMonthlySavings(_, context),
1449
- savingsOpportunityPercentage: __limitedParseDouble,
1450
- });
1451
- };
1452
- const de_RDSStorageEstimatedMonthlySavings = (output, context) => {
1453
- return take(output, {
1454
- currency: __expectString,
1455
- value: __limitedParseDouble,
1456
- });
1457
- };
1458
- const de_RDSStorageSavingsOpportunityAfterDiscounts = (output, context) => {
1459
- return take(output, {
1460
- estimatedMonthlySavings: (_) => de_RDSStorageEstimatedMonthlySavings(_, context),
1461
- savingsOpportunityPercentage: __limitedParseDouble,
1462
- });
1463
- };
1464
- const de_ReasonCodeSummaries = (output, context) => {
1465
- const retVal = (output || [])
1466
- .filter((e) => e != null)
1467
- .map((entry) => {
1468
- return de_ReasonCodeSummary(entry, context);
1469
- });
1470
- return retVal;
1471
- };
1472
- const de_ReasonCodeSummary = (output, context) => {
1473
- return take(output, {
1474
- name: __expectString,
1475
- value: __limitedParseDouble,
1476
- });
1477
- };
1478
- const de_RecommendationExportJob = (output, context) => {
1479
- return take(output, {
1480
- creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1481
- destination: _json,
1482
- failureReason: __expectString,
1483
- jobId: __expectString,
1484
- lastUpdatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1485
- resourceType: __expectString,
1486
- status: __expectString,
1487
- });
1488
- };
1489
- const de_RecommendationExportJobs = (output, context) => {
1490
- const retVal = (output || [])
1491
- .filter((e) => e != null)
1492
- .map((entry) => {
1493
- return de_RecommendationExportJob(entry, context);
1494
- });
1495
- return retVal;
1496
- };
1497
- const de_RecommendationOptions = (output, context) => {
1498
- const retVal = (output || [])
1499
- .filter((e) => e != null)
1500
- .map((entry) => {
1501
- return de_InstanceRecommendationOption(entry, context);
1502
- });
1503
- return retVal;
1504
- };
1505
- const de_RecommendationSummaries = (output, context) => {
1506
- const retVal = (output || [])
1507
- .filter((e) => e != null)
1508
- .map((entry) => {
1509
- return de_RecommendationSummary(entry, context);
1510
- });
1511
- return retVal;
1512
- };
1513
- const de_RecommendationSummary = (output, context) => {
1514
- return take(output, {
1515
- accountId: __expectString,
1516
- aggregatedSavingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1517
- currentPerformanceRiskRatings: _json,
1518
- idleSavingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1519
- idleSummaries: (_) => de_IdleSummaries(_, context),
1520
- inferredWorkloadSavings: (_) => de_InferredWorkloadSavings(_, context),
1521
- recommendationResourceType: __expectString,
1522
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1523
- summaries: (_) => de_Summaries(_, context),
1524
- });
1525
- };
1526
- const de_RecommendedOptionProjectedMetric = (output, context) => {
1527
- return take(output, {
1528
- projectedMetrics: (_) => de_ProjectedMetrics(_, context),
1529
- rank: __expectInt32,
1530
- recommendedInstanceType: __expectString,
1531
- });
1532
- };
1533
- const de_RecommendedOptionProjectedMetrics = (output, context) => {
1534
- const retVal = (output || [])
1535
- .filter((e) => e != null)
1536
- .map((entry) => {
1537
- return de_RecommendedOptionProjectedMetric(entry, context);
1538
- });
1539
- return retVal;
1540
- };
1541
- const de_SavingsOpportunity = (output, context) => {
1542
- return take(output, {
1543
- estimatedMonthlySavings: (_) => de_EstimatedMonthlySavings(_, context),
1544
- savingsOpportunityPercentage: __limitedParseDouble,
1545
- });
1546
- };
1547
- const de_Summaries = (output, context) => {
1548
- const retVal = (output || [])
1549
- .filter((e) => e != null)
1550
- .map((entry) => {
1551
- return de_Summary(entry, context);
1552
- });
1553
- return retVal;
1554
- };
1555
- const de_Summary = (output, context) => {
1556
- return take(output, {
1557
- name: __expectString,
1558
- reasonCodeSummaries: (_) => de_ReasonCodeSummaries(_, context),
1559
- value: __limitedParseDouble,
1560
- });
1561
- };
1562
- const de_Timestamps = (output, context) => {
1563
- const retVal = (output || [])
1564
- .filter((e) => e != null)
1565
- .map((entry) => {
1566
- return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry)));
1567
- });
1568
- return retVal;
1569
- };
1570
- const de_UtilizationMetric = (output, context) => {
1571
- return take(output, {
1572
- name: __expectString,
1573
- statistic: __expectString,
1574
- value: __limitedParseDouble,
1575
- });
1576
- };
1577
- const de_UtilizationMetrics = (output, context) => {
1578
- const retVal = (output || [])
1579
- .filter((e) => e != null)
1580
- .map((entry) => {
1581
- return de_UtilizationMetric(entry, context);
1582
- });
1583
- return retVal;
1584
- };
1585
- const de_VolumeRecommendation = (output, context) => {
1586
- return take(output, {
1587
- accountId: __expectString,
1588
- currentConfiguration: _json,
1589
- currentPerformanceRisk: __expectString,
1590
- effectiveRecommendationPreferences: _json,
1591
- finding: __expectString,
1592
- lastRefreshTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1593
- lookBackPeriodInDays: __limitedParseDouble,
1594
- tags: _json,
1595
- utilizationMetrics: (_) => de_EBSUtilizationMetrics(_, context),
1596
- volumeArn: __expectString,
1597
- volumeRecommendationOptions: (_) => de_VolumeRecommendationOptions(_, context),
1598
- });
1599
- };
1600
- const de_VolumeRecommendationOption = (output, context) => {
1601
- return take(output, {
1602
- configuration: _json,
1603
- performanceRisk: __limitedParseDouble,
1604
- rank: __expectInt32,
1605
- savingsOpportunity: (_) => de_SavingsOpportunity(_, context),
1606
- savingsOpportunityAfterDiscounts: (_) => de_EBSSavingsOpportunityAfterDiscounts(_, context),
1607
- });
1608
- };
1609
- const de_VolumeRecommendationOptions = (output, context) => {
1610
- const retVal = (output || [])
1611
- .filter((e) => e != null)
1612
- .map((entry) => {
1613
- return de_VolumeRecommendationOption(entry, context);
1614
- });
1615
- return retVal;
1616
- };
1617
- const de_VolumeRecommendations = (output, context) => {
1618
- const retVal = (output || [])
1619
- .filter((e) => e != null)
1620
- .map((entry) => {
1621
- return de_VolumeRecommendation(entry, context);
1622
- });
1623
- return retVal;
1624
- };
1625
- const deserializeMetadata = (output) => ({
1626
- httpStatusCode: output.statusCode,
1627
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1628
- extendedRequestId: output.headers["x-amz-id-2"],
1629
- cfId: output.headers["x-amz-cf-id"],
1630
- });
1631
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1632
- const throwDefaultError = withBaseException(__BaseException);
1633
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1634
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1635
- const contents = {
1636
- protocol,
1637
- hostname,
1638
- port,
1639
- method: "POST",
1640
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1641
- headers,
1642
- };
1643
- if (resolvedHostname !== undefined) {
1644
- contents.hostname = resolvedHostname;
1645
- }
1646
- if (body !== undefined) {
1647
- contents.body = body;
1648
- }
1649
- return new __HttpRequest(contents);
1650
- };
1651
- function sharedHeaders(operation) {
1652
- return {
1653
- "content-type": "application/x-amz-json-1.0",
1654
- "x-amz-target": `ComputeOptimizerService.${operation}`,
1655
- };
1656
- }