@aws-sdk/client-cost-optimization-hub 3.458.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/LICENSE +201 -0
- package/README.md +268 -0
- package/dist-cjs/CostOptimizationHub.js +25 -0
- package/dist-cjs/CostOptimizationHubClient.js +43 -0
- package/dist-cjs/commands/GetPreferencesCommand.js +51 -0
- package/dist-cjs/commands/GetRecommendationCommand.js +51 -0
- package/dist-cjs/commands/ListEnrollmentStatusesCommand.js +51 -0
- package/dist-cjs/commands/ListRecommendationSummariesCommand.js +51 -0
- package/dist-cjs/commands/ListRecommendationsCommand.js +51 -0
- package/dist-cjs/commands/UpdateEnrollmentStatusCommand.js +51 -0
- package/dist-cjs/commands/UpdatePreferencesCommand.js +51 -0
- package/dist-cjs/commands/index.js +10 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +12 -0
- package/dist-cjs/models/CostOptimizationHubServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +158 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListEnrollmentStatusesPaginator.js +29 -0
- package/dist-cjs/pagination/ListRecommendationSummariesPaginator.js +29 -0
- package/dist-cjs/pagination/ListRecommendationsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_0.js +830 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +24 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/CostOptimizationHub.js +21 -0
- package/dist-es/CostOptimizationHubClient.js +39 -0
- package/dist-es/commands/GetPreferencesCommand.js +47 -0
- package/dist-es/commands/GetRecommendationCommand.js +47 -0
- package/dist-es/commands/ListEnrollmentStatusesCommand.js +47 -0
- package/dist-es/commands/ListRecommendationSummariesCommand.js +47 -0
- package/dist-es/commands/ListRecommendationsCommand.js +47 -0
- package/dist-es/commands/UpdateEnrollmentStatusCommand.js +47 -0
- package/dist-es/commands/UpdatePreferencesCommand.js +47 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +7 -0
- package/dist-es/models/CostOptimizationHubServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +150 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListEnrollmentStatusesPaginator.js +25 -0
- package/dist-es/pagination/ListRecommendationSummariesPaginator.js +25 -0
- package/dist-es/pagination/ListRecommendationsPaginator.js +25 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_0.js +813 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +20 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/CostOptimizationHub.d.ts +66 -0
- package/dist-types/CostOptimizationHubClient.d.ts +183 -0
- package/dist-types/commands/GetPreferencesCommand.d.ts +89 -0
- package/dist-types/commands/GetRecommendationCommand.d.ts +647 -0
- package/dist-types/commands/ListEnrollmentStatusesCommand.d.ts +99 -0
- package/dist-types/commands/ListRecommendationSummariesCommand.d.ts +138 -0
- package/dist-types/commands/ListRecommendationsCommand.d.ts +157 -0
- package/dist-types/commands/UpdateEnrollmentStatusCommand.d.ts +94 -0
- package/dist-types/commands/UpdatePreferencesCommand.d.ts +91 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +22 -0
- package/dist-types/models/CostOptimizationHubServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2141 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListEnrollmentStatusesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRecommendationSummariesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRecommendationsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +65 -0
- package/dist-types/runtimeConfig.browser.d.ts +46 -0
- package/dist-types/runtimeConfig.d.ts +46 -0
- package/dist-types/runtimeConfig.native.d.ts +45 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/CostOptimizationHub.d.ts +126 -0
- package/dist-types/ts3.4/CostOptimizationHubClient.d.ts +163 -0
- package/dist-types/ts3.4/commands/GetPreferencesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetRecommendationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListEnrollmentStatusesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListRecommendationSummariesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListRecommendationsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/UpdateEnrollmentStatusCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/UpdatePreferencesCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +10 -0
- package/dist-types/ts3.4/models/CostOptimizationHubServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +734 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListEnrollmentStatusesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecommendationSummariesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecommendationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +99 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +99 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +90 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +102 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListEnrollmentStatusesCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
|
|
10
|
+
class ListEnrollmentStatusesCommand extends smithy_client_1.Command {
|
|
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
|
+
constructor(input) {
|
|
20
|
+
super();
|
|
21
|
+
this.input = input;
|
|
22
|
+
}
|
|
23
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
24
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
25
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListEnrollmentStatusesCommand.getEndpointParameterInstructions()));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "CostOptimizationHubClient";
|
|
29
|
+
const commandName = "ListEnrollmentStatusesCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: (_) => _,
|
|
35
|
+
outputFilterSensitiveLog: (_) => _,
|
|
36
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
37
|
+
service: "CostOptimizationHubService",
|
|
38
|
+
operation: "ListEnrollmentStatuses",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const { requestHandler } = configuration;
|
|
42
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
43
|
+
}
|
|
44
|
+
serialize(input, context) {
|
|
45
|
+
return (0, Aws_json1_0_1.se_ListEnrollmentStatusesCommand)(input, context);
|
|
46
|
+
}
|
|
47
|
+
deserialize(output, context) {
|
|
48
|
+
return (0, Aws_json1_0_1.de_ListEnrollmentStatusesCommand)(output, context);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ListEnrollmentStatusesCommand = ListEnrollmentStatusesCommand;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListRecommendationSummariesCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
|
|
10
|
+
class ListRecommendationSummariesCommand extends smithy_client_1.Command {
|
|
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
|
+
constructor(input) {
|
|
20
|
+
super();
|
|
21
|
+
this.input = input;
|
|
22
|
+
}
|
|
23
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
24
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
25
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListRecommendationSummariesCommand.getEndpointParameterInstructions()));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "CostOptimizationHubClient";
|
|
29
|
+
const commandName = "ListRecommendationSummariesCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: (_) => _,
|
|
35
|
+
outputFilterSensitiveLog: (_) => _,
|
|
36
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
37
|
+
service: "CostOptimizationHubService",
|
|
38
|
+
operation: "ListRecommendationSummaries",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const { requestHandler } = configuration;
|
|
42
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
43
|
+
}
|
|
44
|
+
serialize(input, context) {
|
|
45
|
+
return (0, Aws_json1_0_1.se_ListRecommendationSummariesCommand)(input, context);
|
|
46
|
+
}
|
|
47
|
+
deserialize(output, context) {
|
|
48
|
+
return (0, Aws_json1_0_1.de_ListRecommendationSummariesCommand)(output, context);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ListRecommendationSummariesCommand = ListRecommendationSummariesCommand;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListRecommendationsCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
|
|
10
|
+
class ListRecommendationsCommand extends smithy_client_1.Command {
|
|
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
|
+
constructor(input) {
|
|
20
|
+
super();
|
|
21
|
+
this.input = input;
|
|
22
|
+
}
|
|
23
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
24
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
25
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListRecommendationsCommand.getEndpointParameterInstructions()));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "CostOptimizationHubClient";
|
|
29
|
+
const commandName = "ListRecommendationsCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: (_) => _,
|
|
35
|
+
outputFilterSensitiveLog: (_) => _,
|
|
36
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
37
|
+
service: "CostOptimizationHubService",
|
|
38
|
+
operation: "ListRecommendations",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const { requestHandler } = configuration;
|
|
42
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
43
|
+
}
|
|
44
|
+
serialize(input, context) {
|
|
45
|
+
return (0, Aws_json1_0_1.se_ListRecommendationsCommand)(input, context);
|
|
46
|
+
}
|
|
47
|
+
deserialize(output, context) {
|
|
48
|
+
return (0, Aws_json1_0_1.de_ListRecommendationsCommand)(output, context);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ListRecommendationsCommand = ListRecommendationsCommand;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateEnrollmentStatusCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
|
|
10
|
+
class UpdateEnrollmentStatusCommand extends smithy_client_1.Command {
|
|
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
|
+
constructor(input) {
|
|
20
|
+
super();
|
|
21
|
+
this.input = input;
|
|
22
|
+
}
|
|
23
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
24
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
25
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdateEnrollmentStatusCommand.getEndpointParameterInstructions()));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "CostOptimizationHubClient";
|
|
29
|
+
const commandName = "UpdateEnrollmentStatusCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: (_) => _,
|
|
35
|
+
outputFilterSensitiveLog: (_) => _,
|
|
36
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
37
|
+
service: "CostOptimizationHubService",
|
|
38
|
+
operation: "UpdateEnrollmentStatus",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const { requestHandler } = configuration;
|
|
42
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
43
|
+
}
|
|
44
|
+
serialize(input, context) {
|
|
45
|
+
return (0, Aws_json1_0_1.se_UpdateEnrollmentStatusCommand)(input, context);
|
|
46
|
+
}
|
|
47
|
+
deserialize(output, context) {
|
|
48
|
+
return (0, Aws_json1_0_1.de_UpdateEnrollmentStatusCommand)(output, context);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.UpdateEnrollmentStatusCommand = UpdateEnrollmentStatusCommand;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePreferencesCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
|
|
10
|
+
class UpdatePreferencesCommand extends smithy_client_1.Command {
|
|
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
|
+
constructor(input) {
|
|
20
|
+
super();
|
|
21
|
+
this.input = input;
|
|
22
|
+
}
|
|
23
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
24
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
25
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UpdatePreferencesCommand.getEndpointParameterInstructions()));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "CostOptimizationHubClient";
|
|
29
|
+
const commandName = "UpdatePreferencesCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: (_) => _,
|
|
35
|
+
outputFilterSensitiveLog: (_) => _,
|
|
36
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
37
|
+
service: "CostOptimizationHubService",
|
|
38
|
+
operation: "UpdatePreferences",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const { requestHandler } = configuration;
|
|
42
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
43
|
+
}
|
|
44
|
+
serialize(input, context) {
|
|
45
|
+
return (0, Aws_json1_0_1.se_UpdatePreferencesCommand)(input, context);
|
|
46
|
+
}
|
|
47
|
+
deserialize(output, context) {
|
|
48
|
+
return (0, Aws_json1_0_1.de_UpdatePreferencesCommand)(output, context);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.UpdatePreferencesCommand = UpdatePreferencesCommand;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./GetPreferencesCommand"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./GetRecommendationCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./ListEnrollmentStatusesCommand"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./ListRecommendationSummariesCommand"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./ListRecommendationsCommand"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./UpdateEnrollmentStatusCommand"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./UpdatePreferencesCommand"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveClientEndpointParameters = void 0;
|
|
4
|
+
const resolveClientEndpointParameters = (options) => {
|
|
5
|
+
return {
|
|
6
|
+
...options,
|
|
7
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
8
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
9
|
+
defaultSigningName: "cost-optimization-hub",
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultEndpointResolver = void 0;
|
|
4
|
+
const util_endpoints_1 = require("@smithy/util-endpoints");
|
|
5
|
+
const ruleset_1 = require("./ruleset");
|
|
6
|
+
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
7
|
+
return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
8
|
+
endpointParams: endpointParams,
|
|
9
|
+
logger: context.logger,
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ruleSet = void 0;
|
|
4
|
+
const s = "required", t = "fn", u = "argv", v = "ref";
|
|
5
|
+
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://cost-optimization-hub-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://cost-optimization-hub-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://cost-optimization-hub.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://cost-optimization-hub.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
|
7
|
+
exports.ruleSet = _data;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CostOptimizationHubServiceException = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./CostOptimizationHubClient"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./CostOptimizationHub"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./commands"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./pagination"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./models"), exports);
|
|
10
|
+
require("@aws-sdk/util-endpoints");
|
|
11
|
+
var CostOptimizationHubServiceException_1 = require("./models/CostOptimizationHubServiceException");
|
|
12
|
+
Object.defineProperty(exports, "CostOptimizationHubServiceException", { enumerable: true, get: function () { return CostOptimizationHubServiceException_1.CostOptimizationHubServiceException; } });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CostOptimizationHubServiceException = exports.__ServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
+
class CostOptimizationHubServiceException extends smithy_client_1.ServiceException {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
Object.setPrototypeOf(this, CostOptimizationHubServiceException.prototype);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CostOptimizationHubServiceException = CostOptimizationHubServiceException;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Order = exports.ResourceNotFoundException = exports.Source = exports.ImplementationEffort = exports.ResourceType = exports.ResourceDetails = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.InternalServerException = exports.SavingsEstimationMode = exports.MemberAccountDiscountVisibility = exports.ActionType = exports.EnrollmentStatus = exports.AccessDeniedException = void 0;
|
|
4
|
+
const CostOptimizationHubServiceException_1 = require("./CostOptimizationHubServiceException");
|
|
5
|
+
class AccessDeniedException extends CostOptimizationHubServiceException_1.CostOptimizationHubServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "AccessDeniedException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts,
|
|
11
|
+
});
|
|
12
|
+
this.name = "AccessDeniedException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
18
|
+
exports.EnrollmentStatus = {
|
|
19
|
+
ACTIVE: "Active",
|
|
20
|
+
INACTIVE: "Inactive",
|
|
21
|
+
};
|
|
22
|
+
exports.ActionType = {
|
|
23
|
+
MIGRATE_TO_GRAVITON: "MigrateToGraviton",
|
|
24
|
+
PURCHASE_RESERVED_INSTANCES: "PurchaseReservedInstances",
|
|
25
|
+
PURCHASE_SAVINGS_PLANS: "PurchaseSavingsPlans",
|
|
26
|
+
RIGHTSIZE: "Rightsize",
|
|
27
|
+
STOP: "Stop",
|
|
28
|
+
UPGRADE: "Upgrade",
|
|
29
|
+
};
|
|
30
|
+
exports.MemberAccountDiscountVisibility = {
|
|
31
|
+
ALL: "All",
|
|
32
|
+
NONE: "None",
|
|
33
|
+
};
|
|
34
|
+
exports.SavingsEstimationMode = {
|
|
35
|
+
AFTER_DISCOUNTS: "AfterDiscounts",
|
|
36
|
+
BEFORE_DISCOUNTS: "BeforeDiscounts",
|
|
37
|
+
};
|
|
38
|
+
class InternalServerException extends CostOptimizationHubServiceException_1.CostOptimizationHubServiceException {
|
|
39
|
+
constructor(opts) {
|
|
40
|
+
super({
|
|
41
|
+
name: "InternalServerException",
|
|
42
|
+
$fault: "server",
|
|
43
|
+
...opts,
|
|
44
|
+
});
|
|
45
|
+
this.name = "InternalServerException";
|
|
46
|
+
this.$fault = "server";
|
|
47
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.InternalServerException = InternalServerException;
|
|
51
|
+
class ThrottlingException extends CostOptimizationHubServiceException_1.CostOptimizationHubServiceException {
|
|
52
|
+
constructor(opts) {
|
|
53
|
+
super({
|
|
54
|
+
name: "ThrottlingException",
|
|
55
|
+
$fault: "client",
|
|
56
|
+
...opts,
|
|
57
|
+
});
|
|
58
|
+
this.name = "ThrottlingException";
|
|
59
|
+
this.$fault = "client";
|
|
60
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.ThrottlingException = ThrottlingException;
|
|
64
|
+
exports.ValidationExceptionReason = {
|
|
65
|
+
FIELD_VALIDATION_FAILED: "FieldValidationFailed",
|
|
66
|
+
OTHER: "Other",
|
|
67
|
+
};
|
|
68
|
+
class ValidationException extends CostOptimizationHubServiceException_1.CostOptimizationHubServiceException {
|
|
69
|
+
constructor(opts) {
|
|
70
|
+
super({
|
|
71
|
+
name: "ValidationException",
|
|
72
|
+
$fault: "client",
|
|
73
|
+
...opts,
|
|
74
|
+
});
|
|
75
|
+
this.name = "ValidationException";
|
|
76
|
+
this.$fault = "client";
|
|
77
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
78
|
+
this.reason = opts.reason;
|
|
79
|
+
this.fields = opts.fields;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.ValidationException = ValidationException;
|
|
83
|
+
var ResourceDetails;
|
|
84
|
+
(function (ResourceDetails) {
|
|
85
|
+
ResourceDetails.visit = (value, visitor) => {
|
|
86
|
+
if (value.lambdaFunction !== undefined)
|
|
87
|
+
return visitor.lambdaFunction(value.lambdaFunction);
|
|
88
|
+
if (value.ecsService !== undefined)
|
|
89
|
+
return visitor.ecsService(value.ecsService);
|
|
90
|
+
if (value.ec2Instance !== undefined)
|
|
91
|
+
return visitor.ec2Instance(value.ec2Instance);
|
|
92
|
+
if (value.ebsVolume !== undefined)
|
|
93
|
+
return visitor.ebsVolume(value.ebsVolume);
|
|
94
|
+
if (value.ec2AutoScalingGroup !== undefined)
|
|
95
|
+
return visitor.ec2AutoScalingGroup(value.ec2AutoScalingGroup);
|
|
96
|
+
if (value.ec2ReservedInstances !== undefined)
|
|
97
|
+
return visitor.ec2ReservedInstances(value.ec2ReservedInstances);
|
|
98
|
+
if (value.rdsReservedInstances !== undefined)
|
|
99
|
+
return visitor.rdsReservedInstances(value.rdsReservedInstances);
|
|
100
|
+
if (value.elastiCacheReservedInstances !== undefined)
|
|
101
|
+
return visitor.elastiCacheReservedInstances(value.elastiCacheReservedInstances);
|
|
102
|
+
if (value.openSearchReservedInstances !== undefined)
|
|
103
|
+
return visitor.openSearchReservedInstances(value.openSearchReservedInstances);
|
|
104
|
+
if (value.redshiftReservedInstances !== undefined)
|
|
105
|
+
return visitor.redshiftReservedInstances(value.redshiftReservedInstances);
|
|
106
|
+
if (value.ec2InstanceSavingsPlans !== undefined)
|
|
107
|
+
return visitor.ec2InstanceSavingsPlans(value.ec2InstanceSavingsPlans);
|
|
108
|
+
if (value.computeSavingsPlans !== undefined)
|
|
109
|
+
return visitor.computeSavingsPlans(value.computeSavingsPlans);
|
|
110
|
+
if (value.sageMakerSavingsPlans !== undefined)
|
|
111
|
+
return visitor.sageMakerSavingsPlans(value.sageMakerSavingsPlans);
|
|
112
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
113
|
+
};
|
|
114
|
+
})(ResourceDetails = exports.ResourceDetails || (exports.ResourceDetails = {}));
|
|
115
|
+
exports.ResourceType = {
|
|
116
|
+
COMPUTE_SAVINGS_PLANS: "ComputeSavingsPlans",
|
|
117
|
+
EBS_VOLUME: "EbsVolume",
|
|
118
|
+
EC2_AUTO_SCALING_GROUP: "Ec2AutoScalingGroup",
|
|
119
|
+
EC2_INSTANCE: "Ec2Instance",
|
|
120
|
+
EC2_INSTANCE_SAVINGS_PLANS: "Ec2InstanceSavingsPlans",
|
|
121
|
+
EC2_RESERVED_INSTANCES: "Ec2ReservedInstances",
|
|
122
|
+
ECS_SERVICE: "EcsService",
|
|
123
|
+
ELASTI_CACHE_RESERVED_INSTANCES: "ElastiCacheReservedInstances",
|
|
124
|
+
LAMBDA_FUNCTION: "LambdaFunction",
|
|
125
|
+
OPEN_SEARCH_RESERVED_INSTANCES: "OpenSearchReservedInstances",
|
|
126
|
+
RDS_RESERVED_INSTANCES: "RdsReservedInstances",
|
|
127
|
+
REDSHIFT_RESERVED_INSTANCES: "RedshiftReservedInstances",
|
|
128
|
+
SAGE_MAKER_SAVINGS_PLANS: "SageMakerSavingsPlans",
|
|
129
|
+
};
|
|
130
|
+
exports.ImplementationEffort = {
|
|
131
|
+
HIGH: "High",
|
|
132
|
+
LOW: "Low",
|
|
133
|
+
MEDIUM: "Medium",
|
|
134
|
+
VERY_HIGH: "VeryHigh",
|
|
135
|
+
VERY_LOW: "VeryLow",
|
|
136
|
+
};
|
|
137
|
+
exports.Source = {
|
|
138
|
+
COMPUTE_OPTIMIZER: "ComputeOptimizer",
|
|
139
|
+
COST_EXPLORER: "CostExplorer",
|
|
140
|
+
};
|
|
141
|
+
class ResourceNotFoundException extends CostOptimizationHubServiceException_1.CostOptimizationHubServiceException {
|
|
142
|
+
constructor(opts) {
|
|
143
|
+
super({
|
|
144
|
+
name: "ResourceNotFoundException",
|
|
145
|
+
$fault: "client",
|
|
146
|
+
...opts,
|
|
147
|
+
});
|
|
148
|
+
this.name = "ResourceNotFoundException";
|
|
149
|
+
this.$fault = "client";
|
|
150
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
151
|
+
this.resourceId = opts.resourceId;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
155
|
+
exports.Order = {
|
|
156
|
+
ASC: "Asc",
|
|
157
|
+
DESC: "Desc",
|
|
158
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListEnrollmentStatuses = void 0;
|
|
4
|
+
const ListEnrollmentStatusesCommand_1 = require("../commands/ListEnrollmentStatusesCommand");
|
|
5
|
+
const CostOptimizationHubClient_1 = require("../CostOptimizationHubClient");
|
|
6
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
7
|
+
return await client.send(new ListEnrollmentStatusesCommand_1.ListEnrollmentStatusesCommand(input), ...args);
|
|
8
|
+
};
|
|
9
|
+
async function* paginateListEnrollmentStatuses(config, input, ...additionalArguments) {
|
|
10
|
+
let token = config.startingToken || undefined;
|
|
11
|
+
let hasNext = true;
|
|
12
|
+
let page;
|
|
13
|
+
while (hasNext) {
|
|
14
|
+
input.nextToken = token;
|
|
15
|
+
input["maxResults"] = config.pageSize;
|
|
16
|
+
if (config.client instanceof CostOptimizationHubClient_1.CostOptimizationHubClient) {
|
|
17
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
|
|
21
|
+
}
|
|
22
|
+
yield page;
|
|
23
|
+
const prevToken = token;
|
|
24
|
+
token = page.nextToken;
|
|
25
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
exports.paginateListEnrollmentStatuses = paginateListEnrollmentStatuses;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListRecommendationSummaries = void 0;
|
|
4
|
+
const ListRecommendationSummariesCommand_1 = require("../commands/ListRecommendationSummariesCommand");
|
|
5
|
+
const CostOptimizationHubClient_1 = require("../CostOptimizationHubClient");
|
|
6
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
7
|
+
return await client.send(new ListRecommendationSummariesCommand_1.ListRecommendationSummariesCommand(input), ...args);
|
|
8
|
+
};
|
|
9
|
+
async function* paginateListRecommendationSummaries(config, input, ...additionalArguments) {
|
|
10
|
+
let token = config.startingToken || undefined;
|
|
11
|
+
let hasNext = true;
|
|
12
|
+
let page;
|
|
13
|
+
while (hasNext) {
|
|
14
|
+
input.nextToken = token;
|
|
15
|
+
input["maxResults"] = config.pageSize;
|
|
16
|
+
if (config.client instanceof CostOptimizationHubClient_1.CostOptimizationHubClient) {
|
|
17
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
|
|
21
|
+
}
|
|
22
|
+
yield page;
|
|
23
|
+
const prevToken = token;
|
|
24
|
+
token = page.nextToken;
|
|
25
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
exports.paginateListRecommendationSummaries = paginateListRecommendationSummaries;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListRecommendations = void 0;
|
|
4
|
+
const ListRecommendationsCommand_1 = require("../commands/ListRecommendationsCommand");
|
|
5
|
+
const CostOptimizationHubClient_1 = require("../CostOptimizationHubClient");
|
|
6
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
7
|
+
return await client.send(new ListRecommendationsCommand_1.ListRecommendationsCommand(input), ...args);
|
|
8
|
+
};
|
|
9
|
+
async function* paginateListRecommendations(config, input, ...additionalArguments) {
|
|
10
|
+
let token = config.startingToken || undefined;
|
|
11
|
+
let hasNext = true;
|
|
12
|
+
let page;
|
|
13
|
+
while (hasNext) {
|
|
14
|
+
input.nextToken = token;
|
|
15
|
+
input["maxResults"] = config.pageSize;
|
|
16
|
+
if (config.client instanceof CostOptimizationHubClient_1.CostOptimizationHubClient) {
|
|
17
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
|
|
21
|
+
}
|
|
22
|
+
yield page;
|
|
23
|
+
const prevToken = token;
|
|
24
|
+
token = page.nextToken;
|
|
25
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
exports.paginateListRecommendations = paginateListRecommendations;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./ListEnrollmentStatusesPaginator"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./ListRecommendationSummariesPaginator"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./ListRecommendationsPaginator"), exports);
|