@aws-sdk/client-compute-optimizer 3.43.0 → 3.47.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.
- package/CHANGELOG.md +50 -0
- package/README.md +7 -10
- package/dist-cjs/ComputeOptimizer.js +60 -0
- package/dist-cjs/commands/DeleteRecommendationPreferencesCommand.js +36 -0
- package/dist-cjs/commands/GetEffectiveRecommendationPreferencesCommand.js +36 -0
- package/dist-cjs/commands/GetRecommendationPreferencesCommand.js +36 -0
- package/dist-cjs/commands/PutRecommendationPreferencesCommand.js +36 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +146 -68
- package/dist-cjs/protocols/Aws_json1_0.js +617 -1
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/ComputeOptimizer.js +60 -0
- package/dist-es/commands/DeleteRecommendationPreferencesCommand.js +39 -0
- package/dist-es/commands/GetEffectiveRecommendationPreferencesCommand.js +39 -0
- package/dist-es/commands/GetRecommendationPreferencesCommand.js +39 -0
- package/dist-es/commands/PutRecommendationPreferencesCommand.js +39 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +115 -48
- package/dist-es/protocols/Aws_json1_0.js +646 -8
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/ComputeOptimizer.d.ts +50 -27
- package/dist-types/ComputeOptimizerClient.d.ts +11 -3
- package/dist-types/commands/DeleteRecommendationPreferencesCommand.d.ts +38 -0
- package/dist-types/commands/DescribeRecommendationExportJobsCommand.d.ts +0 -1
- package/dist-types/commands/ExportAutoScalingGroupRecommendationsCommand.d.ts +0 -2
- package/dist-types/commands/ExportEBSVolumeRecommendationsCommand.d.ts +1 -4
- package/dist-types/commands/ExportEC2InstanceRecommendationsCommand.d.ts +1 -4
- package/dist-types/commands/ExportLambdaFunctionRecommendationsCommand.d.ts +1 -4
- package/dist-types/commands/GetAutoScalingGroupRecommendationsCommand.d.ts +0 -1
- package/dist-types/commands/GetEBSVolumeRecommendationsCommand.d.ts +0 -1
- package/dist-types/commands/GetEC2InstanceRecommendationsCommand.d.ts +0 -1
- package/dist-types/commands/GetEC2RecommendationProjectedMetricsCommand.d.ts +0 -1
- package/dist-types/commands/GetEffectiveRecommendationPreferencesCommand.d.ts +40 -0
- package/dist-types/commands/GetEnrollmentStatusCommand.d.ts +0 -1
- package/dist-types/commands/GetEnrollmentStatusesForOrganizationCommand.d.ts +0 -1
- package/dist-types/commands/GetLambdaFunctionRecommendationsCommand.d.ts +0 -1
- package/dist-types/commands/GetRecommendationPreferencesCommand.d.ts +42 -0
- package/dist-types/commands/GetRecommendationSummariesCommand.d.ts +0 -2
- package/dist-types/commands/PutRecommendationPreferencesCommand.d.ts +39 -0
- package/dist-types/commands/UpdateEnrollmentStatusCommand.d.ts +0 -3
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +603 -293
- package/dist-types/protocols/Aws_json1_0.d.ts +12 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/ComputeOptimizer.d.ts +20 -0
- package/dist-types/ts3.4/ComputeOptimizerClient.d.ts +9 -3
- package/dist-types/ts3.4/commands/DeleteRecommendationPreferencesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetEffectiveRecommendationPreferencesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetRecommendationPreferencesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutRecommendationPreferencesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +266 -88
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +12 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +38 -45
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
3
|
import { expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
|
|
4
|
+
export var serializeAws_json1_0DeleteRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var headers, body;
|
|
6
|
+
return __generator(this, function (_a) {
|
|
7
|
+
headers = {
|
|
8
|
+
"content-type": "application/x-amz-json-1.0",
|
|
9
|
+
"x-amz-target": "ComputeOptimizerService.DeleteRecommendationPreferences",
|
|
10
|
+
};
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_0DeleteRecommendationPreferencesRequest(input, context));
|
|
12
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
13
|
+
});
|
|
14
|
+
}); };
|
|
4
15
|
export var serializeAws_json1_0DescribeRecommendationExportJobsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
16
|
var headers, body;
|
|
6
17
|
return __generator(this, function (_a) {
|
|
@@ -100,6 +111,17 @@ export var serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = fun
|
|
|
100
111
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
101
112
|
});
|
|
102
113
|
}); };
|
|
114
|
+
export var serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
115
|
+
var headers, body;
|
|
116
|
+
return __generator(this, function (_a) {
|
|
117
|
+
headers = {
|
|
118
|
+
"content-type": "application/x-amz-json-1.0",
|
|
119
|
+
"x-amz-target": "ComputeOptimizerService.GetEffectiveRecommendationPreferences",
|
|
120
|
+
};
|
|
121
|
+
body = JSON.stringify(serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest(input, context));
|
|
122
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
123
|
+
});
|
|
124
|
+
}); };
|
|
103
125
|
export var serializeAws_json1_0GetEnrollmentStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
104
126
|
var headers, body;
|
|
105
127
|
return __generator(this, function (_a) {
|
|
@@ -133,6 +155,17 @@ export var serializeAws_json1_0GetLambdaFunctionRecommendationsCommand = functio
|
|
|
133
155
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
134
156
|
});
|
|
135
157
|
}); };
|
|
158
|
+
export var serializeAws_json1_0GetRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
159
|
+
var headers, body;
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
headers = {
|
|
162
|
+
"content-type": "application/x-amz-json-1.0",
|
|
163
|
+
"x-amz-target": "ComputeOptimizerService.GetRecommendationPreferences",
|
|
164
|
+
};
|
|
165
|
+
body = JSON.stringify(serializeAws_json1_0GetRecommendationPreferencesRequest(input, context));
|
|
166
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
167
|
+
});
|
|
168
|
+
}); };
|
|
136
169
|
export var serializeAws_json1_0GetRecommendationSummariesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
170
|
var headers, body;
|
|
138
171
|
return __generator(this, function (_a) {
|
|
@@ -144,6 +177,17 @@ export var serializeAws_json1_0GetRecommendationSummariesCommand = function (inp
|
|
|
144
177
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
145
178
|
});
|
|
146
179
|
}); };
|
|
180
|
+
export var serializeAws_json1_0PutRecommendationPreferencesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
181
|
+
var headers, body;
|
|
182
|
+
return __generator(this, function (_a) {
|
|
183
|
+
headers = {
|
|
184
|
+
"content-type": "application/x-amz-json-1.0",
|
|
185
|
+
"x-amz-target": "ComputeOptimizerService.PutRecommendationPreferences",
|
|
186
|
+
};
|
|
187
|
+
body = JSON.stringify(serializeAws_json1_0PutRecommendationPreferencesRequest(input, context));
|
|
188
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
189
|
+
});
|
|
190
|
+
}); };
|
|
147
191
|
export var serializeAws_json1_0UpdateEnrollmentStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
148
192
|
var headers, body;
|
|
149
193
|
return __generator(this, function (_a) {
|
|
@@ -155,6 +199,118 @@ export var serializeAws_json1_0UpdateEnrollmentStatusCommand = function (input,
|
|
|
155
199
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
156
200
|
});
|
|
157
201
|
}); };
|
|
202
|
+
export var deserializeAws_json1_0DeleteRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
203
|
+
var data, contents, response;
|
|
204
|
+
return __generator(this, function (_a) {
|
|
205
|
+
switch (_a.label) {
|
|
206
|
+
case 0:
|
|
207
|
+
if (output.statusCode >= 300) {
|
|
208
|
+
return [2, deserializeAws_json1_0DeleteRecommendationPreferencesCommandError(output, context)];
|
|
209
|
+
}
|
|
210
|
+
return [4, parseBody(output.body, context)];
|
|
211
|
+
case 1:
|
|
212
|
+
data = _a.sent();
|
|
213
|
+
contents = {};
|
|
214
|
+
contents = deserializeAws_json1_0DeleteRecommendationPreferencesResponse(data, context);
|
|
215
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
216
|
+
return [2, Promise.resolve(response)];
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}); };
|
|
220
|
+
var deserializeAws_json1_0DeleteRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
221
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;
|
|
222
|
+
var _l;
|
|
223
|
+
return __generator(this, function (_m) {
|
|
224
|
+
switch (_m.label) {
|
|
225
|
+
case 0:
|
|
226
|
+
_a = [__assign({}, output)];
|
|
227
|
+
_l = {};
|
|
228
|
+
return [4, parseBody(output.body, context)];
|
|
229
|
+
case 1:
|
|
230
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
231
|
+
errorCode = "UnknownError";
|
|
232
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
233
|
+
_b = errorCode;
|
|
234
|
+
switch (_b) {
|
|
235
|
+
case "AccessDeniedException": return [3, 2];
|
|
236
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
|
|
237
|
+
case "InternalServerException": return [3, 4];
|
|
238
|
+
case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
|
|
239
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
240
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
|
|
241
|
+
case "MissingAuthenticationToken": return [3, 8];
|
|
242
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
|
|
243
|
+
case "OptInRequiredException": return [3, 10];
|
|
244
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
|
|
245
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
246
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
|
|
247
|
+
case "ServiceUnavailableException": return [3, 14];
|
|
248
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
|
|
249
|
+
case "ThrottlingException": return [3, 16];
|
|
250
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
|
|
251
|
+
}
|
|
252
|
+
return [3, 18];
|
|
253
|
+
case 2:
|
|
254
|
+
_c = [{}];
|
|
255
|
+
return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
256
|
+
case 3:
|
|
257
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
258
|
+
return [3, 19];
|
|
259
|
+
case 4:
|
|
260
|
+
_d = [{}];
|
|
261
|
+
return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
262
|
+
case 5:
|
|
263
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
264
|
+
return [3, 19];
|
|
265
|
+
case 6:
|
|
266
|
+
_e = [{}];
|
|
267
|
+
return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
268
|
+
case 7:
|
|
269
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
270
|
+
return [3, 19];
|
|
271
|
+
case 8:
|
|
272
|
+
_f = [{}];
|
|
273
|
+
return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
|
|
274
|
+
case 9:
|
|
275
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
276
|
+
return [3, 19];
|
|
277
|
+
case 10:
|
|
278
|
+
_g = [{}];
|
|
279
|
+
return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
|
|
280
|
+
case 11:
|
|
281
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
282
|
+
return [3, 19];
|
|
283
|
+
case 12:
|
|
284
|
+
_h = [{}];
|
|
285
|
+
return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
286
|
+
case 13:
|
|
287
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
288
|
+
return [3, 19];
|
|
289
|
+
case 14:
|
|
290
|
+
_j = [{}];
|
|
291
|
+
return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
292
|
+
case 15:
|
|
293
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
294
|
+
return [3, 19];
|
|
295
|
+
case 16:
|
|
296
|
+
_k = [{}];
|
|
297
|
+
return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
298
|
+
case 17:
|
|
299
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
300
|
+
return [3, 19];
|
|
301
|
+
case 18:
|
|
302
|
+
parsedBody = parsedOutput.body;
|
|
303
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
304
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
305
|
+
_m.label = 19;
|
|
306
|
+
case 19:
|
|
307
|
+
message = response.message || response.Message || errorCode;
|
|
308
|
+
response.message = message;
|
|
309
|
+
delete response.Message;
|
|
310
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}); };
|
|
158
314
|
export var deserializeAws_json1_0DescribeRecommendationExportJobsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
159
315
|
var data, contents, response;
|
|
160
316
|
return __generator(this, function (_a) {
|
|
@@ -1163,6 +1319,118 @@ var deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError = fun
|
|
|
1163
1319
|
}
|
|
1164
1320
|
});
|
|
1165
1321
|
}); };
|
|
1322
|
+
export var deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1323
|
+
var data, contents, response;
|
|
1324
|
+
return __generator(this, function (_a) {
|
|
1325
|
+
switch (_a.label) {
|
|
1326
|
+
case 0:
|
|
1327
|
+
if (output.statusCode >= 300) {
|
|
1328
|
+
return [2, deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError(output, context)];
|
|
1329
|
+
}
|
|
1330
|
+
return [4, parseBody(output.body, context)];
|
|
1331
|
+
case 1:
|
|
1332
|
+
data = _a.sent();
|
|
1333
|
+
contents = {};
|
|
1334
|
+
contents = deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse(data, context);
|
|
1335
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1336
|
+
return [2, Promise.resolve(response)];
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
}); };
|
|
1340
|
+
var deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1341
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;
|
|
1342
|
+
var _l;
|
|
1343
|
+
return __generator(this, function (_m) {
|
|
1344
|
+
switch (_m.label) {
|
|
1345
|
+
case 0:
|
|
1346
|
+
_a = [__assign({}, output)];
|
|
1347
|
+
_l = {};
|
|
1348
|
+
return [4, parseBody(output.body, context)];
|
|
1349
|
+
case 1:
|
|
1350
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
1351
|
+
errorCode = "UnknownError";
|
|
1352
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1353
|
+
_b = errorCode;
|
|
1354
|
+
switch (_b) {
|
|
1355
|
+
case "AccessDeniedException": return [3, 2];
|
|
1356
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
|
|
1357
|
+
case "InternalServerException": return [3, 4];
|
|
1358
|
+
case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
|
|
1359
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
1360
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
|
|
1361
|
+
case "MissingAuthenticationToken": return [3, 8];
|
|
1362
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
|
|
1363
|
+
case "OptInRequiredException": return [3, 10];
|
|
1364
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
|
|
1365
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
1366
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
|
|
1367
|
+
case "ServiceUnavailableException": return [3, 14];
|
|
1368
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
|
|
1369
|
+
case "ThrottlingException": return [3, 16];
|
|
1370
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
|
|
1371
|
+
}
|
|
1372
|
+
return [3, 18];
|
|
1373
|
+
case 2:
|
|
1374
|
+
_c = [{}];
|
|
1375
|
+
return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1376
|
+
case 3:
|
|
1377
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1378
|
+
return [3, 19];
|
|
1379
|
+
case 4:
|
|
1380
|
+
_d = [{}];
|
|
1381
|
+
return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
1382
|
+
case 5:
|
|
1383
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1384
|
+
return [3, 19];
|
|
1385
|
+
case 6:
|
|
1386
|
+
_e = [{}];
|
|
1387
|
+
return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
1388
|
+
case 7:
|
|
1389
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1390
|
+
return [3, 19];
|
|
1391
|
+
case 8:
|
|
1392
|
+
_f = [{}];
|
|
1393
|
+
return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
|
|
1394
|
+
case 9:
|
|
1395
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1396
|
+
return [3, 19];
|
|
1397
|
+
case 10:
|
|
1398
|
+
_g = [{}];
|
|
1399
|
+
return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
|
|
1400
|
+
case 11:
|
|
1401
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1402
|
+
return [3, 19];
|
|
1403
|
+
case 12:
|
|
1404
|
+
_h = [{}];
|
|
1405
|
+
return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1406
|
+
case 13:
|
|
1407
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1408
|
+
return [3, 19];
|
|
1409
|
+
case 14:
|
|
1410
|
+
_j = [{}];
|
|
1411
|
+
return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1412
|
+
case 15:
|
|
1413
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1414
|
+
return [3, 19];
|
|
1415
|
+
case 16:
|
|
1416
|
+
_k = [{}];
|
|
1417
|
+
return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1418
|
+
case 17:
|
|
1419
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1420
|
+
return [3, 19];
|
|
1421
|
+
case 18:
|
|
1422
|
+
parsedBody = parsedOutput.body;
|
|
1423
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1424
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1425
|
+
_m.label = 19;
|
|
1426
|
+
case 19:
|
|
1427
|
+
message = response.message || response.Message || errorCode;
|
|
1428
|
+
response.message = message;
|
|
1429
|
+
delete response.Message;
|
|
1430
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1431
|
+
}
|
|
1432
|
+
});
|
|
1433
|
+
}); };
|
|
1166
1434
|
export var deserializeAws_json1_0GetEnrollmentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1167
1435
|
var data, contents, response;
|
|
1168
1436
|
return __generator(this, function (_a) {
|
|
@@ -1467,29 +1735,141 @@ var deserializeAws_json1_0GetLambdaFunctionRecommendationsCommandError = functio
|
|
|
1467
1735
|
}
|
|
1468
1736
|
});
|
|
1469
1737
|
}); };
|
|
1470
|
-
export var
|
|
1738
|
+
export var deserializeAws_json1_0GetRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1471
1739
|
var data, contents, response;
|
|
1472
1740
|
return __generator(this, function (_a) {
|
|
1473
1741
|
switch (_a.label) {
|
|
1474
1742
|
case 0:
|
|
1475
1743
|
if (output.statusCode >= 300) {
|
|
1476
|
-
return [2,
|
|
1744
|
+
return [2, deserializeAws_json1_0GetRecommendationPreferencesCommandError(output, context)];
|
|
1477
1745
|
}
|
|
1478
1746
|
return [4, parseBody(output.body, context)];
|
|
1479
1747
|
case 1:
|
|
1480
1748
|
data = _a.sent();
|
|
1481
1749
|
contents = {};
|
|
1482
|
-
contents =
|
|
1750
|
+
contents = deserializeAws_json1_0GetRecommendationPreferencesResponse(data, context);
|
|
1483
1751
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1484
1752
|
return [2, Promise.resolve(response)];
|
|
1485
1753
|
}
|
|
1486
1754
|
});
|
|
1487
1755
|
}); };
|
|
1488
|
-
var
|
|
1489
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
1490
|
-
var
|
|
1491
|
-
return __generator(this, function (
|
|
1492
|
-
switch (
|
|
1756
|
+
var deserializeAws_json1_0GetRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1757
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;
|
|
1758
|
+
var _l;
|
|
1759
|
+
return __generator(this, function (_m) {
|
|
1760
|
+
switch (_m.label) {
|
|
1761
|
+
case 0:
|
|
1762
|
+
_a = [__assign({}, output)];
|
|
1763
|
+
_l = {};
|
|
1764
|
+
return [4, parseBody(output.body, context)];
|
|
1765
|
+
case 1:
|
|
1766
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
1767
|
+
errorCode = "UnknownError";
|
|
1768
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1769
|
+
_b = errorCode;
|
|
1770
|
+
switch (_b) {
|
|
1771
|
+
case "AccessDeniedException": return [3, 2];
|
|
1772
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
|
|
1773
|
+
case "InternalServerException": return [3, 4];
|
|
1774
|
+
case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
|
|
1775
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
1776
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
|
|
1777
|
+
case "MissingAuthenticationToken": return [3, 8];
|
|
1778
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
|
|
1779
|
+
case "OptInRequiredException": return [3, 10];
|
|
1780
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
|
|
1781
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
1782
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
|
|
1783
|
+
case "ServiceUnavailableException": return [3, 14];
|
|
1784
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
|
|
1785
|
+
case "ThrottlingException": return [3, 16];
|
|
1786
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
|
|
1787
|
+
}
|
|
1788
|
+
return [3, 18];
|
|
1789
|
+
case 2:
|
|
1790
|
+
_c = [{}];
|
|
1791
|
+
return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1792
|
+
case 3:
|
|
1793
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1794
|
+
return [3, 19];
|
|
1795
|
+
case 4:
|
|
1796
|
+
_d = [{}];
|
|
1797
|
+
return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
1798
|
+
case 5:
|
|
1799
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1800
|
+
return [3, 19];
|
|
1801
|
+
case 6:
|
|
1802
|
+
_e = [{}];
|
|
1803
|
+
return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
1804
|
+
case 7:
|
|
1805
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1806
|
+
return [3, 19];
|
|
1807
|
+
case 8:
|
|
1808
|
+
_f = [{}];
|
|
1809
|
+
return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
|
|
1810
|
+
case 9:
|
|
1811
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1812
|
+
return [3, 19];
|
|
1813
|
+
case 10:
|
|
1814
|
+
_g = [{}];
|
|
1815
|
+
return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
|
|
1816
|
+
case 11:
|
|
1817
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1818
|
+
return [3, 19];
|
|
1819
|
+
case 12:
|
|
1820
|
+
_h = [{}];
|
|
1821
|
+
return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1822
|
+
case 13:
|
|
1823
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1824
|
+
return [3, 19];
|
|
1825
|
+
case 14:
|
|
1826
|
+
_j = [{}];
|
|
1827
|
+
return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
1828
|
+
case 15:
|
|
1829
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1830
|
+
return [3, 19];
|
|
1831
|
+
case 16:
|
|
1832
|
+
_k = [{}];
|
|
1833
|
+
return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1834
|
+
case 17:
|
|
1835
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1836
|
+
return [3, 19];
|
|
1837
|
+
case 18:
|
|
1838
|
+
parsedBody = parsedOutput.body;
|
|
1839
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1840
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1841
|
+
_m.label = 19;
|
|
1842
|
+
case 19:
|
|
1843
|
+
message = response.message || response.Message || errorCode;
|
|
1844
|
+
response.message = message;
|
|
1845
|
+
delete response.Message;
|
|
1846
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1847
|
+
}
|
|
1848
|
+
});
|
|
1849
|
+
}); };
|
|
1850
|
+
export var deserializeAws_json1_0GetRecommendationSummariesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1851
|
+
var data, contents, response;
|
|
1852
|
+
return __generator(this, function (_a) {
|
|
1853
|
+
switch (_a.label) {
|
|
1854
|
+
case 0:
|
|
1855
|
+
if (output.statusCode >= 300) {
|
|
1856
|
+
return [2, deserializeAws_json1_0GetRecommendationSummariesCommandError(output, context)];
|
|
1857
|
+
}
|
|
1858
|
+
return [4, parseBody(output.body, context)];
|
|
1859
|
+
case 1:
|
|
1860
|
+
data = _a.sent();
|
|
1861
|
+
contents = {};
|
|
1862
|
+
contents = deserializeAws_json1_0GetRecommendationSummariesResponse(data, context);
|
|
1863
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1864
|
+
return [2, Promise.resolve(response)];
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
}); };
|
|
1868
|
+
var deserializeAws_json1_0GetRecommendationSummariesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1869
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
|
|
1870
|
+
var _k;
|
|
1871
|
+
return __generator(this, function (_l) {
|
|
1872
|
+
switch (_l.label) {
|
|
1493
1873
|
case 0:
|
|
1494
1874
|
_a = [__assign({}, output)];
|
|
1495
1875
|
_k = {};
|
|
@@ -1571,6 +1951,118 @@ var deserializeAws_json1_0GetRecommendationSummariesCommandError = function (out
|
|
|
1571
1951
|
}
|
|
1572
1952
|
});
|
|
1573
1953
|
}); };
|
|
1954
|
+
export var deserializeAws_json1_0PutRecommendationPreferencesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1955
|
+
var data, contents, response;
|
|
1956
|
+
return __generator(this, function (_a) {
|
|
1957
|
+
switch (_a.label) {
|
|
1958
|
+
case 0:
|
|
1959
|
+
if (output.statusCode >= 300) {
|
|
1960
|
+
return [2, deserializeAws_json1_0PutRecommendationPreferencesCommandError(output, context)];
|
|
1961
|
+
}
|
|
1962
|
+
return [4, parseBody(output.body, context)];
|
|
1963
|
+
case 1:
|
|
1964
|
+
data = _a.sent();
|
|
1965
|
+
contents = {};
|
|
1966
|
+
contents = deserializeAws_json1_0PutRecommendationPreferencesResponse(data, context);
|
|
1967
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1968
|
+
return [2, Promise.resolve(response)];
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
}); };
|
|
1972
|
+
var deserializeAws_json1_0PutRecommendationPreferencesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1973
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;
|
|
1974
|
+
var _l;
|
|
1975
|
+
return __generator(this, function (_m) {
|
|
1976
|
+
switch (_m.label) {
|
|
1977
|
+
case 0:
|
|
1978
|
+
_a = [__assign({}, output)];
|
|
1979
|
+
_l = {};
|
|
1980
|
+
return [4, parseBody(output.body, context)];
|
|
1981
|
+
case 1:
|
|
1982
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
1983
|
+
errorCode = "UnknownError";
|
|
1984
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1985
|
+
_b = errorCode;
|
|
1986
|
+
switch (_b) {
|
|
1987
|
+
case "AccessDeniedException": return [3, 2];
|
|
1988
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException": return [3, 2];
|
|
1989
|
+
case "InternalServerException": return [3, 4];
|
|
1990
|
+
case "com.amazonaws.computeoptimizer#InternalServerException": return [3, 4];
|
|
1991
|
+
case "InvalidParameterValueException": return [3, 6];
|
|
1992
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException": return [3, 6];
|
|
1993
|
+
case "MissingAuthenticationToken": return [3, 8];
|
|
1994
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": return [3, 8];
|
|
1995
|
+
case "OptInRequiredException": return [3, 10];
|
|
1996
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException": return [3, 10];
|
|
1997
|
+
case "ResourceNotFoundException": return [3, 12];
|
|
1998
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException": return [3, 12];
|
|
1999
|
+
case "ServiceUnavailableException": return [3, 14];
|
|
2000
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException": return [3, 14];
|
|
2001
|
+
case "ThrottlingException": return [3, 16];
|
|
2002
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException": return [3, 16];
|
|
2003
|
+
}
|
|
2004
|
+
return [3, 18];
|
|
2005
|
+
case 2:
|
|
2006
|
+
_c = [{}];
|
|
2007
|
+
return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2008
|
+
case 3:
|
|
2009
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2010
|
+
return [3, 19];
|
|
2011
|
+
case 4:
|
|
2012
|
+
_d = [{}];
|
|
2013
|
+
return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
|
|
2014
|
+
case 5:
|
|
2015
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2016
|
+
return [3, 19];
|
|
2017
|
+
case 6:
|
|
2018
|
+
_e = [{}];
|
|
2019
|
+
return [4, deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)];
|
|
2020
|
+
case 7:
|
|
2021
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2022
|
+
return [3, 19];
|
|
2023
|
+
case 8:
|
|
2024
|
+
_f = [{}];
|
|
2025
|
+
return [4, deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)];
|
|
2026
|
+
case 9:
|
|
2027
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2028
|
+
return [3, 19];
|
|
2029
|
+
case 10:
|
|
2030
|
+
_g = [{}];
|
|
2031
|
+
return [4, deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)];
|
|
2032
|
+
case 11:
|
|
2033
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2034
|
+
return [3, 19];
|
|
2035
|
+
case 12:
|
|
2036
|
+
_h = [{}];
|
|
2037
|
+
return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2038
|
+
case 13:
|
|
2039
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2040
|
+
return [3, 19];
|
|
2041
|
+
case 14:
|
|
2042
|
+
_j = [{}];
|
|
2043
|
+
return [4, deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
2044
|
+
case 15:
|
|
2045
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2046
|
+
return [3, 19];
|
|
2047
|
+
case 16:
|
|
2048
|
+
_k = [{}];
|
|
2049
|
+
return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2050
|
+
case 17:
|
|
2051
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2052
|
+
return [3, 19];
|
|
2053
|
+
case 18:
|
|
2054
|
+
parsedBody = parsedOutput.body;
|
|
2055
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2056
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2057
|
+
_m.label = 19;
|
|
2058
|
+
case 19:
|
|
2059
|
+
message = response.message || response.Message || errorCode;
|
|
2060
|
+
response.message = message;
|
|
2061
|
+
delete response.Message;
|
|
2062
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2063
|
+
}
|
|
2064
|
+
});
|
|
2065
|
+
}); };
|
|
1574
2066
|
export var deserializeAws_json1_0UpdateEnrollmentStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1575
2067
|
var data, contents, response;
|
|
1576
2068
|
return __generator(this, function (_a) {
|
|
@@ -1778,6 +2270,13 @@ var serializeAws_json1_0CpuVendorArchitectures = function (input, context) {
|
|
|
1778
2270
|
return entry;
|
|
1779
2271
|
});
|
|
1780
2272
|
};
|
|
2273
|
+
var serializeAws_json1_0DeleteRecommendationPreferencesRequest = function (input, context) {
|
|
2274
|
+
return __assign(__assign(__assign({}, (input.recommendationPreferenceNames !== undefined &&
|
|
2275
|
+
input.recommendationPreferenceNames !== null && {
|
|
2276
|
+
recommendationPreferenceNames: serializeAws_json1_0RecommendationPreferenceNames(input.recommendationPreferenceNames, context),
|
|
2277
|
+
})), (input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType })), (input.scope !== undefined &&
|
|
2278
|
+
input.scope !== null && { scope: serializeAws_json1_0Scope(input.scope, context) }));
|
|
2279
|
+
};
|
|
1781
2280
|
var serializeAws_json1_0DescribeRecommendationExportJobsRequest = function (input, context) {
|
|
1782
2281
|
return __assign(__assign(__assign(__assign({}, (input.filters !== undefined &&
|
|
1783
2282
|
input.filters !== null && { filters: serializeAws_json1_0JobFilters(input.filters, context) })), (input.jobIds !== undefined &&
|
|
@@ -1975,6 +2474,9 @@ var serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest = function (
|
|
|
1975
2474
|
})), (input.startTime !== undefined &&
|
|
1976
2475
|
input.startTime !== null && { startTime: Math.round(input.startTime.getTime() / 1000) })), (input.stat !== undefined && input.stat !== null && { stat: input.stat }));
|
|
1977
2476
|
};
|
|
2477
|
+
var serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest = function (input, context) {
|
|
2478
|
+
return __assign({}, (input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }));
|
|
2479
|
+
};
|
|
1978
2480
|
var serializeAws_json1_0GetEnrollmentStatusesForOrganizationRequest = function (input, context) {
|
|
1979
2481
|
return __assign(__assign(__assign({}, (input.filters !== undefined &&
|
|
1980
2482
|
input.filters !== null && { filters: serializeAws_json1_0EnrollmentFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }));
|
|
@@ -1990,6 +2492,10 @@ var serializeAws_json1_0GetLambdaFunctionRecommendationsRequest = function (inpu
|
|
|
1990
2492
|
})), (input.functionArns !== undefined &&
|
|
1991
2493
|
input.functionArns !== null && { functionArns: serializeAws_json1_0FunctionArns(input.functionArns, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }));
|
|
1992
2494
|
};
|
|
2495
|
+
var serializeAws_json1_0GetRecommendationPreferencesRequest = function (input, context) {
|
|
2496
|
+
return __assign(__assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType })), (input.scope !== undefined &&
|
|
2497
|
+
input.scope !== null && { scope: serializeAws_json1_0Scope(input.scope, context) }));
|
|
2498
|
+
};
|
|
1993
2499
|
var serializeAws_json1_0GetRecommendationSummariesRequest = function (input, context) {
|
|
1994
2500
|
return __assign(__assign(__assign({}, (input.accountIds !== undefined &&
|
|
1995
2501
|
input.accountIds !== null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }));
|
|
@@ -2042,6 +2548,23 @@ var serializeAws_json1_0LambdaFunctionRecommendationFilters = function (input, c
|
|
|
2042
2548
|
return serializeAws_json1_0LambdaFunctionRecommendationFilter(entry, context);
|
|
2043
2549
|
});
|
|
2044
2550
|
};
|
|
2551
|
+
var serializeAws_json1_0PutRecommendationPreferencesRequest = function (input, context) {
|
|
2552
|
+
return __assign(__assign(__assign({}, (input.enhancedInfrastructureMetrics !== undefined &&
|
|
2553
|
+
input.enhancedInfrastructureMetrics !== null && {
|
|
2554
|
+
enhancedInfrastructureMetrics: input.enhancedInfrastructureMetrics,
|
|
2555
|
+
})), (input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType })), (input.scope !== undefined &&
|
|
2556
|
+
input.scope !== null && { scope: serializeAws_json1_0Scope(input.scope, context) }));
|
|
2557
|
+
};
|
|
2558
|
+
var serializeAws_json1_0RecommendationPreferenceNames = function (input, context) {
|
|
2559
|
+
return input
|
|
2560
|
+
.filter(function (e) { return e != null; })
|
|
2561
|
+
.map(function (entry) {
|
|
2562
|
+
if (entry === null) {
|
|
2563
|
+
return null;
|
|
2564
|
+
}
|
|
2565
|
+
return entry;
|
|
2566
|
+
});
|
|
2567
|
+
};
|
|
2045
2568
|
var serializeAws_json1_0RecommendationPreferences = function (input, context) {
|
|
2046
2569
|
return __assign({}, (input.cpuVendorArchitectures !== undefined &&
|
|
2047
2570
|
input.cpuVendorArchitectures !== null && {
|
|
@@ -2051,6 +2574,9 @@ var serializeAws_json1_0RecommendationPreferences = function (input, context) {
|
|
|
2051
2574
|
var serializeAws_json1_0S3DestinationConfig = function (input, context) {
|
|
2052
2575
|
return __assign(__assign({}, (input.bucket !== undefined && input.bucket !== null && { bucket: input.bucket })), (input.keyPrefix !== undefined && input.keyPrefix !== null && { keyPrefix: input.keyPrefix }));
|
|
2053
2576
|
};
|
|
2577
|
+
var serializeAws_json1_0Scope = function (input, context) {
|
|
2578
|
+
return __assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.value !== undefined && input.value !== null && { value: input.value }));
|
|
2579
|
+
};
|
|
2054
2580
|
var serializeAws_json1_0UpdateEnrollmentStatusRequest = function (input, context) {
|
|
2055
2581
|
return __assign(__assign({}, (input.includeMemberAccounts !== undefined &&
|
|
2056
2582
|
input.includeMemberAccounts !== null && { includeMemberAccounts: input.includeMemberAccounts })), (input.status !== undefined && input.status !== null && { status: input.status }));
|
|
@@ -2106,6 +2632,10 @@ var deserializeAws_json1_0AutoScalingGroupRecommendation = function (output, con
|
|
|
2106
2632
|
currentConfiguration: output.currentConfiguration !== undefined && output.currentConfiguration !== null
|
|
2107
2633
|
? deserializeAws_json1_0AutoScalingGroupConfiguration(output.currentConfiguration, context)
|
|
2108
2634
|
: undefined,
|
|
2635
|
+
currentPerformanceRisk: __expectString(output.currentPerformanceRisk),
|
|
2636
|
+
effectiveRecommendationPreferences: output.effectiveRecommendationPreferences !== undefined && output.effectiveRecommendationPreferences !== null
|
|
2637
|
+
? deserializeAws_json1_0EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context)
|
|
2638
|
+
: undefined,
|
|
2109
2639
|
finding: __expectString(output.finding),
|
|
2110
2640
|
lastRefreshTimestamp: output.lastRefreshTimestamp !== undefined && output.lastRefreshTimestamp !== null
|
|
2111
2641
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRefreshTimestamp)))
|
|
@@ -2129,6 +2659,9 @@ var deserializeAws_json1_0AutoScalingGroupRecommendationOption = function (outpu
|
|
|
2129
2659
|
? deserializeAws_json1_0ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
|
|
2130
2660
|
: undefined,
|
|
2131
2661
|
rank: __expectInt32(output.rank),
|
|
2662
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
2663
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
2664
|
+
: undefined,
|
|
2132
2665
|
};
|
|
2133
2666
|
};
|
|
2134
2667
|
var deserializeAws_json1_0AutoScalingGroupRecommendationOptions = function (output, context) {
|
|
@@ -2151,6 +2684,27 @@ var deserializeAws_json1_0AutoScalingGroupRecommendations = function (output, co
|
|
|
2151
2684
|
return deserializeAws_json1_0AutoScalingGroupRecommendation(entry, context);
|
|
2152
2685
|
});
|
|
2153
2686
|
};
|
|
2687
|
+
var deserializeAws_json1_0CpuVendorArchitectures = function (output, context) {
|
|
2688
|
+
return (output || [])
|
|
2689
|
+
.filter(function (e) { return e != null; })
|
|
2690
|
+
.map(function (entry) {
|
|
2691
|
+
if (entry === null) {
|
|
2692
|
+
return null;
|
|
2693
|
+
}
|
|
2694
|
+
return __expectString(entry);
|
|
2695
|
+
});
|
|
2696
|
+
};
|
|
2697
|
+
var deserializeAws_json1_0CurrentPerformanceRiskRatings = function (output, context) {
|
|
2698
|
+
return {
|
|
2699
|
+
high: __expectLong(output.high),
|
|
2700
|
+
low: __expectLong(output.low),
|
|
2701
|
+
medium: __expectLong(output.medium),
|
|
2702
|
+
veryLow: __expectLong(output.veryLow),
|
|
2703
|
+
};
|
|
2704
|
+
};
|
|
2705
|
+
var deserializeAws_json1_0DeleteRecommendationPreferencesResponse = function (output, context) {
|
|
2706
|
+
return {};
|
|
2707
|
+
};
|
|
2154
2708
|
var deserializeAws_json1_0DescribeRecommendationExportJobsResponse = function (output, context) {
|
|
2155
2709
|
return {
|
|
2156
2710
|
nextToken: __expectString(output.nextToken),
|
|
@@ -2176,6 +2730,20 @@ var deserializeAws_json1_0EBSUtilizationMetrics = function (output, context) {
|
|
|
2176
2730
|
return deserializeAws_json1_0EBSUtilizationMetric(entry, context);
|
|
2177
2731
|
});
|
|
2178
2732
|
};
|
|
2733
|
+
var deserializeAws_json1_0EffectiveRecommendationPreferences = function (output, context) {
|
|
2734
|
+
return {
|
|
2735
|
+
cpuVendorArchitectures: output.cpuVendorArchitectures !== undefined && output.cpuVendorArchitectures !== null
|
|
2736
|
+
? deserializeAws_json1_0CpuVendorArchitectures(output.cpuVendorArchitectures, context)
|
|
2737
|
+
: undefined,
|
|
2738
|
+
enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics),
|
|
2739
|
+
};
|
|
2740
|
+
};
|
|
2741
|
+
var deserializeAws_json1_0EstimatedMonthlySavings = function (output, context) {
|
|
2742
|
+
return {
|
|
2743
|
+
currency: __expectString(output.currency),
|
|
2744
|
+
value: __limitedParseDouble(output.value),
|
|
2745
|
+
};
|
|
2746
|
+
};
|
|
2179
2747
|
var deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse = function (output, context) {
|
|
2180
2748
|
return {
|
|
2181
2749
|
jobId: __expectString(output.jobId),
|
|
@@ -2255,6 +2823,11 @@ var deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse = functio
|
|
|
2255
2823
|
: undefined,
|
|
2256
2824
|
};
|
|
2257
2825
|
};
|
|
2826
|
+
var deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse = function (output, context) {
|
|
2827
|
+
return {
|
|
2828
|
+
enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics),
|
|
2829
|
+
};
|
|
2830
|
+
};
|
|
2258
2831
|
var deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = function (output, context) {
|
|
2259
2832
|
return {
|
|
2260
2833
|
accountEnrollmentStatuses: output.accountEnrollmentStatuses !== undefined && output.accountEnrollmentStatuses !== null
|
|
@@ -2299,6 +2872,14 @@ var deserializeAws_json1_0GetRecommendationErrors = function (output, context) {
|
|
|
2299
2872
|
return deserializeAws_json1_0GetRecommendationError(entry, context);
|
|
2300
2873
|
});
|
|
2301
2874
|
};
|
|
2875
|
+
var deserializeAws_json1_0GetRecommendationPreferencesResponse = function (output, context) {
|
|
2876
|
+
return {
|
|
2877
|
+
nextToken: __expectString(output.nextToken),
|
|
2878
|
+
recommendationPreferencesDetails: output.recommendationPreferencesDetails !== undefined && output.recommendationPreferencesDetails !== null
|
|
2879
|
+
? deserializeAws_json1_0RecommendationPreferencesDetails(output.recommendationPreferencesDetails, context)
|
|
2880
|
+
: undefined,
|
|
2881
|
+
};
|
|
2882
|
+
};
|
|
2302
2883
|
var deserializeAws_json1_0GetRecommendationSummariesResponse = function (output, context) {
|
|
2303
2884
|
return {
|
|
2304
2885
|
nextToken: __expectString(output.nextToken),
|
|
@@ -2311,6 +2892,10 @@ var deserializeAws_json1_0InstanceRecommendation = function (output, context) {
|
|
|
2311
2892
|
return {
|
|
2312
2893
|
accountId: __expectString(output.accountId),
|
|
2313
2894
|
currentInstanceType: __expectString(output.currentInstanceType),
|
|
2895
|
+
currentPerformanceRisk: __expectString(output.currentPerformanceRisk),
|
|
2896
|
+
effectiveRecommendationPreferences: output.effectiveRecommendationPreferences !== undefined && output.effectiveRecommendationPreferences !== null
|
|
2897
|
+
? deserializeAws_json1_0EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context)
|
|
2898
|
+
: undefined,
|
|
2314
2899
|
finding: __expectString(output.finding),
|
|
2315
2900
|
findingReasonCodes: output.findingReasonCodes !== undefined && output.findingReasonCodes !== null
|
|
2316
2901
|
? deserializeAws_json1_0InstanceRecommendationFindingReasonCodes(output.findingReasonCodes, context)
|
|
@@ -2353,6 +2938,9 @@ var deserializeAws_json1_0InstanceRecommendationOption = function (output, conte
|
|
|
2353
2938
|
? deserializeAws_json1_0ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
|
|
2354
2939
|
: undefined,
|
|
2355
2940
|
rank: __expectInt32(output.rank),
|
|
2941
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
2942
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
2943
|
+
: undefined,
|
|
2356
2944
|
};
|
|
2357
2945
|
};
|
|
2358
2946
|
var deserializeAws_json1_0InstanceRecommendations = function (output, context) {
|
|
@@ -2399,6 +2987,9 @@ var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = function (o
|
|
|
2399
2987
|
? deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics(output.projectedUtilizationMetrics, context)
|
|
2400
2988
|
: undefined,
|
|
2401
2989
|
rank: __expectInt32(output.rank),
|
|
2990
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
2991
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
2992
|
+
: undefined,
|
|
2402
2993
|
};
|
|
2403
2994
|
};
|
|
2404
2995
|
var deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = function (output, context) {
|
|
@@ -2415,6 +3006,7 @@ var deserializeAws_json1_0LambdaFunctionRecommendation = function (output, conte
|
|
|
2415
3006
|
return {
|
|
2416
3007
|
accountId: __expectString(output.accountId),
|
|
2417
3008
|
currentMemorySize: __expectInt32(output.currentMemorySize),
|
|
3009
|
+
currentPerformanceRisk: __expectString(output.currentPerformanceRisk),
|
|
2418
3010
|
finding: __expectString(output.finding),
|
|
2419
3011
|
findingReasonCodes: output.findingReasonCodes !== undefined && output.findingReasonCodes !== null
|
|
2420
3012
|
? deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes(output.findingReasonCodes, context)
|
|
@@ -2537,6 +3129,9 @@ var deserializeAws_json1_0ProjectedUtilizationMetrics = function (output, contex
|
|
|
2537
3129
|
return deserializeAws_json1_0UtilizationMetric(entry, context);
|
|
2538
3130
|
});
|
|
2539
3131
|
};
|
|
3132
|
+
var deserializeAws_json1_0PutRecommendationPreferencesResponse = function (output, context) {
|
|
3133
|
+
return {};
|
|
3134
|
+
};
|
|
2540
3135
|
var deserializeAws_json1_0ReasonCodeSummaries = function (output, context) {
|
|
2541
3136
|
return (output || [])
|
|
2542
3137
|
.filter(function (e) { return e != null; })
|
|
@@ -2590,6 +3185,25 @@ var deserializeAws_json1_0RecommendationOptions = function (output, context) {
|
|
|
2590
3185
|
return deserializeAws_json1_0InstanceRecommendationOption(entry, context);
|
|
2591
3186
|
});
|
|
2592
3187
|
};
|
|
3188
|
+
var deserializeAws_json1_0RecommendationPreferencesDetail = function (output, context) {
|
|
3189
|
+
return {
|
|
3190
|
+
enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics),
|
|
3191
|
+
resourceType: __expectString(output.resourceType),
|
|
3192
|
+
scope: output.scope !== undefined && output.scope !== null
|
|
3193
|
+
? deserializeAws_json1_0Scope(output.scope, context)
|
|
3194
|
+
: undefined,
|
|
3195
|
+
};
|
|
3196
|
+
};
|
|
3197
|
+
var deserializeAws_json1_0RecommendationPreferencesDetails = function (output, context) {
|
|
3198
|
+
return (output || [])
|
|
3199
|
+
.filter(function (e) { return e != null; })
|
|
3200
|
+
.map(function (entry) {
|
|
3201
|
+
if (entry === null) {
|
|
3202
|
+
return null;
|
|
3203
|
+
}
|
|
3204
|
+
return deserializeAws_json1_0RecommendationPreferencesDetail(entry, context);
|
|
3205
|
+
});
|
|
3206
|
+
};
|
|
2593
3207
|
var deserializeAws_json1_0RecommendationSource = function (output, context) {
|
|
2594
3208
|
return {
|
|
2595
3209
|
recommendationSourceArn: __expectString(output.recommendationSourceArn),
|
|
@@ -2619,7 +3233,13 @@ var deserializeAws_json1_0RecommendationSummaries = function (output, context) {
|
|
|
2619
3233
|
var deserializeAws_json1_0RecommendationSummary = function (output, context) {
|
|
2620
3234
|
return {
|
|
2621
3235
|
accountId: __expectString(output.accountId),
|
|
3236
|
+
currentPerformanceRiskRatings: output.currentPerformanceRiskRatings !== undefined && output.currentPerformanceRiskRatings !== null
|
|
3237
|
+
? deserializeAws_json1_0CurrentPerformanceRiskRatings(output.currentPerformanceRiskRatings, context)
|
|
3238
|
+
: undefined,
|
|
2622
3239
|
recommendationResourceType: __expectString(output.recommendationResourceType),
|
|
3240
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
3241
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
3242
|
+
: undefined,
|
|
2623
3243
|
summaries: output.summaries !== undefined && output.summaries !== null
|
|
2624
3244
|
? deserializeAws_json1_0Summaries(output.summaries, context)
|
|
2625
3245
|
: undefined,
|
|
@@ -2656,6 +3276,20 @@ var deserializeAws_json1_0S3Destination = function (output, context) {
|
|
|
2656
3276
|
metadataKey: __expectString(output.metadataKey),
|
|
2657
3277
|
};
|
|
2658
3278
|
};
|
|
3279
|
+
var deserializeAws_json1_0SavingsOpportunity = function (output, context) {
|
|
3280
|
+
return {
|
|
3281
|
+
estimatedMonthlySavings: output.estimatedMonthlySavings !== undefined && output.estimatedMonthlySavings !== null
|
|
3282
|
+
? deserializeAws_json1_0EstimatedMonthlySavings(output.estimatedMonthlySavings, context)
|
|
3283
|
+
: undefined,
|
|
3284
|
+
savingsOpportunityPercentage: __limitedParseDouble(output.savingsOpportunityPercentage),
|
|
3285
|
+
};
|
|
3286
|
+
};
|
|
3287
|
+
var deserializeAws_json1_0Scope = function (output, context) {
|
|
3288
|
+
return {
|
|
3289
|
+
name: __expectString(output.name),
|
|
3290
|
+
value: __expectString(output.value),
|
|
3291
|
+
};
|
|
3292
|
+
};
|
|
2659
3293
|
var deserializeAws_json1_0ServiceUnavailableException = function (output, context) {
|
|
2660
3294
|
return {
|
|
2661
3295
|
message: __expectString(output.message),
|
|
@@ -2734,6 +3368,7 @@ var deserializeAws_json1_0VolumeRecommendation = function (output, context) {
|
|
|
2734
3368
|
currentConfiguration: output.currentConfiguration !== undefined && output.currentConfiguration !== null
|
|
2735
3369
|
? deserializeAws_json1_0VolumeConfiguration(output.currentConfiguration, context)
|
|
2736
3370
|
: undefined,
|
|
3371
|
+
currentPerformanceRisk: __expectString(output.currentPerformanceRisk),
|
|
2737
3372
|
finding: __expectString(output.finding),
|
|
2738
3373
|
lastRefreshTimestamp: output.lastRefreshTimestamp !== undefined && output.lastRefreshTimestamp !== null
|
|
2739
3374
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRefreshTimestamp)))
|
|
@@ -2755,6 +3390,9 @@ var deserializeAws_json1_0VolumeRecommendationOption = function (output, context
|
|
|
2755
3390
|
: undefined,
|
|
2756
3391
|
performanceRisk: __limitedParseDouble(output.performanceRisk),
|
|
2757
3392
|
rank: __expectInt32(output.rank),
|
|
3393
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
3394
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
3395
|
+
: undefined,
|
|
2758
3396
|
};
|
|
2759
3397
|
};
|
|
2760
3398
|
var deserializeAws_json1_0VolumeRecommendationOptions = function (output, context) {
|