@aws-sdk/client-cost-explorer 3.369.0 → 3.376.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.
Files changed (30) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/CostExplorer.js +2 -0
  3. package/dist-cjs/commands/GetSavingsPlanPurchaseRecommendationDetailsCommand.js +46 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/endpoint/ruleset.js +3 -3
  6. package/dist-cjs/protocols/Aws_json1_1.js +51 -2
  7. package/dist-es/CostExplorer.js +2 -0
  8. package/dist-es/commands/GetSavingsPlanPurchaseRecommendationDetailsCommand.js +42 -0
  9. package/dist-es/commands/index.js +1 -0
  10. package/dist-es/endpoint/ruleset.js +3 -3
  11. package/dist-es/protocols/Aws_json1_1.js +47 -0
  12. package/dist-types/CostExplorer.d.ts +7 -0
  13. package/dist-types/CostExplorerClient.d.ts +3 -2
  14. package/dist-types/commands/GetSavingsPlanPurchaseRecommendationDetailsCommand.d.ts +119 -0
  15. package/dist-types/commands/GetSavingsPlansPurchaseRecommendationCommand.d.ts +1 -0
  16. package/dist-types/commands/ListSavingsPlansPurchaseRecommendationGenerationCommand.d.ts +3 -0
  17. package/dist-types/commands/StartSavingsPlansPurchaseRecommendationGenerationCommand.d.ts +3 -0
  18. package/dist-types/commands/UpdateAnomalySubscriptionCommand.d.ts +6 -1
  19. package/dist-types/commands/index.d.ts +1 -0
  20. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  21. package/dist-types/models/models_0.d.ts +260 -47
  22. package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
  23. package/dist-types/ts3.4/CostExplorer.d.ts +23 -0
  24. package/dist-types/ts3.4/CostExplorerClient.d.ts +6 -0
  25. package/dist-types/ts3.4/commands/GetSavingsPlanPurchaseRecommendationDetailsCommand.d.ts +42 -0
  26. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  27. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  28. package/dist-types/ts3.4/models/models_0.d.ts +53 -7
  29. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
  30. package/package.json +16 -17
package/README.md CHANGED
@@ -369,6 +369,14 @@ GetRightsizingRecommendation
369
369
 
370
370
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cost-explorer/classes/getrightsizingrecommendationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cost-explorer/interfaces/getrightsizingrecommendationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cost-explorer/interfaces/getrightsizingrecommendationcommandoutput.html)
371
371
 
372
+ </details>
373
+ <details>
374
+ <summary>
375
+ GetSavingsPlanPurchaseRecommendationDetails
376
+ </summary>
377
+
378
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cost-explorer/classes/getsavingsplanpurchaserecommendationdetailscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cost-explorer/interfaces/getsavingsplanpurchaserecommendationdetailscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cost-explorer/interfaces/getsavingsplanpurchaserecommendationdetailscommandoutput.html)
379
+
372
380
  </details>
373
381
  <details>
374
382
  <summary>
@@ -21,6 +21,7 @@ const GetReservationCoverageCommand_1 = require("./commands/GetReservationCovera
21
21
  const GetReservationPurchaseRecommendationCommand_1 = require("./commands/GetReservationPurchaseRecommendationCommand");
22
22
  const GetReservationUtilizationCommand_1 = require("./commands/GetReservationUtilizationCommand");
23
23
  const GetRightsizingRecommendationCommand_1 = require("./commands/GetRightsizingRecommendationCommand");
24
+ const GetSavingsPlanPurchaseRecommendationDetailsCommand_1 = require("./commands/GetSavingsPlanPurchaseRecommendationDetailsCommand");
24
25
  const GetSavingsPlansCoverageCommand_1 = require("./commands/GetSavingsPlansCoverageCommand");
25
26
  const GetSavingsPlansPurchaseRecommendationCommand_1 = require("./commands/GetSavingsPlansPurchaseRecommendationCommand");
26
27
  const GetSavingsPlansUtilizationCommand_1 = require("./commands/GetSavingsPlansUtilizationCommand");
@@ -60,6 +61,7 @@ const commands = {
60
61
  GetReservationPurchaseRecommendationCommand: GetReservationPurchaseRecommendationCommand_1.GetReservationPurchaseRecommendationCommand,
61
62
  GetReservationUtilizationCommand: GetReservationUtilizationCommand_1.GetReservationUtilizationCommand,
62
63
  GetRightsizingRecommendationCommand: GetRightsizingRecommendationCommand_1.GetRightsizingRecommendationCommand,
64
+ GetSavingsPlanPurchaseRecommendationDetailsCommand: GetSavingsPlanPurchaseRecommendationDetailsCommand_1.GetSavingsPlanPurchaseRecommendationDetailsCommand,
63
65
  GetSavingsPlansCoverageCommand: GetSavingsPlansCoverageCommand_1.GetSavingsPlansCoverageCommand,
64
66
  GetSavingsPlansPurchaseRecommendationCommand: GetSavingsPlansPurchaseRecommendationCommand_1.GetSavingsPlansPurchaseRecommendationCommand,
65
67
  GetSavingsPlansUtilizationCommand: GetSavingsPlansUtilizationCommand_1.GetSavingsPlansUtilizationCommand,
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSavingsPlanPurchaseRecommendationDetailsCommand = 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 Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class GetSavingsPlanPurchaseRecommendationDetailsCommand extends smithy_client_1.Command {
10
+ static getEndpointParameterInstructions() {
11
+ return {
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
+ };
17
+ }
18
+ constructor(input) {
19
+ super();
20
+ this.input = input;
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetSavingsPlanPurchaseRecommendationDetailsCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CostExplorerClient";
28
+ const commandName = "GetSavingsPlanPurchaseRecommendationDetailsCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: (_) => _,
34
+ outputFilterSensitiveLog: (_) => _,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_json1_1_1.se_GetSavingsPlanPurchaseRecommendationDetailsCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.de_GetSavingsPlanPurchaseRecommendationDetailsCommand)(output, context);
44
+ }
45
+ }
46
+ exports.GetSavingsPlanPurchaseRecommendationDetailsCommand = GetSavingsPlanPurchaseRecommendationDetailsCommand;
@@ -20,6 +20,7 @@ tslib_1.__exportStar(require("./GetReservationCoverageCommand"), exports);
20
20
  tslib_1.__exportStar(require("./GetReservationPurchaseRecommendationCommand"), exports);
21
21
  tslib_1.__exportStar(require("./GetReservationUtilizationCommand"), exports);
22
22
  tslib_1.__exportStar(require("./GetRightsizingRecommendationCommand"), exports);
23
+ tslib_1.__exportStar(require("./GetSavingsPlanPurchaseRecommendationDetailsCommand"), exports);
23
24
  tslib_1.__exportStar(require("./GetSavingsPlansCoverageCommand"), exports);
24
25
  tslib_1.__exportStar(require("./GetSavingsPlansPurchaseRecommendationCommand"), exports);
25
26
  tslib_1.__exportStar(require("./GetSavingsPlansUtilizationCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
- const A = "type", B = "fn", C = "argv", D = "ref", E = "properties", F = "headers", G = "authSchemes", H = "signingRegion", I = "signingName";
5
- const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = "stringEquals", i = { "required": true, "default": false, [A]: "Boolean" }, j = { [D]: "Region" }, k = { [D]: "Endpoint" }, l = {}, m = { [B]: "getAttr", [C]: [{ [D]: d }, "name"] }, n = { [G]: [{ "name": "sigv4", [H]: "us-east-1", [I]: "ce" }] }, o = { [f]: "FIPS and DualStack are enabled, but this partition does not support one or both", [A]: f }, p = { [f]: "FIPS is enabled but this partition does not support FIPS", [A]: f }, q = { [f]: "DualStack is enabled but this partition does not support DualStack", [A]: f }, r = { "url": "https://ce.us-east-1.amazonaws.com", [E]: n, [F]: {} }, s = { [G]: [{ "name": "sigv4", [H]: "cn-northwest-1", [I]: "ce" }] }, t = { "url": "https://ce.cn-northwest-1.amazonaws.com.cn", [E]: s, [F]: {} }, u = [{ [B]: "booleanEquals", [C]: [{ [D]: "UseFIPS" }, true] }], v = [{ [B]: "booleanEquals", [C]: [{ [D]: "UseDualStack" }, true] }], w = [{ [B]: "booleanEquals", [C]: [{ [D]: "UseFIPS" }, true] }, { [B]: "booleanEquals", [C]: [{ [D]: "UseDualStack" }, true] }], x = [{ [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsFIPS"] }] }, { [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsDualStack"] }] }], y = [{ [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsFIPS"] }] }], z = [{ [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsDualStack"] }] }];
6
- const _data = { version: "1.0", parameters: { Region: { required: a, [A]: c }, UseDualStack: i, UseFIPS: i, Endpoint: { required: b, [A]: c } }, rules: [{ conditions: [{ [B]: "aws.partition", [C]: [j], assign: d }], [A]: e, rules: [{ conditions: [{ [B]: "isSet", [C]: [k] }], [A]: e, rules: [{ conditions: u, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [A]: f }, { [A]: e, rules: [{ conditions: v, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [A]: f }, { endpoint: { url: k, [E]: l, [F]: l }, [A]: g }] }] }, { conditions: [{ [B]: h, [C]: [m, "aws"] }], [A]: e, rules: [{ conditions: w, [A]: e, rules: [{ conditions: x, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.api.aws", [E]: n, [F]: l }, [A]: g }] }, o] }, { conditions: u, [A]: e, rules: [{ conditions: y, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.amazonaws.com", [E]: n, [F]: l }, [A]: g }] }, p] }, { conditions: v, [A]: e, rules: [{ conditions: z, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer.{Region}.api.aws", [E]: n, [F]: l }, [A]: g }] }, q] }, { endpoint: r, [A]: g }] }, { conditions: [{ [B]: h, [C]: [m, "aws-cn"] }], [A]: e, rules: [{ conditions: w, [A]: e, rules: [{ conditions: x, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.api.amazonwebservices.com.cn", [E]: s, [F]: l }, [A]: g }] }, o] }, { conditions: u, [A]: e, rules: [{ conditions: y, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.amazonaws.com.cn", [E]: s, [F]: l }, [A]: g }] }, p] }, { conditions: v, [A]: e, rules: [{ conditions: z, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer.{Region}.api.amazonwebservices.com.cn", [E]: s, [F]: l }, [A]: g }] }, q] }, { endpoint: t, [A]: g }] }, { conditions: w, [A]: e, rules: [{ conditions: x, [A]: e, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [E]: l, [F]: l }, [A]: g }] }, o] }, { conditions: u, [A]: e, rules: [{ conditions: y, [A]: e, rules: [{ [A]: e, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dnsSuffix}", [E]: l, [F]: l }, [A]: g }] }] }, p] }, { conditions: v, [A]: e, rules: [{ conditions: z, [A]: e, rules: [{ endpoint: { url: "https://ce.{Region}.{PartitionResult#dualStackDnsSuffix}", [E]: l, [F]: l }, [A]: g }] }, q] }, { [A]: e, rules: [{ conditions: [{ [B]: h, [C]: [j, "aws-global"] }], endpoint: r, [A]: g }, { conditions: [{ [B]: h, [C]: [j, "aws-cn-global"] }], endpoint: t, [A]: g }, { endpoint: { url: "https://ce.{Region}.{PartitionResult#dnsSuffix}", [E]: l, [F]: l }, [A]: g }] }] }] };
4
+ const v = "required", w = "fn", x = "argv", y = "ref";
5
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = "stringEquals", g = "sigv4", h = { [v]: false, "type": "String" }, i = { [v]: true, "default": false, "type": "Boolean" }, j = { [y]: "Endpoint" }, k = { [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, true] }, l = { [w]: "booleanEquals", [x]: [{ [y]: "UseDualStack" }, true] }, m = {}, n = { [w]: "getAttr", [x]: [{ [y]: e }, "name"] }, o = { [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, false] }, p = { [w]: "booleanEquals", [x]: [{ [y]: "UseDualStack" }, false] }, q = { [w]: "booleanEquals", [x]: [true, { [w]: "getAttr", [x]: [{ [y]: e }, "supportsFIPS"] }] }, r = { [w]: "booleanEquals", [x]: [true, { [w]: "getAttr", [x]: [{ [y]: e }, "supportsDualStack"] }] }, s = [k], t = [l], u = [{ [y]: "Region" }];
6
+ const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [w]: a, [x]: [j] }], type: b, rules: [{ conditions: s, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: t, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: j, properties: m, headers: m }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [w]: a, [x]: u }], type: b, rules: [{ conditions: [{ [w]: "aws.partition", [x]: u, assign: e }], type: b, rules: [{ conditions: [{ [w]: f, [x]: [n, "aws"] }, o, p], endpoint: { url: "https://ce.us-east-1.amazonaws.com", properties: { authSchemes: [{ name: g, signingName: "ce", signingRegion: "us-east-1" }] }, headers: m }, type: d }, { conditions: [{ [w]: f, [x]: [n, "aws-cn"] }, o, p], endpoint: { url: "https://ce.cn-northwest-1.amazonaws.com.cn", properties: { authSchemes: [{ name: g, signingName: "ce", signingRegion: "cn-northwest-1" }] }, headers: m }, type: d }, { conditions: [k, l], type: b, rules: [{ conditions: [q, r], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: s, type: b, rules: [{ conditions: [q], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: t, type: b, rules: [{ conditions: [r], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://ce.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://ce.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
7
7
  exports.ruleSet = _data;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetCostCategoriesCommand = exports.de_GetCostAndUsageWithResourcesCommand = exports.de_GetCostAndUsageCommand = exports.de_GetAnomalySubscriptionsCommand = exports.de_GetAnomalyMonitorsCommand = exports.de_GetAnomaliesCommand = exports.de_DescribeCostCategoryDefinitionCommand = exports.de_DeleteCostCategoryDefinitionCommand = exports.de_DeleteAnomalySubscriptionCommand = exports.de_DeleteAnomalyMonitorCommand = exports.de_CreateCostCategoryDefinitionCommand = exports.de_CreateAnomalySubscriptionCommand = exports.de_CreateAnomalyMonitorCommand = exports.se_UpdateCostCategoryDefinitionCommand = exports.se_UpdateCostAllocationTagsStatusCommand = exports.se_UpdateAnomalySubscriptionCommand = exports.se_UpdateAnomalyMonitorCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartSavingsPlansPurchaseRecommendationGenerationCommand = exports.se_ProvideAnomalyFeedbackCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSavingsPlansPurchaseRecommendationGenerationCommand = exports.se_ListCostCategoryDefinitionsCommand = exports.se_ListCostAllocationTagsCommand = exports.se_GetUsageForecastCommand = exports.se_GetTagsCommand = exports.se_GetSavingsPlansUtilizationDetailsCommand = exports.se_GetSavingsPlansUtilizationCommand = exports.se_GetSavingsPlansPurchaseRecommendationCommand = exports.se_GetSavingsPlansCoverageCommand = exports.se_GetRightsizingRecommendationCommand = exports.se_GetReservationUtilizationCommand = exports.se_GetReservationPurchaseRecommendationCommand = exports.se_GetReservationCoverageCommand = exports.se_GetDimensionValuesCommand = exports.se_GetCostForecastCommand = exports.se_GetCostCategoriesCommand = exports.se_GetCostAndUsageWithResourcesCommand = exports.se_GetCostAndUsageCommand = exports.se_GetAnomalySubscriptionsCommand = exports.se_GetAnomalyMonitorsCommand = exports.se_GetAnomaliesCommand = exports.se_DescribeCostCategoryDefinitionCommand = exports.se_DeleteCostCategoryDefinitionCommand = exports.se_DeleteAnomalySubscriptionCommand = exports.se_DeleteAnomalyMonitorCommand = exports.se_CreateCostCategoryDefinitionCommand = exports.se_CreateAnomalySubscriptionCommand = exports.se_CreateAnomalyMonitorCommand = void 0;
4
- exports.de_UpdateCostCategoryDefinitionCommand = exports.de_UpdateCostAllocationTagsStatusCommand = exports.de_UpdateAnomalySubscriptionCommand = exports.de_UpdateAnomalyMonitorCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartSavingsPlansPurchaseRecommendationGenerationCommand = exports.de_ProvideAnomalyFeedbackCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSavingsPlansPurchaseRecommendationGenerationCommand = exports.de_ListCostCategoryDefinitionsCommand = exports.de_ListCostAllocationTagsCommand = exports.de_GetUsageForecastCommand = exports.de_GetTagsCommand = exports.de_GetSavingsPlansUtilizationDetailsCommand = exports.de_GetSavingsPlansUtilizationCommand = exports.de_GetSavingsPlansPurchaseRecommendationCommand = exports.de_GetSavingsPlansCoverageCommand = exports.de_GetRightsizingRecommendationCommand = exports.de_GetReservationUtilizationCommand = exports.de_GetReservationPurchaseRecommendationCommand = exports.de_GetReservationCoverageCommand = exports.de_GetDimensionValuesCommand = exports.de_GetCostForecastCommand = void 0;
3
+ exports.de_GetCostAndUsageWithResourcesCommand = exports.de_GetCostAndUsageCommand = exports.de_GetAnomalySubscriptionsCommand = exports.de_GetAnomalyMonitorsCommand = exports.de_GetAnomaliesCommand = exports.de_DescribeCostCategoryDefinitionCommand = exports.de_DeleteCostCategoryDefinitionCommand = exports.de_DeleteAnomalySubscriptionCommand = exports.de_DeleteAnomalyMonitorCommand = exports.de_CreateCostCategoryDefinitionCommand = exports.de_CreateAnomalySubscriptionCommand = exports.de_CreateAnomalyMonitorCommand = exports.se_UpdateCostCategoryDefinitionCommand = exports.se_UpdateCostAllocationTagsStatusCommand = exports.se_UpdateAnomalySubscriptionCommand = exports.se_UpdateAnomalyMonitorCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartSavingsPlansPurchaseRecommendationGenerationCommand = exports.se_ProvideAnomalyFeedbackCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSavingsPlansPurchaseRecommendationGenerationCommand = exports.se_ListCostCategoryDefinitionsCommand = exports.se_ListCostAllocationTagsCommand = exports.se_GetUsageForecastCommand = exports.se_GetTagsCommand = exports.se_GetSavingsPlansUtilizationDetailsCommand = exports.se_GetSavingsPlansUtilizationCommand = exports.se_GetSavingsPlansPurchaseRecommendationCommand = exports.se_GetSavingsPlansCoverageCommand = exports.se_GetSavingsPlanPurchaseRecommendationDetailsCommand = exports.se_GetRightsizingRecommendationCommand = exports.se_GetReservationUtilizationCommand = exports.se_GetReservationPurchaseRecommendationCommand = exports.se_GetReservationCoverageCommand = exports.se_GetDimensionValuesCommand = exports.se_GetCostForecastCommand = exports.se_GetCostCategoriesCommand = exports.se_GetCostAndUsageWithResourcesCommand = exports.se_GetCostAndUsageCommand = exports.se_GetAnomalySubscriptionsCommand = exports.se_GetAnomalyMonitorsCommand = exports.se_GetAnomaliesCommand = exports.se_DescribeCostCategoryDefinitionCommand = exports.se_DeleteCostCategoryDefinitionCommand = exports.se_DeleteAnomalySubscriptionCommand = exports.se_DeleteAnomalyMonitorCommand = exports.se_CreateCostCategoryDefinitionCommand = exports.se_CreateAnomalySubscriptionCommand = exports.se_CreateAnomalyMonitorCommand = void 0;
4
+ exports.de_UpdateCostCategoryDefinitionCommand = exports.de_UpdateCostAllocationTagsStatusCommand = exports.de_UpdateAnomalySubscriptionCommand = exports.de_UpdateAnomalyMonitorCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartSavingsPlansPurchaseRecommendationGenerationCommand = exports.de_ProvideAnomalyFeedbackCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSavingsPlansPurchaseRecommendationGenerationCommand = exports.de_ListCostCategoryDefinitionsCommand = exports.de_ListCostAllocationTagsCommand = exports.de_GetUsageForecastCommand = exports.de_GetTagsCommand = exports.de_GetSavingsPlansUtilizationDetailsCommand = exports.de_GetSavingsPlansUtilizationCommand = exports.de_GetSavingsPlansPurchaseRecommendationCommand = exports.de_GetSavingsPlansCoverageCommand = exports.de_GetSavingsPlanPurchaseRecommendationDetailsCommand = exports.de_GetRightsizingRecommendationCommand = exports.de_GetReservationUtilizationCommand = exports.de_GetReservationPurchaseRecommendationCommand = exports.de_GetReservationCoverageCommand = exports.de_GetDimensionValuesCommand = exports.de_GetCostForecastCommand = exports.de_GetCostCategoriesCommand = void 0;
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const CostExplorerServiceException_1 = require("../models/CostExplorerServiceException");
@@ -139,6 +139,13 @@ const se_GetRightsizingRecommendationCommand = async (input, context) => {
139
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
140
  };
141
141
  exports.se_GetRightsizingRecommendationCommand = se_GetRightsizingRecommendationCommand;
142
+ const se_GetSavingsPlanPurchaseRecommendationDetailsCommand = async (input, context) => {
143
+ const headers = sharedHeaders("GetSavingsPlanPurchaseRecommendationDetails");
144
+ let body;
145
+ body = JSON.stringify((0, smithy_client_1._json)(input));
146
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
+ };
148
+ exports.se_GetSavingsPlanPurchaseRecommendationDetailsCommand = se_GetSavingsPlanPurchaseRecommendationDetailsCommand;
142
149
  const se_GetSavingsPlansCoverageCommand = async (input, context) => {
143
150
  const headers = sharedHeaders("GetSavingsPlansCoverage");
144
151
  let body;
@@ -997,6 +1004,42 @@ const de_GetRightsizingRecommendationCommandError = async (output, context) => {
997
1004
  });
998
1005
  }
999
1006
  };
1007
+ const de_GetSavingsPlanPurchaseRecommendationDetailsCommand = async (output, context) => {
1008
+ if (output.statusCode >= 300) {
1009
+ return de_GetSavingsPlanPurchaseRecommendationDetailsCommandError(output, context);
1010
+ }
1011
+ const data = await parseBody(output.body, context);
1012
+ let contents = {};
1013
+ contents = (0, smithy_client_1._json)(data);
1014
+ const response = {
1015
+ $metadata: deserializeMetadata(output),
1016
+ ...contents,
1017
+ };
1018
+ return response;
1019
+ };
1020
+ exports.de_GetSavingsPlanPurchaseRecommendationDetailsCommand = de_GetSavingsPlanPurchaseRecommendationDetailsCommand;
1021
+ const de_GetSavingsPlanPurchaseRecommendationDetailsCommandError = async (output, context) => {
1022
+ const parsedOutput = {
1023
+ ...output,
1024
+ body: await parseErrorBody(output.body, context),
1025
+ };
1026
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1027
+ switch (errorCode) {
1028
+ case "DataUnavailableException":
1029
+ case "com.amazonaws.costexplorer#DataUnavailableException":
1030
+ throw await de_DataUnavailableExceptionRes(parsedOutput, context);
1031
+ case "LimitExceededException":
1032
+ case "com.amazonaws.costexplorer#LimitExceededException":
1033
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1034
+ default:
1035
+ const parsedBody = parsedOutput.body;
1036
+ return throwDefaultError({
1037
+ output,
1038
+ parsedBody,
1039
+ errorCode,
1040
+ });
1041
+ }
1042
+ };
1000
1043
  const de_GetSavingsPlansCoverageCommand = async (output, context) => {
1001
1044
  if (output.statusCode >= 300) {
1002
1045
  return de_GetSavingsPlansCoverageCommandError(output, context);
@@ -1321,6 +1364,9 @@ const de_ListSavingsPlansPurchaseRecommendationGenerationCommandError = async (o
1321
1364
  };
1322
1365
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1323
1366
  switch (errorCode) {
1367
+ case "DataUnavailableException":
1368
+ case "com.amazonaws.costexplorer#DataUnavailableException":
1369
+ throw await de_DataUnavailableExceptionRes(parsedOutput, context);
1324
1370
  case "InvalidNextTokenException":
1325
1371
  case "com.amazonaws.costexplorer#InvalidNextTokenException":
1326
1372
  throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
@@ -1426,6 +1472,9 @@ const de_StartSavingsPlansPurchaseRecommendationGenerationCommandError = async (
1426
1472
  };
1427
1473
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1428
1474
  switch (errorCode) {
1475
+ case "DataUnavailableException":
1476
+ case "com.amazonaws.costexplorer#DataUnavailableException":
1477
+ throw await de_DataUnavailableExceptionRes(parsedOutput, context);
1429
1478
  case "GenerationExistsException":
1430
1479
  case "com.amazonaws.costexplorer#GenerationExistsException":
1431
1480
  throw await de_GenerationExistsExceptionRes(parsedOutput, context);
@@ -18,6 +18,7 @@ import { GetReservationCoverageCommand, } from "./commands/GetReservationCoverag
18
18
  import { GetReservationPurchaseRecommendationCommand, } from "./commands/GetReservationPurchaseRecommendationCommand";
19
19
  import { GetReservationUtilizationCommand, } from "./commands/GetReservationUtilizationCommand";
20
20
  import { GetRightsizingRecommendationCommand, } from "./commands/GetRightsizingRecommendationCommand";
21
+ import { GetSavingsPlanPurchaseRecommendationDetailsCommand, } from "./commands/GetSavingsPlanPurchaseRecommendationDetailsCommand";
21
22
  import { GetSavingsPlansCoverageCommand, } from "./commands/GetSavingsPlansCoverageCommand";
22
23
  import { GetSavingsPlansPurchaseRecommendationCommand, } from "./commands/GetSavingsPlansPurchaseRecommendationCommand";
23
24
  import { GetSavingsPlansUtilizationCommand, } from "./commands/GetSavingsPlansUtilizationCommand";
@@ -57,6 +58,7 @@ const commands = {
57
58
  GetReservationPurchaseRecommendationCommand,
58
59
  GetReservationUtilizationCommand,
59
60
  GetRightsizingRecommendationCommand,
61
+ GetSavingsPlanPurchaseRecommendationDetailsCommand,
60
62
  GetSavingsPlansCoverageCommand,
61
63
  GetSavingsPlansPurchaseRecommendationCommand,
62
64
  GetSavingsPlansUtilizationCommand,
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { de_GetSavingsPlanPurchaseRecommendationDetailsCommand, se_GetSavingsPlanPurchaseRecommendationDetailsCommand, } from "../protocols/Aws_json1_1";
5
+ export { $Command };
6
+ export class GetSavingsPlanPurchaseRecommendationDetailsCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetSavingsPlanPurchaseRecommendationDetailsCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "CostExplorerClient";
25
+ const commandName = "GetSavingsPlanPurchaseRecommendationDetailsCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_GetSavingsPlanPurchaseRecommendationDetailsCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_GetSavingsPlanPurchaseRecommendationDetailsCommand(output, context);
41
+ }
42
+ }
@@ -17,6 +17,7 @@ export * from "./GetReservationCoverageCommand";
17
17
  export * from "./GetReservationPurchaseRecommendationCommand";
18
18
  export * from "./GetReservationUtilizationCommand";
19
19
  export * from "./GetRightsizingRecommendationCommand";
20
+ export * from "./GetSavingsPlanPurchaseRecommendationDetailsCommand";
20
21
  export * from "./GetSavingsPlansCoverageCommand";
21
22
  export * from "./GetSavingsPlansPurchaseRecommendationCommand";
22
23
  export * from "./GetSavingsPlansUtilizationCommand";
@@ -1,4 +1,4 @@
1
- const A = "type", B = "fn", C = "argv", D = "ref", E = "properties", F = "headers", G = "authSchemes", H = "signingRegion", I = "signingName";
2
- const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = "stringEquals", i = { "required": true, "default": false, [A]: "Boolean" }, j = { [D]: "Region" }, k = { [D]: "Endpoint" }, l = {}, m = { [B]: "getAttr", [C]: [{ [D]: d }, "name"] }, n = { [G]: [{ "name": "sigv4", [H]: "us-east-1", [I]: "ce" }] }, o = { [f]: "FIPS and DualStack are enabled, but this partition does not support one or both", [A]: f }, p = { [f]: "FIPS is enabled but this partition does not support FIPS", [A]: f }, q = { [f]: "DualStack is enabled but this partition does not support DualStack", [A]: f }, r = { "url": "https://ce.us-east-1.amazonaws.com", [E]: n, [F]: {} }, s = { [G]: [{ "name": "sigv4", [H]: "cn-northwest-1", [I]: "ce" }] }, t = { "url": "https://ce.cn-northwest-1.amazonaws.com.cn", [E]: s, [F]: {} }, u = [{ [B]: "booleanEquals", [C]: [{ [D]: "UseFIPS" }, true] }], v = [{ [B]: "booleanEquals", [C]: [{ [D]: "UseDualStack" }, true] }], w = [{ [B]: "booleanEquals", [C]: [{ [D]: "UseFIPS" }, true] }, { [B]: "booleanEquals", [C]: [{ [D]: "UseDualStack" }, true] }], x = [{ [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsFIPS"] }] }, { [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsDualStack"] }] }], y = [{ [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsFIPS"] }] }], z = [{ [B]: "booleanEquals", [C]: [true, { [B]: "getAttr", [C]: [{ [D]: d }, "supportsDualStack"] }] }];
3
- const _data = { version: "1.0", parameters: { Region: { required: a, [A]: c }, UseDualStack: i, UseFIPS: i, Endpoint: { required: b, [A]: c } }, rules: [{ conditions: [{ [B]: "aws.partition", [C]: [j], assign: d }], [A]: e, rules: [{ conditions: [{ [B]: "isSet", [C]: [k] }], [A]: e, rules: [{ conditions: u, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [A]: f }, { [A]: e, rules: [{ conditions: v, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [A]: f }, { endpoint: { url: k, [E]: l, [F]: l }, [A]: g }] }] }, { conditions: [{ [B]: h, [C]: [m, "aws"] }], [A]: e, rules: [{ conditions: w, [A]: e, rules: [{ conditions: x, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.api.aws", [E]: n, [F]: l }, [A]: g }] }, o] }, { conditions: u, [A]: e, rules: [{ conditions: y, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.amazonaws.com", [E]: n, [F]: l }, [A]: g }] }, p] }, { conditions: v, [A]: e, rules: [{ conditions: z, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer.{Region}.api.aws", [E]: n, [F]: l }, [A]: g }] }, q] }, { endpoint: r, [A]: g }] }, { conditions: [{ [B]: h, [C]: [m, "aws-cn"] }], [A]: e, rules: [{ conditions: w, [A]: e, rules: [{ conditions: x, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.api.amazonwebservices.com.cn", [E]: s, [F]: l }, [A]: g }] }, o] }, { conditions: u, [A]: e, rules: [{ conditions: y, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer-fips.{Region}.amazonaws.com.cn", [E]: s, [F]: l }, [A]: g }] }, p] }, { conditions: v, [A]: e, rules: [{ conditions: z, [A]: e, rules: [{ endpoint: { url: "https://cost-explorer.{Region}.api.amazonwebservices.com.cn", [E]: s, [F]: l }, [A]: g }] }, q] }, { endpoint: t, [A]: g }] }, { conditions: w, [A]: e, rules: [{ conditions: x, [A]: e, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [E]: l, [F]: l }, [A]: g }] }, o] }, { conditions: u, [A]: e, rules: [{ conditions: y, [A]: e, rules: [{ [A]: e, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dnsSuffix}", [E]: l, [F]: l }, [A]: g }] }] }, p] }, { conditions: v, [A]: e, rules: [{ conditions: z, [A]: e, rules: [{ endpoint: { url: "https://ce.{Region}.{PartitionResult#dualStackDnsSuffix}", [E]: l, [F]: l }, [A]: g }] }, q] }, { [A]: e, rules: [{ conditions: [{ [B]: h, [C]: [j, "aws-global"] }], endpoint: r, [A]: g }, { conditions: [{ [B]: h, [C]: [j, "aws-cn-global"] }], endpoint: t, [A]: g }, { endpoint: { url: "https://ce.{Region}.{PartitionResult#dnsSuffix}", [E]: l, [F]: l }, [A]: g }] }] }] };
1
+ const v = "required", w = "fn", x = "argv", y = "ref";
2
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = "stringEquals", g = "sigv4", h = { [v]: false, "type": "String" }, i = { [v]: true, "default": false, "type": "Boolean" }, j = { [y]: "Endpoint" }, k = { [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, true] }, l = { [w]: "booleanEquals", [x]: [{ [y]: "UseDualStack" }, true] }, m = {}, n = { [w]: "getAttr", [x]: [{ [y]: e }, "name"] }, o = { [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, false] }, p = { [w]: "booleanEquals", [x]: [{ [y]: "UseDualStack" }, false] }, q = { [w]: "booleanEquals", [x]: [true, { [w]: "getAttr", [x]: [{ [y]: e }, "supportsFIPS"] }] }, r = { [w]: "booleanEquals", [x]: [true, { [w]: "getAttr", [x]: [{ [y]: e }, "supportsDualStack"] }] }, s = [k], t = [l], u = [{ [y]: "Region" }];
3
+ const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [w]: a, [x]: [j] }], type: b, rules: [{ conditions: s, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: t, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: j, properties: m, headers: m }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [w]: a, [x]: u }], type: b, rules: [{ conditions: [{ [w]: "aws.partition", [x]: u, assign: e }], type: b, rules: [{ conditions: [{ [w]: f, [x]: [n, "aws"] }, o, p], endpoint: { url: "https://ce.us-east-1.amazonaws.com", properties: { authSchemes: [{ name: g, signingName: "ce", signingRegion: "us-east-1" }] }, headers: m }, type: d }, { conditions: [{ [w]: f, [x]: [n, "aws-cn"] }, o, p], endpoint: { url: "https://ce.cn-northwest-1.amazonaws.com.cn", properties: { authSchemes: [{ name: g, signingName: "ce", signingRegion: "cn-northwest-1" }] }, headers: m }, type: d }, { conditions: [k, l], type: b, rules: [{ conditions: [q, r], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: s, type: b, rules: [{ conditions: [q], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://ce-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: t, type: b, rules: [{ conditions: [r], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://ce.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://ce.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
4
4
  export const ruleSet = _data;
@@ -116,6 +116,12 @@ export const se_GetRightsizingRecommendationCommand = async (input, context) =>
116
116
  body = JSON.stringify(se_GetRightsizingRecommendationRequest(input, context));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
+ export const se_GetSavingsPlanPurchaseRecommendationDetailsCommand = async (input, context) => {
120
+ const headers = sharedHeaders("GetSavingsPlanPurchaseRecommendationDetails");
121
+ let body;
122
+ body = JSON.stringify(_json(input));
123
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
124
+ };
119
125
  export const se_GetSavingsPlansCoverageCommand = async (input, context) => {
120
126
  const headers = sharedHeaders("GetSavingsPlansCoverage");
121
127
  let body;
@@ -937,6 +943,41 @@ const de_GetRightsizingRecommendationCommandError = async (output, context) => {
937
943
  });
938
944
  }
939
945
  };
946
+ export const de_GetSavingsPlanPurchaseRecommendationDetailsCommand = async (output, context) => {
947
+ if (output.statusCode >= 300) {
948
+ return de_GetSavingsPlanPurchaseRecommendationDetailsCommandError(output, context);
949
+ }
950
+ const data = await parseBody(output.body, context);
951
+ let contents = {};
952
+ contents = _json(data);
953
+ const response = {
954
+ $metadata: deserializeMetadata(output),
955
+ ...contents,
956
+ };
957
+ return response;
958
+ };
959
+ const de_GetSavingsPlanPurchaseRecommendationDetailsCommandError = async (output, context) => {
960
+ const parsedOutput = {
961
+ ...output,
962
+ body: await parseErrorBody(output.body, context),
963
+ };
964
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
965
+ switch (errorCode) {
966
+ case "DataUnavailableException":
967
+ case "com.amazonaws.costexplorer#DataUnavailableException":
968
+ throw await de_DataUnavailableExceptionRes(parsedOutput, context);
969
+ case "LimitExceededException":
970
+ case "com.amazonaws.costexplorer#LimitExceededException":
971
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
972
+ default:
973
+ const parsedBody = parsedOutput.body;
974
+ return throwDefaultError({
975
+ output,
976
+ parsedBody,
977
+ errorCode,
978
+ });
979
+ }
980
+ };
940
981
  export const de_GetSavingsPlansCoverageCommand = async (output, context) => {
941
982
  if (output.statusCode >= 300) {
942
983
  return de_GetSavingsPlansCoverageCommandError(output, context);
@@ -1252,6 +1293,9 @@ const de_ListSavingsPlansPurchaseRecommendationGenerationCommandError = async (o
1252
1293
  };
1253
1294
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1254
1295
  switch (errorCode) {
1296
+ case "DataUnavailableException":
1297
+ case "com.amazonaws.costexplorer#DataUnavailableException":
1298
+ throw await de_DataUnavailableExceptionRes(parsedOutput, context);
1255
1299
  case "InvalidNextTokenException":
1256
1300
  case "com.amazonaws.costexplorer#InvalidNextTokenException":
1257
1301
  throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
@@ -1354,6 +1398,9 @@ const de_StartSavingsPlansPurchaseRecommendationGenerationCommandError = async (
1354
1398
  };
1355
1399
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1356
1400
  switch (errorCode) {
1401
+ case "DataUnavailableException":
1402
+ case "com.amazonaws.costexplorer#DataUnavailableException":
1403
+ throw await de_DataUnavailableExceptionRes(parsedOutput, context);
1357
1404
  case "GenerationExistsException":
1358
1405
  case "com.amazonaws.costexplorer#GenerationExistsException":
1359
1406
  throw await de_GenerationExistsExceptionRes(parsedOutput, context);
@@ -18,6 +18,7 @@ import { GetReservationCoverageCommandInput, GetReservationCoverageCommandOutput
18
18
  import { GetReservationPurchaseRecommendationCommandInput, GetReservationPurchaseRecommendationCommandOutput } from "./commands/GetReservationPurchaseRecommendationCommand";
19
19
  import { GetReservationUtilizationCommandInput, GetReservationUtilizationCommandOutput } from "./commands/GetReservationUtilizationCommand";
20
20
  import { GetRightsizingRecommendationCommandInput, GetRightsizingRecommendationCommandOutput } from "./commands/GetRightsizingRecommendationCommand";
21
+ import { GetSavingsPlanPurchaseRecommendationDetailsCommandInput, GetSavingsPlanPurchaseRecommendationDetailsCommandOutput } from "./commands/GetSavingsPlanPurchaseRecommendationDetailsCommand";
21
22
  import { GetSavingsPlansCoverageCommandInput, GetSavingsPlansCoverageCommandOutput } from "./commands/GetSavingsPlansCoverageCommand";
22
23
  import { GetSavingsPlansPurchaseRecommendationCommandInput, GetSavingsPlansPurchaseRecommendationCommandOutput } from "./commands/GetSavingsPlansPurchaseRecommendationCommand";
23
24
  import { GetSavingsPlansUtilizationCommandInput, GetSavingsPlansUtilizationCommandOutput } from "./commands/GetSavingsPlansUtilizationCommand";
@@ -152,6 +153,12 @@ export interface CostExplorer {
152
153
  getRightsizingRecommendation(args: GetRightsizingRecommendationCommandInput, options?: __HttpHandlerOptions): Promise<GetRightsizingRecommendationCommandOutput>;
153
154
  getRightsizingRecommendation(args: GetRightsizingRecommendationCommandInput, cb: (err: any, data?: GetRightsizingRecommendationCommandOutput) => void): void;
154
155
  getRightsizingRecommendation(args: GetRightsizingRecommendationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRightsizingRecommendationCommandOutput) => void): void;
156
+ /**
157
+ * @see {@link GetSavingsPlanPurchaseRecommendationDetailsCommand}
158
+ */
159
+ getSavingsPlanPurchaseRecommendationDetails(args: GetSavingsPlanPurchaseRecommendationDetailsCommandInput, options?: __HttpHandlerOptions): Promise<GetSavingsPlanPurchaseRecommendationDetailsCommandOutput>;
160
+ getSavingsPlanPurchaseRecommendationDetails(args: GetSavingsPlanPurchaseRecommendationDetailsCommandInput, cb: (err: any, data?: GetSavingsPlanPurchaseRecommendationDetailsCommandOutput) => void): void;
161
+ getSavingsPlanPurchaseRecommendationDetails(args: GetSavingsPlanPurchaseRecommendationDetailsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSavingsPlanPurchaseRecommendationDetailsCommandOutput) => void): void;
155
162
  /**
156
163
  * @see {@link GetSavingsPlansCoverageCommand}
157
164
  */
@@ -27,6 +27,7 @@ import { GetReservationCoverageCommandInput, GetReservationCoverageCommandOutput
27
27
  import { GetReservationPurchaseRecommendationCommandInput, GetReservationPurchaseRecommendationCommandOutput } from "./commands/GetReservationPurchaseRecommendationCommand";
28
28
  import { GetReservationUtilizationCommandInput, GetReservationUtilizationCommandOutput } from "./commands/GetReservationUtilizationCommand";
29
29
  import { GetRightsizingRecommendationCommandInput, GetRightsizingRecommendationCommandOutput } from "./commands/GetRightsizingRecommendationCommand";
30
+ import { GetSavingsPlanPurchaseRecommendationDetailsCommandInput, GetSavingsPlanPurchaseRecommendationDetailsCommandOutput } from "./commands/GetSavingsPlanPurchaseRecommendationDetailsCommand";
30
31
  import { GetSavingsPlansCoverageCommandInput, GetSavingsPlansCoverageCommandOutput } from "./commands/GetSavingsPlansCoverageCommand";
31
32
  import { GetSavingsPlansPurchaseRecommendationCommandInput, GetSavingsPlansPurchaseRecommendationCommandOutput } from "./commands/GetSavingsPlansPurchaseRecommendationCommand";
32
33
  import { GetSavingsPlansUtilizationCommandInput, GetSavingsPlansUtilizationCommandOutput } from "./commands/GetSavingsPlansUtilizationCommand";
@@ -50,11 +51,11 @@ export { __Client };
50
51
  /**
51
52
  * @public
52
53
  */
53
- export type ServiceInputTypes = CreateAnomalyMonitorCommandInput | CreateAnomalySubscriptionCommandInput | CreateCostCategoryDefinitionCommandInput | DeleteAnomalyMonitorCommandInput | DeleteAnomalySubscriptionCommandInput | DeleteCostCategoryDefinitionCommandInput | DescribeCostCategoryDefinitionCommandInput | GetAnomaliesCommandInput | GetAnomalyMonitorsCommandInput | GetAnomalySubscriptionsCommandInput | GetCostAndUsageCommandInput | GetCostAndUsageWithResourcesCommandInput | GetCostCategoriesCommandInput | GetCostForecastCommandInput | GetDimensionValuesCommandInput | GetReservationCoverageCommandInput | GetReservationPurchaseRecommendationCommandInput | GetReservationUtilizationCommandInput | GetRightsizingRecommendationCommandInput | GetSavingsPlansCoverageCommandInput | GetSavingsPlansPurchaseRecommendationCommandInput | GetSavingsPlansUtilizationCommandInput | GetSavingsPlansUtilizationDetailsCommandInput | GetTagsCommandInput | GetUsageForecastCommandInput | ListCostAllocationTagsCommandInput | ListCostCategoryDefinitionsCommandInput | ListSavingsPlansPurchaseRecommendationGenerationCommandInput | ListTagsForResourceCommandInput | ProvideAnomalyFeedbackCommandInput | StartSavingsPlansPurchaseRecommendationGenerationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAnomalyMonitorCommandInput | UpdateAnomalySubscriptionCommandInput | UpdateCostAllocationTagsStatusCommandInput | UpdateCostCategoryDefinitionCommandInput;
54
+ export type ServiceInputTypes = CreateAnomalyMonitorCommandInput | CreateAnomalySubscriptionCommandInput | CreateCostCategoryDefinitionCommandInput | DeleteAnomalyMonitorCommandInput | DeleteAnomalySubscriptionCommandInput | DeleteCostCategoryDefinitionCommandInput | DescribeCostCategoryDefinitionCommandInput | GetAnomaliesCommandInput | GetAnomalyMonitorsCommandInput | GetAnomalySubscriptionsCommandInput | GetCostAndUsageCommandInput | GetCostAndUsageWithResourcesCommandInput | GetCostCategoriesCommandInput | GetCostForecastCommandInput | GetDimensionValuesCommandInput | GetReservationCoverageCommandInput | GetReservationPurchaseRecommendationCommandInput | GetReservationUtilizationCommandInput | GetRightsizingRecommendationCommandInput | GetSavingsPlanPurchaseRecommendationDetailsCommandInput | GetSavingsPlansCoverageCommandInput | GetSavingsPlansPurchaseRecommendationCommandInput | GetSavingsPlansUtilizationCommandInput | GetSavingsPlansUtilizationDetailsCommandInput | GetTagsCommandInput | GetUsageForecastCommandInput | ListCostAllocationTagsCommandInput | ListCostCategoryDefinitionsCommandInput | ListSavingsPlansPurchaseRecommendationGenerationCommandInput | ListTagsForResourceCommandInput | ProvideAnomalyFeedbackCommandInput | StartSavingsPlansPurchaseRecommendationGenerationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAnomalyMonitorCommandInput | UpdateAnomalySubscriptionCommandInput | UpdateCostAllocationTagsStatusCommandInput | UpdateCostCategoryDefinitionCommandInput;
54
55
  /**
55
56
  * @public
56
57
  */
57
- export type ServiceOutputTypes = CreateAnomalyMonitorCommandOutput | CreateAnomalySubscriptionCommandOutput | CreateCostCategoryDefinitionCommandOutput | DeleteAnomalyMonitorCommandOutput | DeleteAnomalySubscriptionCommandOutput | DeleteCostCategoryDefinitionCommandOutput | DescribeCostCategoryDefinitionCommandOutput | GetAnomaliesCommandOutput | GetAnomalyMonitorsCommandOutput | GetAnomalySubscriptionsCommandOutput | GetCostAndUsageCommandOutput | GetCostAndUsageWithResourcesCommandOutput | GetCostCategoriesCommandOutput | GetCostForecastCommandOutput | GetDimensionValuesCommandOutput | GetReservationCoverageCommandOutput | GetReservationPurchaseRecommendationCommandOutput | GetReservationUtilizationCommandOutput | GetRightsizingRecommendationCommandOutput | GetSavingsPlansCoverageCommandOutput | GetSavingsPlansPurchaseRecommendationCommandOutput | GetSavingsPlansUtilizationCommandOutput | GetSavingsPlansUtilizationDetailsCommandOutput | GetTagsCommandOutput | GetUsageForecastCommandOutput | ListCostAllocationTagsCommandOutput | ListCostCategoryDefinitionsCommandOutput | ListSavingsPlansPurchaseRecommendationGenerationCommandOutput | ListTagsForResourceCommandOutput | ProvideAnomalyFeedbackCommandOutput | StartSavingsPlansPurchaseRecommendationGenerationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAnomalyMonitorCommandOutput | UpdateAnomalySubscriptionCommandOutput | UpdateCostAllocationTagsStatusCommandOutput | UpdateCostCategoryDefinitionCommandOutput;
58
+ export type ServiceOutputTypes = CreateAnomalyMonitorCommandOutput | CreateAnomalySubscriptionCommandOutput | CreateCostCategoryDefinitionCommandOutput | DeleteAnomalyMonitorCommandOutput | DeleteAnomalySubscriptionCommandOutput | DeleteCostCategoryDefinitionCommandOutput | DescribeCostCategoryDefinitionCommandOutput | GetAnomaliesCommandOutput | GetAnomalyMonitorsCommandOutput | GetAnomalySubscriptionsCommandOutput | GetCostAndUsageCommandOutput | GetCostAndUsageWithResourcesCommandOutput | GetCostCategoriesCommandOutput | GetCostForecastCommandOutput | GetDimensionValuesCommandOutput | GetReservationCoverageCommandOutput | GetReservationPurchaseRecommendationCommandOutput | GetReservationUtilizationCommandOutput | GetRightsizingRecommendationCommandOutput | GetSavingsPlanPurchaseRecommendationDetailsCommandOutput | GetSavingsPlansCoverageCommandOutput | GetSavingsPlansPurchaseRecommendationCommandOutput | GetSavingsPlansUtilizationCommandOutput | GetSavingsPlansUtilizationDetailsCommandOutput | GetTagsCommandOutput | GetUsageForecastCommandOutput | ListCostAllocationTagsCommandOutput | ListCostCategoryDefinitionsCommandOutput | ListSavingsPlansPurchaseRecommendationGenerationCommandOutput | ListTagsForResourceCommandOutput | ProvideAnomalyFeedbackCommandOutput | StartSavingsPlansPurchaseRecommendationGenerationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAnomalyMonitorCommandOutput | UpdateAnomalySubscriptionCommandOutput | UpdateCostAllocationTagsStatusCommandOutput | UpdateCostCategoryDefinitionCommandOutput;
58
59
  /**
59
60
  * @public
60
61
  */
@@ -0,0 +1,119 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { CostExplorerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CostExplorerClient";
5
+ import { GetSavingsPlanPurchaseRecommendationDetailsRequest, GetSavingsPlanPurchaseRecommendationDetailsResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetSavingsPlanPurchaseRecommendationDetailsCommand}.
14
+ */
15
+ export interface GetSavingsPlanPurchaseRecommendationDetailsCommandInput extends GetSavingsPlanPurchaseRecommendationDetailsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetSavingsPlanPurchaseRecommendationDetailsCommand}.
21
+ */
22
+ export interface GetSavingsPlanPurchaseRecommendationDetailsCommandOutput extends GetSavingsPlanPurchaseRecommendationDetailsResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Retrieves the details for a Savings Plan recommendation. These details include the hourly
27
+ * data-points that construct the new cost, coverage, and utilization charts.</p>
28
+ * @example
29
+ * Use a bare-bones client and the command you need to make an API call.
30
+ * ```javascript
31
+ * import { CostExplorerClient, GetSavingsPlanPurchaseRecommendationDetailsCommand } from "@aws-sdk/client-cost-explorer"; // ES Modules import
32
+ * // const { CostExplorerClient, GetSavingsPlanPurchaseRecommendationDetailsCommand } = require("@aws-sdk/client-cost-explorer"); // CommonJS import
33
+ * const client = new CostExplorerClient(config);
34
+ * const input = { // GetSavingsPlanPurchaseRecommendationDetailsRequest
35
+ * RecommendationDetailId: "STRING_VALUE", // required
36
+ * };
37
+ * const command = new GetSavingsPlanPurchaseRecommendationDetailsCommand(input);
38
+ * const response = await client.send(command);
39
+ * // { // GetSavingsPlanPurchaseRecommendationDetailsResponse
40
+ * // RecommendationDetailId: "STRING_VALUE",
41
+ * // RecommendationDetailData: { // RecommendationDetailData
42
+ * // AccountScope: "PAYER" || "LINKED",
43
+ * // LookbackPeriodInDays: "SEVEN_DAYS" || "THIRTY_DAYS" || "SIXTY_DAYS",
44
+ * // SavingsPlansType: "COMPUTE_SP" || "EC2_INSTANCE_SP" || "SAGEMAKER_SP",
45
+ * // TermInYears: "ONE_YEAR" || "THREE_YEARS",
46
+ * // PaymentOption: "NO_UPFRONT" || "PARTIAL_UPFRONT" || "ALL_UPFRONT" || "LIGHT_UTILIZATION" || "MEDIUM_UTILIZATION" || "HEAVY_UTILIZATION",
47
+ * // AccountId: "STRING_VALUE",
48
+ * // CurrencyCode: "STRING_VALUE",
49
+ * // InstanceFamily: "STRING_VALUE",
50
+ * // Region: "STRING_VALUE",
51
+ * // OfferingId: "STRING_VALUE",
52
+ * // GenerationTimestamp: "STRING_VALUE",
53
+ * // LatestUsageTimestamp: "STRING_VALUE",
54
+ * // CurrentAverageHourlyOnDemandSpend: "STRING_VALUE",
55
+ * // CurrentMaximumHourlyOnDemandSpend: "STRING_VALUE",
56
+ * // CurrentMinimumHourlyOnDemandSpend: "STRING_VALUE",
57
+ * // EstimatedAverageUtilization: "STRING_VALUE",
58
+ * // EstimatedMonthlySavingsAmount: "STRING_VALUE",
59
+ * // EstimatedOnDemandCost: "STRING_VALUE",
60
+ * // EstimatedOnDemandCostWithCurrentCommitment: "STRING_VALUE",
61
+ * // EstimatedROI: "STRING_VALUE",
62
+ * // EstimatedSPCost: "STRING_VALUE",
63
+ * // EstimatedSavingsAmount: "STRING_VALUE",
64
+ * // EstimatedSavingsPercentage: "STRING_VALUE",
65
+ * // ExistingHourlyCommitment: "STRING_VALUE",
66
+ * // HourlyCommitmentToPurchase: "STRING_VALUE",
67
+ * // UpfrontCost: "STRING_VALUE",
68
+ * // CurrentAverageCoverage: "STRING_VALUE",
69
+ * // EstimatedAverageCoverage: "STRING_VALUE",
70
+ * // MetricsOverLookbackPeriod: [ // MetricsOverLookbackPeriod
71
+ * // { // RecommendationDetailHourlyMetrics
72
+ * // StartTime: "STRING_VALUE",
73
+ * // EstimatedOnDemandCost: "STRING_VALUE",
74
+ * // CurrentCoverage: "STRING_VALUE",
75
+ * // EstimatedCoverage: "STRING_VALUE",
76
+ * // EstimatedNewCommitmentUtilization: "STRING_VALUE",
77
+ * // },
78
+ * // ],
79
+ * // },
80
+ * // };
81
+ *
82
+ * ```
83
+ *
84
+ * @param GetSavingsPlanPurchaseRecommendationDetailsCommandInput - {@link GetSavingsPlanPurchaseRecommendationDetailsCommandInput}
85
+ * @returns {@link GetSavingsPlanPurchaseRecommendationDetailsCommandOutput}
86
+ * @see {@link GetSavingsPlanPurchaseRecommendationDetailsCommandInput} for command's `input` shape.
87
+ * @see {@link GetSavingsPlanPurchaseRecommendationDetailsCommandOutput} for command's `response` shape.
88
+ * @see {@link CostExplorerClientResolvedConfig | config} for CostExplorerClient's `config` shape.
89
+ *
90
+ * @throws {@link DataUnavailableException} (client fault)
91
+ * <p>The requested data is unavailable.</p>
92
+ *
93
+ * @throws {@link LimitExceededException} (client fault)
94
+ * <p>You made too many calls in a short period of time. Try again later.</p>
95
+ *
96
+ * @throws {@link CostExplorerServiceException}
97
+ * <p>Base exception class for all service exceptions from CostExplorer service.</p>
98
+ *
99
+ */
100
+ export declare class GetSavingsPlanPurchaseRecommendationDetailsCommand extends $Command<GetSavingsPlanPurchaseRecommendationDetailsCommandInput, GetSavingsPlanPurchaseRecommendationDetailsCommandOutput, CostExplorerClientResolvedConfig> {
101
+ readonly input: GetSavingsPlanPurchaseRecommendationDetailsCommandInput;
102
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
103
+ /**
104
+ * @public
105
+ */
106
+ constructor(input: GetSavingsPlanPurchaseRecommendationDetailsCommandInput);
107
+ /**
108
+ * @internal
109
+ */
110
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CostExplorerClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetSavingsPlanPurchaseRecommendationDetailsCommandInput, GetSavingsPlanPurchaseRecommendationDetailsCommandOutput>;
111
+ /**
112
+ * @internal
113
+ */
114
+ private serialize;
115
+ /**
116
+ * @internal
117
+ */
118
+ private deserialize;
119
+ }
@@ -145,6 +145,7 @@ export interface GetSavingsPlansPurchaseRecommendationCommandOutput extends GetS
145
145
  * // CurrentMinimumHourlyOnDemandSpend: "STRING_VALUE",
146
146
  * // CurrentMaximumHourlyOnDemandSpend: "STRING_VALUE",
147
147
  * // CurrentAverageHourlyOnDemandSpend: "STRING_VALUE",
148
+ * // RecommendationDetailId: "STRING_VALUE",
148
149
  * // },
149
150
  * // ],
150
151
  * // SavingsPlansPurchaseRecommendationSummary: { // SavingsPlansPurchaseRecommendationSummary
@@ -62,6 +62,9 @@ export interface ListSavingsPlansPurchaseRecommendationGenerationCommandOutput e
62
62
  * @see {@link ListSavingsPlansPurchaseRecommendationGenerationCommandOutput} for command's `response` shape.
63
63
  * @see {@link CostExplorerClientResolvedConfig | config} for CostExplorerClient's `config` shape.
64
64
  *
65
+ * @throws {@link DataUnavailableException} (client fault)
66
+ * <p>The requested data is unavailable.</p>
67
+ *
65
68
  * @throws {@link InvalidNextTokenException} (client fault)
66
69
  * <p>The pagination token is invalid. Try again without a pagination token.</p>
67
70
  *