Skip to content

Commit 23dad7a

Browse files
author
awstools
committed
feat(client-cost-explorer): This release introduces Cost Comparison feature (GetCostAndUsageComparisons, GetCostComparisonDrivers) allowing you find cost variations across multiple dimensions and identify key drivers of spending changes.
1 parent 6020508 commit 23dad7a

File tree

12 files changed

+2110
-84
lines changed

12 files changed

+2110
-84
lines changed

clients/client-cost-explorer/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,14 @@ GetCostAndUsage
321321

322322
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/GetCostAndUsageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostAndUsageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostAndUsageCommandOutput/)
323323

324+
</details>
325+
<details>
326+
<summary>
327+
GetCostAndUsageComparisons
328+
</summary>
329+
330+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/GetCostAndUsageComparisonsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostAndUsageComparisonsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostAndUsageComparisonsCommandOutput/)
331+
324332
</details>
325333
<details>
326334
<summary>
@@ -337,6 +345,14 @@ GetCostCategories
337345

338346
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/GetCostCategoriesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostCategoriesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostCategoriesCommandOutput/)
339347

348+
</details>
349+
<details>
350+
<summary>
351+
GetCostComparisonDrivers
352+
</summary>
353+
354+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cost-explorer/command/GetCostComparisonDriversCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostComparisonDriversCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cost-explorer/Interface/GetCostComparisonDriversCommandOutput/)
355+
340356
</details>
341357
<details>
342358
<summary>

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

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ import {
6767
GetCostAndUsageCommandInput,
6868
GetCostAndUsageCommandOutput,
6969
} from "./commands/GetCostAndUsageCommand";
70+
import {
71+
GetCostAndUsageComparisonsCommand,
72+
GetCostAndUsageComparisonsCommandInput,
73+
GetCostAndUsageComparisonsCommandOutput,
74+
} from "./commands/GetCostAndUsageComparisonsCommand";
7075
import {
7176
GetCostAndUsageWithResourcesCommand,
7277
GetCostAndUsageWithResourcesCommandInput,
@@ -77,6 +82,11 @@ import {
7782
GetCostCategoriesCommandInput,
7883
GetCostCategoriesCommandOutput,
7984
} from "./commands/GetCostCategoriesCommand";
85+
import {
86+
GetCostComparisonDriversCommand,
87+
GetCostComparisonDriversCommandInput,
88+
GetCostComparisonDriversCommandOutput,
89+
} from "./commands/GetCostComparisonDriversCommand";
8090
import {
8191
GetCostForecastCommand,
8292
GetCostForecastCommandInput,
@@ -230,8 +240,10 @@ const commands = {
230240
GetApproximateUsageRecordsCommand,
231241
GetCommitmentPurchaseAnalysisCommand,
232242
GetCostAndUsageCommand,
243+
GetCostAndUsageComparisonsCommand,
233244
GetCostAndUsageWithResourcesCommand,
234245
GetCostCategoriesCommand,
246+
GetCostComparisonDriversCommand,
235247
GetCostForecastCommand,
236248
GetDimensionValuesCommand,
237249
GetReservationCoverageCommand,
@@ -478,6 +490,23 @@ export interface CostExplorer {
478490
cb: (err: any, data?: GetCostAndUsageCommandOutput) => void
479491
): void;
480492

493+
/**
494+
* @see {@link GetCostAndUsageComparisonsCommand}
495+
*/
496+
getCostAndUsageComparisons(
497+
args: GetCostAndUsageComparisonsCommandInput,
498+
options?: __HttpHandlerOptions
499+
): Promise<GetCostAndUsageComparisonsCommandOutput>;
500+
getCostAndUsageComparisons(
501+
args: GetCostAndUsageComparisonsCommandInput,
502+
cb: (err: any, data?: GetCostAndUsageComparisonsCommandOutput) => void
503+
): void;
504+
getCostAndUsageComparisons(
505+
args: GetCostAndUsageComparisonsCommandInput,
506+
options: __HttpHandlerOptions,
507+
cb: (err: any, data?: GetCostAndUsageComparisonsCommandOutput) => void
508+
): void;
509+
481510
/**
482511
* @see {@link GetCostAndUsageWithResourcesCommand}
483512
*/
@@ -512,6 +541,23 @@ export interface CostExplorer {
512541
cb: (err: any, data?: GetCostCategoriesCommandOutput) => void
513542
): void;
514543

544+
/**
545+
* @see {@link GetCostComparisonDriversCommand}
546+
*/
547+
getCostComparisonDrivers(
548+
args: GetCostComparisonDriversCommandInput,
549+
options?: __HttpHandlerOptions
550+
): Promise<GetCostComparisonDriversCommandOutput>;
551+
getCostComparisonDrivers(
552+
args: GetCostComparisonDriversCommandInput,
553+
cb: (err: any, data?: GetCostComparisonDriversCommandOutput) => void
554+
): void;
555+
getCostComparisonDrivers(
556+
args: GetCostComparisonDriversCommandInput,
557+
options: __HttpHandlerOptions,
558+
cb: (err: any, data?: GetCostComparisonDriversCommandOutput) => void
559+
): void;
560+
515561
/**
516562
* @see {@link GetCostForecastCommand}
517563
*/

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,19 @@ import {
9696
GetCommitmentPurchaseAnalysisCommandOutput,
9797
} from "./commands/GetCommitmentPurchaseAnalysisCommand";
9898
import { GetCostAndUsageCommandInput, GetCostAndUsageCommandOutput } from "./commands/GetCostAndUsageCommand";
99+
import {
100+
GetCostAndUsageComparisonsCommandInput,
101+
GetCostAndUsageComparisonsCommandOutput,
102+
} from "./commands/GetCostAndUsageComparisonsCommand";
99103
import {
100104
GetCostAndUsageWithResourcesCommandInput,
101105
GetCostAndUsageWithResourcesCommandOutput,
102106
} from "./commands/GetCostAndUsageWithResourcesCommand";
103107
import { GetCostCategoriesCommandInput, GetCostCategoriesCommandOutput } from "./commands/GetCostCategoriesCommand";
108+
import {
109+
GetCostComparisonDriversCommandInput,
110+
GetCostComparisonDriversCommandOutput,
111+
} from "./commands/GetCostComparisonDriversCommand";
104112
import { GetCostForecastCommandInput, GetCostForecastCommandOutput } from "./commands/GetCostForecastCommand";
105113
import { GetDimensionValuesCommandInput, GetDimensionValuesCommandOutput } from "./commands/GetDimensionValuesCommand";
106114
import {
@@ -227,8 +235,10 @@ export type ServiceInputTypes =
227235
| GetApproximateUsageRecordsCommandInput
228236
| GetCommitmentPurchaseAnalysisCommandInput
229237
| GetCostAndUsageCommandInput
238+
| GetCostAndUsageComparisonsCommandInput
230239
| GetCostAndUsageWithResourcesCommandInput
231240
| GetCostCategoriesCommandInput
241+
| GetCostComparisonDriversCommandInput
232242
| GetCostForecastCommandInput
233243
| GetDimensionValuesCommandInput
234244
| GetReservationCoverageCommandInput
@@ -276,8 +286,10 @@ export type ServiceOutputTypes =
276286
| GetApproximateUsageRecordsCommandOutput
277287
| GetCommitmentPurchaseAnalysisCommandOutput
278288
| GetCostAndUsageCommandOutput
289+
| GetCostAndUsageComparisonsCommandOutput
279290
| GetCostAndUsageWithResourcesCommandOutput
280291
| GetCostCategoriesCommandOutput
292+
| GetCostComparisonDriversCommandOutput
281293
| GetCostForecastCommandOutput
282294
| GetDimensionValuesCommandOutput
283295
| GetReservationCoverageCommandOutput

0 commit comments

Comments
 (0)