diff --git a/clients/client-cost-explorer/README.md b/clients/client-cost-explorer/README.md index c43451a99f5f..177f8c2ae449 100644 --- a/clients/client-cost-explorer/README.md +++ b/clients/client-cost-explorer/README.md @@ -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/) + +
+ +GetCommitmentPurchaseAnalysis + + +[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/) +
@@ -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/) +
+
+ +ListCommitmentPurchaseAnalyses + + +[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/) +
@@ -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/) +
+
+ +StartCommitmentPurchaseAnalysis + + +[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/) +
diff --git a/clients/client-cost-explorer/src/CostExplorer.ts b/clients/client-cost-explorer/src/CostExplorer.ts index fc6d94835afc..f9fcf96bde06 100644 --- a/clients/client-cost-explorer/src/CostExplorer.ts +++ b/clients/client-cost-explorer/src/CostExplorer.ts @@ -57,6 +57,11 @@ import { GetApproximateUsageRecordsCommandInput, GetApproximateUsageRecordsCommandOutput, } from "./commands/GetApproximateUsageRecordsCommand"; +import { + GetCommitmentPurchaseAnalysisCommand, + GetCommitmentPurchaseAnalysisCommandInput, + GetCommitmentPurchaseAnalysisCommandOutput, +} from "./commands/GetCommitmentPurchaseAnalysisCommand"; import { GetCostAndUsageCommand, GetCostAndUsageCommandInput, @@ -133,6 +138,11 @@ import { GetUsageForecastCommandInput, GetUsageForecastCommandOutput, } from "./commands/GetUsageForecastCommand"; +import { + ListCommitmentPurchaseAnalysesCommand, + ListCommitmentPurchaseAnalysesCommandInput, + ListCommitmentPurchaseAnalysesCommandOutput, +} from "./commands/ListCommitmentPurchaseAnalysesCommand"; import { ListCostAllocationTagBackfillHistoryCommand, ListCostAllocationTagBackfillHistoryCommandInput, @@ -163,6 +173,11 @@ import { ProvideAnomalyFeedbackCommandInput, ProvideAnomalyFeedbackCommandOutput, } from "./commands/ProvideAnomalyFeedbackCommand"; +import { + StartCommitmentPurchaseAnalysisCommand, + StartCommitmentPurchaseAnalysisCommandInput, + StartCommitmentPurchaseAnalysisCommandOutput, +} from "./commands/StartCommitmentPurchaseAnalysisCommand"; import { StartCostAllocationTagBackfillCommand, StartCostAllocationTagBackfillCommandInput, @@ -213,6 +228,7 @@ const commands = { GetAnomalyMonitorsCommand, GetAnomalySubscriptionsCommand, GetApproximateUsageRecordsCommand, + GetCommitmentPurchaseAnalysisCommand, GetCostAndUsageCommand, GetCostAndUsageWithResourcesCommand, GetCostCategoriesCommand, @@ -229,12 +245,14 @@ const commands = { GetSavingsPlansUtilizationDetailsCommand, GetTagsCommand, GetUsageForecastCommand, + ListCommitmentPurchaseAnalysesCommand, ListCostAllocationTagBackfillHistoryCommand, ListCostAllocationTagsCommand, ListCostCategoryDefinitionsCommand, ListSavingsPlansPurchaseRecommendationGenerationCommand, ListTagsForResourceCommand, ProvideAnomalyFeedbackCommand, + StartCommitmentPurchaseAnalysisCommand, StartCostAllocationTagBackfillCommand, StartSavingsPlansPurchaseRecommendationGenerationCommand, TagResourceCommand, @@ -429,6 +447,23 @@ export interface CostExplorer { cb: (err: any, data?: GetApproximateUsageRecordsCommandOutput) => void ): void; + /** + * @see {@link GetCommitmentPurchaseAnalysisCommand} + */ + getCommitmentPurchaseAnalysis( + args: GetCommitmentPurchaseAnalysisCommandInput, + options?: __HttpHandlerOptions + ): Promise; + 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} */ @@ -689,6 +724,24 @@ export interface CostExplorer { cb: (err: any, data?: GetUsageForecastCommandOutput) => void ): void; + /** + * @see {@link ListCommitmentPurchaseAnalysesCommand} + */ + listCommitmentPurchaseAnalyses(): Promise; + listCommitmentPurchaseAnalyses( + args: ListCommitmentPurchaseAnalysesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + 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} */ @@ -795,6 +848,23 @@ export interface CostExplorer { cb: (err: any, data?: ProvideAnomalyFeedbackCommandOutput) => void ): void; + /** + * @see {@link StartCommitmentPurchaseAnalysisCommand} + */ + startCommitmentPurchaseAnalysis( + args: StartCommitmentPurchaseAnalysisCommandInput, + options?: __HttpHandlerOptions + ): Promise; + 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} */ diff --git a/clients/client-cost-explorer/src/CostExplorerClient.ts b/clients/client-cost-explorer/src/CostExplorerClient.ts index b77dd81cbf5d..81c7699637d3 100644 --- a/clients/client-cost-explorer/src/CostExplorerClient.ts +++ b/clients/client-cost-explorer/src/CostExplorerClient.ts @@ -91,6 +91,10 @@ import { GetApproximateUsageRecordsCommandInput, GetApproximateUsageRecordsCommandOutput, } from "./commands/GetApproximateUsageRecordsCommand"; +import { + GetCommitmentPurchaseAnalysisCommandInput, + GetCommitmentPurchaseAnalysisCommandOutput, +} from "./commands/GetCommitmentPurchaseAnalysisCommand"; import { GetCostAndUsageCommandInput, GetCostAndUsageCommandOutput } from "./commands/GetCostAndUsageCommand"; import { GetCostAndUsageWithResourcesCommandInput, @@ -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, @@ -161,6 +169,10 @@ import { ProvideAnomalyFeedbackCommandInput, ProvideAnomalyFeedbackCommandOutput, } from "./commands/ProvideAnomalyFeedbackCommand"; +import { + StartCommitmentPurchaseAnalysisCommandInput, + StartCommitmentPurchaseAnalysisCommandOutput, +} from "./commands/StartCommitmentPurchaseAnalysisCommand"; import { StartCostAllocationTagBackfillCommandInput, StartCostAllocationTagBackfillCommandOutput, @@ -213,6 +225,7 @@ export type ServiceInputTypes = | GetAnomalyMonitorsCommandInput | GetAnomalySubscriptionsCommandInput | GetApproximateUsageRecordsCommandInput + | GetCommitmentPurchaseAnalysisCommandInput | GetCostAndUsageCommandInput | GetCostAndUsageWithResourcesCommandInput | GetCostCategoriesCommandInput @@ -229,12 +242,14 @@ export type ServiceInputTypes = | GetSavingsPlansUtilizationDetailsCommandInput | GetTagsCommandInput | GetUsageForecastCommandInput + | ListCommitmentPurchaseAnalysesCommandInput | ListCostAllocationTagBackfillHistoryCommandInput | ListCostAllocationTagsCommandInput | ListCostCategoryDefinitionsCommandInput | ListSavingsPlansPurchaseRecommendationGenerationCommandInput | ListTagsForResourceCommandInput | ProvideAnomalyFeedbackCommandInput + | StartCommitmentPurchaseAnalysisCommandInput | StartCostAllocationTagBackfillCommandInput | StartSavingsPlansPurchaseRecommendationGenerationCommandInput | TagResourceCommandInput @@ -259,6 +274,7 @@ export type ServiceOutputTypes = | GetAnomalyMonitorsCommandOutput | GetAnomalySubscriptionsCommandOutput | GetApproximateUsageRecordsCommandOutput + | GetCommitmentPurchaseAnalysisCommandOutput | GetCostAndUsageCommandOutput | GetCostAndUsageWithResourcesCommandOutput | GetCostCategoriesCommandOutput @@ -275,12 +291,14 @@ export type ServiceOutputTypes = | GetSavingsPlansUtilizationDetailsCommandOutput | GetTagsCommandOutput | GetUsageForecastCommandOutput + | ListCommitmentPurchaseAnalysesCommandOutput | ListCostAllocationTagBackfillHistoryCommandOutput | ListCostAllocationTagsCommandOutput | ListCostCategoryDefinitionsCommandOutput | ListSavingsPlansPurchaseRecommendationGenerationCommandOutput | ListTagsForResourceCommandOutput | ProvideAnomalyFeedbackCommandOutput + | StartCommitmentPurchaseAnalysisCommandOutput | StartCostAllocationTagBackfillCommandOutput | StartSavingsPlansPurchaseRecommendationGenerationCommandOutput | TagResourceCommandOutput diff --git a/clients/client-cost-explorer/src/commands/GetCommitmentPurchaseAnalysisCommand.ts b/clients/client-cost-explorer/src/commands/GetCommitmentPurchaseAnalysisCommand.ts new file mode 100644 index 000000000000..910e30f7ba79 --- /dev/null +++ b/clients/client-cost-explorer/src/commands/GetCommitmentPurchaseAnalysisCommand.ts @@ -0,0 +1,172 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { CostExplorerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CostExplorerClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetCommitmentPurchaseAnalysisRequest, GetCommitmentPurchaseAnalysisResponse } from "../models/models_0"; +import { + de_GetCommitmentPurchaseAnalysisCommand, + se_GetCommitmentPurchaseAnalysisCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetCommitmentPurchaseAnalysisCommand}. + */ +export interface GetCommitmentPurchaseAnalysisCommandInput extends GetCommitmentPurchaseAnalysisRequest {} +/** + * @public + * + * The output of {@link GetCommitmentPurchaseAnalysisCommand}. + */ +export interface GetCommitmentPurchaseAnalysisCommandOutput + extends GetCommitmentPurchaseAnalysisResponse, + __MetadataBearer {} + +/** + *

Retrieves a commitment purchase analysis result based on the + * AnalysisId.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CostExplorerClient, GetCommitmentPurchaseAnalysisCommand } from "@aws-sdk/client-cost-explorer"; // ES Modules import + * // const { CostExplorerClient, GetCommitmentPurchaseAnalysisCommand } = require("@aws-sdk/client-cost-explorer"); // CommonJS import + * const client = new CostExplorerClient(config); + * const input = { // GetCommitmentPurchaseAnalysisRequest + * AnalysisId: "STRING_VALUE", // required + * }; + * const command = new GetCommitmentPurchaseAnalysisCommand(input); + * const response = await client.send(command); + * // { // GetCommitmentPurchaseAnalysisResponse + * // EstimatedCompletionTime: "STRING_VALUE", // required + * // AnalysisCompletionTime: "STRING_VALUE", + * // AnalysisStartedTime: "STRING_VALUE", // required + * // AnalysisId: "STRING_VALUE", // required + * // AnalysisStatus: "SUCCEEDED" || "PROCESSING" || "FAILED", // required + * // ErrorCode: "NO_USAGE_FOUND" || "INTERNAL_FAILURE" || "INVALID_SAVINGS_PLANS_TO_ADD" || "INVALID_SAVINGS_PLANS_TO_EXCLUDE" || "INVALID_ACCOUNT_ID", + * // AnalysisDetails: { // AnalysisDetails + * // SavingsPlansPurchaseAnalysisDetails: { // SavingsPlansPurchaseAnalysisDetails + * // CurrencyCode: "STRING_VALUE", + * // LookbackPeriodInHours: "STRING_VALUE", + * // CurrentAverageCoverage: "STRING_VALUE", + * // CurrentAverageHourlyOnDemandSpend: "STRING_VALUE", + * // CurrentMaximumHourlyOnDemandSpend: "STRING_VALUE", + * // CurrentMinimumHourlyOnDemandSpend: "STRING_VALUE", + * // CurrentOnDemandSpend: "STRING_VALUE", + * // ExistingHourlyCommitment: "STRING_VALUE", + * // HourlyCommitmentToPurchase: "STRING_VALUE", + * // EstimatedAverageCoverage: "STRING_VALUE", + * // EstimatedAverageUtilization: "STRING_VALUE", + * // EstimatedMonthlySavingsAmount: "STRING_VALUE", + * // EstimatedOnDemandCost: "STRING_VALUE", + * // EstimatedOnDemandCostWithCurrentCommitment: "STRING_VALUE", + * // EstimatedROI: "STRING_VALUE", + * // EstimatedSavingsAmount: "STRING_VALUE", + * // EstimatedSavingsPercentage: "STRING_VALUE", + * // EstimatedCommitmentCost: "STRING_VALUE", + * // LatestUsageTimestamp: "STRING_VALUE", + * // UpfrontCost: "STRING_VALUE", + * // AdditionalMetadata: "STRING_VALUE", + * // MetricsOverLookbackPeriod: [ // MetricsOverLookbackPeriod + * // { // RecommendationDetailHourlyMetrics + * // StartTime: "STRING_VALUE", + * // EstimatedOnDemandCost: "STRING_VALUE", + * // CurrentCoverage: "STRING_VALUE", + * // EstimatedCoverage: "STRING_VALUE", + * // EstimatedNewCommitmentUtilization: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }, + * // CommitmentPurchaseAnalysisConfiguration: { // CommitmentPurchaseAnalysisConfiguration + * // SavingsPlansPurchaseAnalysisConfiguration: { // SavingsPlansPurchaseAnalysisConfiguration + * // AccountScope: "PAYER" || "LINKED", + * // AccountId: "STRING_VALUE", + * // AnalysisType: "MAX_SAVINGS" || "CUSTOM_COMMITMENT", // required + * // SavingsPlansToAdd: [ // SavingsPlansToAdd // required + * // { // SavingsPlans + * // PaymentOption: "NO_UPFRONT" || "PARTIAL_UPFRONT" || "ALL_UPFRONT" || "LIGHT_UTILIZATION" || "MEDIUM_UTILIZATION" || "HEAVY_UTILIZATION", + * // SavingsPlansType: "COMPUTE_SP" || "EC2_INSTANCE_SP" || "SAGEMAKER_SP", + * // Region: "STRING_VALUE", + * // InstanceFamily: "STRING_VALUE", + * // TermInYears: "ONE_YEAR" || "THREE_YEARS", + * // SavingsPlansCommitment: Number("double"), + * // OfferingId: "STRING_VALUE", + * // }, + * // ], + * // SavingsPlansToExclude: [ // SavingsPlansToExclude + * // "STRING_VALUE", + * // ], + * // LookBackTimePeriod: { // DateInterval + * // Start: "STRING_VALUE", // required + * // End: "STRING_VALUE", // required + * // }, + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetCommitmentPurchaseAnalysisCommandInput - {@link GetCommitmentPurchaseAnalysisCommandInput} + * @returns {@link GetCommitmentPurchaseAnalysisCommandOutput} + * @see {@link GetCommitmentPurchaseAnalysisCommandInput} for command's `input` shape. + * @see {@link GetCommitmentPurchaseAnalysisCommandOutput} for command's `response` shape. + * @see {@link CostExplorerClientResolvedConfig | config} for CostExplorerClient's `config` shape. + * + * @throws {@link AnalysisNotFoundException} (client fault) + *

The requested analysis can't be + * found.

+ * + * @throws {@link DataUnavailableException} (client fault) + *

The requested data is unavailable.

+ * + * @throws {@link LimitExceededException} (client fault) + *

You made too many calls in a short period of time. Try again later.

+ * + * @throws {@link CostExplorerServiceException} + *

Base exception class for all service exceptions from CostExplorer service.

+ * + * @public + */ +export class GetCommitmentPurchaseAnalysisCommand extends $Command + .classBuilder< + GetCommitmentPurchaseAnalysisCommandInput, + GetCommitmentPurchaseAnalysisCommandOutput, + CostExplorerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: CostExplorerClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSInsightsIndexService", "GetCommitmentPurchaseAnalysis", {}) + .n("CostExplorerClient", "GetCommitmentPurchaseAnalysisCommand") + .f(void 0, void 0) + .ser(se_GetCommitmentPurchaseAnalysisCommand) + .de(de_GetCommitmentPurchaseAnalysisCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetCommitmentPurchaseAnalysisRequest; + output: GetCommitmentPurchaseAnalysisResponse; + }; + sdk: { + input: GetCommitmentPurchaseAnalysisCommandInput; + output: GetCommitmentPurchaseAnalysisCommandOutput; + }; + }; +} diff --git a/clients/client-cost-explorer/src/commands/ListCommitmentPurchaseAnalysesCommand.ts b/clients/client-cost-explorer/src/commands/ListCommitmentPurchaseAnalysesCommand.ts new file mode 100644 index 000000000000..7c715899afca --- /dev/null +++ b/clients/client-cost-explorer/src/commands/ListCommitmentPurchaseAnalysesCommand.ts @@ -0,0 +1,147 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { CostExplorerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CostExplorerClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListCommitmentPurchaseAnalysesRequest, ListCommitmentPurchaseAnalysesResponse } from "../models/models_0"; +import { + de_ListCommitmentPurchaseAnalysesCommand, + se_ListCommitmentPurchaseAnalysesCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListCommitmentPurchaseAnalysesCommand}. + */ +export interface ListCommitmentPurchaseAnalysesCommandInput extends ListCommitmentPurchaseAnalysesRequest {} +/** + * @public + * + * The output of {@link ListCommitmentPurchaseAnalysesCommand}. + */ +export interface ListCommitmentPurchaseAnalysesCommandOutput + extends ListCommitmentPurchaseAnalysesResponse, + __MetadataBearer {} + +/** + *

Lists the commitment purchase analyses for your account based on the last 30 + * days.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CostExplorerClient, ListCommitmentPurchaseAnalysesCommand } from "@aws-sdk/client-cost-explorer"; // ES Modules import + * // const { CostExplorerClient, ListCommitmentPurchaseAnalysesCommand } = require("@aws-sdk/client-cost-explorer"); // CommonJS import + * const client = new CostExplorerClient(config); + * const input = { // ListCommitmentPurchaseAnalysesRequest + * AnalysisStatus: "SUCCEEDED" || "PROCESSING" || "FAILED", + * NextPageToken: "STRING_VALUE", + * PageSize: Number("int"), + * AnalysisIds: [ // AnalysisIds + * "STRING_VALUE", + * ], + * }; + * const command = new ListCommitmentPurchaseAnalysesCommand(input); + * const response = await client.send(command); + * // { // ListCommitmentPurchaseAnalysesResponse + * // AnalysisSummaryList: [ // AnalysisSummaryList + * // { // AnalysisSummary + * // EstimatedCompletionTime: "STRING_VALUE", + * // AnalysisCompletionTime: "STRING_VALUE", + * // AnalysisStartedTime: "STRING_VALUE", + * // AnalysisStatus: "SUCCEEDED" || "PROCESSING" || "FAILED", + * // ErrorCode: "NO_USAGE_FOUND" || "INTERNAL_FAILURE" || "INVALID_SAVINGS_PLANS_TO_ADD" || "INVALID_SAVINGS_PLANS_TO_EXCLUDE" || "INVALID_ACCOUNT_ID", + * // AnalysisId: "STRING_VALUE", + * // CommitmentPurchaseAnalysisConfiguration: { // CommitmentPurchaseAnalysisConfiguration + * // SavingsPlansPurchaseAnalysisConfiguration: { // SavingsPlansPurchaseAnalysisConfiguration + * // AccountScope: "PAYER" || "LINKED", + * // AccountId: "STRING_VALUE", + * // AnalysisType: "MAX_SAVINGS" || "CUSTOM_COMMITMENT", // required + * // SavingsPlansToAdd: [ // SavingsPlansToAdd // required + * // { // SavingsPlans + * // PaymentOption: "NO_UPFRONT" || "PARTIAL_UPFRONT" || "ALL_UPFRONT" || "LIGHT_UTILIZATION" || "MEDIUM_UTILIZATION" || "HEAVY_UTILIZATION", + * // SavingsPlansType: "COMPUTE_SP" || "EC2_INSTANCE_SP" || "SAGEMAKER_SP", + * // Region: "STRING_VALUE", + * // InstanceFamily: "STRING_VALUE", + * // TermInYears: "ONE_YEAR" || "THREE_YEARS", + * // SavingsPlansCommitment: Number("double"), + * // OfferingId: "STRING_VALUE", + * // }, + * // ], + * // SavingsPlansToExclude: [ // SavingsPlansToExclude + * // "STRING_VALUE", + * // ], + * // LookBackTimePeriod: { // DateInterval + * // Start: "STRING_VALUE", // required + * // End: "STRING_VALUE", // required + * // }, + * // }, + * // }, + * // }, + * // ], + * // NextPageToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListCommitmentPurchaseAnalysesCommandInput - {@link ListCommitmentPurchaseAnalysesCommandInput} + * @returns {@link ListCommitmentPurchaseAnalysesCommandOutput} + * @see {@link ListCommitmentPurchaseAnalysesCommandInput} for command's `input` shape. + * @see {@link ListCommitmentPurchaseAnalysesCommandOutput} for command's `response` shape. + * @see {@link CostExplorerClientResolvedConfig | config} for CostExplorerClient's `config` shape. + * + * @throws {@link DataUnavailableException} (client fault) + *

The requested data is unavailable.

+ * + * @throws {@link InvalidNextTokenException} (client fault) + *

The pagination token is invalid. Try again without a pagination token.

+ * + * @throws {@link LimitExceededException} (client fault) + *

You made too many calls in a short period of time. Try again later.

+ * + * @throws {@link CostExplorerServiceException} + *

Base exception class for all service exceptions from CostExplorer service.

+ * + * @public + */ +export class ListCommitmentPurchaseAnalysesCommand extends $Command + .classBuilder< + ListCommitmentPurchaseAnalysesCommandInput, + ListCommitmentPurchaseAnalysesCommandOutput, + CostExplorerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: CostExplorerClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSInsightsIndexService", "ListCommitmentPurchaseAnalyses", {}) + .n("CostExplorerClient", "ListCommitmentPurchaseAnalysesCommand") + .f(void 0, void 0) + .ser(se_ListCommitmentPurchaseAnalysesCommand) + .de(de_ListCommitmentPurchaseAnalysesCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListCommitmentPurchaseAnalysesRequest; + output: ListCommitmentPurchaseAnalysesResponse; + }; + sdk: { + input: ListCommitmentPurchaseAnalysesCommandInput; + output: ListCommitmentPurchaseAnalysesCommandOutput; + }; + }; +} diff --git a/clients/client-cost-explorer/src/commands/StartCommitmentPurchaseAnalysisCommand.ts b/clients/client-cost-explorer/src/commands/StartCommitmentPurchaseAnalysisCommand.ts new file mode 100644 index 000000000000..bdbdeea00fdb --- /dev/null +++ b/clients/client-cost-explorer/src/commands/StartCommitmentPurchaseAnalysisCommand.ts @@ -0,0 +1,139 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { CostExplorerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CostExplorerClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { StartCommitmentPurchaseAnalysisRequest, StartCommitmentPurchaseAnalysisResponse } from "../models/models_0"; +import { + de_StartCommitmentPurchaseAnalysisCommand, + se_StartCommitmentPurchaseAnalysisCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link StartCommitmentPurchaseAnalysisCommand}. + */ +export interface StartCommitmentPurchaseAnalysisCommandInput extends StartCommitmentPurchaseAnalysisRequest {} +/** + * @public + * + * The output of {@link StartCommitmentPurchaseAnalysisCommand}. + */ +export interface StartCommitmentPurchaseAnalysisCommandOutput + extends StartCommitmentPurchaseAnalysisResponse, + __MetadataBearer {} + +/** + *

Specifies the parameters of a planned commitment purchase and starts the generation of the + * analysis. This enables you to estimate the cost, coverage, and utilization impact of your + * planned commitment purchases. You can request up to 20 analysis runs per + * day.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CostExplorerClient, StartCommitmentPurchaseAnalysisCommand } from "@aws-sdk/client-cost-explorer"; // ES Modules import + * // const { CostExplorerClient, StartCommitmentPurchaseAnalysisCommand } = require("@aws-sdk/client-cost-explorer"); // CommonJS import + * const client = new CostExplorerClient(config); + * const input = { // StartCommitmentPurchaseAnalysisRequest + * CommitmentPurchaseAnalysisConfiguration: { // CommitmentPurchaseAnalysisConfiguration + * SavingsPlansPurchaseAnalysisConfiguration: { // SavingsPlansPurchaseAnalysisConfiguration + * AccountScope: "PAYER" || "LINKED", + * AccountId: "STRING_VALUE", + * AnalysisType: "MAX_SAVINGS" || "CUSTOM_COMMITMENT", // required + * SavingsPlansToAdd: [ // SavingsPlansToAdd // required + * { // SavingsPlans + * PaymentOption: "NO_UPFRONT" || "PARTIAL_UPFRONT" || "ALL_UPFRONT" || "LIGHT_UTILIZATION" || "MEDIUM_UTILIZATION" || "HEAVY_UTILIZATION", + * SavingsPlansType: "COMPUTE_SP" || "EC2_INSTANCE_SP" || "SAGEMAKER_SP", + * Region: "STRING_VALUE", + * InstanceFamily: "STRING_VALUE", + * TermInYears: "ONE_YEAR" || "THREE_YEARS", + * SavingsPlansCommitment: Number("double"), + * OfferingId: "STRING_VALUE", + * }, + * ], + * SavingsPlansToExclude: [ // SavingsPlansToExclude + * "STRING_VALUE", + * ], + * LookBackTimePeriod: { // DateInterval + * Start: "STRING_VALUE", // required + * End: "STRING_VALUE", // required + * }, + * }, + * }, + * }; + * const command = new StartCommitmentPurchaseAnalysisCommand(input); + * const response = await client.send(command); + * // { // StartCommitmentPurchaseAnalysisResponse + * // AnalysisId: "STRING_VALUE", // required + * // AnalysisStartedTime: "STRING_VALUE", // required + * // EstimatedCompletionTime: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param StartCommitmentPurchaseAnalysisCommandInput - {@link StartCommitmentPurchaseAnalysisCommandInput} + * @returns {@link StartCommitmentPurchaseAnalysisCommandOutput} + * @see {@link StartCommitmentPurchaseAnalysisCommandInput} for command's `input` shape. + * @see {@link StartCommitmentPurchaseAnalysisCommandOutput} for command's `response` shape. + * @see {@link CostExplorerClientResolvedConfig | config} for CostExplorerClient's `config` shape. + * + * @throws {@link DataUnavailableException} (client fault) + *

The requested data is unavailable.

+ * + * @throws {@link GenerationExistsException} (client fault) + *

A request to generate a recommendation is already in progress.

+ * + * @throws {@link LimitExceededException} (client fault) + *

You made too many calls in a short period of time. Try again later.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've reached the limit on the number of resources you can create, or exceeded the + * size of an individual resource.

+ * + * @throws {@link CostExplorerServiceException} + *

Base exception class for all service exceptions from CostExplorer service.

+ * + * @public + */ +export class StartCommitmentPurchaseAnalysisCommand extends $Command + .classBuilder< + StartCommitmentPurchaseAnalysisCommandInput, + StartCommitmentPurchaseAnalysisCommandOutput, + CostExplorerClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: CostExplorerClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSInsightsIndexService", "StartCommitmentPurchaseAnalysis", {}) + .n("CostExplorerClient", "StartCommitmentPurchaseAnalysisCommand") + .f(void 0, void 0) + .ser(se_StartCommitmentPurchaseAnalysisCommand) + .de(de_StartCommitmentPurchaseAnalysisCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: StartCommitmentPurchaseAnalysisRequest; + output: StartCommitmentPurchaseAnalysisResponse; + }; + sdk: { + input: StartCommitmentPurchaseAnalysisCommandInput; + output: StartCommitmentPurchaseAnalysisCommandOutput; + }; + }; +} diff --git a/clients/client-cost-explorer/src/commands/index.ts b/clients/client-cost-explorer/src/commands/index.ts index ee24a26d04d0..dd0d0021ac74 100644 --- a/clients/client-cost-explorer/src/commands/index.ts +++ b/clients/client-cost-explorer/src/commands/index.ts @@ -10,6 +10,7 @@ export * from "./GetAnomaliesCommand"; export * from "./GetAnomalyMonitorsCommand"; export * from "./GetAnomalySubscriptionsCommand"; export * from "./GetApproximateUsageRecordsCommand"; +export * from "./GetCommitmentPurchaseAnalysisCommand"; export * from "./GetCostAndUsageCommand"; export * from "./GetCostAndUsageWithResourcesCommand"; export * from "./GetCostCategoriesCommand"; @@ -26,12 +27,14 @@ export * from "./GetSavingsPlansUtilizationCommand"; export * from "./GetSavingsPlansUtilizationDetailsCommand"; export * from "./GetTagsCommand"; export * from "./GetUsageForecastCommand"; +export * from "./ListCommitmentPurchaseAnalysesCommand"; export * from "./ListCostAllocationTagBackfillHistoryCommand"; export * from "./ListCostAllocationTagsCommand"; export * from "./ListCostCategoryDefinitionsCommand"; export * from "./ListSavingsPlansPurchaseRecommendationGenerationCommand"; export * from "./ListTagsForResourceCommand"; export * from "./ProvideAnomalyFeedbackCommand"; +export * from "./StartCommitmentPurchaseAnalysisCommand"; export * from "./StartCostAllocationTagBackfillCommand"; export * from "./StartSavingsPlansPurchaseRecommendationGenerationCommand"; export * from "./TagResourceCommand"; diff --git a/clients/client-cost-explorer/src/models/models_0.ts b/clients/client-cost-explorer/src/models/models_0.ts index 869503a43bac..9ade3882550b 100644 --- a/clients/client-cost-explorer/src/models/models_0.ts +++ b/clients/client-cost-explorer/src/models/models_0.ts @@ -17,6 +17,528 @@ export const AccountScope = { */ export type AccountScope = (typeof AccountScope)[keyof typeof AccountScope]; +/** + *

Contains the hourly metrics for the given recommendation over the lookback period. + *

+ * @public + */ +export interface RecommendationDetailHourlyMetrics { + /** + *

The period of time that you want the usage and costs for.

+ * @public + */ + StartTime?: string | undefined; + + /** + *

The remaining On-Demand cost estimated to not be covered by the recommended Savings + * Plan, over the length of the lookback period.

+ * @public + */ + EstimatedOnDemandCost?: string | undefined; + + /** + *

The current amount of Savings Plans eligible usage that the Savings Plan + * covered.

+ * @public + */ + CurrentCoverage?: string | undefined; + + /** + *

The estimated coverage amount based on the recommended Savings Plan.

+ * @public + */ + EstimatedCoverage?: string | undefined; + + /** + *

The estimated utilization for the recommended Savings Plan.

+ * @public + */ + EstimatedNewCommitmentUtilization?: string | undefined; +} + +/** + *

Details about the Savings Plans purchase + * analysis.

+ * @public + */ +export interface SavingsPlansPurchaseAnalysisDetails { + /** + *

The currency code used for the + * analysis.

+ * @public + */ + CurrencyCode?: string | undefined; + + /** + *

The lookback period in hours that's used to generate the + * analysis.

+ * @public + */ + LookbackPeriodInHours?: string | undefined; + + /** + *

The average value of hourly coverage over the lookback + * period.

+ * @public + */ + CurrentAverageCoverage?: string | undefined; + + /** + *

The average value of hourly On-Demand spend over the lookback + * period.

+ * @public + */ + CurrentAverageHourlyOnDemandSpend?: string | undefined; + + /** + *

The highest value of hourly On-Demand spend over the lookback + * period.

+ * @public + */ + CurrentMaximumHourlyOnDemandSpend?: string | undefined; + + /** + *

The lowest value of hourly On-Demand spend over the lookback + * period.

+ * @public + */ + CurrentMinimumHourlyOnDemandSpend?: string | undefined; + + /** + *

The current total On-Demand spend over the lookback + * period.

+ * @public + */ + CurrentOnDemandSpend?: string | undefined; + + /** + *

The existing hourly commitment for the Savings Plan + * type.

+ * @public + */ + ExistingHourlyCommitment?: string | undefined; + + /** + *

The recommended or custom hourly + * commitment.

+ * @public + */ + HourlyCommitmentToPurchase?: string | undefined; + + /** + *

The estimated coverage of the Savings + * Plan.

+ * @public + */ + EstimatedAverageCoverage?: string | undefined; + + /** + *

The estimated utilization of the Savings + * Plan.

+ * @public + */ + EstimatedAverageUtilization?: string | undefined; + + /** + *

The estimated monthly savings amount based on the Savings + * Plan.

+ * @public + */ + EstimatedMonthlySavingsAmount?: string | undefined; + + /** + *

The remaining On-Demand cost estimated to not be covered by the commitment, over the + * length of the lookback period.

+ * @public + */ + EstimatedOnDemandCost?: string | undefined; + + /** + *

The estimated On-Demand cost you expect with no additional commitment, based on your + * usage of the selected time period and the Savings Plan you + * own.

+ * @public + */ + EstimatedOnDemandCostWithCurrentCommitment?: string | undefined; + + /** + *

The estimated return on investment that's based on the purchase commitment and + * estimated savings. This is calculated as + * estimatedSavingsAmount/estimatedSPCost*100.

+ * @public + */ + EstimatedROI?: string | undefined; + + /** + *

The estimated savings amount that's based on the purchase commitment over the length + * of the lookback period.

+ * @public + */ + EstimatedSavingsAmount?: string | undefined; + + /** + *

The estimated savings percentage relative to the total cost over the cost calculation + * lookback period.

+ * @public + */ + EstimatedSavingsPercentage?: string | undefined; + + /** + *

The estimated cost of the purchase commitment over the length of the lookback + * period.

+ * @public + */ + EstimatedCommitmentCost?: string | undefined; + + /** + *

The date and time of the last hour that went into the + * analysis.

+ * @public + */ + LatestUsageTimestamp?: string | undefined; + + /** + *

The upfront cost of the Savings Plan, based on the selected payment + * option.

+ * @public + */ + UpfrontCost?: string | undefined; + + /** + *

Additional metadata that might be applicable to the + * commitment.

+ * @public + */ + AdditionalMetadata?: string | undefined; + + /** + *

The related hourly cost, coverage, and utilization metrics over the lookback + * period.

+ * @public + */ + MetricsOverLookbackPeriod?: RecommendationDetailHourlyMetrics[] | undefined; +} + +/** + *

Details about the analysis.

+ * @public + */ +export interface AnalysisDetails { + /** + *

Details about the Savings Plans purchase + * analysis.

+ * @public + */ + SavingsPlansPurchaseAnalysisDetails?: SavingsPlansPurchaseAnalysisDetails | undefined; +} + +/** + *

The requested analysis can't be + * found.

+ * @public + */ +export class AnalysisNotFoundException extends __BaseException { + readonly name: "AnalysisNotFoundException" = "AnalysisNotFoundException"; + readonly $fault: "client" = "client"; + Message?: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AnalysisNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AnalysisNotFoundException.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + * @enum + */ +export const AnalysisStatus = { + FAILED: "FAILED", + PROCESSING: "PROCESSING", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type AnalysisStatus = (typeof AnalysisStatus)[keyof typeof AnalysisStatus]; + +/** + * @public + * @enum + */ +export const AnalysisType = { + CUSTOM_COMMITMENT: "CUSTOM_COMMITMENT", + MAX_SAVINGS: "MAX_SAVINGS", +} as const; + +/** + * @public + */ +export type AnalysisType = (typeof AnalysisType)[keyof typeof AnalysisType]; + +/** + *

The time period of the request.

+ * @public + */ +export interface DateInterval { + /** + *

The beginning of the time period. The start date is inclusive. For example, if + * start is 2017-01-01, Amazon Web Services retrieves cost and + * usage data starting at 2017-01-01 up to the end date. The start date must + * be equal to or no later than the current date to avoid a validation error.

+ * @public + */ + Start: string | undefined; + + /** + *

The end of the time period. The end date is exclusive. For example, if + * end is 2017-05-01, Amazon Web Services retrieves cost and + * usage data from the start date up to, but not including, 2017-05-01.

+ * @public + */ + End: string | undefined; +} + +/** + * @public + * @enum + */ +export const PaymentOption = { + ALL_UPFRONT: "ALL_UPFRONT", + HEAVY_UTILIZATION: "HEAVY_UTILIZATION", + LIGHT_UTILIZATION: "LIGHT_UTILIZATION", + MEDIUM_UTILIZATION: "MEDIUM_UTILIZATION", + NO_UPFRONT: "NO_UPFRONT", + PARTIAL_UPFRONT: "PARTIAL_UPFRONT", +} as const; + +/** + * @public + */ +export type PaymentOption = (typeof PaymentOption)[keyof typeof PaymentOption]; + +/** + * @public + * @enum + */ +export const SupportedSavingsPlansType = { + COMPUTE_SP: "COMPUTE_SP", + EC2_INSTANCE_SP: "EC2_INSTANCE_SP", + SAGEMAKER_SP: "SAGEMAKER_SP", +} as const; + +/** + * @public + */ +export type SupportedSavingsPlansType = (typeof SupportedSavingsPlansType)[keyof typeof SupportedSavingsPlansType]; + +/** + * @public + * @enum + */ +export const TermInYears = { + ONE_YEAR: "ONE_YEAR", + THREE_YEARS: "THREE_YEARS", +} as const; + +/** + * @public + */ +export type TermInYears = (typeof TermInYears)[keyof typeof TermInYears]; + +/** + *

The Savings Plans commitment + * details.

+ * @public + */ +export interface SavingsPlans { + /** + *

The payment option for the Savings Plans + * commitment.

+ * @public + */ + PaymentOption?: PaymentOption | undefined; + + /** + *

The Savings Plans type.

+ * @public + */ + SavingsPlansType?: SupportedSavingsPlansType | undefined; + + /** + *

The Region associated with the Savings Plans + * commitment.

+ * @public + */ + Region?: string | undefined; + + /** + *

The instance family of the Savings Plans + * commitment.

+ * @public + */ + InstanceFamily?: string | undefined; + + /** + *

The term that you want the Savings Plans commitment + * for.

+ * @public + */ + TermInYears?: TermInYears | undefined; + + /** + *

The Savings Plans commitment.

+ * @public + */ + SavingsPlansCommitment?: number | undefined; + + /** + *

The unique ID that's used to distinguish commitments from one + * another.

+ * @public + */ + OfferingId?: string | undefined; +} + +/** + *

The configuration for the Savings Plans purchase + * analysis.

+ * @public + */ +export interface SavingsPlansPurchaseAnalysisConfiguration { + /** + *

The account scope that you want your analysis + * for.

+ * @public + */ + AccountScope?: AccountScope | undefined; + + /** + *

The account that the analysis is + * for.

+ * @public + */ + AccountId?: string | undefined; + + /** + *

The type of analysis.

+ * @public + */ + AnalysisType: AnalysisType | undefined; + + /** + *

Savings Plans to include in the + * analysis.

+ * @public + */ + SavingsPlansToAdd: SavingsPlans[] | undefined; + + /** + *

Savings Plans to exclude from the + * analysis.

+ * @public + */ + SavingsPlansToExclude?: string[] | undefined; + + /** + *

The time period associated with the + * analysis.

+ * @public + */ + LookBackTimePeriod: DateInterval | undefined; +} + +/** + *

The configuration for the commitment purchase + * analysis.

+ * @public + */ +export interface CommitmentPurchaseAnalysisConfiguration { + /** + *

The configuration for the Savings Plans purchase + * analysis.

+ * @public + */ + SavingsPlansPurchaseAnalysisConfiguration?: SavingsPlansPurchaseAnalysisConfiguration | undefined; +} + +/** + * @public + * @enum + */ +export const ErrorCode = { + INTERNAL_FAILURE: "INTERNAL_FAILURE", + INVALID_ACCOUNT_ID: "INVALID_ACCOUNT_ID", + INVALID_SAVINGS_PLANS_TO_ADD: "INVALID_SAVINGS_PLANS_TO_ADD", + INVALID_SAVINGS_PLANS_TO_EXCLUDE: "INVALID_SAVINGS_PLANS_TO_EXCLUDE", + NO_USAGE_FOUND: "NO_USAGE_FOUND", +} as const; + +/** + * @public + */ +export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode]; + +/** + *

A summary of the analysis.

+ * @public + */ +export interface AnalysisSummary { + /** + *

The estimated time for when the analysis will + * complete.

+ * @public + */ + EstimatedCompletionTime?: string | undefined; + + /** + *

The completion time of the analysis.

+ * @public + */ + AnalysisCompletionTime?: string | undefined; + + /** + *

The start time of the analysis.

+ * @public + */ + AnalysisStartedTime?: string | undefined; + + /** + *

The status of the analysis.

+ * @public + */ + AnalysisStatus?: AnalysisStatus | undefined; + + /** + *

The error code used for the + * analysis.

+ * @public + */ + ErrorCode?: ErrorCode | undefined; + + /** + *

The analysis ID that's associated with the commitment + * purchase.

+ * @public + */ + AnalysisId?: string | undefined; + + /** + *

The analysis configuration for the commitment purchase + * analysis.

+ * @public + */ + CommitmentPurchaseAnalysisConfiguration?: CommitmentPurchaseAnalysisConfiguration | undefined; +} + /** *

Quantifies the anomaly. The higher score means that it's more anomalous.

* @public @@ -93,14 +615,14 @@ export interface Impact { } /** - *

The combination of Amazon Web Servicesservice, linked account, linked account name, + *

The combination of Amazon Web Services service, linked account, linked account name, * Region, and usage type where a cost anomaly is observed. The linked account name will * only be available when the account name can be identified.

* @public */ export interface RootCause { /** - *

The Amazon Web Servicesservice name that's associated with the cost anomaly.

+ *

The Amazon Web Services service name that's associated with the cost anomaly.

* @public */ Service?: string | undefined; @@ -155,7 +677,7 @@ export interface Anomaly { AnomalyEndDate?: string | undefined; /** - *

The dimension for the anomaly (for example, an Amazon Web Servicesservice in a service + *

The dimension for the anomaly (for example, an Amazon Web Services service in a service * monitor).

* @public */ @@ -1207,49 +1729,94 @@ export interface GetApproximateUsageRecordsRequest { } /** - *

The time period of the request.

* @public */ -export interface DateInterval { +export interface GetApproximateUsageRecordsResponse { /** - *

The beginning of the time period. The start date is inclusive. For example, if - * start is 2017-01-01, Amazon Web Services retrieves cost and - * usage data starting at 2017-01-01 up to the end date. The start date must - * be equal to or no later than the current date to avoid a validation error.

+ *

The service metadata for the service or services in the response.

* @public */ - Start: string | undefined; + Services?: Record | undefined; /** - *

The end of the time period. The end date is exclusive. For example, if - * end is 2017-05-01, Amazon Web Services retrieves cost and - * usage data from the start date up to, but not including, 2017-05-01.

+ *

The total number of usage records for all services in the services list.

* @public */ - End: string | undefined; + TotalRecords?: number | undefined; + + /** + *

The lookback period that's used for the estimation.

+ * @public + */ + LookbackPeriod?: DateInterval | undefined; } /** * @public */ -export interface GetApproximateUsageRecordsResponse { +export interface GetCommitmentPurchaseAnalysisRequest { /** - *

The service metadata for the service or services in the response.

+ *

The analysis ID that's associated with the commitment purchase + * analysis.

* @public */ - Services?: Record | undefined; + AnalysisId: string | undefined; +} +/** + * @public + */ +export interface GetCommitmentPurchaseAnalysisResponse { /** - *

The total number of usage records for all services in the services list.

+ *

The estimated time for when the analysis will + * complete.

* @public */ - TotalRecords?: number | undefined; + EstimatedCompletionTime: string | undefined; /** - *

The lookback period that's used for the estimation.

+ *

The completion time of the analysis.

* @public */ - LookbackPeriod?: DateInterval | undefined; + AnalysisCompletionTime?: string | undefined; + + /** + *

The start time of the analysis.

+ * @public + */ + AnalysisStartedTime: string | undefined; + + /** + *

The analysis ID that's associated with the commitment purchase + * analysis.

+ * @public + */ + AnalysisId: string | undefined; + + /** + *

The status of the analysis.

+ * @public + */ + AnalysisStatus: AnalysisStatus | undefined; + + /** + *

The error code used for the analysis.

+ * @public + */ + ErrorCode?: ErrorCode | undefined; + + /** + *

Details about the analysis.

+ * @public + */ + AnalysisDetails?: AnalysisDetails | undefined; + + /** + *

The configuration for the commitment purchase + * analysis.

+ * @public + */ + CommitmentPurchaseAnalysisConfiguration: CommitmentPurchaseAnalysisConfiguration | undefined; } /** @@ -1979,24 +2546,6 @@ export const LookbackPeriodInDays = { */ export type LookbackPeriodInDays = (typeof LookbackPeriodInDays)[keyof typeof LookbackPeriodInDays]; -/** - * @public - * @enum - */ -export const PaymentOption = { - ALL_UPFRONT: "ALL_UPFRONT", - HEAVY_UTILIZATION: "HEAVY_UTILIZATION", - LIGHT_UTILIZATION: "LIGHT_UTILIZATION", - MEDIUM_UTILIZATION: "MEDIUM_UTILIZATION", - NO_UPFRONT: "NO_UPFRONT", - PARTIAL_UPFRONT: "PARTIAL_UPFRONT", -} as const; - -/** - * @public - */ -export type PaymentOption = (typeof PaymentOption)[keyof typeof PaymentOption]; - /** * @public * @enum @@ -2038,20 +2587,6 @@ export interface ServiceSpecification { EC2Specification?: EC2Specification | undefined; } -/** - * @public - * @enum - */ -export const TermInYears = { - ONE_YEAR: "ONE_YEAR", - THREE_YEARS: "THREE_YEARS", -} as const; - -/** - * @public - */ -export type TermInYears = (typeof TermInYears)[keyof typeof TermInYears]; - /** *

Information about a recommendation, such as the timestamp for when Amazon Web Services * made a specific recommendation.

@@ -3548,60 +4083,6 @@ export interface GetSavingsPlanPurchaseRecommendationDetailsRequest { RecommendationDetailId: string | undefined; } -/** - *

Contains the hourly metrics for the given recommendation over the lookback period. - *

- * @public - */ -export interface RecommendationDetailHourlyMetrics { - /** - *

The period of time that you want the usage and costs for.

- * @public - */ - StartTime?: string | undefined; - - /** - *

The remaining On-Demand cost estimated to not be covered by the recommended Savings - * Plan, over the length of the lookback period.

- * @public - */ - EstimatedOnDemandCost?: string | undefined; - - /** - *

The current amount of Savings Plans eligible usage that the Savings Plan - * covered.

- * @public - */ - CurrentCoverage?: string | undefined; - - /** - *

The estimated coverage amount based on the recommended Savings Plan.

- * @public - */ - EstimatedCoverage?: string | undefined; - - /** - *

The estimated utilization for the recommended Savings Plan.

- * @public - */ - EstimatedNewCommitmentUtilization?: string | undefined; -} - -/** - * @public - * @enum - */ -export const SupportedSavingsPlansType = { - COMPUTE_SP: "COMPUTE_SP", - EC2_INSTANCE_SP: "EC2_INSTANCE_SP", - SAGEMAKER_SP: "SAGEMAKER_SP", -} as const; - -/** - * @public - */ -export type SupportedSavingsPlansType = (typeof SupportedSavingsPlansType)[keyof typeof SupportedSavingsPlansType]; - /** *

The details and metrics for the given recommendation.

* @public @@ -4549,6 +5030,56 @@ export class UnresolvableUsageUnitException extends __BaseException { } } +/** + * @public + */ +export interface ListCommitmentPurchaseAnalysesRequest { + /** + *

The status of the analysis.

+ * @public + */ + AnalysisStatus?: AnalysisStatus | undefined; + + /** + *

The token to retrieve the next set of + * results.

+ * @public + */ + NextPageToken?: string | undefined; + + /** + *

The number of analyses that you want returned in a single response + * object.

+ * @public + */ + PageSize?: number | undefined; + + /** + *

The analysis IDs associated with the commitment purchase + * analyses.

+ * @public + */ + AnalysisIds?: string[] | undefined; +} + +/** + * @public + */ +export interface ListCommitmentPurchaseAnalysesResponse { + /** + *

The list of analyses.

+ * @public + */ + AnalysisSummaryList?: AnalysisSummary[] | undefined; + + /** + *

The token to retrieve the next set of + * results.

+ * @public + */ + NextPageToken?: string | undefined; +} + /** * @public */ @@ -5035,6 +5566,65 @@ export interface ProvideAnomalyFeedbackResponse { AnomalyId: string | undefined; } +/** + *

A request to generate a recommendation is already in progress.

+ * @public + */ +export class GenerationExistsException extends __BaseException { + readonly name: "GenerationExistsException" = "GenerationExistsException"; + readonly $fault: "client" = "client"; + Message?: string | undefined; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "GenerationExistsException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, GenerationExistsException.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + */ +export interface StartCommitmentPurchaseAnalysisRequest { + /** + *

The configuration for the commitment purchase + * analysis.

+ * @public + */ + CommitmentPurchaseAnalysisConfiguration: CommitmentPurchaseAnalysisConfiguration | undefined; +} + +/** + * @public + */ +export interface StartCommitmentPurchaseAnalysisResponse { + /** + *

The analysis ID that's associated with the commitment purchase + * analysis.

+ * @public + */ + AnalysisId: string | undefined; + + /** + *

The start time of the analysis.

+ * @public + */ + AnalysisStartedTime: string | undefined; + + /** + *

The estimated time for when the analysis will + * complete.

+ * @public + */ + EstimatedCompletionTime: string | undefined; +} + /** *

* A request to backfill is already in progress. Once the previous request is complete, you can create another request. @@ -5084,28 +5674,6 @@ export interface StartCostAllocationTagBackfillResponse { BackfillRequest?: CostAllocationTagBackfillRequest | undefined; } -/** - *

A request to generate a recommendation is already in progress.

- * @public - */ -export class GenerationExistsException extends __BaseException { - readonly name: "GenerationExistsException" = "GenerationExistsException"; - readonly $fault: "client" = "client"; - Message?: string | undefined; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "GenerationExistsException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, GenerationExistsException.prototype); - this.Message = opts.Message; - } -} - /** * @public */ @@ -5852,7 +6420,7 @@ export interface CostCategoryRule { * object used to categorize costs. This supports dimensions, tags, and nested expressions. * Currently the only dimensions supported are LINKED_ACCOUNT, * - * SERVICE_CODE, RECORD_TYPE, LINKED_ACCOUNT_NAME, REGION, and USAGE_TYPE.

+ * SERVICE_CODE, RECORD_TYPE, LINKED_ACCOUNT_NAME, REGION, USAGE_TYPE, and BILLING_ENTITY.

*

* RECORD_TYPE is a dimension used for Cost Explorer APIs, and is also * supported for Cost Category expressions. This dimension uses different terms, depending @@ -6490,9 +7058,9 @@ export interface GetDimensionValuesRequest { *

  • *

    BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible * values are the following:

    - *

    - Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Servicesservices.

    + *

    - Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Services services.

    *

    - AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that's an acting - * reseller for Amazon Web Servicesservices in India.

    + * reseller for Amazon Web Services services in India.

    *

    - Amazon Web Services Marketplace: The entity that supports the sale of solutions that are built on * Amazon Web Services by third-party software providers.

    *
  • @@ -7313,6 +7881,13 @@ export interface GetReservationUtilizationRequest { * *
  • *

    SERVICE

    + * + *

    If not specified, the SERVICE filter defaults to Amazon Elastic + * Compute Cloud - Compute. Supported values for SERVICE are Amazon Elastic + * Compute Cloud - Compute, Amazon Relational Database Service, Amazon ElastiCache, Amazon + * Redshift, and Amazon Elasticsearch Service. The value for the SERVICE + * filter should not exceed "1".

    + *
    *
  • *
  • *

    SCOPE

    diff --git a/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts b/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts index 1e72d047d8b9..11000cbed7fe 100644 --- a/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts +++ b/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts @@ -57,6 +57,10 @@ import { GetApproximateUsageRecordsCommandInput, GetApproximateUsageRecordsCommandOutput, } from "../commands/GetApproximateUsageRecordsCommand"; +import { + GetCommitmentPurchaseAnalysisCommandInput, + GetCommitmentPurchaseAnalysisCommandOutput, +} from "../commands/GetCommitmentPurchaseAnalysisCommand"; import { GetCostAndUsageCommandInput, GetCostAndUsageCommandOutput } from "../commands/GetCostAndUsageCommand"; import { GetCostAndUsageWithResourcesCommandInput, @@ -103,6 +107,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, @@ -127,6 +135,10 @@ import { ProvideAnomalyFeedbackCommandInput, ProvideAnomalyFeedbackCommandOutput, } from "../commands/ProvideAnomalyFeedbackCommand"; +import { + StartCommitmentPurchaseAnalysisCommandInput, + StartCommitmentPurchaseAnalysisCommandOutput, +} from "../commands/StartCommitmentPurchaseAnalysisCommand"; import { StartCostAllocationTagBackfillCommandInput, StartCostAllocationTagBackfillCommandOutput, @@ -155,6 +167,8 @@ import { } from "../commands/UpdateCostCategoryDefinitionCommand"; import { CostExplorerServiceException as __BaseException } from "../models/CostExplorerServiceException"; import { + AnalysisNotFoundException, + AnalysisSummary, Anomaly, AnomalyDateInterval, AnomalyMonitor, @@ -162,6 +176,7 @@ import { AnomalySubscription, BackfillLimitExceededException, BillExpirationException, + CommitmentPurchaseAnalysisConfiguration, CostAllocationTagStatusEntry, CostCategory, CostCategoryInheritedValueDimension, @@ -190,6 +205,8 @@ import { GetAnomalySubscriptionsRequest, GetAnomalySubscriptionsResponse, GetApproximateUsageRecordsRequest, + GetCommitmentPurchaseAnalysisRequest, + GetCommitmentPurchaseAnalysisResponse, GetCostAndUsageRequest, GetCostAndUsageWithResourcesRequest, GetCostCategoriesRequest, @@ -210,6 +227,8 @@ import { Impact, InvalidNextTokenException, LimitExceededException, + ListCommitmentPurchaseAnalysesRequest, + ListCommitmentPurchaseAnalysesResponse, ListCostAllocationTagBackfillHistoryRequest, ListCostAllocationTagsRequest, ListCostCategoryDefinitionsRequest, @@ -221,10 +240,13 @@ import { ResourceNotFoundException, ResourceTag, RightsizingRecommendationConfiguration, + SavingsPlans, SavingsPlansDataType, + SavingsPlansPurchaseAnalysisConfiguration, ServiceQuotaExceededException, ServiceSpecification, SortDefinition, + StartCommitmentPurchaseAnalysisRequest, StartCostAllocationTagBackfillRequest, StartSavingsPlansPurchaseRecommendationGenerationRequest, Subscriber, @@ -385,6 +407,19 @@ export const se_GetApproximateUsageRecordsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1GetCommitmentPurchaseAnalysisCommand + */ +export const se_GetCommitmentPurchaseAnalysisCommand = async ( + input: GetCommitmentPurchaseAnalysisCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetCommitmentPurchaseAnalysis"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1GetCostAndUsageCommand */ @@ -593,6 +628,19 @@ export const se_GetUsageForecastCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1ListCommitmentPurchaseAnalysesCommand + */ +export const se_ListCommitmentPurchaseAnalysesCommand = async ( + input: ListCommitmentPurchaseAnalysesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListCommitmentPurchaseAnalyses"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1ListCostAllocationTagBackfillHistoryCommand */ @@ -671,6 +719,19 @@ export const se_ProvideAnomalyFeedbackCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1StartCommitmentPurchaseAnalysisCommand + */ +export const se_StartCommitmentPurchaseAnalysisCommand = async ( + input: StartCommitmentPurchaseAnalysisCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("StartCommitmentPurchaseAnalysis"); + let body: any; + body = JSON.stringify(se_StartCommitmentPurchaseAnalysisRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1StartCostAllocationTagBackfillCommand */ @@ -995,6 +1056,26 @@ export const de_GetApproximateUsageRecordsCommand = async ( return response; }; +/** + * deserializeAws_json1_1GetCommitmentPurchaseAnalysisCommand + */ +export const de_GetCommitmentPurchaseAnalysisCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetCommitmentPurchaseAnalysisResponse(data, context); + const response: GetCommitmentPurchaseAnalysisCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1GetCostAndUsageCommand */ @@ -1315,6 +1396,26 @@ export const de_GetUsageForecastCommand = async ( return response; }; +/** + * deserializeAws_json1_1ListCommitmentPurchaseAnalysesCommand + */ +export const de_ListCommitmentPurchaseAnalysesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListCommitmentPurchaseAnalysesResponse(data, context); + const response: ListCommitmentPurchaseAnalysesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1ListCostAllocationTagBackfillHistoryCommand */ @@ -1435,6 +1536,26 @@ export const de_ProvideAnomalyFeedbackCommand = async ( return response; }; +/** + * deserializeAws_json1_1StartCommitmentPurchaseAnalysisCommand + */ +export const de_StartCommitmentPurchaseAnalysisCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: StartCommitmentPurchaseAnalysisCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_1StartCostAllocationTagBackfillCommand */ @@ -1626,6 +1747,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "DataUnavailableException": case "com.amazonaws.costexplorer#DataUnavailableException": throw await de_DataUnavailableExceptionRes(parsedOutput, context); + case "AnalysisNotFoundException": + case "com.amazonaws.costexplorer#AnalysisNotFoundException": + throw await de_AnalysisNotFoundExceptionRes(parsedOutput, context); case "BillExpirationException": case "com.amazonaws.costexplorer#BillExpirationException": throw await de_BillExpirationExceptionRes(parsedOutput, context); @@ -1635,12 +1759,12 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "UnresolvableUsageUnitException": case "com.amazonaws.costexplorer#UnresolvableUsageUnitException": throw await de_UnresolvableUsageUnitExceptionRes(parsedOutput, context); - case "BackfillLimitExceededException": - case "com.amazonaws.costexplorer#BackfillLimitExceededException": - throw await de_BackfillLimitExceededExceptionRes(parsedOutput, context); case "GenerationExistsException": case "com.amazonaws.costexplorer#GenerationExistsException": throw await de_GenerationExistsExceptionRes(parsedOutput, context); + case "BackfillLimitExceededException": + case "com.amazonaws.costexplorer#BackfillLimitExceededException": + throw await de_BackfillLimitExceededExceptionRes(parsedOutput, context); case "TooManyTagsException": case "com.amazonaws.costexplorer#TooManyTagsException": throw await de_TooManyTagsExceptionRes(parsedOutput, context); @@ -1654,6 +1778,22 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): } }; +/** + * deserializeAws_json1_1AnalysisNotFoundExceptionRes + */ +const de_AnalysisNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new AnalysisNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1BackfillLimitExceededExceptionRes */ @@ -1862,6 +2002,8 @@ const de_UnresolvableUsageUnitExceptionRes = async ( return __decorateServiceException(exception, body); }; +// se_AnalysisIds omitted. + // se_AnomalyDateInterval omitted. /** @@ -1897,6 +2039,18 @@ const se_AnomalySubscription = (input: AnomalySubscription, context: __SerdeCont }); }; +/** + * serializeAws_json1_1CommitmentPurchaseAnalysisConfiguration + */ +const se_CommitmentPurchaseAnalysisConfiguration = ( + input: CommitmentPurchaseAnalysisConfiguration, + context: __SerdeContext +): any => { + return take(input, { + SavingsPlansPurchaseAnalysisConfiguration: (_) => se_SavingsPlansPurchaseAnalysisConfiguration(_, context), + }); +}; + // se_CostAllocationTagKeyList omitted. // se_CostAllocationTagStatusEntry omitted. @@ -2039,6 +2193,8 @@ const se_GetAnomaliesRequest = (input: GetAnomaliesRequest, context: __SerdeCont // se_GetApproximateUsageRecordsRequest omitted. +// se_GetCommitmentPurchaseAnalysisRequest omitted. + /** * serializeAws_json1_1GetCostAndUsageRequest */ @@ -2283,6 +2439,8 @@ const se_GetUsageForecastRequest = (input: GetUsageForecastRequest, context: __S // se_GroupDefinitions omitted. +// se_ListCommitmentPurchaseAnalysesRequest omitted. + // se_ListCostAllocationTagBackfillHistoryRequest omitted. // se_ListCostAllocationTagsRequest omitted. @@ -2311,14 +2469,71 @@ const se_GetUsageForecastRequest = (input: GetUsageForecastRequest, context: __S // se_RightsizingRecommendationConfiguration omitted. +/** + * serializeAws_json1_1SavingsPlans + */ +const se_SavingsPlans = (input: SavingsPlans, context: __SerdeContext): any => { + return take(input, { + InstanceFamily: [], + OfferingId: [], + PaymentOption: [], + Region: [], + SavingsPlansCommitment: __serializeFloat, + SavingsPlansType: [], + TermInYears: [], + }); +}; + // se_SavingsPlansDataTypes omitted. +/** + * serializeAws_json1_1SavingsPlansPurchaseAnalysisConfiguration + */ +const se_SavingsPlansPurchaseAnalysisConfiguration = ( + input: SavingsPlansPurchaseAnalysisConfiguration, + context: __SerdeContext +): any => { + return take(input, { + AccountId: [], + AccountScope: [], + AnalysisType: [], + LookBackTimePeriod: _json, + SavingsPlansToAdd: (_) => se_SavingsPlansToAdd(_, context), + SavingsPlansToExclude: _json, + }); +}; + +/** + * serializeAws_json1_1SavingsPlansToAdd + */ +const se_SavingsPlansToAdd = (input: SavingsPlans[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_SavingsPlans(entry, context); + }); +}; + +// se_SavingsPlansToExclude omitted. + // se_ServiceSpecification omitted. // se_SortDefinition omitted. // se_SortDefinitions omitted. +/** + * serializeAws_json1_1StartCommitmentPurchaseAnalysisRequest + */ +const se_StartCommitmentPurchaseAnalysisRequest = ( + input: StartCommitmentPurchaseAnalysisRequest, + context: __SerdeContext +): any => { + return take(input, { + CommitmentPurchaseAnalysisConfiguration: (_) => se_CommitmentPurchaseAnalysisConfiguration(_, context), + }); +}; + // se_StartCostAllocationTagBackfillRequest omitted. // se_StartSavingsPlansPurchaseRecommendationGenerationRequest omitted. @@ -2384,6 +2599,37 @@ const se_UpdateCostCategoryDefinitionRequest = ( // se_Values omitted. +// de_AnalysisDetails omitted. + +// de_AnalysisNotFoundException omitted. + +/** + * deserializeAws_json1_1AnalysisSummary + */ +const de_AnalysisSummary = (output: any, context: __SerdeContext): AnalysisSummary => { + return take(output, { + AnalysisCompletionTime: __expectString, + AnalysisId: __expectString, + AnalysisStartedTime: __expectString, + AnalysisStatus: __expectString, + CommitmentPurchaseAnalysisConfiguration: (_: any) => de_CommitmentPurchaseAnalysisConfiguration(_, context), + ErrorCode: __expectString, + EstimatedCompletionTime: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1AnalysisSummaryList + */ +const de_AnalysisSummaryList = (output: any, context: __SerdeContext): AnalysisSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AnalysisSummary(entry, context); + }); + return retVal; +}; + /** * deserializeAws_json1_1Anomalies */ @@ -2488,6 +2734,18 @@ const de_AnomalySubscriptions = (output: any, context: __SerdeContext): AnomalyS // de_BillExpirationException omitted. +/** + * deserializeAws_json1_1CommitmentPurchaseAnalysisConfiguration + */ +const de_CommitmentPurchaseAnalysisConfiguration = ( + output: any, + context: __SerdeContext +): CommitmentPurchaseAnalysisConfiguration => { + return take(output, { + SavingsPlansPurchaseAnalysisConfiguration: (_: any) => de_SavingsPlansPurchaseAnalysisConfiguration(_, context), + }) as any; +}; + // de_CostAllocationTag omitted. // de_CostAllocationTagBackfillRequest omitted. @@ -2701,6 +2959,25 @@ const de_GetAnomalySubscriptionsResponse = (output: any, context: __SerdeContext // de_GetApproximateUsageRecordsResponse omitted. +/** + * deserializeAws_json1_1GetCommitmentPurchaseAnalysisResponse + */ +const de_GetCommitmentPurchaseAnalysisResponse = ( + output: any, + context: __SerdeContext +): GetCommitmentPurchaseAnalysisResponse => { + return take(output, { + AnalysisCompletionTime: __expectString, + AnalysisDetails: _json, + AnalysisId: __expectString, + AnalysisStartedTime: __expectString, + AnalysisStatus: __expectString, + CommitmentPurchaseAnalysisConfiguration: (_: any) => de_CommitmentPurchaseAnalysisConfiguration(_, context), + ErrorCode: __expectString, + EstimatedCompletionTime: __expectString, + }) as any; +}; + // de_GetCostAndUsageResponse omitted. // de_GetCostAndUsageWithResourcesResponse omitted. @@ -2762,6 +3039,19 @@ const de_Impact = (output: any, context: __SerdeContext): Impact => { // de_LimitExceededException omitted. +/** + * deserializeAws_json1_1ListCommitmentPurchaseAnalysesResponse + */ +const de_ListCommitmentPurchaseAnalysesResponse = ( + output: any, + context: __SerdeContext +): ListCommitmentPurchaseAnalysesResponse => { + return take(output, { + AnalysisSummaryList: (_: any) => de_AnalysisSummaryList(_, context), + NextPageToken: __expectString, + }) as any; +}; + // de_ListCostAllocationTagBackfillHistoryResponse omitted. // de_ListCostAllocationTagsResponse omitted. @@ -2854,6 +3144,21 @@ const de_Impact = (output: any, context: __SerdeContext): Impact => { // de_RootCauses omitted. +/** + * deserializeAws_json1_1SavingsPlans + */ +const de_SavingsPlans = (output: any, context: __SerdeContext): SavingsPlans => { + return take(output, { + InstanceFamily: __expectString, + OfferingId: __expectString, + PaymentOption: __expectString, + Region: __expectString, + SavingsPlansCommitment: __limitedParseDouble, + SavingsPlansType: __expectString, + TermInYears: __expectString, + }) as any; +}; + // de_SavingsPlansAmortizedCommitment omitted. // de_SavingsPlansCoverage omitted. @@ -2864,6 +3169,25 @@ const de_Impact = (output: any, context: __SerdeContext): Impact => { // de_SavingsPlansDetails omitted. +/** + * deserializeAws_json1_1SavingsPlansPurchaseAnalysisConfiguration + */ +const de_SavingsPlansPurchaseAnalysisConfiguration = ( + output: any, + context: __SerdeContext +): SavingsPlansPurchaseAnalysisConfiguration => { + return take(output, { + AccountId: __expectString, + AccountScope: __expectString, + AnalysisType: __expectString, + LookBackTimePeriod: _json, + SavingsPlansToAdd: (_: any) => de_SavingsPlansToAdd(_, context), + SavingsPlansToExclude: _json, + }) as any; +}; + +// de_SavingsPlansPurchaseAnalysisDetails omitted. + // de_SavingsPlansPurchaseRecommendation omitted. // de_SavingsPlansPurchaseRecommendationDetail omitted. @@ -2876,6 +3200,20 @@ const de_Impact = (output: any, context: __SerdeContext): Impact => { // de_SavingsPlansSavings omitted. +/** + * deserializeAws_json1_1SavingsPlansToAdd + */ +const de_SavingsPlansToAdd = (output: any, context: __SerdeContext): SavingsPlans[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SavingsPlans(entry, context); + }); + return retVal; +}; + +// de_SavingsPlansToExclude omitted. + // de_SavingsPlansUtilization omitted. // de_SavingsPlansUtilizationAggregates omitted. @@ -2892,6 +3230,8 @@ const de_Impact = (output: any, context: __SerdeContext): Impact => { // de_ServiceSpecification omitted. +// de_StartCommitmentPurchaseAnalysisResponse omitted. + // de_StartCostAllocationTagBackfillResponse omitted. // de_StartSavingsPlansPurchaseRecommendationGenerationResponse omitted. diff --git a/codegen/sdk-codegen/aws-models/cost-explorer.json b/codegen/sdk-codegen/aws-models/cost-explorer.json index 665b1e7df12b..362438f15ac9 100644 --- a/codegen/sdk-codegen/aws-models/cost-explorer.json +++ b/codegen/sdk-codegen/aws-models/cost-explorer.json @@ -66,6 +66,9 @@ { "target": "com.amazonaws.costexplorer#GetApproximateUsageRecords" }, + { + "target": "com.amazonaws.costexplorer#GetCommitmentPurchaseAnalysis" + }, { "target": "com.amazonaws.costexplorer#GetCostAndUsage" }, @@ -114,6 +117,9 @@ { "target": "com.amazonaws.costexplorer#GetUsageForecast" }, + { + "target": "com.amazonaws.costexplorer#ListCommitmentPurchaseAnalyses" + }, { "target": "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistory" }, @@ -132,6 +138,9 @@ { "target": "com.amazonaws.costexplorer#ProvideAnomalyFeedback" }, + { + "target": "com.amazonaws.costexplorer#StartCommitmentPurchaseAnalysis" + }, { "target": "com.amazonaws.costexplorer#StartCostAllocationTagBackfill" }, @@ -966,6 +975,16 @@ } } }, + "com.amazonaws.costexplorer#AccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + }, + "smithy.api#pattern": "^[0-9]{12}$" + } + }, "com.amazonaws.costexplorer#AccountScope": { "type": "enum", "members": { @@ -989,6 +1008,151 @@ "com.amazonaws.costexplorer#AmortizedUpfrontFee": { "type": "string" }, + "com.amazonaws.costexplorer#AnalysisDetails": { + "type": "structure", + "members": { + "SavingsPlansPurchaseAnalysisDetails": { + "target": "com.amazonaws.costexplorer#SavingsPlansPurchaseAnalysisDetails", + "traits": { + "smithy.api#documentation": "

    Details about the Savings Plans purchase\n analysis.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Details about the analysis.

    " + } + }, + "com.amazonaws.costexplorer#AnalysisId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[\\S\\s]{8}-[\\S\\s]{4}-[\\S\\s]{4}-[\\S\\s]{4}-[\\S\\s]{12}$" + } + }, + "com.amazonaws.costexplorer#AnalysisIds": { + "type": "list", + "member": { + "target": "com.amazonaws.costexplorer#AnalysisId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 600 + } + } + }, + "com.amazonaws.costexplorer#AnalysisNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.costexplorer#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

    The requested analysis can't be\n found.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.costexplorer#AnalysisStatus": { + "type": "enum", + "members": { + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROCESSING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } + } + }, + "com.amazonaws.costexplorer#AnalysisSummary": { + "type": "structure", + "members": { + "EstimatedCompletionTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The estimated time for when the analysis will\n complete.

    " + } + }, + "AnalysisCompletionTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The completion time of the analysis.

    " + } + }, + "AnalysisStartedTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The start time of the analysis.

    " + } + }, + "AnalysisStatus": { + "target": "com.amazonaws.costexplorer#AnalysisStatus", + "traits": { + "smithy.api#documentation": "

    The status of the analysis.

    " + } + }, + "ErrorCode": { + "target": "com.amazonaws.costexplorer#ErrorCode", + "traits": { + "smithy.api#documentation": "

    The error code used for the\n analysis.

    " + } + }, + "AnalysisId": { + "target": "com.amazonaws.costexplorer#AnalysisId", + "traits": { + "smithy.api#documentation": "

    The analysis ID that's associated with the commitment\n purchase.

    " + } + }, + "CommitmentPurchaseAnalysisConfiguration": { + "target": "com.amazonaws.costexplorer#CommitmentPurchaseAnalysisConfiguration", + "traits": { + "smithy.api#documentation": "

    The analysis configuration for the commitment purchase\n analysis.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    A summary of the analysis.

    " + } + }, + "com.amazonaws.costexplorer#AnalysisSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.costexplorer#AnalysisSummary" + } + }, + "com.amazonaws.costexplorer#AnalysisType": { + "type": "enum", + "members": { + "MAX_SAVINGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MAX_SAVINGS" + } + }, + "CUSTOM_COMMITMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOM_COMMITMENT" + } + } + } + }, "com.amazonaws.costexplorer#Anomalies": { "type": "list", "member": { @@ -1020,7 +1184,7 @@ "DimensionValue": { "target": "com.amazonaws.costexplorer#GenericString", "traits": { - "smithy.api#documentation": "

    The dimension for the anomaly (for example, an Amazon Web Servicesservice in a service\n monitor).

    " + "smithy.api#documentation": "

    The dimension for the anomaly (for example, an Amazon Web Services service in a service\n monitor).

    " } }, "RootCauses": { @@ -1365,6 +1529,20 @@ "smithy.api#error": "client" } }, + "com.amazonaws.costexplorer#CommitmentPurchaseAnalysisConfiguration": { + "type": "structure", + "members": { + "SavingsPlansPurchaseAnalysisConfiguration": { + "target": "com.amazonaws.costexplorer#SavingsPlansPurchaseAnalysisConfiguration", + "traits": { + "smithy.api#documentation": "

    The configuration for the Savings Plans purchase\n analysis.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    The configuration for the commitment purchase\n analysis.

    " + } + }, "com.amazonaws.costexplorer#Context": { "type": "enum", "members": { @@ -1820,7 +1998,7 @@ "Rule": { "target": "com.amazonaws.costexplorer#Expression", "traits": { - "smithy.api#documentation": "

    An Expression\n object used to categorize costs. This supports dimensions, tags, and nested expressions.\n Currently the only dimensions supported are LINKED_ACCOUNT,\n\n SERVICE_CODE, RECORD_TYPE, LINKED_ACCOUNT_NAME, REGION, and USAGE_TYPE.

    \n

    \n RECORD_TYPE is a dimension used for Cost Explorer APIs, and is also\n supported for Cost Category expressions. This dimension uses different terms, depending\n on whether you're using the console or API/JSON editor. For a detailed comparison, see\n Term Comparisons in the Billing and Cost Management User\n Guide.

    " + "smithy.api#documentation": "

    An Expression\n object used to categorize costs. This supports dimensions, tags, and nested expressions.\n Currently the only dimensions supported are LINKED_ACCOUNT,\n\n SERVICE_CODE, RECORD_TYPE, LINKED_ACCOUNT_NAME, REGION, USAGE_TYPE, and BILLING_ENTITY.

    \n

    \n RECORD_TYPE is a dimension used for Cost Explorer APIs, and is also\n supported for Cost Category expressions. This dimension uses different terms, depending\n on whether you're using the console or API/JSON editor. For a detailed comparison, see\n Term Comparisons in the Billing and Cost Management User\n Guide.

    " } }, "InheritedValue": { @@ -3340,6 +3518,41 @@ "com.amazonaws.costexplorer#Entity": { "type": "string" }, + "com.amazonaws.costexplorer#ErrorCode": { + "type": "enum", + "members": { + "NO_USAGE_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO_USAGE_FOUND" + } + }, + "INTERNAL_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERNAL_FAILURE" + } + }, + "INVALID_SAVINGS_PLANS_TO_ADD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_SAVINGS_PLANS_TO_ADD" + } + }, + "INVALID_SAVINGS_PLANS_TO_EXCLUDE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_SAVINGS_PLANS_TO_EXCLUDE" + } + }, + "INVALID_ACCOUNT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ACCOUNT_ID" + } + } + } + }, "com.amazonaws.costexplorer#ErrorMessage": { "type": "string" }, @@ -3953,6 +4166,105 @@ "smithy.api#output": {} } }, + "com.amazonaws.costexplorer#GetCommitmentPurchaseAnalysis": { + "type": "operation", + "input": { + "target": "com.amazonaws.costexplorer#GetCommitmentPurchaseAnalysisRequest" + }, + "output": { + "target": "com.amazonaws.costexplorer#GetCommitmentPurchaseAnalysisResponse" + }, + "errors": [ + { + "target": "com.amazonaws.costexplorer#AnalysisNotFoundException" + }, + { + "target": "com.amazonaws.costexplorer#DataUnavailableException" + }, + { + "target": "com.amazonaws.costexplorer#LimitExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

    Retrieves a commitment purchase analysis result based on the\n AnalysisId.

    " + } + }, + "com.amazonaws.costexplorer#GetCommitmentPurchaseAnalysisRequest": { + "type": "structure", + "members": { + "AnalysisId": { + "target": "com.amazonaws.costexplorer#AnalysisId", + "traits": { + "smithy.api#documentation": "

    The analysis ID that's associated with the commitment purchase\n analysis.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.costexplorer#GetCommitmentPurchaseAnalysisResponse": { + "type": "structure", + "members": { + "EstimatedCompletionTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The estimated time for when the analysis will\n complete.

    ", + "smithy.api#required": {} + } + }, + "AnalysisCompletionTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The completion time of the analysis.

    " + } + }, + "AnalysisStartedTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The start time of the analysis.

    ", + "smithy.api#required": {} + } + }, + "AnalysisId": { + "target": "com.amazonaws.costexplorer#AnalysisId", + "traits": { + "smithy.api#documentation": "

    The analysis ID that's associated with the commitment purchase\n analysis.

    ", + "smithy.api#required": {} + } + }, + "AnalysisStatus": { + "target": "com.amazonaws.costexplorer#AnalysisStatus", + "traits": { + "smithy.api#documentation": "

    The status of the analysis.

    ", + "smithy.api#required": {} + } + }, + "ErrorCode": { + "target": "com.amazonaws.costexplorer#ErrorCode", + "traits": { + "smithy.api#documentation": "

    The error code used for the analysis.

    " + } + }, + "AnalysisDetails": { + "target": "com.amazonaws.costexplorer#AnalysisDetails", + "traits": { + "smithy.api#documentation": "

    Details about the analysis.

    " + } + }, + "CommitmentPurchaseAnalysisConfiguration": { + "target": "com.amazonaws.costexplorer#CommitmentPurchaseAnalysisConfiguration", + "traits": { + "smithy.api#documentation": "

    The configuration for the commitment purchase\n analysis.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.costexplorer#GetCostAndUsage": { "type": "operation", "input": { @@ -4418,7 +4730,7 @@ "Context": { "target": "com.amazonaws.costexplorer#Context", "traits": { - "smithy.api#documentation": "

    The context for the call to GetDimensionValues. This can be\n RESERVATIONS or COST_AND_USAGE. The default value is\n COST_AND_USAGE. If the context is set to RESERVATIONS, the\n resulting dimension values can be used in the GetReservationUtilization\n operation. If the context is set to COST_AND_USAGE, the resulting dimension\n values can be used in the GetCostAndUsage operation.

    \n

    If you set the context to COST_AND_USAGE, you can use the following\n dimensions for searching:

    \n
      \n
    • \n

      AZ - The Availability Zone. An example is us-east-1a.

      \n
    • \n
    • \n

      BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible\n values are the following:

      \n

      - Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Servicesservices.

      \n

      - AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that's an acting\n reseller for Amazon Web Servicesservices in India.

      \n

      - Amazon Web Services Marketplace: The entity that supports the sale of solutions that are built on\n Amazon Web Services by third-party software providers.

      \n
    • \n
    • \n

      CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments.\n Valid values are SingleAZ and MultiAZ.

      \n
    • \n
    • \n

      DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are\n Aurora or MySQL.

      \n
    • \n
    • \n

      INSTANCE_TYPE - The type of Amazon EC2 instance. An example is\n m4.xlarge.

      \n
    • \n
    • \n

      INSTANCE_TYPE_FAMILY - A family of instance types optimized to fit different use\n cases. Examples are Compute Optimized (for example, C4,\n C5, C6g, and C7g), Memory\n Optimization (for example, R4, R5n, R5b,\n and R6g).

      \n
    • \n
    • \n

      INVOICING_ENTITY - The name of the entity that issues the Amazon Web Services\n invoice.

      \n
    • \n
    • \n

      LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services\n services, such as Amazon Web Services.

      \n
    • \n
    • \n

      LINKED_ACCOUNT - The description in the attribute map that includes the full name\n of the member account. The value field contains the Amazon Web Services ID of the member\n account.

      \n
    • \n
    • \n

      OPERATING_SYSTEM - The operating system. Examples are Windows or Linux.

      \n
    • \n
    • \n

      OPERATION - The action performed. Examples include RunInstance and\n CreateBucket.

      \n
    • \n
    • \n

      PLATFORM - The Amazon EC2 operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      PURCHASE_TYPE - The reservation type of the purchase that this usage is related to.\n Examples include On-Demand Instances and Standard Reserved Instances.

      \n
    • \n
    • \n

      RESERVATION_ID - The unique identifier for an Amazon Web Services Reservation\n Instance.

      \n
    • \n
    • \n

      SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

      \n
    • \n
    • \n

      SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute).

      \n
    • \n
    • \n

      SERVICE - The Amazon Web Services service such as Amazon DynamoDB.

      \n
    • \n
    • \n

      TENANCY - The tenancy of a resource. Examples are shared or dedicated.

      \n
    • \n
    • \n

      USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response\n for the GetDimensionValues operation includes a unit attribute. Examples\n include GB and Hrs.

      \n
    • \n
    • \n

      USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2:\n CloudWatch – Alarms. The response for this operation includes a unit attribute.

      \n
    • \n
    • \n

      REGION - The Amazon Web Services Region.

      \n
    • \n
    • \n

      RECORD_TYPE - The different types of charges such as Reserved Instance (RI) fees,\n usage costs, tax refunds, and credits.

      \n
    • \n
    • \n

      RESOURCE_ID - The unique identifier of the resource. ResourceId is an opt-in\n feature only available for last 14 days for EC2-Compute Service.

      \n
    • \n
    \n

    If you set the context to RESERVATIONS, you can use the following\n dimensions for searching:

    \n
      \n
    • \n

      AZ - The Availability Zone. An example is us-east-1a.

      \n
    • \n
    • \n

      CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments.\n Valid values are SingleAZ and MultiAZ.

      \n
    • \n
    • \n

      INSTANCE_TYPE - The type of Amazon EC2 instance. An example is\n m4.xlarge.

      \n
    • \n
    • \n

      LINKED_ACCOUNT - The description in the attribute map that includes the full name\n of the member account. The value field contains the Amazon Web Services ID of the member\n account.

      \n
    • \n
    • \n

      PLATFORM - The Amazon EC2 operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      REGION - The Amazon Web Services Region.

      \n
    • \n
    • \n

      SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are\n regional or a single Availability Zone.

      \n
    • \n
    • \n

      TAG (Coverage only) - The tags that are associated with a Reserved Instance\n (RI).

      \n
    • \n
    • \n

      TENANCY - The tenancy of a resource. Examples are shared or dedicated.

      \n
    • \n
    \n

    If you set the context to SAVINGS_PLANS, you can use the following\n dimensions for searching:

    \n
      \n
    • \n

      SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)

      \n
    • \n
    • \n

      PAYMENT_OPTION - The payment option for the given Savings Plans (for example, All\n Upfront)

      \n
    • \n
    • \n

      REGION - The Amazon Web Services Region.

      \n
    • \n
    • \n

      INSTANCE_TYPE_FAMILY - The family of instances (For example,\n m5)

      \n
    • \n
    • \n

      LINKED_ACCOUNT - The description in the attribute map that includes the full name\n of the member account. The value field contains the Amazon Web Services ID of the member\n account.

      \n
    • \n
    • \n

      SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

      \n
    • \n
    " + "smithy.api#documentation": "

    The context for the call to GetDimensionValues. This can be\n RESERVATIONS or COST_AND_USAGE. The default value is\n COST_AND_USAGE. If the context is set to RESERVATIONS, the\n resulting dimension values can be used in the GetReservationUtilization\n operation. If the context is set to COST_AND_USAGE, the resulting dimension\n values can be used in the GetCostAndUsage operation.

    \n

    If you set the context to COST_AND_USAGE, you can use the following\n dimensions for searching:

    \n
      \n
    • \n

      AZ - The Availability Zone. An example is us-east-1a.

      \n
    • \n
    • \n

      BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible\n values are the following:

      \n

      - Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Services services.

      \n

      - AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that's an acting\n reseller for Amazon Web Services services in India.

      \n

      - Amazon Web Services Marketplace: The entity that supports the sale of solutions that are built on\n Amazon Web Services by third-party software providers.

      \n
    • \n
    • \n

      CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments.\n Valid values are SingleAZ and MultiAZ.

      \n
    • \n
    • \n

      DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are\n Aurora or MySQL.

      \n
    • \n
    • \n

      INSTANCE_TYPE - The type of Amazon EC2 instance. An example is\n m4.xlarge.

      \n
    • \n
    • \n

      INSTANCE_TYPE_FAMILY - A family of instance types optimized to fit different use\n cases. Examples are Compute Optimized (for example, C4,\n C5, C6g, and C7g), Memory\n Optimization (for example, R4, R5n, R5b,\n and R6g).

      \n
    • \n
    • \n

      INVOICING_ENTITY - The name of the entity that issues the Amazon Web Services\n invoice.

      \n
    • \n
    • \n

      LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services\n services, such as Amazon Web Services.

      \n
    • \n
    • \n

      LINKED_ACCOUNT - The description in the attribute map that includes the full name\n of the member account. The value field contains the Amazon Web Services ID of the member\n account.

      \n
    • \n
    • \n

      OPERATING_SYSTEM - The operating system. Examples are Windows or Linux.

      \n
    • \n
    • \n

      OPERATION - The action performed. Examples include RunInstance and\n CreateBucket.

      \n
    • \n
    • \n

      PLATFORM - The Amazon EC2 operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      PURCHASE_TYPE - The reservation type of the purchase that this usage is related to.\n Examples include On-Demand Instances and Standard Reserved Instances.

      \n
    • \n
    • \n

      RESERVATION_ID - The unique identifier for an Amazon Web Services Reservation\n Instance.

      \n
    • \n
    • \n

      SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

      \n
    • \n
    • \n

      SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute).

      \n
    • \n
    • \n

      SERVICE - The Amazon Web Services service such as Amazon DynamoDB.

      \n
    • \n
    • \n

      TENANCY - The tenancy of a resource. Examples are shared or dedicated.

      \n
    • \n
    • \n

      USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response\n for the GetDimensionValues operation includes a unit attribute. Examples\n include GB and Hrs.

      \n
    • \n
    • \n

      USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2:\n CloudWatch – Alarms. The response for this operation includes a unit attribute.

      \n
    • \n
    • \n

      REGION - The Amazon Web Services Region.

      \n
    • \n
    • \n

      RECORD_TYPE - The different types of charges such as Reserved Instance (RI) fees,\n usage costs, tax refunds, and credits.

      \n
    • \n
    • \n

      RESOURCE_ID - The unique identifier of the resource. ResourceId is an opt-in\n feature only available for last 14 days for EC2-Compute Service.

      \n
    • \n
    \n

    If you set the context to RESERVATIONS, you can use the following\n dimensions for searching:

    \n
      \n
    • \n

      AZ - The Availability Zone. An example is us-east-1a.

      \n
    • \n
    • \n

      CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments.\n Valid values are SingleAZ and MultiAZ.

      \n
    • \n
    • \n

      INSTANCE_TYPE - The type of Amazon EC2 instance. An example is\n m4.xlarge.

      \n
    • \n
    • \n

      LINKED_ACCOUNT - The description in the attribute map that includes the full name\n of the member account. The value field contains the Amazon Web Services ID of the member\n account.

      \n
    • \n
    • \n

      PLATFORM - The Amazon EC2 operating system. Examples are Windows or\n Linux.

      \n
    • \n
    • \n

      REGION - The Amazon Web Services Region.

      \n
    • \n
    • \n

      SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are\n regional or a single Availability Zone.

      \n
    • \n
    • \n

      TAG (Coverage only) - The tags that are associated with a Reserved Instance\n (RI).

      \n
    • \n
    • \n

      TENANCY - The tenancy of a resource. Examples are shared or dedicated.

      \n
    • \n
    \n

    If you set the context to SAVINGS_PLANS, you can use the following\n dimensions for searching:

    \n
      \n
    • \n

      SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)

      \n
    • \n
    • \n

      PAYMENT_OPTION - The payment option for the given Savings Plans (for example, All\n Upfront)

      \n
    • \n
    • \n

      REGION - The Amazon Web Services Region.

      \n
    • \n
    • \n

      INSTANCE_TYPE_FAMILY - The family of instances (For example,\n m5)

      \n
    • \n
    • \n

      LINKED_ACCOUNT - The description in the attribute map that includes the full name\n of the member account. The value field contains the Amazon Web Services ID of the member\n account.

      \n
    • \n
    • \n

      SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

      \n
    • \n
    " } }, "Filter": { @@ -4754,7 +5066,7 @@ "Filter": { "target": "com.amazonaws.costexplorer#Expression", "traits": { - "smithy.api#documentation": "

    Filters utilization data by dimensions. You can filter by the following\n dimensions:

    \n
      \n
    • \n

      AZ

      \n
    • \n
    • \n

      CACHE_ENGINE

      \n
    • \n
    • \n

      DEPLOYMENT_OPTION

      \n
    • \n
    • \n

      INSTANCE_TYPE

      \n
    • \n
    • \n

      LINKED_ACCOUNT

      \n
    • \n
    • \n

      OPERATING_SYSTEM

      \n
    • \n
    • \n

      PLATFORM

      \n
    • \n
    • \n

      REGION

      \n
    • \n
    • \n

      SERVICE

      \n
    • \n
    • \n

      SCOPE

      \n
    • \n
    • \n

      TENANCY

      \n
    • \n
    \n

    \n GetReservationUtilization uses the same Expression object\n as the other operations, but only AND is supported among each dimension, and\n nesting is supported up to only one level deep. If there are multiple values for a dimension,\n they are OR'd together.

    " + "smithy.api#documentation": "

    Filters utilization data by dimensions. You can filter by the following\n dimensions:

    \n
      \n
    • \n

      AZ

      \n
    • \n
    • \n

      CACHE_ENGINE

      \n
    • \n
    • \n

      DEPLOYMENT_OPTION

      \n
    • \n
    • \n

      INSTANCE_TYPE

      \n
    • \n
    • \n

      LINKED_ACCOUNT

      \n
    • \n
    • \n

      OPERATING_SYSTEM

      \n
    • \n
    • \n

      PLATFORM

      \n
    • \n
    • \n

      REGION

      \n
    • \n
    • \n

      SERVICE

      \n \n

      If not specified, the SERVICE filter defaults to Amazon Elastic\n Compute Cloud - Compute. Supported values for SERVICE are Amazon Elastic\n Compute Cloud - Compute, Amazon Relational Database Service, Amazon ElastiCache, Amazon\n Redshift, and Amazon Elasticsearch Service. The value for the SERVICE\n filter should not exceed \"1\".

      \n
      \n
    • \n
    • \n

      SCOPE

      \n
    • \n
    • \n

      TENANCY

      \n
    • \n
    \n

    \n GetReservationUtilization uses the same Expression object\n as the other operations, but only AND is supported among each dimension, and\n nesting is supported up to only one level deep. If there are multiple values for a dimension,\n they are OR'd together.

    " } }, "SortBy": { @@ -5772,15 +6084,18 @@ "smithy.api#error": "client" } }, - "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistory": { + "com.amazonaws.costexplorer#ListCommitmentPurchaseAnalyses": { "type": "operation", "input": { - "target": "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryRequest" + "target": "com.amazonaws.costexplorer#ListCommitmentPurchaseAnalysesRequest" }, "output": { - "target": "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryResponse" + "target": "com.amazonaws.costexplorer#ListCommitmentPurchaseAnalysesResponse" }, "errors": [ + { + "target": "com.amazonaws.costexplorer#DataUnavailableException" + }, { "target": "com.amazonaws.costexplorer#InvalidNextTokenException" }, @@ -5789,27 +6104,35 @@ } ], "traits": { - "smithy.api#documentation": "

    \n Retrieves a list of your historical cost allocation tag backfill requests.\n

    ", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" - } + "smithy.api#documentation": "

    Lists the commitment purchase analyses for your account based on the last 30\n days.

    " } }, - "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryRequest": { + "com.amazonaws.costexplorer#ListCommitmentPurchaseAnalysesRequest": { "type": "structure", "members": { - "NextToken": { + "AnalysisStatus": { + "target": "com.amazonaws.costexplorer#AnalysisStatus", + "traits": { + "smithy.api#documentation": "

    The status of the analysis.

    " + } + }, + "NextPageToken": { "target": "com.amazonaws.costexplorer#NextPageToken", "traits": { - "smithy.api#documentation": "

    \n The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.\n

    " + "smithy.api#documentation": "

    The token to retrieve the next set of\n results.

    " } }, - "MaxResults": { - "target": "com.amazonaws.costexplorer#CostAllocationTagsMaxResults", + "PageSize": { + "target": "com.amazonaws.costexplorer#NonNegativeInteger", "traits": { - "smithy.api#documentation": "

    \n The maximum number of objects that are returned for this request.\n

    " + "smithy.api#default": 0, + "smithy.api#documentation": "

    The number of analyses that you want returned in a single response\n object.

    " + } + }, + "AnalysisIds": { + "target": "com.amazonaws.costexplorer#AnalysisIds", + "traits": { + "smithy.api#documentation": "

    The analysis IDs associated with the commitment purchase\n analyses.

    " } } }, @@ -5817,19 +6140,84 @@ "smithy.api#input": {} } }, - "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryResponse": { + "com.amazonaws.costexplorer#ListCommitmentPurchaseAnalysesResponse": { "type": "structure", "members": { - "BackfillRequests": { - "target": "com.amazonaws.costexplorer#CostAllocationTagBackfillRequestList", + "AnalysisSummaryList": { + "target": "com.amazonaws.costexplorer#AnalysisSummaryList", "traits": { - "smithy.api#documentation": "

    \n The list of historical cost allocation tag backfill requests.\n

    " + "smithy.api#documentation": "

    The list of analyses.

    " } }, - "NextToken": { + "NextPageToken": { "target": "com.amazonaws.costexplorer#NextPageToken", "traits": { - "smithy.api#documentation": "

    \n The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.\n

    " + "smithy.api#documentation": "

    The token to retrieve the next set of\n results.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistory": { + "type": "operation", + "input": { + "target": "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryRequest" + }, + "output": { + "target": "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.costexplorer#InvalidNextTokenException" + }, + { + "target": "com.amazonaws.costexplorer#LimitExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

    \n Retrieves a list of your historical cost allocation tag backfill requests.\n

    ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.costexplorer#NextPageToken", + "traits": { + "smithy.api#documentation": "

    \n The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.\n

    " + } + }, + "MaxResults": { + "target": "com.amazonaws.costexplorer#CostAllocationTagsMaxResults", + "traits": { + "smithy.api#documentation": "

    \n The maximum number of objects that are returned for this request.\n

    " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.costexplorer#ListCostAllocationTagBackfillHistoryResponse": { + "type": "structure", + "members": { + "BackfillRequests": { + "target": "com.amazonaws.costexplorer#CostAllocationTagBackfillRequestList", + "traits": { + "smithy.api#documentation": "

    \n The list of historical cost allocation tag backfill requests.\n

    " + } + }, + "NextToken": { + "target": "com.amazonaws.costexplorer#NextPageToken", + "traits": { + "smithy.api#documentation": "

    \n The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.\n

    " } } }, @@ -7841,7 +8229,7 @@ "Service": { "target": "com.amazonaws.costexplorer#GenericString", "traits": { - "smithy.api#documentation": "

    The Amazon Web Servicesservice name that's associated with the cost anomaly.

    " + "smithy.api#documentation": "

    The Amazon Web Services service name that's associated with the cost anomaly.

    " } }, "Region": { @@ -7870,7 +8258,7 @@ } }, "traits": { - "smithy.api#documentation": "

    The combination of Amazon Web Servicesservice, linked account, linked account name,\n Region, and usage type where a cost anomaly is observed. The linked account name will\n only be available when the account name can be identified.

    " + "smithy.api#documentation": "

    The combination of Amazon Web Services service, linked account, linked account name,\n Region, and usage type where a cost anomaly is observed. The linked account name will\n only be available when the account name can be identified.

    " } }, "com.amazonaws.costexplorer#RootCauses": { @@ -7882,6 +8270,56 @@ "com.amazonaws.costexplorer#SavingsPlanArn": { "type": "string" }, + "com.amazonaws.costexplorer#SavingsPlans": { + "type": "structure", + "members": { + "PaymentOption": { + "target": "com.amazonaws.costexplorer#PaymentOption", + "traits": { + "smithy.api#documentation": "

    The payment option for the Savings Plans\n commitment.

    " + } + }, + "SavingsPlansType": { + "target": "com.amazonaws.costexplorer#SupportedSavingsPlansType", + "traits": { + "smithy.api#documentation": "

    The Savings Plans type.

    " + } + }, + "Region": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The Region associated with the Savings Plans\n commitment.

    " + } + }, + "InstanceFamily": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The instance family of the Savings Plans\n commitment.

    " + } + }, + "TermInYears": { + "target": "com.amazonaws.costexplorer#TermInYears", + "traits": { + "smithy.api#documentation": "

    The term that you want the Savings Plans commitment\n for.

    " + } + }, + "SavingsPlansCommitment": { + "target": "com.amazonaws.costexplorer#SavingsPlansCommitment", + "traits": { + "smithy.api#documentation": "

    The Savings Plans commitment.

    " + } + }, + "OfferingId": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The unique ID that's used to distinguish commitments from one\n another.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    The Savings Plans commitment\n details.

    " + } + }, "com.amazonaws.costexplorer#SavingsPlansAmortizedCommitment": { "type": "structure", "members": { @@ -7908,6 +8346,15 @@ "smithy.api#documentation": "

    The amortized amount of Savings Plans purchased in a specific account during a\n specific time interval.

    " } }, + "com.amazonaws.costexplorer#SavingsPlansCommitment": { + "type": "double", + "traits": { + "smithy.api#range": { + "min": 0.001, + "max": 5000 + } + } + }, "com.amazonaws.costexplorer#SavingsPlansCoverage": { "type": "structure", "members": { @@ -8030,6 +8477,203 @@ "smithy.api#documentation": "

    The attribute details on a specific Savings Plan.

    " } }, + "com.amazonaws.costexplorer#SavingsPlansId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[\\S\\s]{8}-[\\S\\s]{4}-[\\S\\s]{4}-[\\S\\s]{4}-[\\S\\s]{12}$" + } + }, + "com.amazonaws.costexplorer#SavingsPlansPurchaseAnalysisConfiguration": { + "type": "structure", + "members": { + "AccountScope": { + "target": "com.amazonaws.costexplorer#AccountScope", + "traits": { + "smithy.api#documentation": "

    The account scope that you want your analysis\n for.

    " + } + }, + "AccountId": { + "target": "com.amazonaws.costexplorer#AccountId", + "traits": { + "smithy.api#documentation": "

    The account that the analysis is\n for.

    " + } + }, + "AnalysisType": { + "target": "com.amazonaws.costexplorer#AnalysisType", + "traits": { + "smithy.api#documentation": "

    The type of analysis.

    ", + "smithy.api#required": {} + } + }, + "SavingsPlansToAdd": { + "target": "com.amazonaws.costexplorer#SavingsPlansToAdd", + "traits": { + "smithy.api#documentation": "

    Savings Plans to include in the\n analysis.

    ", + "smithy.api#required": {} + } + }, + "SavingsPlansToExclude": { + "target": "com.amazonaws.costexplorer#SavingsPlansToExclude", + "traits": { + "smithy.api#documentation": "

    Savings Plans to exclude from the\n analysis.

    " + } + }, + "LookBackTimePeriod": { + "target": "com.amazonaws.costexplorer#DateInterval", + "traits": { + "smithy.api#documentation": "

    The time period associated with the\n analysis.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

    The configuration for the Savings Plans purchase\n analysis.

    " + } + }, + "com.amazonaws.costexplorer#SavingsPlansPurchaseAnalysisDetails": { + "type": "structure", + "members": { + "CurrencyCode": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The currency code used for the\n analysis.

    " + } + }, + "LookbackPeriodInHours": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The lookback period in hours that's used to generate the\n analysis.

    " + } + }, + "CurrentAverageCoverage": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The average value of hourly coverage over the lookback\n period.

    " + } + }, + "CurrentAverageHourlyOnDemandSpend": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The average value of hourly On-Demand spend over the lookback\n period.

    " + } + }, + "CurrentMaximumHourlyOnDemandSpend": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The highest value of hourly On-Demand spend over the lookback\n period.

    " + } + }, + "CurrentMinimumHourlyOnDemandSpend": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The lowest value of hourly On-Demand spend over the lookback\n period.

    " + } + }, + "CurrentOnDemandSpend": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The current total On-Demand spend over the lookback\n period.

    " + } + }, + "ExistingHourlyCommitment": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The existing hourly commitment for the Savings Plan\n type.

    " + } + }, + "HourlyCommitmentToPurchase": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The recommended or custom hourly\n commitment.

    " + } + }, + "EstimatedAverageCoverage": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated coverage of the Savings\n Plan.

    " + } + }, + "EstimatedAverageUtilization": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated utilization of the Savings\n Plan.

    " + } + }, + "EstimatedMonthlySavingsAmount": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated monthly savings amount based on the Savings\n Plan.

    " + } + }, + "EstimatedOnDemandCost": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The remaining On-Demand cost estimated to not be covered by the commitment, over the\n length of the lookback period.

    " + } + }, + "EstimatedOnDemandCostWithCurrentCommitment": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated On-Demand cost you expect with no additional commitment, based on your\n usage of the selected time period and the Savings Plan you\n own.

    " + } + }, + "EstimatedROI": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated return on investment that's based on the purchase commitment and\n estimated savings. This is calculated as\n estimatedSavingsAmount/estimatedSPCost*100.

    " + } + }, + "EstimatedSavingsAmount": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated savings amount that's based on the purchase commitment over the length\n of the lookback period.

    " + } + }, + "EstimatedSavingsPercentage": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated savings percentage relative to the total cost over the cost calculation\n lookback period.

    " + } + }, + "EstimatedCommitmentCost": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The estimated cost of the purchase commitment over the length of the lookback\n period.

    " + } + }, + "LatestUsageTimestamp": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The date and time of the last hour that went into the\n analysis.

    " + } + }, + "UpfrontCost": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    The upfront cost of the Savings Plan, based on the selected payment\n option.

    " + } + }, + "AdditionalMetadata": { + "target": "com.amazonaws.costexplorer#GenericString", + "traits": { + "smithy.api#documentation": "

    Additional metadata that might be applicable to the\n commitment.

    " + } + }, + "MetricsOverLookbackPeriod": { + "target": "com.amazonaws.costexplorer#MetricsOverLookbackPeriod", + "traits": { + "smithy.api#documentation": "

    The related hourly cost, coverage, and utilization metrics over the lookback\n period.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Details about the Savings Plans purchase\n analysis.

    " + } + }, "com.amazonaws.costexplorer#SavingsPlansPurchaseRecommendation": { "type": "structure", "members": { @@ -8316,6 +8960,30 @@ "smithy.api#documentation": "

    The amount of savings that you're accumulating, against the public On-Demand rate of\n the usage accrued in an account.

    " } }, + "com.amazonaws.costexplorer#SavingsPlansToAdd": { + "type": "list", + "member": { + "target": "com.amazonaws.costexplorer#SavingsPlans" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.costexplorer#SavingsPlansToExclude": { + "type": "list", + "member": { + "target": "com.amazonaws.costexplorer#SavingsPlansId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + } + } + }, "com.amazonaws.costexplorer#SavingsPlansUtilization": { "type": "structure", "members": { @@ -8549,6 +9217,76 @@ } } }, + "com.amazonaws.costexplorer#StartCommitmentPurchaseAnalysis": { + "type": "operation", + "input": { + "target": "com.amazonaws.costexplorer#StartCommitmentPurchaseAnalysisRequest" + }, + "output": { + "target": "com.amazonaws.costexplorer#StartCommitmentPurchaseAnalysisResponse" + }, + "errors": [ + { + "target": "com.amazonaws.costexplorer#DataUnavailableException" + }, + { + "target": "com.amazonaws.costexplorer#GenerationExistsException" + }, + { + "target": "com.amazonaws.costexplorer#LimitExceededException" + }, + { + "target": "com.amazonaws.costexplorer#ServiceQuotaExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

    Specifies the parameters of a planned commitment purchase and starts the generation of the\n analysis. This enables you to estimate the cost, coverage, and utilization impact of your\n planned commitment purchases. You can request up to 20 analysis runs per\n day.

    " + } + }, + "com.amazonaws.costexplorer#StartCommitmentPurchaseAnalysisRequest": { + "type": "structure", + "members": { + "CommitmentPurchaseAnalysisConfiguration": { + "target": "com.amazonaws.costexplorer#CommitmentPurchaseAnalysisConfiguration", + "traits": { + "smithy.api#documentation": "

    The configuration for the commitment purchase\n analysis.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.costexplorer#StartCommitmentPurchaseAnalysisResponse": { + "type": "structure", + "members": { + "AnalysisId": { + "target": "com.amazonaws.costexplorer#AnalysisId", + "traits": { + "smithy.api#documentation": "

    The analysis ID that's associated with the commitment purchase\n analysis.

    ", + "smithy.api#required": {} + } + }, + "AnalysisStartedTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The start time of the analysis.

    ", + "smithy.api#required": {} + } + }, + "EstimatedCompletionTime": { + "target": "com.amazonaws.costexplorer#ZonedDateTime", + "traits": { + "smithy.api#documentation": "

    The estimated time for when the analysis will\n complete.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.costexplorer#StartCostAllocationTagBackfill": { "type": "operation", "input": {