@aws-sdk/client-compute-optimizer 3.42.0 → 3.46.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 +47 -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 +183 -51
- package/dist-cjs/protocols/Aws_json1_0.js +617 -1
- package/dist-cjs/runtimeConfig.js +0 -2
- 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 +143 -40
- package/dist-es/protocols/Aws_json1_0.js +646 -8
- package/dist-es/runtimeConfig.js +0 -2
- package/dist-types/ComputeOptimizer.d.ts +50 -27
- package/dist-types/ComputeOptimizerClient.d.ts +6 -2
- 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 +646 -282
- package/dist-types/protocols/Aws_json1_0.d.ts +12 -0
- package/dist-types/ts3.4/ComputeOptimizer.d.ts +20 -0
- package/dist-types/ts3.4/ComputeOptimizerClient.d.ts +6 -2
- 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 +291 -77
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +12 -0
- package/package.json +36 -43
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_0UpdateEnrollmentStatusCommand = exports.deserializeAws_json1_0GetRecommendationSummariesCommand = exports.deserializeAws_json1_0GetLambdaFunctionRecommendationsCommand = exports.deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = exports.deserializeAws_json1_0GetEnrollmentStatusCommand = exports.deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = exports.deserializeAws_json1_0GetEC2InstanceRecommendationsCommand = exports.deserializeAws_json1_0GetEBSVolumeRecommendationsCommand = exports.deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = exports.deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = exports.deserializeAws_json1_0ExportEC2InstanceRecommendationsCommand = exports.deserializeAws_json1_0ExportEBSVolumeRecommendationsCommand = exports.deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = exports.deserializeAws_json1_0DescribeRecommendationExportJobsCommand = exports.serializeAws_json1_0UpdateEnrollmentStatusCommand = exports.serializeAws_json1_0GetRecommendationSummariesCommand = exports.serializeAws_json1_0GetLambdaFunctionRecommendationsCommand = exports.serializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = exports.serializeAws_json1_0GetEnrollmentStatusCommand = exports.serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = exports.serializeAws_json1_0GetEC2InstanceRecommendationsCommand = exports.serializeAws_json1_0GetEBSVolumeRecommendationsCommand = exports.serializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = exports.serializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = exports.serializeAws_json1_0ExportEC2InstanceRecommendationsCommand = exports.serializeAws_json1_0ExportEBSVolumeRecommendationsCommand = exports.serializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = exports.serializeAws_json1_0DescribeRecommendationExportJobsCommand = void 0;
|
|
3
|
+
exports.deserializeAws_json1_0UpdateEnrollmentStatusCommand = exports.deserializeAws_json1_0PutRecommendationPreferencesCommand = exports.deserializeAws_json1_0GetRecommendationSummariesCommand = exports.deserializeAws_json1_0GetRecommendationPreferencesCommand = exports.deserializeAws_json1_0GetLambdaFunctionRecommendationsCommand = exports.deserializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = exports.deserializeAws_json1_0GetEnrollmentStatusCommand = exports.deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = exports.deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = exports.deserializeAws_json1_0GetEC2InstanceRecommendationsCommand = exports.deserializeAws_json1_0GetEBSVolumeRecommendationsCommand = exports.deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = exports.deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = exports.deserializeAws_json1_0ExportEC2InstanceRecommendationsCommand = exports.deserializeAws_json1_0ExportEBSVolumeRecommendationsCommand = exports.deserializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = exports.deserializeAws_json1_0DescribeRecommendationExportJobsCommand = exports.deserializeAws_json1_0DeleteRecommendationPreferencesCommand = exports.serializeAws_json1_0UpdateEnrollmentStatusCommand = exports.serializeAws_json1_0PutRecommendationPreferencesCommand = exports.serializeAws_json1_0GetRecommendationSummariesCommand = exports.serializeAws_json1_0GetRecommendationPreferencesCommand = exports.serializeAws_json1_0GetLambdaFunctionRecommendationsCommand = exports.serializeAws_json1_0GetEnrollmentStatusesForOrganizationCommand = exports.serializeAws_json1_0GetEnrollmentStatusCommand = exports.serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = exports.serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = exports.serializeAws_json1_0GetEC2InstanceRecommendationsCommand = exports.serializeAws_json1_0GetEBSVolumeRecommendationsCommand = exports.serializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = exports.serializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = exports.serializeAws_json1_0ExportEC2InstanceRecommendationsCommand = exports.serializeAws_json1_0ExportEBSVolumeRecommendationsCommand = exports.serializeAws_json1_0ExportAutoScalingGroupRecommendationsCommand = exports.serializeAws_json1_0DescribeRecommendationExportJobsCommand = exports.serializeAws_json1_0DeleteRecommendationPreferencesCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const serializeAws_json1_0DeleteRecommendationPreferencesCommand = async (input, context) => {
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/x-amz-json-1.0",
|
|
9
|
+
"x-amz-target": "ComputeOptimizerService.DeleteRecommendationPreferences",
|
|
10
|
+
};
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify(serializeAws_json1_0DeleteRecommendationPreferencesRequest(input, context));
|
|
13
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
+
};
|
|
15
|
+
exports.serializeAws_json1_0DeleteRecommendationPreferencesCommand = serializeAws_json1_0DeleteRecommendationPreferencesCommand;
|
|
6
16
|
const serializeAws_json1_0DescribeRecommendationExportJobsCommand = async (input, context) => {
|
|
7
17
|
const headers = {
|
|
8
18
|
"content-type": "application/x-amz-json-1.0",
|
|
@@ -93,6 +103,16 @@ const serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = async (i
|
|
|
93
103
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
104
|
};
|
|
95
105
|
exports.serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand;
|
|
106
|
+
const serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = async (input, context) => {
|
|
107
|
+
const headers = {
|
|
108
|
+
"content-type": "application/x-amz-json-1.0",
|
|
109
|
+
"x-amz-target": "ComputeOptimizerService.GetEffectiveRecommendationPreferences",
|
|
110
|
+
};
|
|
111
|
+
let body;
|
|
112
|
+
body = JSON.stringify(serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest(input, context));
|
|
113
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
114
|
+
};
|
|
115
|
+
exports.serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand;
|
|
96
116
|
const serializeAws_json1_0GetEnrollmentStatusCommand = async (input, context) => {
|
|
97
117
|
const headers = {
|
|
98
118
|
"content-type": "application/x-amz-json-1.0",
|
|
@@ -123,6 +143,16 @@ const serializeAws_json1_0GetLambdaFunctionRecommendationsCommand = async (input
|
|
|
123
143
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
124
144
|
};
|
|
125
145
|
exports.serializeAws_json1_0GetLambdaFunctionRecommendationsCommand = serializeAws_json1_0GetLambdaFunctionRecommendationsCommand;
|
|
146
|
+
const serializeAws_json1_0GetRecommendationPreferencesCommand = async (input, context) => {
|
|
147
|
+
const headers = {
|
|
148
|
+
"content-type": "application/x-amz-json-1.0",
|
|
149
|
+
"x-amz-target": "ComputeOptimizerService.GetRecommendationPreferences",
|
|
150
|
+
};
|
|
151
|
+
let body;
|
|
152
|
+
body = JSON.stringify(serializeAws_json1_0GetRecommendationPreferencesRequest(input, context));
|
|
153
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
154
|
+
};
|
|
155
|
+
exports.serializeAws_json1_0GetRecommendationPreferencesCommand = serializeAws_json1_0GetRecommendationPreferencesCommand;
|
|
126
156
|
const serializeAws_json1_0GetRecommendationSummariesCommand = async (input, context) => {
|
|
127
157
|
const headers = {
|
|
128
158
|
"content-type": "application/x-amz-json-1.0",
|
|
@@ -133,6 +163,16 @@ const serializeAws_json1_0GetRecommendationSummariesCommand = async (input, cont
|
|
|
133
163
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
134
164
|
};
|
|
135
165
|
exports.serializeAws_json1_0GetRecommendationSummariesCommand = serializeAws_json1_0GetRecommendationSummariesCommand;
|
|
166
|
+
const serializeAws_json1_0PutRecommendationPreferencesCommand = async (input, context) => {
|
|
167
|
+
const headers = {
|
|
168
|
+
"content-type": "application/x-amz-json-1.0",
|
|
169
|
+
"x-amz-target": "ComputeOptimizerService.PutRecommendationPreferences",
|
|
170
|
+
};
|
|
171
|
+
let body;
|
|
172
|
+
body = JSON.stringify(serializeAws_json1_0PutRecommendationPreferencesRequest(input, context));
|
|
173
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
174
|
+
};
|
|
175
|
+
exports.serializeAws_json1_0PutRecommendationPreferencesCommand = serializeAws_json1_0PutRecommendationPreferencesCommand;
|
|
136
176
|
const serializeAws_json1_0UpdateEnrollmentStatusCommand = async (input, context) => {
|
|
137
177
|
const headers = {
|
|
138
178
|
"content-type": "application/x-amz-json-1.0",
|
|
@@ -143,6 +183,109 @@ const serializeAws_json1_0UpdateEnrollmentStatusCommand = async (input, context)
|
|
|
143
183
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
144
184
|
};
|
|
145
185
|
exports.serializeAws_json1_0UpdateEnrollmentStatusCommand = serializeAws_json1_0UpdateEnrollmentStatusCommand;
|
|
186
|
+
const deserializeAws_json1_0DeleteRecommendationPreferencesCommand = async (output, context) => {
|
|
187
|
+
if (output.statusCode >= 300) {
|
|
188
|
+
return deserializeAws_json1_0DeleteRecommendationPreferencesCommandError(output, context);
|
|
189
|
+
}
|
|
190
|
+
const data = await parseBody(output.body, context);
|
|
191
|
+
let contents = {};
|
|
192
|
+
contents = deserializeAws_json1_0DeleteRecommendationPreferencesResponse(data, context);
|
|
193
|
+
const response = {
|
|
194
|
+
$metadata: deserializeMetadata(output),
|
|
195
|
+
...contents,
|
|
196
|
+
};
|
|
197
|
+
return Promise.resolve(response);
|
|
198
|
+
};
|
|
199
|
+
exports.deserializeAws_json1_0DeleteRecommendationPreferencesCommand = deserializeAws_json1_0DeleteRecommendationPreferencesCommand;
|
|
200
|
+
const deserializeAws_json1_0DeleteRecommendationPreferencesCommandError = async (output, context) => {
|
|
201
|
+
const parsedOutput = {
|
|
202
|
+
...output,
|
|
203
|
+
body: await parseBody(output.body, context),
|
|
204
|
+
};
|
|
205
|
+
let response;
|
|
206
|
+
let errorCode = "UnknownError";
|
|
207
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
208
|
+
switch (errorCode) {
|
|
209
|
+
case "AccessDeniedException":
|
|
210
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException":
|
|
211
|
+
response = {
|
|
212
|
+
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
213
|
+
name: errorCode,
|
|
214
|
+
$metadata: deserializeMetadata(output),
|
|
215
|
+
};
|
|
216
|
+
break;
|
|
217
|
+
case "InternalServerException":
|
|
218
|
+
case "com.amazonaws.computeoptimizer#InternalServerException":
|
|
219
|
+
response = {
|
|
220
|
+
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
221
|
+
name: errorCode,
|
|
222
|
+
$metadata: deserializeMetadata(output),
|
|
223
|
+
};
|
|
224
|
+
break;
|
|
225
|
+
case "InvalidParameterValueException":
|
|
226
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
|
|
227
|
+
response = {
|
|
228
|
+
...(await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
229
|
+
name: errorCode,
|
|
230
|
+
$metadata: deserializeMetadata(output),
|
|
231
|
+
};
|
|
232
|
+
break;
|
|
233
|
+
case "MissingAuthenticationToken":
|
|
234
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
|
|
235
|
+
response = {
|
|
236
|
+
...(await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)),
|
|
237
|
+
name: errorCode,
|
|
238
|
+
$metadata: deserializeMetadata(output),
|
|
239
|
+
};
|
|
240
|
+
break;
|
|
241
|
+
case "OptInRequiredException":
|
|
242
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException":
|
|
243
|
+
response = {
|
|
244
|
+
...(await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)),
|
|
245
|
+
name: errorCode,
|
|
246
|
+
$metadata: deserializeMetadata(output),
|
|
247
|
+
};
|
|
248
|
+
break;
|
|
249
|
+
case "ResourceNotFoundException":
|
|
250
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
|
|
251
|
+
response = {
|
|
252
|
+
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
253
|
+
name: errorCode,
|
|
254
|
+
$metadata: deserializeMetadata(output),
|
|
255
|
+
};
|
|
256
|
+
break;
|
|
257
|
+
case "ServiceUnavailableException":
|
|
258
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
|
|
259
|
+
response = {
|
|
260
|
+
...(await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
261
|
+
name: errorCode,
|
|
262
|
+
$metadata: deserializeMetadata(output),
|
|
263
|
+
};
|
|
264
|
+
break;
|
|
265
|
+
case "ThrottlingException":
|
|
266
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException":
|
|
267
|
+
response = {
|
|
268
|
+
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
269
|
+
name: errorCode,
|
|
270
|
+
$metadata: deserializeMetadata(output),
|
|
271
|
+
};
|
|
272
|
+
break;
|
|
273
|
+
default:
|
|
274
|
+
const parsedBody = parsedOutput.body;
|
|
275
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
276
|
+
response = {
|
|
277
|
+
...parsedBody,
|
|
278
|
+
name: `${errorCode}`,
|
|
279
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
280
|
+
$fault: "client",
|
|
281
|
+
$metadata: deserializeMetadata(output),
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
const message = response.message || response.Message || errorCode;
|
|
285
|
+
response.message = message;
|
|
286
|
+
delete response.Message;
|
|
287
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
288
|
+
};
|
|
146
289
|
const deserializeAws_json1_0DescribeRecommendationExportJobsCommand = async (output, context) => {
|
|
147
290
|
if (output.statusCode >= 300) {
|
|
148
291
|
return deserializeAws_json1_0DescribeRecommendationExportJobsCommandError(output, context);
|
|
@@ -1070,6 +1213,109 @@ const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError = a
|
|
|
1070
1213
|
delete response.Message;
|
|
1071
1214
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1072
1215
|
};
|
|
1216
|
+
const deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = async (output, context) => {
|
|
1217
|
+
if (output.statusCode >= 300) {
|
|
1218
|
+
return deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError(output, context);
|
|
1219
|
+
}
|
|
1220
|
+
const data = await parseBody(output.body, context);
|
|
1221
|
+
let contents = {};
|
|
1222
|
+
contents = deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse(data, context);
|
|
1223
|
+
const response = {
|
|
1224
|
+
$metadata: deserializeMetadata(output),
|
|
1225
|
+
...contents,
|
|
1226
|
+
};
|
|
1227
|
+
return Promise.resolve(response);
|
|
1228
|
+
};
|
|
1229
|
+
exports.deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand;
|
|
1230
|
+
const deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError = async (output, context) => {
|
|
1231
|
+
const parsedOutput = {
|
|
1232
|
+
...output,
|
|
1233
|
+
body: await parseBody(output.body, context),
|
|
1234
|
+
};
|
|
1235
|
+
let response;
|
|
1236
|
+
let errorCode = "UnknownError";
|
|
1237
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1238
|
+
switch (errorCode) {
|
|
1239
|
+
case "AccessDeniedException":
|
|
1240
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException":
|
|
1241
|
+
response = {
|
|
1242
|
+
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1243
|
+
name: errorCode,
|
|
1244
|
+
$metadata: deserializeMetadata(output),
|
|
1245
|
+
};
|
|
1246
|
+
break;
|
|
1247
|
+
case "InternalServerException":
|
|
1248
|
+
case "com.amazonaws.computeoptimizer#InternalServerException":
|
|
1249
|
+
response = {
|
|
1250
|
+
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1251
|
+
name: errorCode,
|
|
1252
|
+
$metadata: deserializeMetadata(output),
|
|
1253
|
+
};
|
|
1254
|
+
break;
|
|
1255
|
+
case "InvalidParameterValueException":
|
|
1256
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
|
|
1257
|
+
response = {
|
|
1258
|
+
...(await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
1259
|
+
name: errorCode,
|
|
1260
|
+
$metadata: deserializeMetadata(output),
|
|
1261
|
+
};
|
|
1262
|
+
break;
|
|
1263
|
+
case "MissingAuthenticationToken":
|
|
1264
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
|
|
1265
|
+
response = {
|
|
1266
|
+
...(await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)),
|
|
1267
|
+
name: errorCode,
|
|
1268
|
+
$metadata: deserializeMetadata(output),
|
|
1269
|
+
};
|
|
1270
|
+
break;
|
|
1271
|
+
case "OptInRequiredException":
|
|
1272
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException":
|
|
1273
|
+
response = {
|
|
1274
|
+
...(await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)),
|
|
1275
|
+
name: errorCode,
|
|
1276
|
+
$metadata: deserializeMetadata(output),
|
|
1277
|
+
};
|
|
1278
|
+
break;
|
|
1279
|
+
case "ResourceNotFoundException":
|
|
1280
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
|
|
1281
|
+
response = {
|
|
1282
|
+
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1283
|
+
name: errorCode,
|
|
1284
|
+
$metadata: deserializeMetadata(output),
|
|
1285
|
+
};
|
|
1286
|
+
break;
|
|
1287
|
+
case "ServiceUnavailableException":
|
|
1288
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
|
|
1289
|
+
response = {
|
|
1290
|
+
...(await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1291
|
+
name: errorCode,
|
|
1292
|
+
$metadata: deserializeMetadata(output),
|
|
1293
|
+
};
|
|
1294
|
+
break;
|
|
1295
|
+
case "ThrottlingException":
|
|
1296
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException":
|
|
1297
|
+
response = {
|
|
1298
|
+
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1299
|
+
name: errorCode,
|
|
1300
|
+
$metadata: deserializeMetadata(output),
|
|
1301
|
+
};
|
|
1302
|
+
break;
|
|
1303
|
+
default:
|
|
1304
|
+
const parsedBody = parsedOutput.body;
|
|
1305
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1306
|
+
response = {
|
|
1307
|
+
...parsedBody,
|
|
1308
|
+
name: `${errorCode}`,
|
|
1309
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1310
|
+
$fault: "client",
|
|
1311
|
+
$metadata: deserializeMetadata(output),
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
const message = response.message || response.Message || errorCode;
|
|
1315
|
+
response.message = message;
|
|
1316
|
+
delete response.Message;
|
|
1317
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1318
|
+
};
|
|
1073
1319
|
const deserializeAws_json1_0GetEnrollmentStatusCommand = async (output, context) => {
|
|
1074
1320
|
if (output.statusCode >= 300) {
|
|
1075
1321
|
return deserializeAws_json1_0GetEnrollmentStatusCommandError(output, context);
|
|
@@ -1347,6 +1593,109 @@ const deserializeAws_json1_0GetLambdaFunctionRecommendationsCommandError = async
|
|
|
1347
1593
|
delete response.Message;
|
|
1348
1594
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1349
1595
|
};
|
|
1596
|
+
const deserializeAws_json1_0GetRecommendationPreferencesCommand = async (output, context) => {
|
|
1597
|
+
if (output.statusCode >= 300) {
|
|
1598
|
+
return deserializeAws_json1_0GetRecommendationPreferencesCommandError(output, context);
|
|
1599
|
+
}
|
|
1600
|
+
const data = await parseBody(output.body, context);
|
|
1601
|
+
let contents = {};
|
|
1602
|
+
contents = deserializeAws_json1_0GetRecommendationPreferencesResponse(data, context);
|
|
1603
|
+
const response = {
|
|
1604
|
+
$metadata: deserializeMetadata(output),
|
|
1605
|
+
...contents,
|
|
1606
|
+
};
|
|
1607
|
+
return Promise.resolve(response);
|
|
1608
|
+
};
|
|
1609
|
+
exports.deserializeAws_json1_0GetRecommendationPreferencesCommand = deserializeAws_json1_0GetRecommendationPreferencesCommand;
|
|
1610
|
+
const deserializeAws_json1_0GetRecommendationPreferencesCommandError = async (output, context) => {
|
|
1611
|
+
const parsedOutput = {
|
|
1612
|
+
...output,
|
|
1613
|
+
body: await parseBody(output.body, context),
|
|
1614
|
+
};
|
|
1615
|
+
let response;
|
|
1616
|
+
let errorCode = "UnknownError";
|
|
1617
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1618
|
+
switch (errorCode) {
|
|
1619
|
+
case "AccessDeniedException":
|
|
1620
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException":
|
|
1621
|
+
response = {
|
|
1622
|
+
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1623
|
+
name: errorCode,
|
|
1624
|
+
$metadata: deserializeMetadata(output),
|
|
1625
|
+
};
|
|
1626
|
+
break;
|
|
1627
|
+
case "InternalServerException":
|
|
1628
|
+
case "com.amazonaws.computeoptimizer#InternalServerException":
|
|
1629
|
+
response = {
|
|
1630
|
+
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1631
|
+
name: errorCode,
|
|
1632
|
+
$metadata: deserializeMetadata(output),
|
|
1633
|
+
};
|
|
1634
|
+
break;
|
|
1635
|
+
case "InvalidParameterValueException":
|
|
1636
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
|
|
1637
|
+
response = {
|
|
1638
|
+
...(await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
1639
|
+
name: errorCode,
|
|
1640
|
+
$metadata: deserializeMetadata(output),
|
|
1641
|
+
};
|
|
1642
|
+
break;
|
|
1643
|
+
case "MissingAuthenticationToken":
|
|
1644
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
|
|
1645
|
+
response = {
|
|
1646
|
+
...(await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)),
|
|
1647
|
+
name: errorCode,
|
|
1648
|
+
$metadata: deserializeMetadata(output),
|
|
1649
|
+
};
|
|
1650
|
+
break;
|
|
1651
|
+
case "OptInRequiredException":
|
|
1652
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException":
|
|
1653
|
+
response = {
|
|
1654
|
+
...(await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)),
|
|
1655
|
+
name: errorCode,
|
|
1656
|
+
$metadata: deserializeMetadata(output),
|
|
1657
|
+
};
|
|
1658
|
+
break;
|
|
1659
|
+
case "ResourceNotFoundException":
|
|
1660
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
|
|
1661
|
+
response = {
|
|
1662
|
+
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1663
|
+
name: errorCode,
|
|
1664
|
+
$metadata: deserializeMetadata(output),
|
|
1665
|
+
};
|
|
1666
|
+
break;
|
|
1667
|
+
case "ServiceUnavailableException":
|
|
1668
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
|
|
1669
|
+
response = {
|
|
1670
|
+
...(await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1671
|
+
name: errorCode,
|
|
1672
|
+
$metadata: deserializeMetadata(output),
|
|
1673
|
+
};
|
|
1674
|
+
break;
|
|
1675
|
+
case "ThrottlingException":
|
|
1676
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException":
|
|
1677
|
+
response = {
|
|
1678
|
+
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1679
|
+
name: errorCode,
|
|
1680
|
+
$metadata: deserializeMetadata(output),
|
|
1681
|
+
};
|
|
1682
|
+
break;
|
|
1683
|
+
default:
|
|
1684
|
+
const parsedBody = parsedOutput.body;
|
|
1685
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1686
|
+
response = {
|
|
1687
|
+
...parsedBody,
|
|
1688
|
+
name: `${errorCode}`,
|
|
1689
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1690
|
+
$fault: "client",
|
|
1691
|
+
$metadata: deserializeMetadata(output),
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
const message = response.message || response.Message || errorCode;
|
|
1695
|
+
response.message = message;
|
|
1696
|
+
delete response.Message;
|
|
1697
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1698
|
+
};
|
|
1350
1699
|
const deserializeAws_json1_0GetRecommendationSummariesCommand = async (output, context) => {
|
|
1351
1700
|
if (output.statusCode >= 300) {
|
|
1352
1701
|
return deserializeAws_json1_0GetRecommendationSummariesCommandError(output, context);
|
|
@@ -1442,6 +1791,109 @@ const deserializeAws_json1_0GetRecommendationSummariesCommandError = async (outp
|
|
|
1442
1791
|
delete response.Message;
|
|
1443
1792
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1444
1793
|
};
|
|
1794
|
+
const deserializeAws_json1_0PutRecommendationPreferencesCommand = async (output, context) => {
|
|
1795
|
+
if (output.statusCode >= 300) {
|
|
1796
|
+
return deserializeAws_json1_0PutRecommendationPreferencesCommandError(output, context);
|
|
1797
|
+
}
|
|
1798
|
+
const data = await parseBody(output.body, context);
|
|
1799
|
+
let contents = {};
|
|
1800
|
+
contents = deserializeAws_json1_0PutRecommendationPreferencesResponse(data, context);
|
|
1801
|
+
const response = {
|
|
1802
|
+
$metadata: deserializeMetadata(output),
|
|
1803
|
+
...contents,
|
|
1804
|
+
};
|
|
1805
|
+
return Promise.resolve(response);
|
|
1806
|
+
};
|
|
1807
|
+
exports.deserializeAws_json1_0PutRecommendationPreferencesCommand = deserializeAws_json1_0PutRecommendationPreferencesCommand;
|
|
1808
|
+
const deserializeAws_json1_0PutRecommendationPreferencesCommandError = async (output, context) => {
|
|
1809
|
+
const parsedOutput = {
|
|
1810
|
+
...output,
|
|
1811
|
+
body: await parseBody(output.body, context),
|
|
1812
|
+
};
|
|
1813
|
+
let response;
|
|
1814
|
+
let errorCode = "UnknownError";
|
|
1815
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1816
|
+
switch (errorCode) {
|
|
1817
|
+
case "AccessDeniedException":
|
|
1818
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException":
|
|
1819
|
+
response = {
|
|
1820
|
+
...(await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1821
|
+
name: errorCode,
|
|
1822
|
+
$metadata: deserializeMetadata(output),
|
|
1823
|
+
};
|
|
1824
|
+
break;
|
|
1825
|
+
case "InternalServerException":
|
|
1826
|
+
case "com.amazonaws.computeoptimizer#InternalServerException":
|
|
1827
|
+
response = {
|
|
1828
|
+
...(await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)),
|
|
1829
|
+
name: errorCode,
|
|
1830
|
+
$metadata: deserializeMetadata(output),
|
|
1831
|
+
};
|
|
1832
|
+
break;
|
|
1833
|
+
case "InvalidParameterValueException":
|
|
1834
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
|
|
1835
|
+
response = {
|
|
1836
|
+
...(await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
1837
|
+
name: errorCode,
|
|
1838
|
+
$metadata: deserializeMetadata(output),
|
|
1839
|
+
};
|
|
1840
|
+
break;
|
|
1841
|
+
case "MissingAuthenticationToken":
|
|
1842
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
|
|
1843
|
+
response = {
|
|
1844
|
+
...(await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context)),
|
|
1845
|
+
name: errorCode,
|
|
1846
|
+
$metadata: deserializeMetadata(output),
|
|
1847
|
+
};
|
|
1848
|
+
break;
|
|
1849
|
+
case "OptInRequiredException":
|
|
1850
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException":
|
|
1851
|
+
response = {
|
|
1852
|
+
...(await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context)),
|
|
1853
|
+
name: errorCode,
|
|
1854
|
+
$metadata: deserializeMetadata(output),
|
|
1855
|
+
};
|
|
1856
|
+
break;
|
|
1857
|
+
case "ResourceNotFoundException":
|
|
1858
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
|
|
1859
|
+
response = {
|
|
1860
|
+
...(await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1861
|
+
name: errorCode,
|
|
1862
|
+
$metadata: deserializeMetadata(output),
|
|
1863
|
+
};
|
|
1864
|
+
break;
|
|
1865
|
+
case "ServiceUnavailableException":
|
|
1866
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
|
|
1867
|
+
response = {
|
|
1868
|
+
...(await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1869
|
+
name: errorCode,
|
|
1870
|
+
$metadata: deserializeMetadata(output),
|
|
1871
|
+
};
|
|
1872
|
+
break;
|
|
1873
|
+
case "ThrottlingException":
|
|
1874
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException":
|
|
1875
|
+
response = {
|
|
1876
|
+
...(await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1877
|
+
name: errorCode,
|
|
1878
|
+
$metadata: deserializeMetadata(output),
|
|
1879
|
+
};
|
|
1880
|
+
break;
|
|
1881
|
+
default:
|
|
1882
|
+
const parsedBody = parsedOutput.body;
|
|
1883
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1884
|
+
response = {
|
|
1885
|
+
...parsedBody,
|
|
1886
|
+
name: `${errorCode}`,
|
|
1887
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1888
|
+
$fault: "client",
|
|
1889
|
+
$metadata: deserializeMetadata(output),
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
const message = response.message || response.Message || errorCode;
|
|
1893
|
+
response.message = message;
|
|
1894
|
+
delete response.Message;
|
|
1895
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1896
|
+
};
|
|
1445
1897
|
const deserializeAws_json1_0UpdateEnrollmentStatusCommand = async (output, context) => {
|
|
1446
1898
|
if (output.statusCode >= 300) {
|
|
1447
1899
|
return deserializeAws_json1_0UpdateEnrollmentStatusCommandError(output, context);
|
|
@@ -1658,6 +2110,17 @@ const serializeAws_json1_0CpuVendorArchitectures = (input, context) => {
|
|
|
1658
2110
|
return entry;
|
|
1659
2111
|
});
|
|
1660
2112
|
};
|
|
2113
|
+
const serializeAws_json1_0DeleteRecommendationPreferencesRequest = (input, context) => {
|
|
2114
|
+
return {
|
|
2115
|
+
...(input.recommendationPreferenceNames !== undefined &&
|
|
2116
|
+
input.recommendationPreferenceNames !== null && {
|
|
2117
|
+
recommendationPreferenceNames: serializeAws_json1_0RecommendationPreferenceNames(input.recommendationPreferenceNames, context),
|
|
2118
|
+
}),
|
|
2119
|
+
...(input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType }),
|
|
2120
|
+
...(input.scope !== undefined &&
|
|
2121
|
+
input.scope !== null && { scope: serializeAws_json1_0Scope(input.scope, context) }),
|
|
2122
|
+
};
|
|
2123
|
+
};
|
|
1661
2124
|
const serializeAws_json1_0DescribeRecommendationExportJobsRequest = (input, context) => {
|
|
1662
2125
|
return {
|
|
1663
2126
|
...(input.filters !== undefined &&
|
|
@@ -1926,6 +2389,11 @@ const serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest = (input,
|
|
|
1926
2389
|
...(input.stat !== undefined && input.stat !== null && { stat: input.stat }),
|
|
1927
2390
|
};
|
|
1928
2391
|
};
|
|
2392
|
+
const serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest = (input, context) => {
|
|
2393
|
+
return {
|
|
2394
|
+
...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
|
|
2395
|
+
};
|
|
2396
|
+
};
|
|
1929
2397
|
const serializeAws_json1_0GetEnrollmentStatusesForOrganizationRequest = (input, context) => {
|
|
1930
2398
|
return {
|
|
1931
2399
|
...(input.filters !== undefined &&
|
|
@@ -1951,6 +2419,15 @@ const serializeAws_json1_0GetLambdaFunctionRecommendationsRequest = (input, cont
|
|
|
1951
2419
|
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
1952
2420
|
};
|
|
1953
2421
|
};
|
|
2422
|
+
const serializeAws_json1_0GetRecommendationPreferencesRequest = (input, context) => {
|
|
2423
|
+
return {
|
|
2424
|
+
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
2425
|
+
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
2426
|
+
...(input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType }),
|
|
2427
|
+
...(input.scope !== undefined &&
|
|
2428
|
+
input.scope !== null && { scope: serializeAws_json1_0Scope(input.scope, context) }),
|
|
2429
|
+
};
|
|
2430
|
+
};
|
|
1954
2431
|
const serializeAws_json1_0GetRecommendationSummariesRequest = (input, context) => {
|
|
1955
2432
|
return {
|
|
1956
2433
|
...(input.accountIds !== undefined &&
|
|
@@ -2013,6 +2490,27 @@ const serializeAws_json1_0LambdaFunctionRecommendationFilters = (input, context)
|
|
|
2013
2490
|
return serializeAws_json1_0LambdaFunctionRecommendationFilter(entry, context);
|
|
2014
2491
|
});
|
|
2015
2492
|
};
|
|
2493
|
+
const serializeAws_json1_0PutRecommendationPreferencesRequest = (input, context) => {
|
|
2494
|
+
return {
|
|
2495
|
+
...(input.enhancedInfrastructureMetrics !== undefined &&
|
|
2496
|
+
input.enhancedInfrastructureMetrics !== null && {
|
|
2497
|
+
enhancedInfrastructureMetrics: input.enhancedInfrastructureMetrics,
|
|
2498
|
+
}),
|
|
2499
|
+
...(input.resourceType !== undefined && input.resourceType !== null && { resourceType: input.resourceType }),
|
|
2500
|
+
...(input.scope !== undefined &&
|
|
2501
|
+
input.scope !== null && { scope: serializeAws_json1_0Scope(input.scope, context) }),
|
|
2502
|
+
};
|
|
2503
|
+
};
|
|
2504
|
+
const serializeAws_json1_0RecommendationPreferenceNames = (input, context) => {
|
|
2505
|
+
return input
|
|
2506
|
+
.filter((e) => e != null)
|
|
2507
|
+
.map((entry) => {
|
|
2508
|
+
if (entry === null) {
|
|
2509
|
+
return null;
|
|
2510
|
+
}
|
|
2511
|
+
return entry;
|
|
2512
|
+
});
|
|
2513
|
+
};
|
|
2016
2514
|
const serializeAws_json1_0RecommendationPreferences = (input, context) => {
|
|
2017
2515
|
return {
|
|
2018
2516
|
...(input.cpuVendorArchitectures !== undefined &&
|
|
@@ -2027,6 +2525,12 @@ const serializeAws_json1_0S3DestinationConfig = (input, context) => {
|
|
|
2027
2525
|
...(input.keyPrefix !== undefined && input.keyPrefix !== null && { keyPrefix: input.keyPrefix }),
|
|
2028
2526
|
};
|
|
2029
2527
|
};
|
|
2528
|
+
const serializeAws_json1_0Scope = (input, context) => {
|
|
2529
|
+
return {
|
|
2530
|
+
...(input.name !== undefined && input.name !== null && { name: input.name }),
|
|
2531
|
+
...(input.value !== undefined && input.value !== null && { value: input.value }),
|
|
2532
|
+
};
|
|
2533
|
+
};
|
|
2030
2534
|
const serializeAws_json1_0UpdateEnrollmentStatusRequest = (input, context) => {
|
|
2031
2535
|
return {
|
|
2032
2536
|
...(input.includeMemberAccounts !== undefined &&
|
|
@@ -2085,6 +2589,10 @@ const deserializeAws_json1_0AutoScalingGroupRecommendation = (output, context) =
|
|
|
2085
2589
|
currentConfiguration: output.currentConfiguration !== undefined && output.currentConfiguration !== null
|
|
2086
2590
|
? deserializeAws_json1_0AutoScalingGroupConfiguration(output.currentConfiguration, context)
|
|
2087
2591
|
: undefined,
|
|
2592
|
+
currentPerformanceRisk: smithy_client_1.expectString(output.currentPerformanceRisk),
|
|
2593
|
+
effectiveRecommendationPreferences: output.effectiveRecommendationPreferences !== undefined && output.effectiveRecommendationPreferences !== null
|
|
2594
|
+
? deserializeAws_json1_0EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context)
|
|
2595
|
+
: undefined,
|
|
2088
2596
|
finding: smithy_client_1.expectString(output.finding),
|
|
2089
2597
|
lastRefreshTimestamp: output.lastRefreshTimestamp !== undefined && output.lastRefreshTimestamp !== null
|
|
2090
2598
|
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastRefreshTimestamp)))
|
|
@@ -2108,6 +2616,9 @@ const deserializeAws_json1_0AutoScalingGroupRecommendationOption = (output, cont
|
|
|
2108
2616
|
? deserializeAws_json1_0ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
|
|
2109
2617
|
: undefined,
|
|
2110
2618
|
rank: smithy_client_1.expectInt32(output.rank),
|
|
2619
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
2620
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
2621
|
+
: undefined,
|
|
2111
2622
|
};
|
|
2112
2623
|
};
|
|
2113
2624
|
const deserializeAws_json1_0AutoScalingGroupRecommendationOptions = (output, context) => {
|
|
@@ -2130,6 +2641,27 @@ const deserializeAws_json1_0AutoScalingGroupRecommendations = (output, context)
|
|
|
2130
2641
|
return deserializeAws_json1_0AutoScalingGroupRecommendation(entry, context);
|
|
2131
2642
|
});
|
|
2132
2643
|
};
|
|
2644
|
+
const deserializeAws_json1_0CpuVendorArchitectures = (output, context) => {
|
|
2645
|
+
return (output || [])
|
|
2646
|
+
.filter((e) => e != null)
|
|
2647
|
+
.map((entry) => {
|
|
2648
|
+
if (entry === null) {
|
|
2649
|
+
return null;
|
|
2650
|
+
}
|
|
2651
|
+
return smithy_client_1.expectString(entry);
|
|
2652
|
+
});
|
|
2653
|
+
};
|
|
2654
|
+
const deserializeAws_json1_0CurrentPerformanceRiskRatings = (output, context) => {
|
|
2655
|
+
return {
|
|
2656
|
+
high: smithy_client_1.expectLong(output.high),
|
|
2657
|
+
low: smithy_client_1.expectLong(output.low),
|
|
2658
|
+
medium: smithy_client_1.expectLong(output.medium),
|
|
2659
|
+
veryLow: smithy_client_1.expectLong(output.veryLow),
|
|
2660
|
+
};
|
|
2661
|
+
};
|
|
2662
|
+
const deserializeAws_json1_0DeleteRecommendationPreferencesResponse = (output, context) => {
|
|
2663
|
+
return {};
|
|
2664
|
+
};
|
|
2133
2665
|
const deserializeAws_json1_0DescribeRecommendationExportJobsResponse = (output, context) => {
|
|
2134
2666
|
return {
|
|
2135
2667
|
nextToken: smithy_client_1.expectString(output.nextToken),
|
|
@@ -2155,6 +2687,20 @@ const deserializeAws_json1_0EBSUtilizationMetrics = (output, context) => {
|
|
|
2155
2687
|
return deserializeAws_json1_0EBSUtilizationMetric(entry, context);
|
|
2156
2688
|
});
|
|
2157
2689
|
};
|
|
2690
|
+
const deserializeAws_json1_0EffectiveRecommendationPreferences = (output, context) => {
|
|
2691
|
+
return {
|
|
2692
|
+
cpuVendorArchitectures: output.cpuVendorArchitectures !== undefined && output.cpuVendorArchitectures !== null
|
|
2693
|
+
? deserializeAws_json1_0CpuVendorArchitectures(output.cpuVendorArchitectures, context)
|
|
2694
|
+
: undefined,
|
|
2695
|
+
enhancedInfrastructureMetrics: smithy_client_1.expectString(output.enhancedInfrastructureMetrics),
|
|
2696
|
+
};
|
|
2697
|
+
};
|
|
2698
|
+
const deserializeAws_json1_0EstimatedMonthlySavings = (output, context) => {
|
|
2699
|
+
return {
|
|
2700
|
+
currency: smithy_client_1.expectString(output.currency),
|
|
2701
|
+
value: smithy_client_1.limitedParseDouble(output.value),
|
|
2702
|
+
};
|
|
2703
|
+
};
|
|
2158
2704
|
const deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse = (output, context) => {
|
|
2159
2705
|
return {
|
|
2160
2706
|
jobId: smithy_client_1.expectString(output.jobId),
|
|
@@ -2234,6 +2780,11 @@ const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse = (outp
|
|
|
2234
2780
|
: undefined,
|
|
2235
2781
|
};
|
|
2236
2782
|
};
|
|
2783
|
+
const deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse = (output, context) => {
|
|
2784
|
+
return {
|
|
2785
|
+
enhancedInfrastructureMetrics: smithy_client_1.expectString(output.enhancedInfrastructureMetrics),
|
|
2786
|
+
};
|
|
2787
|
+
};
|
|
2237
2788
|
const deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse = (output, context) => {
|
|
2238
2789
|
return {
|
|
2239
2790
|
accountEnrollmentStatuses: output.accountEnrollmentStatuses !== undefined && output.accountEnrollmentStatuses !== null
|
|
@@ -2278,6 +2829,14 @@ const deserializeAws_json1_0GetRecommendationErrors = (output, context) => {
|
|
|
2278
2829
|
return deserializeAws_json1_0GetRecommendationError(entry, context);
|
|
2279
2830
|
});
|
|
2280
2831
|
};
|
|
2832
|
+
const deserializeAws_json1_0GetRecommendationPreferencesResponse = (output, context) => {
|
|
2833
|
+
return {
|
|
2834
|
+
nextToken: smithy_client_1.expectString(output.nextToken),
|
|
2835
|
+
recommendationPreferencesDetails: output.recommendationPreferencesDetails !== undefined && output.recommendationPreferencesDetails !== null
|
|
2836
|
+
? deserializeAws_json1_0RecommendationPreferencesDetails(output.recommendationPreferencesDetails, context)
|
|
2837
|
+
: undefined,
|
|
2838
|
+
};
|
|
2839
|
+
};
|
|
2281
2840
|
const deserializeAws_json1_0GetRecommendationSummariesResponse = (output, context) => {
|
|
2282
2841
|
return {
|
|
2283
2842
|
nextToken: smithy_client_1.expectString(output.nextToken),
|
|
@@ -2290,6 +2849,10 @@ const deserializeAws_json1_0InstanceRecommendation = (output, context) => {
|
|
|
2290
2849
|
return {
|
|
2291
2850
|
accountId: smithy_client_1.expectString(output.accountId),
|
|
2292
2851
|
currentInstanceType: smithy_client_1.expectString(output.currentInstanceType),
|
|
2852
|
+
currentPerformanceRisk: smithy_client_1.expectString(output.currentPerformanceRisk),
|
|
2853
|
+
effectiveRecommendationPreferences: output.effectiveRecommendationPreferences !== undefined && output.effectiveRecommendationPreferences !== null
|
|
2854
|
+
? deserializeAws_json1_0EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context)
|
|
2855
|
+
: undefined,
|
|
2293
2856
|
finding: smithy_client_1.expectString(output.finding),
|
|
2294
2857
|
findingReasonCodes: output.findingReasonCodes !== undefined && output.findingReasonCodes !== null
|
|
2295
2858
|
? deserializeAws_json1_0InstanceRecommendationFindingReasonCodes(output.findingReasonCodes, context)
|
|
@@ -2332,6 +2895,9 @@ const deserializeAws_json1_0InstanceRecommendationOption = (output, context) =>
|
|
|
2332
2895
|
? deserializeAws_json1_0ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
|
|
2333
2896
|
: undefined,
|
|
2334
2897
|
rank: smithy_client_1.expectInt32(output.rank),
|
|
2898
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
2899
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
2900
|
+
: undefined,
|
|
2335
2901
|
};
|
|
2336
2902
|
};
|
|
2337
2903
|
const deserializeAws_json1_0InstanceRecommendations = (output, context) => {
|
|
@@ -2378,6 +2944,9 @@ const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOption = (output,
|
|
|
2378
2944
|
? deserializeAws_json1_0LambdaFunctionMemoryProjectedMetrics(output.projectedUtilizationMetrics, context)
|
|
2379
2945
|
: undefined,
|
|
2380
2946
|
rank: smithy_client_1.expectInt32(output.rank),
|
|
2947
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
2948
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
2949
|
+
: undefined,
|
|
2381
2950
|
};
|
|
2382
2951
|
};
|
|
2383
2952
|
const deserializeAws_json1_0LambdaFunctionMemoryRecommendationOptions = (output, context) => {
|
|
@@ -2394,6 +2963,7 @@ const deserializeAws_json1_0LambdaFunctionRecommendation = (output, context) =>
|
|
|
2394
2963
|
return {
|
|
2395
2964
|
accountId: smithy_client_1.expectString(output.accountId),
|
|
2396
2965
|
currentMemorySize: smithy_client_1.expectInt32(output.currentMemorySize),
|
|
2966
|
+
currentPerformanceRisk: smithy_client_1.expectString(output.currentPerformanceRisk),
|
|
2397
2967
|
finding: smithy_client_1.expectString(output.finding),
|
|
2398
2968
|
findingReasonCodes: output.findingReasonCodes !== undefined && output.findingReasonCodes !== null
|
|
2399
2969
|
? deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes(output.findingReasonCodes, context)
|
|
@@ -2516,6 +3086,9 @@ const deserializeAws_json1_0ProjectedUtilizationMetrics = (output, context) => {
|
|
|
2516
3086
|
return deserializeAws_json1_0UtilizationMetric(entry, context);
|
|
2517
3087
|
});
|
|
2518
3088
|
};
|
|
3089
|
+
const deserializeAws_json1_0PutRecommendationPreferencesResponse = (output, context) => {
|
|
3090
|
+
return {};
|
|
3091
|
+
};
|
|
2519
3092
|
const deserializeAws_json1_0ReasonCodeSummaries = (output, context) => {
|
|
2520
3093
|
return (output || [])
|
|
2521
3094
|
.filter((e) => e != null)
|
|
@@ -2569,6 +3142,25 @@ const deserializeAws_json1_0RecommendationOptions = (output, context) => {
|
|
|
2569
3142
|
return deserializeAws_json1_0InstanceRecommendationOption(entry, context);
|
|
2570
3143
|
});
|
|
2571
3144
|
};
|
|
3145
|
+
const deserializeAws_json1_0RecommendationPreferencesDetail = (output, context) => {
|
|
3146
|
+
return {
|
|
3147
|
+
enhancedInfrastructureMetrics: smithy_client_1.expectString(output.enhancedInfrastructureMetrics),
|
|
3148
|
+
resourceType: smithy_client_1.expectString(output.resourceType),
|
|
3149
|
+
scope: output.scope !== undefined && output.scope !== null
|
|
3150
|
+
? deserializeAws_json1_0Scope(output.scope, context)
|
|
3151
|
+
: undefined,
|
|
3152
|
+
};
|
|
3153
|
+
};
|
|
3154
|
+
const deserializeAws_json1_0RecommendationPreferencesDetails = (output, context) => {
|
|
3155
|
+
return (output || [])
|
|
3156
|
+
.filter((e) => e != null)
|
|
3157
|
+
.map((entry) => {
|
|
3158
|
+
if (entry === null) {
|
|
3159
|
+
return null;
|
|
3160
|
+
}
|
|
3161
|
+
return deserializeAws_json1_0RecommendationPreferencesDetail(entry, context);
|
|
3162
|
+
});
|
|
3163
|
+
};
|
|
2572
3164
|
const deserializeAws_json1_0RecommendationSource = (output, context) => {
|
|
2573
3165
|
return {
|
|
2574
3166
|
recommendationSourceArn: smithy_client_1.expectString(output.recommendationSourceArn),
|
|
@@ -2598,7 +3190,13 @@ const deserializeAws_json1_0RecommendationSummaries = (output, context) => {
|
|
|
2598
3190
|
const deserializeAws_json1_0RecommendationSummary = (output, context) => {
|
|
2599
3191
|
return {
|
|
2600
3192
|
accountId: smithy_client_1.expectString(output.accountId),
|
|
3193
|
+
currentPerformanceRiskRatings: output.currentPerformanceRiskRatings !== undefined && output.currentPerformanceRiskRatings !== null
|
|
3194
|
+
? deserializeAws_json1_0CurrentPerformanceRiskRatings(output.currentPerformanceRiskRatings, context)
|
|
3195
|
+
: undefined,
|
|
2601
3196
|
recommendationResourceType: smithy_client_1.expectString(output.recommendationResourceType),
|
|
3197
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
3198
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
3199
|
+
: undefined,
|
|
2602
3200
|
summaries: output.summaries !== undefined && output.summaries !== null
|
|
2603
3201
|
? deserializeAws_json1_0Summaries(output.summaries, context)
|
|
2604
3202
|
: undefined,
|
|
@@ -2635,6 +3233,20 @@ const deserializeAws_json1_0S3Destination = (output, context) => {
|
|
|
2635
3233
|
metadataKey: smithy_client_1.expectString(output.metadataKey),
|
|
2636
3234
|
};
|
|
2637
3235
|
};
|
|
3236
|
+
const deserializeAws_json1_0SavingsOpportunity = (output, context) => {
|
|
3237
|
+
return {
|
|
3238
|
+
estimatedMonthlySavings: output.estimatedMonthlySavings !== undefined && output.estimatedMonthlySavings !== null
|
|
3239
|
+
? deserializeAws_json1_0EstimatedMonthlySavings(output.estimatedMonthlySavings, context)
|
|
3240
|
+
: undefined,
|
|
3241
|
+
savingsOpportunityPercentage: smithy_client_1.limitedParseDouble(output.savingsOpportunityPercentage),
|
|
3242
|
+
};
|
|
3243
|
+
};
|
|
3244
|
+
const deserializeAws_json1_0Scope = (output, context) => {
|
|
3245
|
+
return {
|
|
3246
|
+
name: smithy_client_1.expectString(output.name),
|
|
3247
|
+
value: smithy_client_1.expectString(output.value),
|
|
3248
|
+
};
|
|
3249
|
+
};
|
|
2638
3250
|
const deserializeAws_json1_0ServiceUnavailableException = (output, context) => {
|
|
2639
3251
|
return {
|
|
2640
3252
|
message: smithy_client_1.expectString(output.message),
|
|
@@ -2713,6 +3325,7 @@ const deserializeAws_json1_0VolumeRecommendation = (output, context) => {
|
|
|
2713
3325
|
currentConfiguration: output.currentConfiguration !== undefined && output.currentConfiguration !== null
|
|
2714
3326
|
? deserializeAws_json1_0VolumeConfiguration(output.currentConfiguration, context)
|
|
2715
3327
|
: undefined,
|
|
3328
|
+
currentPerformanceRisk: smithy_client_1.expectString(output.currentPerformanceRisk),
|
|
2716
3329
|
finding: smithy_client_1.expectString(output.finding),
|
|
2717
3330
|
lastRefreshTimestamp: output.lastRefreshTimestamp !== undefined && output.lastRefreshTimestamp !== null
|
|
2718
3331
|
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.lastRefreshTimestamp)))
|
|
@@ -2734,6 +3347,9 @@ const deserializeAws_json1_0VolumeRecommendationOption = (output, context) => {
|
|
|
2734
3347
|
: undefined,
|
|
2735
3348
|
performanceRisk: smithy_client_1.limitedParseDouble(output.performanceRisk),
|
|
2736
3349
|
rank: smithy_client_1.expectInt32(output.rank),
|
|
3350
|
+
savingsOpportunity: output.savingsOpportunity !== undefined && output.savingsOpportunity !== null
|
|
3351
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
3352
|
+
: undefined,
|
|
2737
3353
|
};
|
|
2738
3354
|
};
|
|
2739
3355
|
const deserializeAws_json1_0VolumeRecommendationOptions = (output, context) => {
|