Skip to content

Commit 1a8d64c

Browse files
author
awstools
committed
feat(client-cost-explorer): This release introduces three new APIs that enable you to estimate the cost, coverage, and utilization impact of Savings Plans you plan to purchase. The three APIs are StartCommitmentPurchaseAnalysis, GetCommitmentPurchaseAnalysis, and ListCommitmentPurchaseAnalyses.
1 parent 47f4d7f commit 1a8d64c

File tree

10 files changed

+2388
-162
lines changed

10 files changed

+2388
-162
lines changed

clients/client-cost-explorer/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ GetApproximateUsageRecords
305305

306306
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/GetApproximateUsageRecordsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetApproximateUsageRecordsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetApproximateUsageRecordsCommandOutput/)
307307

308+
</details>
309+
<details>
310+
<summary>
311+
GetCommitmentPurchaseAnalysis
312+
</summary>
313+
314+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/GetCommitmentPurchaseAnalysisCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCommitmentPurchaseAnalysisCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCommitmentPurchaseAnalysisCommandOutput/)
315+
308316
</details>
309317
<details>
310318
<summary>
@@ -433,6 +441,14 @@ GetUsageForecast
433441

434442
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/GetUsageForecastCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetUsageForecastCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetUsageForecastCommandOutput/)
435443

444+
</details>
445+
<details>
446+
<summary>
447+
ListCommitmentPurchaseAnalyses
448+
</summary>
449+
450+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/ListCommitmentPurchaseAnalysesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/ListCommitmentPurchaseAnalysesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/ListCommitmentPurchaseAnalysesCommandOutput/)
451+
436452
</details>
437453
<details>
438454
<summary>
@@ -481,6 +497,14 @@ ProvideAnomalyFeedback
481497

482498
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/ProvideAnomalyFeedbackCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/ProvideAnomalyFeedbackCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/ProvideAnomalyFeedbackCommandOutput/)
483499

500+
</details>
501+
<details>
502+
<summary>
503+
StartCommitmentPurchaseAnalysis
504+
</summary>
505+
506+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/StartCommitmentPurchaseAnalysisCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/StartCommitmentPurchaseAnalysisCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/StartCommitmentPurchaseAnalysisCommandOutput/)
507+
484508
</details>
485509
<details>
486510
<summary>

clients/client-cost-explorer/src/CostExplorer.ts

+70
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ import {
5757
GetApproximateUsageRecordsCommandInput,
5858
GetApproximateUsageRecordsCommandOutput,
5959
} from "./commands/GetApproximateUsageRecordsCommand";
60+
import {
61+
GetCommitmentPurchaseAnalysisCommand,
62+
GetCommitmentPurchaseAnalysisCommandInput,
63+
GetCommitmentPurchaseAnalysisCommandOutput,
64+
} from "./commands/GetCommitmentPurchaseAnalysisCommand";
6065
import {
6166
GetCostAndUsageCommand,
6267
GetCostAndUsageCommandInput,
@@ -133,6 +138,11 @@ import {
133138
GetUsageForecastCommandInput,
134139
GetUsageForecastCommandOutput,
135140
} from "./commands/GetUsageForecastCommand";
141+
import {
142+
ListCommitmentPurchaseAnalysesCommand,
143+
ListCommitmentPurchaseAnalysesCommandInput,
144+
ListCommitmentPurchaseAnalysesCommandOutput,
145+
} from "./commands/ListCommitmentPurchaseAnalysesCommand";
136146
import {
137147
ListCostAllocationTagBackfillHistoryCommand,
138148
ListCostAllocationTagBackfillHistoryCommandInput,
@@ -163,6 +173,11 @@ import {
163173
ProvideAnomalyFeedbackCommandInput,
164174
ProvideAnomalyFeedbackCommandOutput,
165175
} from "./commands/ProvideAnomalyFeedbackCommand";
176+
import {
177+
StartCommitmentPurchaseAnalysisCommand,
178+
StartCommitmentPurchaseAnalysisCommandInput,
179+
StartCommitmentPurchaseAnalysisCommandOutput,
180+
} from "./commands/StartCommitmentPurchaseAnalysisCommand";
166181
import {
167182
StartCostAllocationTagBackfillCommand,
168183
StartCostAllocationTagBackfillCommandInput,
@@ -213,6 +228,7 @@ const commands = {
213228
GetAnomalyMonitorsCommand,
214229
GetAnomalySubscriptionsCommand,
215230
GetApproximateUsageRecordsCommand,
231+
GetCommitmentPurchaseAnalysisCommand,
216232
GetCostAndUsageCommand,
217233
GetCostAndUsageWithResourcesCommand,
218234
GetCostCategoriesCommand,
@@ -229,12 +245,14 @@ const commands = {
229245
GetSavingsPlansUtilizationDetailsCommand,
230246
GetTagsCommand,
231247
GetUsageForecastCommand,
248+
ListCommitmentPurchaseAnalysesCommand,
232249
ListCostAllocationTagBackfillHistoryCommand,
233250
ListCostAllocationTagsCommand,
234251
ListCostCategoryDefinitionsCommand,
235252
ListSavingsPlansPurchaseRecommendationGenerationCommand,
236253
ListTagsForResourceCommand,
237254
ProvideAnomalyFeedbackCommand,
255+
StartCommitmentPurchaseAnalysisCommand,
238256
StartCostAllocationTagBackfillCommand,
239257
StartSavingsPlansPurchaseRecommendationGenerationCommand,
240258
TagResourceCommand,
@@ -429,6 +447,23 @@ export interface CostExplorer {
429447
cb: (err: any, data?: GetApproximateUsageRecordsCommandOutput) => void
430448
): void;
431449

450+
/**
451+
* @see {@link GetCommitmentPurchaseAnalysisCommand}
452+
*/
453+
getCommitmentPurchaseAnalysis(
454+
args: GetCommitmentPurchaseAnalysisCommandInput,
455+
options?: __HttpHandlerOptions
456+
): Promise<GetCommitmentPurchaseAnalysisCommandOutput>;
457+
getCommitmentPurchaseAnalysis(
458+
args: GetCommitmentPurchaseAnalysisCommandInput,
459+
cb: (err: any, data?: GetCommitmentPurchaseAnalysisCommandOutput) => void
460+
): void;
461+
getCommitmentPurchaseAnalysis(
462+
args: GetCommitmentPurchaseAnalysisCommandInput,
463+
options: __HttpHandlerOptions,
464+
cb: (err: any, data?: GetCommitmentPurchaseAnalysisCommandOutput) => void
465+
): void;
466+
432467
/**
433468
* @see {@link GetCostAndUsageCommand}
434469
*/
@@ -689,6 +724,24 @@ export interface CostExplorer {
689724
cb: (err: any, data?: GetUsageForecastCommandOutput) => void
690725
): void;
691726

727+
/**
728+
* @see {@link ListCommitmentPurchaseAnalysesCommand}
729+
*/
730+
listCommitmentPurchaseAnalyses(): Promise<ListCommitmentPurchaseAnalysesCommandOutput>;
731+
listCommitmentPurchaseAnalyses(
732+
args: ListCommitmentPurchaseAnalysesCommandInput,
733+
options?: __HttpHandlerOptions
734+
): Promise<ListCommitmentPurchaseAnalysesCommandOutput>;
735+
listCommitmentPurchaseAnalyses(
736+
args: ListCommitmentPurchaseAnalysesCommandInput,
737+
cb: (err: any, data?: ListCommitmentPurchaseAnalysesCommandOutput) => void
738+
): void;
739+
listCommitmentPurchaseAnalyses(
740+
args: ListCommitmentPurchaseAnalysesCommandInput,
741+
options: __HttpHandlerOptions,
742+
cb: (err: any, data?: ListCommitmentPurchaseAnalysesCommandOutput) => void
743+
): void;
744+
692745
/**
693746
* @see {@link ListCostAllocationTagBackfillHistoryCommand}
694747
*/
@@ -795,6 +848,23 @@ export interface CostExplorer {
795848
cb: (err: any, data?: ProvideAnomalyFeedbackCommandOutput) => void
796849
): void;
797850

851+
/**
852+
* @see {@link StartCommitmentPurchaseAnalysisCommand}
853+
*/
854+
startCommitmentPurchaseAnalysis(
855+
args: StartCommitmentPurchaseAnalysisCommandInput,
856+
options?: __HttpHandlerOptions
857+
): Promise<StartCommitmentPurchaseAnalysisCommandOutput>;
858+
startCommitmentPurchaseAnalysis(
859+
args: StartCommitmentPurchaseAnalysisCommandInput,
860+
cb: (err: any, data?: StartCommitmentPurchaseAnalysisCommandOutput) => void
861+
): void;
862+
startCommitmentPurchaseAnalysis(
863+
args: StartCommitmentPurchaseAnalysisCommandInput,
864+
options: __HttpHandlerOptions,
865+
cb: (err: any, data?: StartCommitmentPurchaseAnalysisCommandOutput) => void
866+
): void;
867+
798868
/**
799869
* @see {@link StartCostAllocationTagBackfillCommand}
800870
*/

clients/client-cost-explorer/src/CostExplorerClient.ts

+18
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ import {
9191
GetApproximateUsageRecordsCommandInput,
9292
GetApproximateUsageRecordsCommandOutput,
9393
} from "./commands/GetApproximateUsageRecordsCommand";
94+
import {
95+
GetCommitmentPurchaseAnalysisCommandInput,
96+
GetCommitmentPurchaseAnalysisCommandOutput,
97+
} from "./commands/GetCommitmentPurchaseAnalysisCommand";
9498
import { GetCostAndUsageCommandInput, GetCostAndUsageCommandOutput } from "./commands/GetCostAndUsageCommand";
9599
import {
96100
GetCostAndUsageWithResourcesCommandInput,
@@ -137,6 +141,10 @@ import {
137141
} from "./commands/GetSavingsPlansUtilizationDetailsCommand";
138142
import { GetTagsCommandInput, GetTagsCommandOutput } from "./commands/GetTagsCommand";
139143
import { GetUsageForecastCommandInput, GetUsageForecastCommandOutput } from "./commands/GetUsageForecastCommand";
144+
import {
145+
ListCommitmentPurchaseAnalysesCommandInput,
146+
ListCommitmentPurchaseAnalysesCommandOutput,
147+
} from "./commands/ListCommitmentPurchaseAnalysesCommand";
140148
import {
141149
ListCostAllocationTagBackfillHistoryCommandInput,
142150
ListCostAllocationTagBackfillHistoryCommandOutput,
@@ -161,6 +169,10 @@ import {
161169
ProvideAnomalyFeedbackCommandInput,
162170
ProvideAnomalyFeedbackCommandOutput,
163171
} from "./commands/ProvideAnomalyFeedbackCommand";
172+
import {
173+
StartCommitmentPurchaseAnalysisCommandInput,
174+
StartCommitmentPurchaseAnalysisCommandOutput,
175+
} from "./commands/StartCommitmentPurchaseAnalysisCommand";
164176
import {
165177
StartCostAllocationTagBackfillCommandInput,
166178
StartCostAllocationTagBackfillCommandOutput,
@@ -213,6 +225,7 @@ export type ServiceInputTypes =
213225
| GetAnomalyMonitorsCommandInput
214226
| GetAnomalySubscriptionsCommandInput
215227
| GetApproximateUsageRecordsCommandInput
228+
| GetCommitmentPurchaseAnalysisCommandInput
216229
| GetCostAndUsageCommandInput
217230
| GetCostAndUsageWithResourcesCommandInput
218231
| GetCostCategoriesCommandInput
@@ -229,12 +242,14 @@ export type ServiceInputTypes =
229242
| GetSavingsPlansUtilizationDetailsCommandInput
230243
| GetTagsCommandInput
231244
| GetUsageForecastCommandInput
245+
| ListCommitmentPurchaseAnalysesCommandInput
232246
| ListCostAllocationTagBackfillHistoryCommandInput
233247
| ListCostAllocationTagsCommandInput
234248
| ListCostCategoryDefinitionsCommandInput
235249
| ListSavingsPlansPurchaseRecommendationGenerationCommandInput
236250
| ListTagsForResourceCommandInput
237251
| ProvideAnomalyFeedbackCommandInput
252+
| StartCommitmentPurchaseAnalysisCommandInput
238253
| StartCostAllocationTagBackfillCommandInput
239254
| StartSavingsPlansPurchaseRecommendationGenerationCommandInput
240255
| TagResourceCommandInput
@@ -259,6 +274,7 @@ export type ServiceOutputTypes =
259274
| GetAnomalyMonitorsCommandOutput
260275
| GetAnomalySubscriptionsCommandOutput
261276
| GetApproximateUsageRecordsCommandOutput
277+
| GetCommitmentPurchaseAnalysisCommandOutput
262278
| GetCostAndUsageCommandOutput
263279
| GetCostAndUsageWithResourcesCommandOutput
264280
| GetCostCategoriesCommandOutput
@@ -275,12 +291,14 @@ export type ServiceOutputTypes =
275291
| GetSavingsPlansUtilizationDetailsCommandOutput
276292
| GetTagsCommandOutput
277293
| GetUsageForecastCommandOutput
294+
| ListCommitmentPurchaseAnalysesCommandOutput
278295
| ListCostAllocationTagBackfillHistoryCommandOutput
279296
| ListCostAllocationTagsCommandOutput
280297
| ListCostCategoryDefinitionsCommandOutput
281298
| ListSavingsPlansPurchaseRecommendationGenerationCommandOutput
282299
| ListTagsForResourceCommandOutput
283300
| ProvideAnomalyFeedbackCommandOutput
301+
| StartCommitmentPurchaseAnalysisCommandOutput
284302
| StartCostAllocationTagBackfillCommandOutput
285303
| StartSavingsPlansPurchaseRecommendationGenerationCommandOutput
286304
| TagResourceCommandOutput

0 commit comments

Comments
 (0)