@aws-sdk/client-compute-optimizer 3.236.0 → 3.237.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/README.md +2 -1
- package/dist-cjs/ComputeOptimizer.js +45 -0
- package/dist-cjs/commands/ExportECSServiceRecommendationsCommand.js +46 -0
- package/dist-cjs/commands/GetECSServiceRecommendationProjectedMetricsCommand.js +46 -0
- package/dist-cjs/commands/GetECSServiceRecommendationsCommand.js +46 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/index.js +1 -0
- package/dist-cjs/models/models_0.js +137 -3
- package/dist-cjs/pagination/DescribeRecommendationExportJobsPaginator.js +36 -0
- package/dist-cjs/pagination/GetEnrollmentStatusesForOrganizationPaginator.js +36 -0
- package/dist-cjs/pagination/GetLambdaFunctionRecommendationsPaginator.js +36 -0
- package/dist-cjs/pagination/GetRecommendationPreferencesPaginator.js +36 -0
- package/dist-cjs/pagination/GetRecommendationSummariesPaginator.js +36 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/index.js +9 -0
- package/dist-cjs/protocols/Aws_json1_0.js +491 -1
- package/dist-es/ComputeOptimizer.js +45 -0
- package/dist-es/commands/ExportECSServiceRecommendationsCommand.js +42 -0
- package/dist-es/commands/GetECSServiceRecommendationProjectedMetricsCommand.js +42 -0
- package/dist-es/commands/GetECSServiceRecommendationsCommand.js +42 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/index.js +1 -0
- package/dist-es/models/models_0.js +117 -0
- package/dist-es/pagination/DescribeRecommendationExportJobsPaginator.js +32 -0
- package/dist-es/pagination/GetEnrollmentStatusesForOrganizationPaginator.js +32 -0
- package/dist-es/pagination/GetLambdaFunctionRecommendationsPaginator.js +32 -0
- package/dist-es/pagination/GetRecommendationPreferencesPaginator.js +32 -0
- package/dist-es/pagination/GetRecommendationSummariesPaginator.js +32 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/index.js +6 -0
- package/dist-es/protocols/Aws_json1_0.js +484 -0
- package/dist-types/ComputeOptimizer.d.ts +76 -32
- package/dist-types/ComputeOptimizerClient.d.ts +7 -3
- package/dist-types/commands/DeleteRecommendationPreferencesCommand.d.ts +1 -1
- package/dist-types/commands/DescribeRecommendationExportJobsCommand.d.ts +1 -1
- package/dist-types/commands/ExportAutoScalingGroupRecommendationsCommand.d.ts +2 -2
- package/dist-types/commands/ExportEBSVolumeRecommendationsCommand.d.ts +2 -2
- package/dist-types/commands/ExportEC2InstanceRecommendationsCommand.d.ts +2 -2
- package/dist-types/commands/ExportECSServiceRecommendationsCommand.d.ts +44 -0
- package/dist-types/commands/ExportLambdaFunctionRecommendationsCommand.d.ts +2 -2
- package/dist-types/commands/GetAutoScalingGroupRecommendationsCommand.d.ts +1 -1
- package/dist-types/commands/GetEBSVolumeRecommendationsCommand.d.ts +1 -1
- package/dist-types/commands/GetEC2InstanceRecommendationsCommand.d.ts +1 -1
- package/dist-types/commands/GetEC2RecommendationProjectedMetricsCommand.d.ts +2 -2
- package/dist-types/commands/GetECSServiceRecommendationProjectedMetricsCommand.d.ts +39 -0
- package/dist-types/commands/GetECSServiceRecommendationsCommand.d.ts +46 -0
- package/dist-types/commands/GetEffectiveRecommendationPreferencesCommand.d.ts +1 -1
- package/dist-types/commands/GetEnrollmentStatusCommand.d.ts +1 -1
- package/dist-types/commands/GetEnrollmentStatusesForOrganizationCommand.d.ts +1 -1
- package/dist-types/commands/GetLambdaFunctionRecommendationsCommand.d.ts +1 -1
- package/dist-types/commands/GetRecommendationPreferencesCommand.d.ts +2 -2
- package/dist-types/commands/GetRecommendationSummariesCommand.d.ts +10 -6
- package/dist-types/commands/PutRecommendationPreferencesCommand.d.ts +1 -1
- package/dist-types/commands/UpdateEnrollmentStatusCommand.d.ts +3 -3
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1353 -519
- package/dist-types/pagination/DescribeRecommendationExportJobsPaginator.d.ts +4 -0
- package/dist-types/pagination/GetEnrollmentStatusesForOrganizationPaginator.d.ts +4 -0
- package/dist-types/pagination/GetLambdaFunctionRecommendationsPaginator.d.ts +4 -0
- package/dist-types/pagination/GetRecommendationPreferencesPaginator.d.ts +4 -0
- package/dist-types/pagination/GetRecommendationSummariesPaginator.d.ts +4 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/index.d.ts +6 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +9 -0
- package/dist-types/ts3.4/ComputeOptimizer.d.ts +57 -0
- package/dist-types/ts3.4/ComputeOptimizerClient.d.ts +18 -0
- package/dist-types/ts3.4/commands/ExportECSServiceRecommendationsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetECSServiceRecommendationProjectedMetricsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetECSServiceRecommendationsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +210 -0
- package/dist-types/ts3.4/pagination/DescribeRecommendationExportJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/GetEnrollmentStatusesForOrganizationPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/GetLambdaFunctionRecommendationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/GetRecommendationPreferencesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/GetRecommendationSummariesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +7 -0
- package/dist-types/ts3.4/pagination/index.d.ts +6 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +36 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateGetRecommendationSummaries = void 0;
|
|
4
|
+
const GetRecommendationSummariesCommand_1 = require("../commands/GetRecommendationSummariesCommand");
|
|
5
|
+
const ComputeOptimizer_1 = require("../ComputeOptimizer");
|
|
6
|
+
const ComputeOptimizerClient_1 = require("../ComputeOptimizerClient");
|
|
7
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.send(new GetRecommendationSummariesCommand_1.GetRecommendationSummariesCommand(input), ...args);
|
|
9
|
+
};
|
|
10
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
+
return await client.getRecommendationSummaries(input, ...args);
|
|
12
|
+
};
|
|
13
|
+
async function* paginateGetRecommendationSummaries(config, input, ...additionalArguments) {
|
|
14
|
+
let token = config.startingToken || undefined;
|
|
15
|
+
let hasNext = true;
|
|
16
|
+
let page;
|
|
17
|
+
while (hasNext) {
|
|
18
|
+
input.nextToken = token;
|
|
19
|
+
input["maxResults"] = config.pageSize;
|
|
20
|
+
if (config.client instanceof ComputeOptimizer_1.ComputeOptimizer) {
|
|
21
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else if (config.client instanceof ComputeOptimizerClient_1.ComputeOptimizerClient) {
|
|
24
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
throw new Error("Invalid client, expected ComputeOptimizer | ComputeOptimizerClient");
|
|
28
|
+
}
|
|
29
|
+
yield page;
|
|
30
|
+
const prevToken = token;
|
|
31
|
+
token = page.nextToken;
|
|
32
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
exports.paginateGetRecommendationSummaries = paginateGetRecommendationSummaries;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./DescribeRecommendationExportJobsPaginator"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./GetEnrollmentStatusesForOrganizationPaginator"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetLambdaFunctionRecommendationsPaginator"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./GetRecommendationPreferencesPaginator"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./GetRecommendationSummariesPaginator"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
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_0GetECSServiceRecommendationsCommand = exports.deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand = exports.deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = exports.deserializeAws_json1_0GetEC2InstanceRecommendationsCommand = exports.deserializeAws_json1_0GetEBSVolumeRecommendationsCommand = exports.deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = exports.deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = exports.deserializeAws_json1_0ExportECSServiceRecommendationsCommand = 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_0GetECSServiceRecommendationsCommand = exports.serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand = exports.serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = exports.serializeAws_json1_0GetEC2InstanceRecommendationsCommand = exports.serializeAws_json1_0GetEBSVolumeRecommendationsCommand = exports.serializeAws_json1_0GetAutoScalingGroupRecommendationsCommand = exports.serializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = exports.serializeAws_json1_0ExportECSServiceRecommendationsCommand = 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
6
|
const ComputeOptimizerServiceException_1 = require("../models/ComputeOptimizerServiceException");
|
|
@@ -55,6 +55,16 @@ const serializeAws_json1_0ExportEC2InstanceRecommendationsCommand = async (input
|
|
|
55
55
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
56
|
};
|
|
57
57
|
exports.serializeAws_json1_0ExportEC2InstanceRecommendationsCommand = serializeAws_json1_0ExportEC2InstanceRecommendationsCommand;
|
|
58
|
+
const serializeAws_json1_0ExportECSServiceRecommendationsCommand = async (input, context) => {
|
|
59
|
+
const headers = {
|
|
60
|
+
"content-type": "application/x-amz-json-1.0",
|
|
61
|
+
"x-amz-target": "ComputeOptimizerService.ExportECSServiceRecommendations",
|
|
62
|
+
};
|
|
63
|
+
let body;
|
|
64
|
+
body = JSON.stringify(serializeAws_json1_0ExportECSServiceRecommendationsRequest(input, context));
|
|
65
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
|
+
};
|
|
67
|
+
exports.serializeAws_json1_0ExportECSServiceRecommendationsCommand = serializeAws_json1_0ExportECSServiceRecommendationsCommand;
|
|
58
68
|
const serializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = async (input, context) => {
|
|
59
69
|
const headers = {
|
|
60
70
|
"content-type": "application/x-amz-json-1.0",
|
|
@@ -105,6 +115,26 @@ const serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = async (i
|
|
|
105
115
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
106
116
|
};
|
|
107
117
|
exports.serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand = serializeAws_json1_0GetEC2RecommendationProjectedMetricsCommand;
|
|
118
|
+
const serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand = async (input, context) => {
|
|
119
|
+
const headers = {
|
|
120
|
+
"content-type": "application/x-amz-json-1.0",
|
|
121
|
+
"x-amz-target": "ComputeOptimizerService.GetECSServiceRecommendationProjectedMetrics",
|
|
122
|
+
};
|
|
123
|
+
let body;
|
|
124
|
+
body = JSON.stringify(serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsRequest(input, context));
|
|
125
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
|
+
};
|
|
127
|
+
exports.serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand = serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand;
|
|
128
|
+
const serializeAws_json1_0GetECSServiceRecommendationsCommand = async (input, context) => {
|
|
129
|
+
const headers = {
|
|
130
|
+
"content-type": "application/x-amz-json-1.0",
|
|
131
|
+
"x-amz-target": "ComputeOptimizerService.GetECSServiceRecommendations",
|
|
132
|
+
};
|
|
133
|
+
let body;
|
|
134
|
+
body = JSON.stringify(serializeAws_json1_0GetECSServiceRecommendationsRequest(input, context));
|
|
135
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
136
|
+
};
|
|
137
|
+
exports.serializeAws_json1_0GetECSServiceRecommendationsCommand = serializeAws_json1_0GetECSServiceRecommendationsCommand;
|
|
108
138
|
const serializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = async (input, context) => {
|
|
109
139
|
const headers = {
|
|
110
140
|
"content-type": "application/x-amz-json-1.0",
|
|
@@ -460,6 +490,61 @@ const deserializeAws_json1_0ExportEC2InstanceRecommendationsCommandError = async
|
|
|
460
490
|
});
|
|
461
491
|
}
|
|
462
492
|
};
|
|
493
|
+
const deserializeAws_json1_0ExportECSServiceRecommendationsCommand = async (output, context) => {
|
|
494
|
+
if (output.statusCode >= 300) {
|
|
495
|
+
return deserializeAws_json1_0ExportECSServiceRecommendationsCommandError(output, context);
|
|
496
|
+
}
|
|
497
|
+
const data = await parseBody(output.body, context);
|
|
498
|
+
let contents = {};
|
|
499
|
+
contents = deserializeAws_json1_0ExportECSServiceRecommendationsResponse(data, context);
|
|
500
|
+
const response = {
|
|
501
|
+
$metadata: deserializeMetadata(output),
|
|
502
|
+
...contents,
|
|
503
|
+
};
|
|
504
|
+
return Promise.resolve(response);
|
|
505
|
+
};
|
|
506
|
+
exports.deserializeAws_json1_0ExportECSServiceRecommendationsCommand = deserializeAws_json1_0ExportECSServiceRecommendationsCommand;
|
|
507
|
+
const deserializeAws_json1_0ExportECSServiceRecommendationsCommandError = async (output, context) => {
|
|
508
|
+
const parsedOutput = {
|
|
509
|
+
...output,
|
|
510
|
+
body: await parseErrorBody(output.body, context),
|
|
511
|
+
};
|
|
512
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
513
|
+
switch (errorCode) {
|
|
514
|
+
case "AccessDeniedException":
|
|
515
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException":
|
|
516
|
+
throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
|
|
517
|
+
case "InternalServerException":
|
|
518
|
+
case "com.amazonaws.computeoptimizer#InternalServerException":
|
|
519
|
+
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
520
|
+
case "InvalidParameterValueException":
|
|
521
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
|
|
522
|
+
throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
523
|
+
case "LimitExceededException":
|
|
524
|
+
case "com.amazonaws.computeoptimizer#LimitExceededException":
|
|
525
|
+
throw await deserializeAws_json1_0LimitExceededExceptionResponse(parsedOutput, context);
|
|
526
|
+
case "MissingAuthenticationToken":
|
|
527
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
|
|
528
|
+
throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
|
|
529
|
+
case "OptInRequiredException":
|
|
530
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException":
|
|
531
|
+
throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
|
|
532
|
+
case "ServiceUnavailableException":
|
|
533
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
|
|
534
|
+
throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
535
|
+
case "ThrottlingException":
|
|
536
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException":
|
|
537
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
538
|
+
default:
|
|
539
|
+
const parsedBody = parsedOutput.body;
|
|
540
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
541
|
+
output,
|
|
542
|
+
parsedBody,
|
|
543
|
+
exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
|
|
544
|
+
errorCode,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
};
|
|
463
548
|
const deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommand = async (output, context) => {
|
|
464
549
|
if (output.statusCode >= 300) {
|
|
465
550
|
return deserializeAws_json1_0ExportLambdaFunctionRecommendationsCommandError(output, context);
|
|
@@ -735,6 +820,116 @@ const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsCommandError = a
|
|
|
735
820
|
});
|
|
736
821
|
}
|
|
737
822
|
};
|
|
823
|
+
const deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand = async (output, context) => {
|
|
824
|
+
if (output.statusCode >= 300) {
|
|
825
|
+
return deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommandError(output, context);
|
|
826
|
+
}
|
|
827
|
+
const data = await parseBody(output.body, context);
|
|
828
|
+
let contents = {};
|
|
829
|
+
contents = deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsResponse(data, context);
|
|
830
|
+
const response = {
|
|
831
|
+
$metadata: deserializeMetadata(output),
|
|
832
|
+
...contents,
|
|
833
|
+
};
|
|
834
|
+
return Promise.resolve(response);
|
|
835
|
+
};
|
|
836
|
+
exports.deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand = deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand;
|
|
837
|
+
const deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommandError = async (output, context) => {
|
|
838
|
+
const parsedOutput = {
|
|
839
|
+
...output,
|
|
840
|
+
body: await parseErrorBody(output.body, context),
|
|
841
|
+
};
|
|
842
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
843
|
+
switch (errorCode) {
|
|
844
|
+
case "AccessDeniedException":
|
|
845
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException":
|
|
846
|
+
throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
|
|
847
|
+
case "InternalServerException":
|
|
848
|
+
case "com.amazonaws.computeoptimizer#InternalServerException":
|
|
849
|
+
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
850
|
+
case "InvalidParameterValueException":
|
|
851
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
|
|
852
|
+
throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
853
|
+
case "MissingAuthenticationToken":
|
|
854
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
|
|
855
|
+
throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
|
|
856
|
+
case "OptInRequiredException":
|
|
857
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException":
|
|
858
|
+
throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
|
|
859
|
+
case "ResourceNotFoundException":
|
|
860
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
|
|
861
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
862
|
+
case "ServiceUnavailableException":
|
|
863
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
|
|
864
|
+
throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
865
|
+
case "ThrottlingException":
|
|
866
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException":
|
|
867
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
868
|
+
default:
|
|
869
|
+
const parsedBody = parsedOutput.body;
|
|
870
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
871
|
+
output,
|
|
872
|
+
parsedBody,
|
|
873
|
+
exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
|
|
874
|
+
errorCode,
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
const deserializeAws_json1_0GetECSServiceRecommendationsCommand = async (output, context) => {
|
|
879
|
+
if (output.statusCode >= 300) {
|
|
880
|
+
return deserializeAws_json1_0GetECSServiceRecommendationsCommandError(output, context);
|
|
881
|
+
}
|
|
882
|
+
const data = await parseBody(output.body, context);
|
|
883
|
+
let contents = {};
|
|
884
|
+
contents = deserializeAws_json1_0GetECSServiceRecommendationsResponse(data, context);
|
|
885
|
+
const response = {
|
|
886
|
+
$metadata: deserializeMetadata(output),
|
|
887
|
+
...contents,
|
|
888
|
+
};
|
|
889
|
+
return Promise.resolve(response);
|
|
890
|
+
};
|
|
891
|
+
exports.deserializeAws_json1_0GetECSServiceRecommendationsCommand = deserializeAws_json1_0GetECSServiceRecommendationsCommand;
|
|
892
|
+
const deserializeAws_json1_0GetECSServiceRecommendationsCommandError = async (output, context) => {
|
|
893
|
+
const parsedOutput = {
|
|
894
|
+
...output,
|
|
895
|
+
body: await parseErrorBody(output.body, context),
|
|
896
|
+
};
|
|
897
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
898
|
+
switch (errorCode) {
|
|
899
|
+
case "AccessDeniedException":
|
|
900
|
+
case "com.amazonaws.computeoptimizer#AccessDeniedException":
|
|
901
|
+
throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
|
|
902
|
+
case "InternalServerException":
|
|
903
|
+
case "com.amazonaws.computeoptimizer#InternalServerException":
|
|
904
|
+
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
905
|
+
case "InvalidParameterValueException":
|
|
906
|
+
case "com.amazonaws.computeoptimizer#InvalidParameterValueException":
|
|
907
|
+
throw await deserializeAws_json1_0InvalidParameterValueExceptionResponse(parsedOutput, context);
|
|
908
|
+
case "MissingAuthenticationToken":
|
|
909
|
+
case "com.amazonaws.computeoptimizer#MissingAuthenticationToken":
|
|
910
|
+
throw await deserializeAws_json1_0MissingAuthenticationTokenResponse(parsedOutput, context);
|
|
911
|
+
case "OptInRequiredException":
|
|
912
|
+
case "com.amazonaws.computeoptimizer#OptInRequiredException":
|
|
913
|
+
throw await deserializeAws_json1_0OptInRequiredExceptionResponse(parsedOutput, context);
|
|
914
|
+
case "ResourceNotFoundException":
|
|
915
|
+
case "com.amazonaws.computeoptimizer#ResourceNotFoundException":
|
|
916
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
917
|
+
case "ServiceUnavailableException":
|
|
918
|
+
case "com.amazonaws.computeoptimizer#ServiceUnavailableException":
|
|
919
|
+
throw await deserializeAws_json1_0ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
920
|
+
case "ThrottlingException":
|
|
921
|
+
case "com.amazonaws.computeoptimizer#ThrottlingException":
|
|
922
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
923
|
+
default:
|
|
924
|
+
const parsedBody = parsedOutput.body;
|
|
925
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
926
|
+
output,
|
|
927
|
+
parsedBody,
|
|
928
|
+
exceptionCtor: ComputeOptimizerServiceException_1.ComputeOptimizerServiceException,
|
|
929
|
+
errorCode,
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
};
|
|
738
933
|
const deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommand = async (output, context) => {
|
|
739
934
|
if (output.statusCode >= 300) {
|
|
740
935
|
return deserializeAws_json1_0GetEffectiveRecommendationPreferencesCommandError(output, context);
|
|
@@ -1286,6 +1481,19 @@ const serializeAws_json1_0EBSFilters = (input, context) => {
|
|
|
1286
1481
|
return serializeAws_json1_0EBSFilter(entry, context);
|
|
1287
1482
|
});
|
|
1288
1483
|
};
|
|
1484
|
+
const serializeAws_json1_0ECSServiceRecommendationFilter = (input, context) => {
|
|
1485
|
+
return {
|
|
1486
|
+
...(input.name != null && { name: input.name }),
|
|
1487
|
+
...(input.values != null && { values: serializeAws_json1_0FilterValues(input.values, context) }),
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
1490
|
+
const serializeAws_json1_0ECSServiceRecommendationFilters = (input, context) => {
|
|
1491
|
+
return input
|
|
1492
|
+
.filter((e) => e != null)
|
|
1493
|
+
.map((entry) => {
|
|
1494
|
+
return serializeAws_json1_0ECSServiceRecommendationFilter(entry, context);
|
|
1495
|
+
});
|
|
1496
|
+
};
|
|
1289
1497
|
const serializeAws_json1_0EnrollmentFilter = (input, context) => {
|
|
1290
1498
|
return {
|
|
1291
1499
|
...(input.name != null && { name: input.name }),
|
|
@@ -1306,6 +1514,13 @@ const serializeAws_json1_0ExportableAutoScalingGroupFields = (input, context) =>
|
|
|
1306
1514
|
return entry;
|
|
1307
1515
|
});
|
|
1308
1516
|
};
|
|
1517
|
+
const serializeAws_json1_0ExportableECSServiceFields = (input, context) => {
|
|
1518
|
+
return input
|
|
1519
|
+
.filter((e) => e != null)
|
|
1520
|
+
.map((entry) => {
|
|
1521
|
+
return entry;
|
|
1522
|
+
});
|
|
1523
|
+
};
|
|
1309
1524
|
const serializeAws_json1_0ExportableInstanceFields = (input, context) => {
|
|
1310
1525
|
return input
|
|
1311
1526
|
.filter((e) => e != null)
|
|
@@ -1375,6 +1590,22 @@ const serializeAws_json1_0ExportEC2InstanceRecommendationsRequest = (input, cont
|
|
|
1375
1590
|
}),
|
|
1376
1591
|
};
|
|
1377
1592
|
};
|
|
1593
|
+
const serializeAws_json1_0ExportECSServiceRecommendationsRequest = (input, context) => {
|
|
1594
|
+
return {
|
|
1595
|
+
...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
|
|
1596
|
+
...(input.fieldsToExport != null && {
|
|
1597
|
+
fieldsToExport: serializeAws_json1_0ExportableECSServiceFields(input.fieldsToExport, context),
|
|
1598
|
+
}),
|
|
1599
|
+
...(input.fileFormat != null && { fileFormat: input.fileFormat }),
|
|
1600
|
+
...(input.filters != null && {
|
|
1601
|
+
filters: serializeAws_json1_0ECSServiceRecommendationFilters(input.filters, context),
|
|
1602
|
+
}),
|
|
1603
|
+
...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
|
|
1604
|
+
...(input.s3DestinationConfig != null && {
|
|
1605
|
+
s3DestinationConfig: serializeAws_json1_0S3DestinationConfig(input.s3DestinationConfig, context),
|
|
1606
|
+
}),
|
|
1607
|
+
};
|
|
1608
|
+
};
|
|
1378
1609
|
const serializeAws_json1_0ExportLambdaFunctionRecommendationsRequest = (input, context) => {
|
|
1379
1610
|
return {
|
|
1380
1611
|
...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
|
|
@@ -1470,6 +1701,26 @@ const serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest = (input,
|
|
|
1470
1701
|
...(input.stat != null && { stat: input.stat }),
|
|
1471
1702
|
};
|
|
1472
1703
|
};
|
|
1704
|
+
const serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsRequest = (input, context) => {
|
|
1705
|
+
return {
|
|
1706
|
+
...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }),
|
|
1707
|
+
...(input.period != null && { period: input.period }),
|
|
1708
|
+
...(input.serviceArn != null && { serviceArn: input.serviceArn }),
|
|
1709
|
+
...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }),
|
|
1710
|
+
...(input.stat != null && { stat: input.stat }),
|
|
1711
|
+
};
|
|
1712
|
+
};
|
|
1713
|
+
const serializeAws_json1_0GetECSServiceRecommendationsRequest = (input, context) => {
|
|
1714
|
+
return {
|
|
1715
|
+
...(input.accountIds != null && { accountIds: serializeAws_json1_0AccountIds(input.accountIds, context) }),
|
|
1716
|
+
...(input.filters != null && {
|
|
1717
|
+
filters: serializeAws_json1_0ECSServiceRecommendationFilters(input.filters, context),
|
|
1718
|
+
}),
|
|
1719
|
+
...(input.maxResults != null && { maxResults: input.maxResults }),
|
|
1720
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
1721
|
+
...(input.serviceArns != null && { serviceArns: serializeAws_json1_0ServiceArns(input.serviceArns, context) }),
|
|
1722
|
+
};
|
|
1723
|
+
};
|
|
1473
1724
|
const serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest = (input, context) => {
|
|
1474
1725
|
return {
|
|
1475
1726
|
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
@@ -1590,6 +1841,13 @@ const serializeAws_json1_0Scope = (input, context) => {
|
|
|
1590
1841
|
...(input.value != null && { value: input.value }),
|
|
1591
1842
|
};
|
|
1592
1843
|
};
|
|
1844
|
+
const serializeAws_json1_0ServiceArns = (input, context) => {
|
|
1845
|
+
return input
|
|
1846
|
+
.filter((e) => e != null)
|
|
1847
|
+
.map((entry) => {
|
|
1848
|
+
return entry;
|
|
1849
|
+
});
|
|
1850
|
+
};
|
|
1593
1851
|
const serializeAws_json1_0UpdateEnrollmentStatusRequest = (input, context) => {
|
|
1594
1852
|
return {
|
|
1595
1853
|
...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }),
|
|
@@ -1703,6 +1961,46 @@ const deserializeAws_json1_0AutoScalingGroupRecommendations = (output, context)
|
|
|
1703
1961
|
});
|
|
1704
1962
|
return retVal;
|
|
1705
1963
|
};
|
|
1964
|
+
const deserializeAws_json1_0ContainerConfiguration = (output, context) => {
|
|
1965
|
+
return {
|
|
1966
|
+
containerName: (0, smithy_client_1.expectString)(output.containerName),
|
|
1967
|
+
cpu: (0, smithy_client_1.expectInt32)(output.cpu),
|
|
1968
|
+
memorySizeConfiguration: output.memorySizeConfiguration != null
|
|
1969
|
+
? deserializeAws_json1_0MemorySizeConfiguration(output.memorySizeConfiguration, context)
|
|
1970
|
+
: undefined,
|
|
1971
|
+
};
|
|
1972
|
+
};
|
|
1973
|
+
const deserializeAws_json1_0ContainerConfigurations = (output, context) => {
|
|
1974
|
+
const retVal = (output || [])
|
|
1975
|
+
.filter((e) => e != null)
|
|
1976
|
+
.map((entry) => {
|
|
1977
|
+
if (entry === null) {
|
|
1978
|
+
return null;
|
|
1979
|
+
}
|
|
1980
|
+
return deserializeAws_json1_0ContainerConfiguration(entry, context);
|
|
1981
|
+
});
|
|
1982
|
+
return retVal;
|
|
1983
|
+
};
|
|
1984
|
+
const deserializeAws_json1_0ContainerRecommendation = (output, context) => {
|
|
1985
|
+
return {
|
|
1986
|
+
containerName: (0, smithy_client_1.expectString)(output.containerName),
|
|
1987
|
+
cpu: (0, smithy_client_1.expectInt32)(output.cpu),
|
|
1988
|
+
memorySizeConfiguration: output.memorySizeConfiguration != null
|
|
1989
|
+
? deserializeAws_json1_0MemorySizeConfiguration(output.memorySizeConfiguration, context)
|
|
1990
|
+
: undefined,
|
|
1991
|
+
};
|
|
1992
|
+
};
|
|
1993
|
+
const deserializeAws_json1_0ContainerRecommendations = (output, context) => {
|
|
1994
|
+
const retVal = (output || [])
|
|
1995
|
+
.filter((e) => e != null)
|
|
1996
|
+
.map((entry) => {
|
|
1997
|
+
if (entry === null) {
|
|
1998
|
+
return null;
|
|
1999
|
+
}
|
|
2000
|
+
return deserializeAws_json1_0ContainerRecommendation(entry, context);
|
|
2001
|
+
});
|
|
2002
|
+
return retVal;
|
|
2003
|
+
};
|
|
1706
2004
|
const deserializeAws_json1_0CpuVendorArchitectures = (output, context) => {
|
|
1707
2005
|
const retVal = (output || [])
|
|
1708
2006
|
.filter((e) => e != null)
|
|
@@ -1751,6 +2049,159 @@ const deserializeAws_json1_0EBSUtilizationMetrics = (output, context) => {
|
|
|
1751
2049
|
});
|
|
1752
2050
|
return retVal;
|
|
1753
2051
|
};
|
|
2052
|
+
const deserializeAws_json1_0ECSServiceProjectedMetric = (output, context) => {
|
|
2053
|
+
return {
|
|
2054
|
+
lowerBoundValues: output.lowerBoundValues != null
|
|
2055
|
+
? deserializeAws_json1_0MetricValues(output.lowerBoundValues, context)
|
|
2056
|
+
: undefined,
|
|
2057
|
+
name: (0, smithy_client_1.expectString)(output.name),
|
|
2058
|
+
timestamps: output.timestamps != null ? deserializeAws_json1_0Timestamps(output.timestamps, context) : undefined,
|
|
2059
|
+
upperBoundValues: output.upperBoundValues != null
|
|
2060
|
+
? deserializeAws_json1_0MetricValues(output.upperBoundValues, context)
|
|
2061
|
+
: undefined,
|
|
2062
|
+
};
|
|
2063
|
+
};
|
|
2064
|
+
const deserializeAws_json1_0ECSServiceProjectedMetrics = (output, context) => {
|
|
2065
|
+
const retVal = (output || [])
|
|
2066
|
+
.filter((e) => e != null)
|
|
2067
|
+
.map((entry) => {
|
|
2068
|
+
if (entry === null) {
|
|
2069
|
+
return null;
|
|
2070
|
+
}
|
|
2071
|
+
return deserializeAws_json1_0ECSServiceProjectedMetric(entry, context);
|
|
2072
|
+
});
|
|
2073
|
+
return retVal;
|
|
2074
|
+
};
|
|
2075
|
+
const deserializeAws_json1_0ECSServiceProjectedUtilizationMetric = (output, context) => {
|
|
2076
|
+
return {
|
|
2077
|
+
lowerBoundValue: (0, smithy_client_1.limitedParseDouble)(output.lowerBoundValue),
|
|
2078
|
+
name: (0, smithy_client_1.expectString)(output.name),
|
|
2079
|
+
statistic: (0, smithy_client_1.expectString)(output.statistic),
|
|
2080
|
+
upperBoundValue: (0, smithy_client_1.limitedParseDouble)(output.upperBoundValue),
|
|
2081
|
+
};
|
|
2082
|
+
};
|
|
2083
|
+
const deserializeAws_json1_0ECSServiceProjectedUtilizationMetrics = (output, context) => {
|
|
2084
|
+
const retVal = (output || [])
|
|
2085
|
+
.filter((e) => e != null)
|
|
2086
|
+
.map((entry) => {
|
|
2087
|
+
if (entry === null) {
|
|
2088
|
+
return null;
|
|
2089
|
+
}
|
|
2090
|
+
return deserializeAws_json1_0ECSServiceProjectedUtilizationMetric(entry, context);
|
|
2091
|
+
});
|
|
2092
|
+
return retVal;
|
|
2093
|
+
};
|
|
2094
|
+
const deserializeAws_json1_0ECSServiceRecommendation = (output, context) => {
|
|
2095
|
+
return {
|
|
2096
|
+
accountId: (0, smithy_client_1.expectString)(output.accountId),
|
|
2097
|
+
currentPerformanceRisk: (0, smithy_client_1.expectString)(output.currentPerformanceRisk),
|
|
2098
|
+
currentServiceConfiguration: output.currentServiceConfiguration != null
|
|
2099
|
+
? deserializeAws_json1_0ServiceConfiguration(output.currentServiceConfiguration, context)
|
|
2100
|
+
: undefined,
|
|
2101
|
+
finding: (0, smithy_client_1.expectString)(output.finding),
|
|
2102
|
+
findingReasonCodes: output.findingReasonCodes != null
|
|
2103
|
+
? deserializeAws_json1_0ECSServiceRecommendationFindingReasonCodes(output.findingReasonCodes, context)
|
|
2104
|
+
: undefined,
|
|
2105
|
+
lastRefreshTimestamp: output.lastRefreshTimestamp != null
|
|
2106
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastRefreshTimestamp)))
|
|
2107
|
+
: undefined,
|
|
2108
|
+
launchType: (0, smithy_client_1.expectString)(output.launchType),
|
|
2109
|
+
lookbackPeriodInDays: (0, smithy_client_1.limitedParseDouble)(output.lookbackPeriodInDays),
|
|
2110
|
+
serviceArn: (0, smithy_client_1.expectString)(output.serviceArn),
|
|
2111
|
+
serviceRecommendationOptions: output.serviceRecommendationOptions != null
|
|
2112
|
+
? deserializeAws_json1_0ECSServiceRecommendationOptions(output.serviceRecommendationOptions, context)
|
|
2113
|
+
: undefined,
|
|
2114
|
+
utilizationMetrics: output.utilizationMetrics != null
|
|
2115
|
+
? deserializeAws_json1_0ECSServiceUtilizationMetrics(output.utilizationMetrics, context)
|
|
2116
|
+
: undefined,
|
|
2117
|
+
};
|
|
2118
|
+
};
|
|
2119
|
+
const deserializeAws_json1_0ECSServiceRecommendationFindingReasonCodes = (output, context) => {
|
|
2120
|
+
const retVal = (output || [])
|
|
2121
|
+
.filter((e) => e != null)
|
|
2122
|
+
.map((entry) => {
|
|
2123
|
+
if (entry === null) {
|
|
2124
|
+
return null;
|
|
2125
|
+
}
|
|
2126
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
2127
|
+
});
|
|
2128
|
+
return retVal;
|
|
2129
|
+
};
|
|
2130
|
+
const deserializeAws_json1_0ECSServiceRecommendationOption = (output, context) => {
|
|
2131
|
+
return {
|
|
2132
|
+
containerRecommendations: output.containerRecommendations != null
|
|
2133
|
+
? deserializeAws_json1_0ContainerRecommendations(output.containerRecommendations, context)
|
|
2134
|
+
: undefined,
|
|
2135
|
+
cpu: (0, smithy_client_1.expectInt32)(output.cpu),
|
|
2136
|
+
memory: (0, smithy_client_1.expectInt32)(output.memory),
|
|
2137
|
+
projectedUtilizationMetrics: output.projectedUtilizationMetrics != null
|
|
2138
|
+
? deserializeAws_json1_0ECSServiceProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context)
|
|
2139
|
+
: undefined,
|
|
2140
|
+
savingsOpportunity: output.savingsOpportunity != null
|
|
2141
|
+
? deserializeAws_json1_0SavingsOpportunity(output.savingsOpportunity, context)
|
|
2142
|
+
: undefined,
|
|
2143
|
+
};
|
|
2144
|
+
};
|
|
2145
|
+
const deserializeAws_json1_0ECSServiceRecommendationOptions = (output, context) => {
|
|
2146
|
+
const retVal = (output || [])
|
|
2147
|
+
.filter((e) => e != null)
|
|
2148
|
+
.map((entry) => {
|
|
2149
|
+
if (entry === null) {
|
|
2150
|
+
return null;
|
|
2151
|
+
}
|
|
2152
|
+
return deserializeAws_json1_0ECSServiceRecommendationOption(entry, context);
|
|
2153
|
+
});
|
|
2154
|
+
return retVal;
|
|
2155
|
+
};
|
|
2156
|
+
const deserializeAws_json1_0ECSServiceRecommendations = (output, context) => {
|
|
2157
|
+
const retVal = (output || [])
|
|
2158
|
+
.filter((e) => e != null)
|
|
2159
|
+
.map((entry) => {
|
|
2160
|
+
if (entry === null) {
|
|
2161
|
+
return null;
|
|
2162
|
+
}
|
|
2163
|
+
return deserializeAws_json1_0ECSServiceRecommendation(entry, context);
|
|
2164
|
+
});
|
|
2165
|
+
return retVal;
|
|
2166
|
+
};
|
|
2167
|
+
const deserializeAws_json1_0ECSServiceRecommendedOptionProjectedMetric = (output, context) => {
|
|
2168
|
+
return {
|
|
2169
|
+
projectedMetrics: output.projectedMetrics != null
|
|
2170
|
+
? deserializeAws_json1_0ECSServiceProjectedMetrics(output.projectedMetrics, context)
|
|
2171
|
+
: undefined,
|
|
2172
|
+
recommendedCpuUnits: (0, smithy_client_1.expectInt32)(output.recommendedCpuUnits),
|
|
2173
|
+
recommendedMemorySize: (0, smithy_client_1.expectInt32)(output.recommendedMemorySize),
|
|
2174
|
+
};
|
|
2175
|
+
};
|
|
2176
|
+
const deserializeAws_json1_0ECSServiceRecommendedOptionProjectedMetrics = (output, context) => {
|
|
2177
|
+
const retVal = (output || [])
|
|
2178
|
+
.filter((e) => e != null)
|
|
2179
|
+
.map((entry) => {
|
|
2180
|
+
if (entry === null) {
|
|
2181
|
+
return null;
|
|
2182
|
+
}
|
|
2183
|
+
return deserializeAws_json1_0ECSServiceRecommendedOptionProjectedMetric(entry, context);
|
|
2184
|
+
});
|
|
2185
|
+
return retVal;
|
|
2186
|
+
};
|
|
2187
|
+
const deserializeAws_json1_0ECSServiceUtilizationMetric = (output, context) => {
|
|
2188
|
+
return {
|
|
2189
|
+
name: (0, smithy_client_1.expectString)(output.name),
|
|
2190
|
+
statistic: (0, smithy_client_1.expectString)(output.statistic),
|
|
2191
|
+
value: (0, smithy_client_1.limitedParseDouble)(output.value),
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
const deserializeAws_json1_0ECSServiceUtilizationMetrics = (output, context) => {
|
|
2195
|
+
const retVal = (output || [])
|
|
2196
|
+
.filter((e) => e != null)
|
|
2197
|
+
.map((entry) => {
|
|
2198
|
+
if (entry === null) {
|
|
2199
|
+
return null;
|
|
2200
|
+
}
|
|
2201
|
+
return deserializeAws_json1_0ECSServiceUtilizationMetric(entry, context);
|
|
2202
|
+
});
|
|
2203
|
+
return retVal;
|
|
2204
|
+
};
|
|
1754
2205
|
const deserializeAws_json1_0EffectiveRecommendationPreferences = (output, context) => {
|
|
1755
2206
|
return {
|
|
1756
2207
|
cpuVendorArchitectures: output.cpuVendorArchitectures != null
|
|
@@ -1792,6 +2243,12 @@ const deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse = (output,
|
|
|
1792
2243
|
s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
|
|
1793
2244
|
};
|
|
1794
2245
|
};
|
|
2246
|
+
const deserializeAws_json1_0ExportECSServiceRecommendationsResponse = (output, context) => {
|
|
2247
|
+
return {
|
|
2248
|
+
jobId: (0, smithy_client_1.expectString)(output.jobId),
|
|
2249
|
+
s3Destination: output.s3Destination != null ? deserializeAws_json1_0S3Destination(output.s3Destination, context) : undefined,
|
|
2250
|
+
};
|
|
2251
|
+
};
|
|
1795
2252
|
const deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse = (output, context) => {
|
|
1796
2253
|
return {
|
|
1797
2254
|
jobId: (0, smithy_client_1.expectString)(output.jobId),
|
|
@@ -1837,6 +2294,22 @@ const deserializeAws_json1_0GetEC2RecommendationProjectedMetricsResponse = (outp
|
|
|
1837
2294
|
: undefined,
|
|
1838
2295
|
};
|
|
1839
2296
|
};
|
|
2297
|
+
const deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsResponse = (output, context) => {
|
|
2298
|
+
return {
|
|
2299
|
+
recommendedOptionProjectedMetrics: output.recommendedOptionProjectedMetrics != null
|
|
2300
|
+
? deserializeAws_json1_0ECSServiceRecommendedOptionProjectedMetrics(output.recommendedOptionProjectedMetrics, context)
|
|
2301
|
+
: undefined,
|
|
2302
|
+
};
|
|
2303
|
+
};
|
|
2304
|
+
const deserializeAws_json1_0GetECSServiceRecommendationsResponse = (output, context) => {
|
|
2305
|
+
return {
|
|
2306
|
+
ecsServiceRecommendations: output.ecsServiceRecommendations != null
|
|
2307
|
+
? deserializeAws_json1_0ECSServiceRecommendations(output.ecsServiceRecommendations, context)
|
|
2308
|
+
: undefined,
|
|
2309
|
+
errors: output.errors != null ? deserializeAws_json1_0GetRecommendationErrors(output.errors, context) : undefined,
|
|
2310
|
+
nextToken: (0, smithy_client_1.expectString)(output.nextToken),
|
|
2311
|
+
};
|
|
2312
|
+
};
|
|
1840
2313
|
const deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse = (output, context) => {
|
|
1841
2314
|
return {
|
|
1842
2315
|
enhancedInfrastructureMetrics: (0, smithy_client_1.expectString)(output.enhancedInfrastructureMetrics),
|
|
@@ -2108,6 +2581,12 @@ const deserializeAws_json1_0LimitExceededException = (output, context) => {
|
|
|
2108
2581
|
message: (0, smithy_client_1.expectString)(output.message),
|
|
2109
2582
|
};
|
|
2110
2583
|
};
|
|
2584
|
+
const deserializeAws_json1_0MemorySizeConfiguration = (output, context) => {
|
|
2585
|
+
return {
|
|
2586
|
+
memory: (0, smithy_client_1.expectInt32)(output.memory),
|
|
2587
|
+
memoryReservation: (0, smithy_client_1.expectInt32)(output.memoryReservation),
|
|
2588
|
+
};
|
|
2589
|
+
};
|
|
2111
2590
|
const deserializeAws_json1_0MetricValues = (output, context) => {
|
|
2112
2591
|
const retVal = (output || [])
|
|
2113
2592
|
.filter((e) => e != null)
|
|
@@ -2335,6 +2814,17 @@ const deserializeAws_json1_0Scope = (output, context) => {
|
|
|
2335
2814
|
value: (0, smithy_client_1.expectString)(output.value),
|
|
2336
2815
|
};
|
|
2337
2816
|
};
|
|
2817
|
+
const deserializeAws_json1_0ServiceConfiguration = (output, context) => {
|
|
2818
|
+
return {
|
|
2819
|
+
autoScalingConfiguration: (0, smithy_client_1.expectString)(output.autoScalingConfiguration),
|
|
2820
|
+
containerConfigurations: output.containerConfigurations != null
|
|
2821
|
+
? deserializeAws_json1_0ContainerConfigurations(output.containerConfigurations, context)
|
|
2822
|
+
: undefined,
|
|
2823
|
+
cpu: (0, smithy_client_1.expectInt32)(output.cpu),
|
|
2824
|
+
memory: (0, smithy_client_1.expectInt32)(output.memory),
|
|
2825
|
+
taskDefinitionArn: (0, smithy_client_1.expectString)(output.taskDefinitionArn),
|
|
2826
|
+
};
|
|
2827
|
+
};
|
|
2338
2828
|
const deserializeAws_json1_0ServiceUnavailableException = (output, context) => {
|
|
2339
2829
|
return {
|
|
2340
2830
|
message: (0, smithy_client_1.expectString)(output.message),
|