Skip to content

Commit

Permalink
feat(client-cost-explorer): This release introduces three new APIs th…
Browse files Browse the repository at this point in the history
…at 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.
  • Loading branch information
awstools committed Nov 21, 2024
1 parent 47f4d7f commit 1a8d64c
Show file tree
Hide file tree
Showing 10 changed files with 2,388 additions and 162 deletions.
24 changes: 24 additions & 0 deletions clients/client-cost-explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ GetApproximateUsageRecords

[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/)

</details>
<details>
<summary>
GetCommitmentPurchaseAnalysis
</summary>

[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/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -433,6 +441,14 @@ GetUsageForecast

[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/)

</details>
<details>
<summary>
ListCommitmentPurchaseAnalyses
</summary>

[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/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -481,6 +497,14 @@ ProvideAnomalyFeedback

[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/)

</details>
<details>
<summary>
StartCommitmentPurchaseAnalysis
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
70 changes: 70 additions & 0 deletions clients/client-cost-explorer/src/CostExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ import {
GetApproximateUsageRecordsCommandInput,
GetApproximateUsageRecordsCommandOutput,
} from "./commands/GetApproximateUsageRecordsCommand";
import {
GetCommitmentPurchaseAnalysisCommand,
GetCommitmentPurchaseAnalysisCommandInput,
GetCommitmentPurchaseAnalysisCommandOutput,
} from "./commands/GetCommitmentPurchaseAnalysisCommand";
import {
GetCostAndUsageCommand,
GetCostAndUsageCommandInput,
Expand Down Expand Up @@ -133,6 +138,11 @@ import {
GetUsageForecastCommandInput,
GetUsageForecastCommandOutput,
} from "./commands/GetUsageForecastCommand";
import {
ListCommitmentPurchaseAnalysesCommand,
ListCommitmentPurchaseAnalysesCommandInput,
ListCommitmentPurchaseAnalysesCommandOutput,
} from "./commands/ListCommitmentPurchaseAnalysesCommand";
import {
ListCostAllocationTagBackfillHistoryCommand,
ListCostAllocationTagBackfillHistoryCommandInput,
Expand Down Expand Up @@ -163,6 +173,11 @@ import {
ProvideAnomalyFeedbackCommandInput,
ProvideAnomalyFeedbackCommandOutput,
} from "./commands/ProvideAnomalyFeedbackCommand";
import {
StartCommitmentPurchaseAnalysisCommand,
StartCommitmentPurchaseAnalysisCommandInput,
StartCommitmentPurchaseAnalysisCommandOutput,
} from "./commands/StartCommitmentPurchaseAnalysisCommand";
import {
StartCostAllocationTagBackfillCommand,
StartCostAllocationTagBackfillCommandInput,
Expand Down Expand Up @@ -213,6 +228,7 @@ const commands = {
GetAnomalyMonitorsCommand,
GetAnomalySubscriptionsCommand,
GetApproximateUsageRecordsCommand,
GetCommitmentPurchaseAnalysisCommand,
GetCostAndUsageCommand,
GetCostAndUsageWithResourcesCommand,
GetCostCategoriesCommand,
Expand All @@ -229,12 +245,14 @@ const commands = {
GetSavingsPlansUtilizationDetailsCommand,
GetTagsCommand,
GetUsageForecastCommand,
ListCommitmentPurchaseAnalysesCommand,
ListCostAllocationTagBackfillHistoryCommand,
ListCostAllocationTagsCommand,
ListCostCategoryDefinitionsCommand,
ListSavingsPlansPurchaseRecommendationGenerationCommand,
ListTagsForResourceCommand,
ProvideAnomalyFeedbackCommand,
StartCommitmentPurchaseAnalysisCommand,
StartCostAllocationTagBackfillCommand,
StartSavingsPlansPurchaseRecommendationGenerationCommand,
TagResourceCommand,
Expand Down Expand Up @@ -429,6 +447,23 @@ export interface CostExplorer {
cb: (err: any, data?: GetApproximateUsageRecordsCommandOutput) => void
): void;

/**
* @see {@link GetCommitmentPurchaseAnalysisCommand}
*/
getCommitmentPurchaseAnalysis(
args: GetCommitmentPurchaseAnalysisCommandInput,
options?: __HttpHandlerOptions
): Promise<GetCommitmentPurchaseAnalysisCommandOutput>;
getCommitmentPurchaseAnalysis(
args: GetCommitmentPurchaseAnalysisCommandInput,
cb: (err: any, data?: GetCommitmentPurchaseAnalysisCommandOutput) => void
): void;
getCommitmentPurchaseAnalysis(
args: GetCommitmentPurchaseAnalysisCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetCommitmentPurchaseAnalysisCommandOutput) => void
): void;

/**
* @see {@link GetCostAndUsageCommand}
*/
Expand Down Expand Up @@ -689,6 +724,24 @@ export interface CostExplorer {
cb: (err: any, data?: GetUsageForecastCommandOutput) => void
): void;

/**
* @see {@link ListCommitmentPurchaseAnalysesCommand}
*/
listCommitmentPurchaseAnalyses(): Promise<ListCommitmentPurchaseAnalysesCommandOutput>;
listCommitmentPurchaseAnalyses(
args: ListCommitmentPurchaseAnalysesCommandInput,
options?: __HttpHandlerOptions
): Promise<ListCommitmentPurchaseAnalysesCommandOutput>;
listCommitmentPurchaseAnalyses(
args: ListCommitmentPurchaseAnalysesCommandInput,
cb: (err: any, data?: ListCommitmentPurchaseAnalysesCommandOutput) => void
): void;
listCommitmentPurchaseAnalyses(
args: ListCommitmentPurchaseAnalysesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListCommitmentPurchaseAnalysesCommandOutput) => void
): void;

/**
* @see {@link ListCostAllocationTagBackfillHistoryCommand}
*/
Expand Down Expand Up @@ -795,6 +848,23 @@ export interface CostExplorer {
cb: (err: any, data?: ProvideAnomalyFeedbackCommandOutput) => void
): void;

/**
* @see {@link StartCommitmentPurchaseAnalysisCommand}
*/
startCommitmentPurchaseAnalysis(
args: StartCommitmentPurchaseAnalysisCommandInput,
options?: __HttpHandlerOptions
): Promise<StartCommitmentPurchaseAnalysisCommandOutput>;
startCommitmentPurchaseAnalysis(
args: StartCommitmentPurchaseAnalysisCommandInput,
cb: (err: any, data?: StartCommitmentPurchaseAnalysisCommandOutput) => void
): void;
startCommitmentPurchaseAnalysis(
args: StartCommitmentPurchaseAnalysisCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartCommitmentPurchaseAnalysisCommandOutput) => void
): void;

/**
* @see {@link StartCostAllocationTagBackfillCommand}
*/
Expand Down
18 changes: 18 additions & 0 deletions clients/client-cost-explorer/src/CostExplorerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ import {
GetApproximateUsageRecordsCommandInput,
GetApproximateUsageRecordsCommandOutput,
} from "./commands/GetApproximateUsageRecordsCommand";
import {
GetCommitmentPurchaseAnalysisCommandInput,
GetCommitmentPurchaseAnalysisCommandOutput,
} from "./commands/GetCommitmentPurchaseAnalysisCommand";
import { GetCostAndUsageCommandInput, GetCostAndUsageCommandOutput } from "./commands/GetCostAndUsageCommand";
import {
GetCostAndUsageWithResourcesCommandInput,
Expand Down Expand Up @@ -137,6 +141,10 @@ import {
} from "./commands/GetSavingsPlansUtilizationDetailsCommand";
import { GetTagsCommandInput, GetTagsCommandOutput } from "./commands/GetTagsCommand";
import { GetUsageForecastCommandInput, GetUsageForecastCommandOutput } from "./commands/GetUsageForecastCommand";
import {
ListCommitmentPurchaseAnalysesCommandInput,
ListCommitmentPurchaseAnalysesCommandOutput,
} from "./commands/ListCommitmentPurchaseAnalysesCommand";
import {
ListCostAllocationTagBackfillHistoryCommandInput,
ListCostAllocationTagBackfillHistoryCommandOutput,
Expand All @@ -161,6 +169,10 @@ import {
ProvideAnomalyFeedbackCommandInput,
ProvideAnomalyFeedbackCommandOutput,
} from "./commands/ProvideAnomalyFeedbackCommand";
import {
StartCommitmentPurchaseAnalysisCommandInput,
StartCommitmentPurchaseAnalysisCommandOutput,
} from "./commands/StartCommitmentPurchaseAnalysisCommand";
import {
StartCostAllocationTagBackfillCommandInput,
StartCostAllocationTagBackfillCommandOutput,
Expand Down Expand Up @@ -213,6 +225,7 @@ export type ServiceInputTypes =
| GetAnomalyMonitorsCommandInput
| GetAnomalySubscriptionsCommandInput
| GetApproximateUsageRecordsCommandInput
| GetCommitmentPurchaseAnalysisCommandInput
| GetCostAndUsageCommandInput
| GetCostAndUsageWithResourcesCommandInput
| GetCostCategoriesCommandInput
Expand All @@ -229,12 +242,14 @@ export type ServiceInputTypes =
| GetSavingsPlansUtilizationDetailsCommandInput
| GetTagsCommandInput
| GetUsageForecastCommandInput
| ListCommitmentPurchaseAnalysesCommandInput
| ListCostAllocationTagBackfillHistoryCommandInput
| ListCostAllocationTagsCommandInput
| ListCostCategoryDefinitionsCommandInput
| ListSavingsPlansPurchaseRecommendationGenerationCommandInput
| ListTagsForResourceCommandInput
| ProvideAnomalyFeedbackCommandInput
| StartCommitmentPurchaseAnalysisCommandInput
| StartCostAllocationTagBackfillCommandInput
| StartSavingsPlansPurchaseRecommendationGenerationCommandInput
| TagResourceCommandInput
Expand All @@ -259,6 +274,7 @@ export type ServiceOutputTypes =
| GetAnomalyMonitorsCommandOutput
| GetAnomalySubscriptionsCommandOutput
| GetApproximateUsageRecordsCommandOutput
| GetCommitmentPurchaseAnalysisCommandOutput
| GetCostAndUsageCommandOutput
| GetCostAndUsageWithResourcesCommandOutput
| GetCostCategoriesCommandOutput
Expand All @@ -275,12 +291,14 @@ export type ServiceOutputTypes =
| GetSavingsPlansUtilizationDetailsCommandOutput
| GetTagsCommandOutput
| GetUsageForecastCommandOutput
| ListCommitmentPurchaseAnalysesCommandOutput
| ListCostAllocationTagBackfillHistoryCommandOutput
| ListCostAllocationTagsCommandOutput
| ListCostCategoryDefinitionsCommandOutput
| ListSavingsPlansPurchaseRecommendationGenerationCommandOutput
| ListTagsForResourceCommandOutput
| ProvideAnomalyFeedbackCommandOutput
| StartCommitmentPurchaseAnalysisCommandOutput
| StartCostAllocationTagBackfillCommandOutput
| StartSavingsPlansPurchaseRecommendationGenerationCommandOutput
| TagResourceCommandOutput
Expand Down
Loading

0 comments on commit 1a8d64c

Please sign in to comment.