@aws-sdk/client-compute-optimizer 3.236.0 → 3.238.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 +5 -4
|
@@ -3,11 +3,14 @@ import { DescribeRecommendationExportJobsCommand, } from "./commands/DescribeRec
|
|
|
3
3
|
import { ExportAutoScalingGroupRecommendationsCommand, } from "./commands/ExportAutoScalingGroupRecommendationsCommand";
|
|
4
4
|
import { ExportEBSVolumeRecommendationsCommand, } from "./commands/ExportEBSVolumeRecommendationsCommand";
|
|
5
5
|
import { ExportEC2InstanceRecommendationsCommand, } from "./commands/ExportEC2InstanceRecommendationsCommand";
|
|
6
|
+
import { ExportECSServiceRecommendationsCommand, } from "./commands/ExportECSServiceRecommendationsCommand";
|
|
6
7
|
import { ExportLambdaFunctionRecommendationsCommand, } from "./commands/ExportLambdaFunctionRecommendationsCommand";
|
|
7
8
|
import { GetAutoScalingGroupRecommendationsCommand, } from "./commands/GetAutoScalingGroupRecommendationsCommand";
|
|
8
9
|
import { GetEBSVolumeRecommendationsCommand, } from "./commands/GetEBSVolumeRecommendationsCommand";
|
|
9
10
|
import { GetEC2InstanceRecommendationsCommand, } from "./commands/GetEC2InstanceRecommendationsCommand";
|
|
10
11
|
import { GetEC2RecommendationProjectedMetricsCommand, } from "./commands/GetEC2RecommendationProjectedMetricsCommand";
|
|
12
|
+
import { GetECSServiceRecommendationProjectedMetricsCommand, } from "./commands/GetECSServiceRecommendationProjectedMetricsCommand";
|
|
13
|
+
import { GetECSServiceRecommendationsCommand, } from "./commands/GetECSServiceRecommendationsCommand";
|
|
11
14
|
import { GetEffectiveRecommendationPreferencesCommand, } from "./commands/GetEffectiveRecommendationPreferencesCommand";
|
|
12
15
|
import { GetEnrollmentStatusCommand, } from "./commands/GetEnrollmentStatusCommand";
|
|
13
16
|
import { GetEnrollmentStatusesForOrganizationCommand, } from "./commands/GetEnrollmentStatusesForOrganizationCommand";
|
|
@@ -88,6 +91,20 @@ export class ComputeOptimizer extends ComputeOptimizerClient {
|
|
|
88
91
|
return this.send(command, optionsOrCb);
|
|
89
92
|
}
|
|
90
93
|
}
|
|
94
|
+
exportECSServiceRecommendations(args, optionsOrCb, cb) {
|
|
95
|
+
const command = new ExportECSServiceRecommendationsCommand(args);
|
|
96
|
+
if (typeof optionsOrCb === "function") {
|
|
97
|
+
this.send(command, optionsOrCb);
|
|
98
|
+
}
|
|
99
|
+
else if (typeof cb === "function") {
|
|
100
|
+
if (typeof optionsOrCb !== "object")
|
|
101
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
102
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
return this.send(command, optionsOrCb);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
91
108
|
exportLambdaFunctionRecommendations(args, optionsOrCb, cb) {
|
|
92
109
|
const command = new ExportLambdaFunctionRecommendationsCommand(args);
|
|
93
110
|
if (typeof optionsOrCb === "function") {
|
|
@@ -158,6 +175,34 @@ export class ComputeOptimizer extends ComputeOptimizerClient {
|
|
|
158
175
|
return this.send(command, optionsOrCb);
|
|
159
176
|
}
|
|
160
177
|
}
|
|
178
|
+
getECSServiceRecommendationProjectedMetrics(args, optionsOrCb, cb) {
|
|
179
|
+
const command = new GetECSServiceRecommendationProjectedMetricsCommand(args);
|
|
180
|
+
if (typeof optionsOrCb === "function") {
|
|
181
|
+
this.send(command, optionsOrCb);
|
|
182
|
+
}
|
|
183
|
+
else if (typeof cb === "function") {
|
|
184
|
+
if (typeof optionsOrCb !== "object")
|
|
185
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
186
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
return this.send(command, optionsOrCb);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
getECSServiceRecommendations(args, optionsOrCb, cb) {
|
|
193
|
+
const command = new GetECSServiceRecommendationsCommand(args);
|
|
194
|
+
if (typeof optionsOrCb === "function") {
|
|
195
|
+
this.send(command, optionsOrCb);
|
|
196
|
+
}
|
|
197
|
+
else if (typeof cb === "function") {
|
|
198
|
+
if (typeof optionsOrCb !== "object")
|
|
199
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
200
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
return this.send(command, optionsOrCb);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
161
206
|
getEffectiveRecommendationPreferences(args, optionsOrCb, cb) {
|
|
162
207
|
const command = new GetEffectiveRecommendationPreferencesCommand(args);
|
|
163
208
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { ExportECSServiceRecommendationsRequestFilterSensitiveLog, ExportECSServiceRecommendationsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_0ExportECSServiceRecommendationsCommand, serializeAws_json1_0ExportECSServiceRecommendationsCommand, } from "../protocols/Aws_json1_0";
|
|
6
|
+
export class ExportECSServiceRecommendationsCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, ExportECSServiceRecommendationsCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "ComputeOptimizerClient";
|
|
25
|
+
const commandName = "ExportECSServiceRecommendationsCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: ExportECSServiceRecommendationsRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: ExportECSServiceRecommendationsResponseFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_json1_0ExportECSServiceRecommendationsCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_0ExportECSServiceRecommendationsCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { GetECSServiceRecommendationProjectedMetricsRequestFilterSensitiveLog, GetECSServiceRecommendationProjectedMetricsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand, serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand, } from "../protocols/Aws_json1_0";
|
|
6
|
+
export class GetECSServiceRecommendationProjectedMetricsCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetECSServiceRecommendationProjectedMetricsCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "ComputeOptimizerClient";
|
|
25
|
+
const commandName = "GetECSServiceRecommendationProjectedMetricsCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: GetECSServiceRecommendationProjectedMetricsRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: GetECSServiceRecommendationProjectedMetricsResponseFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_0GetECSServiceRecommendationProjectedMetricsCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { GetECSServiceRecommendationsRequestFilterSensitiveLog, GetECSServiceRecommendationsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_0GetECSServiceRecommendationsCommand, serializeAws_json1_0GetECSServiceRecommendationsCommand, } from "../protocols/Aws_json1_0";
|
|
6
|
+
export class GetECSServiceRecommendationsCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetECSServiceRecommendationsCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "ComputeOptimizerClient";
|
|
25
|
+
const commandName = "GetECSServiceRecommendationsCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: GetECSServiceRecommendationsRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: GetECSServiceRecommendationsResponseFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_json1_0GetECSServiceRecommendationsCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_0GetECSServiceRecommendationsCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -3,11 +3,14 @@ export * from "./DescribeRecommendationExportJobsCommand";
|
|
|
3
3
|
export * from "./ExportAutoScalingGroupRecommendationsCommand";
|
|
4
4
|
export * from "./ExportEBSVolumeRecommendationsCommand";
|
|
5
5
|
export * from "./ExportEC2InstanceRecommendationsCommand";
|
|
6
|
+
export * from "./ExportECSServiceRecommendationsCommand";
|
|
6
7
|
export * from "./ExportLambdaFunctionRecommendationsCommand";
|
|
7
8
|
export * from "./GetAutoScalingGroupRecommendationsCommand";
|
|
8
9
|
export * from "./GetEBSVolumeRecommendationsCommand";
|
|
9
10
|
export * from "./GetEC2InstanceRecommendationsCommand";
|
|
10
11
|
export * from "./GetEC2RecommendationProjectedMetricsCommand";
|
|
12
|
+
export * from "./GetECSServiceRecommendationProjectedMetricsCommand";
|
|
13
|
+
export * from "./GetECSServiceRecommendationsCommand";
|
|
11
14
|
export * from "./GetEffectiveRecommendationPreferencesCommand";
|
|
12
15
|
export * from "./GetEnrollmentStatusCommand";
|
|
13
16
|
export * from "./GetEnrollmentStatusesForOrganizationCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = { "required": true, "default": false, "type": "Boolean" }, i = { [
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseDualStack: h, UseFIPS: h, Endpoint: { required: b, type: c } }, rules: [{ conditions: [{ [
|
|
1
|
+
const q = "fn", r = "argv", s = "ref";
|
|
2
|
+
const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = { "required": true, "default": false, "type": "Boolean" }, i = { [s]: "Endpoint" }, j = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, k = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, l = {}, m = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: d }, "supportsFIPS"] }] }, n = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: d }, "supportsDualStack"] }] }, o = [j], p = [k];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseDualStack: h, UseFIPS: h, Endpoint: { required: b, type: c } }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: d }], type: e, rules: [{ conditions: [{ [q]: "isSet", [r]: [i] }], type: e, rules: [{ conditions: o, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: f }, { type: e, rules: [{ conditions: p, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: f }, { endpoint: { url: i, properties: l, headers: l }, type: g }] }] }, { conditions: [j, k], type: e, rules: [{ conditions: [m, n], type: e, rules: [{ endpoint: { url: "https://compute-optimizer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: g }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: f }] }, { conditions: o, type: e, rules: [{ conditions: [m], type: e, rules: [{ type: e, rules: [{ endpoint: { url: "https://compute-optimizer-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: g }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: f }] }, { conditions: p, type: e, rules: [{ conditions: [n], type: e, rules: [{ endpoint: { url: "https://compute-optimizer.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: g }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: f }] }, { endpoint: { url: "https://compute-optimizer.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: g }] }] };
|
|
4
4
|
export const ruleSet = _data;
|
package/dist-es/index.js
CHANGED
|
@@ -18,6 +18,11 @@ export var Status;
|
|
|
18
18
|
Status["INACTIVE"] = "Inactive";
|
|
19
19
|
Status["PENDING"] = "Pending";
|
|
20
20
|
})(Status || (Status = {}));
|
|
21
|
+
export var AutoScalingConfiguration;
|
|
22
|
+
(function (AutoScalingConfiguration) {
|
|
23
|
+
AutoScalingConfiguration["TARGET_TRACKING_SCALING_CPU"] = "TargetTrackingScalingCpu";
|
|
24
|
+
AutoScalingConfiguration["TARGET_TRACKING_SCALING_MEMORY"] = "TargetTrackingScalingMemory";
|
|
25
|
+
})(AutoScalingConfiguration || (AutoScalingConfiguration = {}));
|
|
21
26
|
export var CurrentPerformanceRisk;
|
|
22
27
|
(function (CurrentPerformanceRisk) {
|
|
23
28
|
CurrentPerformanceRisk["HIGH"] = "High";
|
|
@@ -109,6 +114,7 @@ export var ResourceType;
|
|
|
109
114
|
ResourceType["AUTO_SCALING_GROUP"] = "AutoScalingGroup";
|
|
110
115
|
ResourceType["EBS_VOLUME"] = "EbsVolume";
|
|
111
116
|
ResourceType["EC2_INSTANCE"] = "Ec2Instance";
|
|
117
|
+
ResourceType["ECS_SERVICE"] = "EcsService";
|
|
112
118
|
ResourceType["LAMBDA_FUNCTION"] = "LambdaFunction";
|
|
113
119
|
ResourceType["NOT_APPLICABLE"] = "NotApplicable";
|
|
114
120
|
})(ResourceType || (ResourceType = {}));
|
|
@@ -384,6 +390,37 @@ export var ExportableInstanceField;
|
|
|
384
390
|
ExportableInstanceField["UTILIZATION_METRICS_NETWORK_PACKETS_IN_PER_SECOND_MAXIMUM"] = "UtilizationMetricsNetworkPacketsInPerSecondMaximum";
|
|
385
391
|
ExportableInstanceField["UTILIZATION_METRICS_NETWORK_PACKETS_OUT_PER_SECOND_MAXIMUM"] = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum";
|
|
386
392
|
})(ExportableInstanceField || (ExportableInstanceField = {}));
|
|
393
|
+
export var ExportableECSServiceField;
|
|
394
|
+
(function (ExportableECSServiceField) {
|
|
395
|
+
ExportableECSServiceField["ACCOUNT_ID"] = "AccountId";
|
|
396
|
+
ExportableECSServiceField["CURRENT_PERFORMANCE_RISK"] = "CurrentPerformanceRisk";
|
|
397
|
+
ExportableECSServiceField["CURRENT_SERVICE_CONFIGURATION_AUTO_SCALING_CONFIGURATION"] = "CurrentServiceConfigurationAutoScalingConfiguration";
|
|
398
|
+
ExportableECSServiceField["CURRENT_SERVICE_CONFIGURATION_CPU"] = "CurrentServiceConfigurationCpu";
|
|
399
|
+
ExportableECSServiceField["CURRENT_SERVICE_CONFIGURATION_MEMORY"] = "CurrentServiceConfigurationMemory";
|
|
400
|
+
ExportableECSServiceField["CURRENT_SERVICE_CONFIGURATION_TASK_DEFINITION_ARN"] = "CurrentServiceConfigurationTaskDefinitionArn";
|
|
401
|
+
ExportableECSServiceField["CURRENT_SERVICE_CONTAINER_CONFIGURATIONS"] = "CurrentServiceContainerConfigurations";
|
|
402
|
+
ExportableECSServiceField["FINDING"] = "Finding";
|
|
403
|
+
ExportableECSServiceField["FINDING_REASON_CODES"] = "FindingReasonCodes";
|
|
404
|
+
ExportableECSServiceField["LAST_REFRESH_TIMESTAMP"] = "LastRefreshTimestamp";
|
|
405
|
+
ExportableECSServiceField["LAUNCH_TYPE"] = "LaunchType";
|
|
406
|
+
ExportableECSServiceField["LOOKBACK_PERIOD_IN_DAYS"] = "LookbackPeriodInDays";
|
|
407
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_CONTAINER_RECOMMENDATIONS"] = "RecommendationOptionsContainerRecommendations";
|
|
408
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_CPU"] = "RecommendationOptionsCpu";
|
|
409
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY"] = "RecommendationOptionsEstimatedMonthlySavingsCurrency";
|
|
410
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE"] = "RecommendationOptionsEstimatedMonthlySavingsValue";
|
|
411
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_MEMORY"] = "RecommendationOptionsMemory";
|
|
412
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_PROJECTED_UTILIZATION_METRICS_CPU_MAXIMUM"] = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum";
|
|
413
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_PROJECTED_UTILIZATION_METRICS_MEMORY_MAXIMUM"] = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum";
|
|
414
|
+
ExportableECSServiceField["RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE"] = "RecommendationOptionsSavingsOpportunityPercentage";
|
|
415
|
+
ExportableECSServiceField["SERVICE_ARN"] = "ServiceArn";
|
|
416
|
+
ExportableECSServiceField["UTILIZATION_METRICS_CPU_MAXIMUM"] = "UtilizationMetricsCpuMaximum";
|
|
417
|
+
ExportableECSServiceField["UTILIZATION_METRICS_MEMORY_MAXIMUM"] = "UtilizationMetricsMemoryMaximum";
|
|
418
|
+
})(ExportableECSServiceField || (ExportableECSServiceField = {}));
|
|
419
|
+
export var ECSServiceRecommendationFilterName;
|
|
420
|
+
(function (ECSServiceRecommendationFilterName) {
|
|
421
|
+
ECSServiceRecommendationFilterName["FINDING"] = "Finding";
|
|
422
|
+
ECSServiceRecommendationFilterName["FINDING_REASON_CODE"] = "FindingReasonCode";
|
|
423
|
+
})(ECSServiceRecommendationFilterName || (ECSServiceRecommendationFilterName = {}));
|
|
387
424
|
export var ExportableLambdaFunctionField;
|
|
388
425
|
(function (ExportableLambdaFunctionField) {
|
|
389
426
|
ExportableLambdaFunctionField["ACCOUNT_ID"] = "AccountId";
|
|
@@ -463,8 +500,37 @@ export var RecommendationSourceType;
|
|
|
463
500
|
RecommendationSourceType["AUTO_SCALING_GROUP"] = "AutoScalingGroup";
|
|
464
501
|
RecommendationSourceType["EBS_VOLUME"] = "EbsVolume";
|
|
465
502
|
RecommendationSourceType["EC2_INSTANCE"] = "Ec2Instance";
|
|
503
|
+
RecommendationSourceType["ECS_SERVICE"] = "EcsService";
|
|
466
504
|
RecommendationSourceType["LAMBDA_FUNCTION"] = "LambdaFunction";
|
|
467
505
|
})(RecommendationSourceType || (RecommendationSourceType = {}));
|
|
506
|
+
export var ECSServiceMetricName;
|
|
507
|
+
(function (ECSServiceMetricName) {
|
|
508
|
+
ECSServiceMetricName["CPU"] = "Cpu";
|
|
509
|
+
ECSServiceMetricName["MEMORY"] = "Memory";
|
|
510
|
+
})(ECSServiceMetricName || (ECSServiceMetricName = {}));
|
|
511
|
+
export var ECSServiceRecommendationFinding;
|
|
512
|
+
(function (ECSServiceRecommendationFinding) {
|
|
513
|
+
ECSServiceRecommendationFinding["OPTIMIZED"] = "Optimized";
|
|
514
|
+
ECSServiceRecommendationFinding["OVER_PROVISIONED"] = "Overprovisioned";
|
|
515
|
+
ECSServiceRecommendationFinding["UNDER_PROVISIONED"] = "Underprovisioned";
|
|
516
|
+
})(ECSServiceRecommendationFinding || (ECSServiceRecommendationFinding = {}));
|
|
517
|
+
export var ECSServiceRecommendationFindingReasonCode;
|
|
518
|
+
(function (ECSServiceRecommendationFindingReasonCode) {
|
|
519
|
+
ECSServiceRecommendationFindingReasonCode["CPU_OVER_PROVISIONED"] = "CPUOverprovisioned";
|
|
520
|
+
ECSServiceRecommendationFindingReasonCode["CPU_UNDER_PROVISIONED"] = "CPUUnderprovisioned";
|
|
521
|
+
ECSServiceRecommendationFindingReasonCode["MEMORY_OVER_PROVISIONED"] = "MemoryOverprovisioned";
|
|
522
|
+
ECSServiceRecommendationFindingReasonCode["MEMORY_UNDER_PROVISIONED"] = "MemoryUnderprovisioned";
|
|
523
|
+
})(ECSServiceRecommendationFindingReasonCode || (ECSServiceRecommendationFindingReasonCode = {}));
|
|
524
|
+
export var ECSServiceLaunchType;
|
|
525
|
+
(function (ECSServiceLaunchType) {
|
|
526
|
+
ECSServiceLaunchType["EC2"] = "EC2";
|
|
527
|
+
ECSServiceLaunchType["FARGATE"] = "Fargate";
|
|
528
|
+
})(ECSServiceLaunchType || (ECSServiceLaunchType = {}));
|
|
529
|
+
export var ECSServiceMetricStatistic;
|
|
530
|
+
(function (ECSServiceMetricStatistic) {
|
|
531
|
+
ECSServiceMetricStatistic["AVERAGE"] = "Average";
|
|
532
|
+
ECSServiceMetricStatistic["MAXIMUM"] = "Maximum";
|
|
533
|
+
})(ECSServiceMetricStatistic || (ECSServiceMetricStatistic = {}));
|
|
468
534
|
export var EnrollmentFilterName;
|
|
469
535
|
(function (EnrollmentFilterName) {
|
|
470
536
|
EnrollmentFilterName["STATUS"] = "Status";
|
|
@@ -591,6 +657,15 @@ export const ExportEC2InstanceRecommendationsRequestFilterSensitiveLog = (obj) =
|
|
|
591
657
|
export const ExportEC2InstanceRecommendationsResponseFilterSensitiveLog = (obj) => ({
|
|
592
658
|
...obj,
|
|
593
659
|
});
|
|
660
|
+
export const ECSServiceRecommendationFilterFilterSensitiveLog = (obj) => ({
|
|
661
|
+
...obj,
|
|
662
|
+
});
|
|
663
|
+
export const ExportECSServiceRecommendationsRequestFilterSensitiveLog = (obj) => ({
|
|
664
|
+
...obj,
|
|
665
|
+
});
|
|
666
|
+
export const ExportECSServiceRecommendationsResponseFilterSensitiveLog = (obj) => ({
|
|
667
|
+
...obj,
|
|
668
|
+
});
|
|
594
669
|
export const LambdaFunctionRecommendationFilterFilterSensitiveLog = (obj) => ({
|
|
595
670
|
...obj,
|
|
596
671
|
});
|
|
@@ -654,6 +729,48 @@ export const RecommendedOptionProjectedMetricFilterSensitiveLog = (obj) => ({
|
|
|
654
729
|
export const GetEC2RecommendationProjectedMetricsResponseFilterSensitiveLog = (obj) => ({
|
|
655
730
|
...obj,
|
|
656
731
|
});
|
|
732
|
+
export const GetECSServiceRecommendationProjectedMetricsRequestFilterSensitiveLog = (obj) => ({
|
|
733
|
+
...obj,
|
|
734
|
+
});
|
|
735
|
+
export const ECSServiceProjectedMetricFilterSensitiveLog = (obj) => ({
|
|
736
|
+
...obj,
|
|
737
|
+
});
|
|
738
|
+
export const ECSServiceRecommendedOptionProjectedMetricFilterSensitiveLog = (obj) => ({
|
|
739
|
+
...obj,
|
|
740
|
+
});
|
|
741
|
+
export const GetECSServiceRecommendationProjectedMetricsResponseFilterSensitiveLog = (obj) => ({
|
|
742
|
+
...obj,
|
|
743
|
+
});
|
|
744
|
+
export const GetECSServiceRecommendationsRequestFilterSensitiveLog = (obj) => ({
|
|
745
|
+
...obj,
|
|
746
|
+
});
|
|
747
|
+
export const MemorySizeConfigurationFilterSensitiveLog = (obj) => ({
|
|
748
|
+
...obj,
|
|
749
|
+
});
|
|
750
|
+
export const ContainerConfigurationFilterSensitiveLog = (obj) => ({
|
|
751
|
+
...obj,
|
|
752
|
+
});
|
|
753
|
+
export const ServiceConfigurationFilterSensitiveLog = (obj) => ({
|
|
754
|
+
...obj,
|
|
755
|
+
});
|
|
756
|
+
export const ContainerRecommendationFilterSensitiveLog = (obj) => ({
|
|
757
|
+
...obj,
|
|
758
|
+
});
|
|
759
|
+
export const ECSServiceProjectedUtilizationMetricFilterSensitiveLog = (obj) => ({
|
|
760
|
+
...obj,
|
|
761
|
+
});
|
|
762
|
+
export const ECSServiceRecommendationOptionFilterSensitiveLog = (obj) => ({
|
|
763
|
+
...obj,
|
|
764
|
+
});
|
|
765
|
+
export const ECSServiceUtilizationMetricFilterSensitiveLog = (obj) => ({
|
|
766
|
+
...obj,
|
|
767
|
+
});
|
|
768
|
+
export const ECSServiceRecommendationFilterSensitiveLog = (obj) => ({
|
|
769
|
+
...obj,
|
|
770
|
+
});
|
|
771
|
+
export const GetECSServiceRecommendationsResponseFilterSensitiveLog = (obj) => ({
|
|
772
|
+
...obj,
|
|
773
|
+
});
|
|
657
774
|
export const GetEffectiveRecommendationPreferencesRequestFilterSensitiveLog = (obj) => ({
|
|
658
775
|
...obj,
|
|
659
776
|
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DescribeRecommendationExportJobsCommand, } from "../commands/DescribeRecommendationExportJobsCommand";
|
|
2
|
+
import { ComputeOptimizer } from "../ComputeOptimizer";
|
|
3
|
+
import { ComputeOptimizerClient } from "../ComputeOptimizerClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new DescribeRecommendationExportJobsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.describeRecommendationExportJobs(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateDescribeRecommendationExportJobs(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ComputeOptimizer) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ComputeOptimizerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ComputeOptimizer | ComputeOptimizerClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GetEnrollmentStatusesForOrganizationCommand, } from "../commands/GetEnrollmentStatusesForOrganizationCommand";
|
|
2
|
+
import { ComputeOptimizer } from "../ComputeOptimizer";
|
|
3
|
+
import { ComputeOptimizerClient } from "../ComputeOptimizerClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new GetEnrollmentStatusesForOrganizationCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.getEnrollmentStatusesForOrganization(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateGetEnrollmentStatusesForOrganization(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ComputeOptimizer) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ComputeOptimizerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ComputeOptimizer | ComputeOptimizerClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GetLambdaFunctionRecommendationsCommand, } from "../commands/GetLambdaFunctionRecommendationsCommand";
|
|
2
|
+
import { ComputeOptimizer } from "../ComputeOptimizer";
|
|
3
|
+
import { ComputeOptimizerClient } from "../ComputeOptimizerClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new GetLambdaFunctionRecommendationsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.getLambdaFunctionRecommendations(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateGetLambdaFunctionRecommendations(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ComputeOptimizer) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ComputeOptimizerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ComputeOptimizer | ComputeOptimizerClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GetRecommendationPreferencesCommand, } from "../commands/GetRecommendationPreferencesCommand";
|
|
2
|
+
import { ComputeOptimizer } from "../ComputeOptimizer";
|
|
3
|
+
import { ComputeOptimizerClient } from "../ComputeOptimizerClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new GetRecommendationPreferencesCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.getRecommendationPreferences(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateGetRecommendationPreferences(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ComputeOptimizer) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ComputeOptimizerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ComputeOptimizer | ComputeOptimizerClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GetRecommendationSummariesCommand, } from "../commands/GetRecommendationSummariesCommand";
|
|
2
|
+
import { ComputeOptimizer } from "../ComputeOptimizer";
|
|
3
|
+
import { ComputeOptimizerClient } from "../ComputeOptimizerClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new GetRecommendationSummariesCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.getRecommendationSummaries(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateGetRecommendationSummaries(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ComputeOptimizer) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ComputeOptimizerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ComputeOptimizer | ComputeOptimizerClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./DescribeRecommendationExportJobsPaginator";
|
|
2
|
+
export * from "./GetEnrollmentStatusesForOrganizationPaginator";
|
|
3
|
+
export * from "./GetLambdaFunctionRecommendationsPaginator";
|
|
4
|
+
export * from "./GetRecommendationPreferencesPaginator";
|
|
5
|
+
export * from "./GetRecommendationSummariesPaginator";
|
|
6
|
+
export * from "./Interfaces";
|