From 3a26fc745250932894b8536c8f4787e7c90d79ed Mon Sep 17 00:00:00 2001 From: awstools Date: Mon, 28 Aug 2023 18:20:01 +0000 Subject: [PATCH] feat(client-compute-optimizer): This release enables AWS Compute Optimizer to analyze and generate licensing optimization recommendations for sql server running on EC2 instances. --- clients/client-compute-optimizer/README.md | 16 + .../src/ComputeOptimizer.ts | 46 + .../src/ComputeOptimizerClient.ts | 12 + .../DeleteRecommendationPreferencesCommand.ts | 2 +- ...DescribeRecommendationExportJobsCommand.ts | 2 +- .../ExportLicenseRecommendationsCommand.ts | 206 +++ .../GetEC2InstanceRecommendationsCommand.ts | 2 +- .../GetLicenseRecommendationsCommand.ts | 244 ++++ .../GetRecommendationPreferencesCommand.ts | 4 +- .../GetRecommendationSummariesCommand.ts | 2 +- .../PutRecommendationPreferencesCommand.ts | 2 +- .../src/commands/index.ts | 2 + .../src/endpoint/ruleset.ts | 2 +- .../src/models/models_0.ts | 650 ++++++++++ .../src/protocols/Aws_json1_0.ts | 265 ++++ .../aws-models/compute-optimizer.json | 1135 ++++++++++++++--- 16 files changed, 2372 insertions(+), 220 deletions(-) create mode 100644 clients/client-compute-optimizer/src/commands/ExportLicenseRecommendationsCommand.ts create mode 100644 clients/client-compute-optimizer/src/commands/GetLicenseRecommendationsCommand.ts diff --git a/clients/client-compute-optimizer/README.md b/clients/client-compute-optimizer/README.md index 4fe8a7c4b7a95..35bc424a4ab27 100644 --- a/clients/client-compute-optimizer/README.md +++ b/clients/client-compute-optimizer/README.md @@ -269,6 +269,14 @@ ExportLambdaFunctionRecommendations [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/classes/exportlambdafunctionrecommendationscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/exportlambdafunctionrecommendationscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/exportlambdafunctionrecommendationscommandoutput.html) + +
+ +ExportLicenseRecommendations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/classes/exportlicenserecommendationscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/exportlicenserecommendationscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/exportlicenserecommendationscommandoutput.html) +
@@ -349,6 +357,14 @@ GetLambdaFunctionRecommendations [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/classes/getlambdafunctionrecommendationscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/getlambdafunctionrecommendationscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/getlambdafunctionrecommendationscommandoutput.html) +
+
+ +GetLicenseRecommendations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/classes/getlicenserecommendationscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/getlicenserecommendationscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-compute-optimizer/interfaces/getlicenserecommendationscommandoutput.html) +
diff --git a/clients/client-compute-optimizer/src/ComputeOptimizer.ts b/clients/client-compute-optimizer/src/ComputeOptimizer.ts index 681e0b1a01b48..adde6d273bdfa 100644 --- a/clients/client-compute-optimizer/src/ComputeOptimizer.ts +++ b/clients/client-compute-optimizer/src/ComputeOptimizer.ts @@ -37,6 +37,11 @@ import { ExportLambdaFunctionRecommendationsCommandInput, ExportLambdaFunctionRecommendationsCommandOutput, } from "./commands/ExportLambdaFunctionRecommendationsCommand"; +import { + ExportLicenseRecommendationsCommand, + ExportLicenseRecommendationsCommandInput, + ExportLicenseRecommendationsCommandOutput, +} from "./commands/ExportLicenseRecommendationsCommand"; import { GetAutoScalingGroupRecommendationsCommand, GetAutoScalingGroupRecommendationsCommandInput, @@ -87,6 +92,11 @@ import { GetLambdaFunctionRecommendationsCommandInput, GetLambdaFunctionRecommendationsCommandOutput, } from "./commands/GetLambdaFunctionRecommendationsCommand"; +import { + GetLicenseRecommendationsCommand, + GetLicenseRecommendationsCommandInput, + GetLicenseRecommendationsCommandOutput, +} from "./commands/GetLicenseRecommendationsCommand"; import { GetRecommendationPreferencesCommand, GetRecommendationPreferencesCommandInput, @@ -117,6 +127,7 @@ const commands = { ExportEC2InstanceRecommendationsCommand, ExportECSServiceRecommendationsCommand, ExportLambdaFunctionRecommendationsCommand, + ExportLicenseRecommendationsCommand, GetAutoScalingGroupRecommendationsCommand, GetEBSVolumeRecommendationsCommand, GetEC2InstanceRecommendationsCommand, @@ -127,6 +138,7 @@ const commands = { GetEnrollmentStatusCommand, GetEnrollmentStatusesForOrganizationCommand, GetLambdaFunctionRecommendationsCommand, + GetLicenseRecommendationsCommand, GetRecommendationPreferencesCommand, GetRecommendationSummariesCommand, PutRecommendationPreferencesCommand, @@ -253,6 +265,23 @@ export interface ComputeOptimizer { cb: (err: any, data?: ExportLambdaFunctionRecommendationsCommandOutput) => void ): void; + /** + * @see {@link ExportLicenseRecommendationsCommand} + */ + exportLicenseRecommendations( + args: ExportLicenseRecommendationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + exportLicenseRecommendations( + args: ExportLicenseRecommendationsCommandInput, + cb: (err: any, data?: ExportLicenseRecommendationsCommandOutput) => void + ): void; + exportLicenseRecommendations( + args: ExportLicenseRecommendationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ExportLicenseRecommendationsCommandOutput) => void + ): void; + /** * @see {@link GetAutoScalingGroupRecommendationsCommand} */ @@ -423,6 +452,23 @@ export interface ComputeOptimizer { cb: (err: any, data?: GetLambdaFunctionRecommendationsCommandOutput) => void ): void; + /** + * @see {@link GetLicenseRecommendationsCommand} + */ + getLicenseRecommendations( + args: GetLicenseRecommendationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getLicenseRecommendations( + args: GetLicenseRecommendationsCommandInput, + cb: (err: any, data?: GetLicenseRecommendationsCommandOutput) => void + ): void; + getLicenseRecommendations( + args: GetLicenseRecommendationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetLicenseRecommendationsCommandOutput) => void + ): void; + /** * @see {@link GetRecommendationPreferencesCommand} */ diff --git a/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts b/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts index ac402df440996..b33388ca9f1d3 100644 --- a/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts +++ b/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts @@ -78,6 +78,10 @@ import { ExportLambdaFunctionRecommendationsCommandInput, ExportLambdaFunctionRecommendationsCommandOutput, } from "./commands/ExportLambdaFunctionRecommendationsCommand"; +import { + ExportLicenseRecommendationsCommandInput, + ExportLicenseRecommendationsCommandOutput, +} from "./commands/ExportLicenseRecommendationsCommand"; import { GetAutoScalingGroupRecommendationsCommandInput, GetAutoScalingGroupRecommendationsCommandOutput, @@ -118,6 +122,10 @@ import { GetLambdaFunctionRecommendationsCommandInput, GetLambdaFunctionRecommendationsCommandOutput, } from "./commands/GetLambdaFunctionRecommendationsCommand"; +import { + GetLicenseRecommendationsCommandInput, + GetLicenseRecommendationsCommandOutput, +} from "./commands/GetLicenseRecommendationsCommand"; import { GetRecommendationPreferencesCommandInput, GetRecommendationPreferencesCommandOutput, @@ -156,6 +164,7 @@ export type ServiceInputTypes = | ExportEC2InstanceRecommendationsCommandInput | ExportECSServiceRecommendationsCommandInput | ExportLambdaFunctionRecommendationsCommandInput + | ExportLicenseRecommendationsCommandInput | GetAutoScalingGroupRecommendationsCommandInput | GetEBSVolumeRecommendationsCommandInput | GetEC2InstanceRecommendationsCommandInput @@ -166,6 +175,7 @@ export type ServiceInputTypes = | GetEnrollmentStatusCommandInput | GetEnrollmentStatusesForOrganizationCommandInput | GetLambdaFunctionRecommendationsCommandInput + | GetLicenseRecommendationsCommandInput | GetRecommendationPreferencesCommandInput | GetRecommendationSummariesCommandInput | PutRecommendationPreferencesCommandInput @@ -182,6 +192,7 @@ export type ServiceOutputTypes = | ExportEC2InstanceRecommendationsCommandOutput | ExportECSServiceRecommendationsCommandOutput | ExportLambdaFunctionRecommendationsCommandOutput + | ExportLicenseRecommendationsCommandOutput | GetAutoScalingGroupRecommendationsCommandOutput | GetEBSVolumeRecommendationsCommandOutput | GetEC2InstanceRecommendationsCommandOutput @@ -192,6 +203,7 @@ export type ServiceOutputTypes = | GetEnrollmentStatusCommandOutput | GetEnrollmentStatusesForOrganizationCommandOutput | GetLambdaFunctionRecommendationsCommandOutput + | GetLicenseRecommendationsCommandOutput | GetRecommendationPreferencesCommandOutput | GetRecommendationSummariesCommandOutput | PutRecommendationPreferencesCommandOutput diff --git a/clients/client-compute-optimizer/src/commands/DeleteRecommendationPreferencesCommand.ts b/clients/client-compute-optimizer/src/commands/DeleteRecommendationPreferencesCommand.ts index 1cd87808c5d0c..5f538b9704349 100644 --- a/clients/client-compute-optimizer/src/commands/DeleteRecommendationPreferencesCommand.ts +++ b/clients/client-compute-optimizer/src/commands/DeleteRecommendationPreferencesCommand.ts @@ -52,7 +52,7 @@ export interface DeleteRecommendationPreferencesCommandOutput * // const { ComputeOptimizerClient, DeleteRecommendationPreferencesCommand } = require("@aws-sdk/client-compute-optimizer"); // CommonJS import * const client = new ComputeOptimizerClient(config); * const input = { // DeleteRecommendationPreferencesRequest - * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService", // required + * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService" || "License", // required * scope: { // Scope * name: "Organization" || "AccountId" || "ResourceArn", * value: "STRING_VALUE", diff --git a/clients/client-compute-optimizer/src/commands/DescribeRecommendationExportJobsCommand.ts b/clients/client-compute-optimizer/src/commands/DescribeRecommendationExportJobsCommand.ts index cd6d2cd209a87..b0f09e8983393 100644 --- a/clients/client-compute-optimizer/src/commands/DescribeRecommendationExportJobsCommand.ts +++ b/clients/client-compute-optimizer/src/commands/DescribeRecommendationExportJobsCommand.ts @@ -79,7 +79,7 @@ export interface DescribeRecommendationExportJobsCommandOutput * // metadataKey: "STRING_VALUE", * // }, * // }, - * // resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService", + * // resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService" || "License", * // status: "Queued" || "InProgress" || "Complete" || "Failed", * // creationTimestamp: new Date("TIMESTAMP"), * // lastUpdatedTimestamp: new Date("TIMESTAMP"), diff --git a/clients/client-compute-optimizer/src/commands/ExportLicenseRecommendationsCommand.ts b/clients/client-compute-optimizer/src/commands/ExportLicenseRecommendationsCommand.ts new file mode 100644 index 0000000000000..132e87049a541 --- /dev/null +++ b/clients/client-compute-optimizer/src/commands/ExportLicenseRecommendationsCommand.ts @@ -0,0 +1,206 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { ComputeOptimizerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComputeOptimizerClient"; +import { ExportLicenseRecommendationsRequest, ExportLicenseRecommendationsResponse } from "../models/models_0"; +import { + de_ExportLicenseRecommendationsCommand, + se_ExportLicenseRecommendationsCommand, +} from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ExportLicenseRecommendationsCommand}. + */ +export interface ExportLicenseRecommendationsCommandInput extends ExportLicenseRecommendationsRequest {} +/** + * @public + * + * The output of {@link ExportLicenseRecommendationsCommand}. + */ +export interface ExportLicenseRecommendationsCommandOutput + extends ExportLicenseRecommendationsResponse, + __MetadataBearer {} + +/** + * @public + *

+ * Export optimization recommendations for your licenses. + *

+ *

Recommendations are exported in a comma-separated values (CSV) file, and its metadata + * in a JavaScript Object Notation (JSON) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting + * Recommendations in the Compute Optimizer User + * Guide.

+ *

You can have only one license export job in progress per Amazon Web Services Region.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ComputeOptimizerClient, ExportLicenseRecommendationsCommand } from "@aws-sdk/client-compute-optimizer"; // ES Modules import + * // const { ComputeOptimizerClient, ExportLicenseRecommendationsCommand } = require("@aws-sdk/client-compute-optimizer"); // CommonJS import + * const client = new ComputeOptimizerClient(config); + * const input = { // ExportLicenseRecommendationsRequest + * accountIds: [ // AccountIds + * "STRING_VALUE", + * ], + * filters: [ // LicenseRecommendationFilters + * { // LicenseRecommendationFilter + * name: "Finding" || "FindingReasonCode" || "LicenseName", + * values: [ // FilterValues + * "STRING_VALUE", + * ], + * }, + * ], + * fieldsToExport: [ // ExportableLicenseFields + * "AccountId" || "ResourceArn" || "LookbackPeriodInDays" || "LastRefreshTimestamp" || "Finding" || "FindingReasonCodes" || "CurrentLicenseConfigurationNumberOfCores" || "CurrentLicenseConfigurationInstanceType" || "CurrentLicenseConfigurationOperatingSystem" || "CurrentLicenseConfigurationLicenseName" || "CurrentLicenseConfigurationLicenseEdition" || "CurrentLicenseConfigurationLicenseModel" || "CurrentLicenseConfigurationLicenseVersion" || "CurrentLicenseConfigurationMetricsSource" || "RecommendationOptionsOperatingSystem" || "RecommendationOptionsLicenseEdition" || "RecommendationOptionsLicenseModel" || "RecommendationOptionsSavingsOpportunityPercentage" || "RecommendationOptionsEstimatedMonthlySavingsCurrency" || "RecommendationOptionsEstimatedMonthlySavingsValue" || "Tags", + * ], + * s3DestinationConfig: { // S3DestinationConfig + * bucket: "STRING_VALUE", + * keyPrefix: "STRING_VALUE", + * }, + * fileFormat: "Csv", + * includeMemberAccounts: true || false, + * }; + * const command = new ExportLicenseRecommendationsCommand(input); + * const response = await client.send(command); + * // { // ExportLicenseRecommendationsResponse + * // jobId: "STRING_VALUE", + * // s3Destination: { // S3Destination + * // bucket: "STRING_VALUE", + * // key: "STRING_VALUE", + * // metadataKey: "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param ExportLicenseRecommendationsCommandInput - {@link ExportLicenseRecommendationsCommandInput} + * @returns {@link ExportLicenseRecommendationsCommandOutput} + * @see {@link ExportLicenseRecommendationsCommandInput} for command's `input` shape. + * @see {@link ExportLicenseRecommendationsCommandOutput} for command's `response` shape. + * @see {@link ComputeOptimizerClientResolvedConfig | config} for ComputeOptimizerClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal error has occurred. Try your call again.

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

The value supplied for the input parameter is out of range or not valid.

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

The request exceeds a limit of the service.

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

The request must contain either a valid (registered) Amazon Web Services access key ID + * or X.509 certificate.

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

The account is not opted in to Compute Optimizer.

+ * + * @throws {@link ServiceUnavailableException} (server fault) + *

The request has failed due to a temporary failure of the server.

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

The request was denied due to request throttling.

+ * + * @throws {@link ComputeOptimizerServiceException} + *

Base exception class for all service exceptions from ComputeOptimizer service.

+ * + */ +export class ExportLicenseRecommendationsCommand extends $Command< + ExportLicenseRecommendationsCommandInput, + ExportLicenseRecommendationsCommandOutput, + ComputeOptimizerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ExportLicenseRecommendationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ComputeOptimizerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ExportLicenseRecommendationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ComputeOptimizerClient"; + const commandName = "ExportLicenseRecommendationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ExportLicenseRecommendationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ExportLicenseRecommendationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ExportLicenseRecommendationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts b/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts index 6a0ffa52f95ae..b4161af10ded7 100644 --- a/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts +++ b/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts @@ -125,7 +125,7 @@ export interface GetEC2InstanceRecommendationsCommandOutput * // recommendationSources: [ // RecommendationSources * // { // RecommendationSource * // recommendationSourceArn: "STRING_VALUE", - * // recommendationSourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "EcsService", + * // recommendationSourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "EcsService" || "License", * // }, * // ], * // lastRefreshTimestamp: new Date("TIMESTAMP"), diff --git a/clients/client-compute-optimizer/src/commands/GetLicenseRecommendationsCommand.ts b/clients/client-compute-optimizer/src/commands/GetLicenseRecommendationsCommand.ts new file mode 100644 index 0000000000000..b04892f4deb70 --- /dev/null +++ b/clients/client-compute-optimizer/src/commands/GetLicenseRecommendationsCommand.ts @@ -0,0 +1,244 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { ComputeOptimizerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ComputeOptimizerClient"; +import { GetLicenseRecommendationsRequest, GetLicenseRecommendationsResponse } from "../models/models_0"; +import { de_GetLicenseRecommendationsCommand, se_GetLicenseRecommendationsCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetLicenseRecommendationsCommand}. + */ +export interface GetLicenseRecommendationsCommandInput extends GetLicenseRecommendationsRequest {} +/** + * @public + * + * The output of {@link GetLicenseRecommendationsCommand}. + */ +export interface GetLicenseRecommendationsCommandOutput extends GetLicenseRecommendationsResponse, __MetadataBearer {} + +/** + * @public + *

Returns license recommendations for Amazon EC2 instances that run on a specific license.

+ *

Compute Optimizer generates recommendations for licenses that meet a specific set of requirements. For more + * information, see the Supported resources and + * requirements in the Compute Optimizer User + * Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ComputeOptimizerClient, GetLicenseRecommendationsCommand } from "@aws-sdk/client-compute-optimizer"; // ES Modules import + * // const { ComputeOptimizerClient, GetLicenseRecommendationsCommand } = require("@aws-sdk/client-compute-optimizer"); // CommonJS import + * const client = new ComputeOptimizerClient(config); + * const input = { // GetLicenseRecommendationsRequest + * resourceArns: [ // ResourceArns + * "STRING_VALUE", + * ], + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * filters: [ // LicenseRecommendationFilters + * { // LicenseRecommendationFilter + * name: "Finding" || "FindingReasonCode" || "LicenseName", + * values: [ // FilterValues + * "STRING_VALUE", + * ], + * }, + * ], + * accountIds: [ // AccountIds + * "STRING_VALUE", + * ], + * }; + * const command = new GetLicenseRecommendationsCommand(input); + * const response = await client.send(command); + * // { // GetLicenseRecommendationsResponse + * // nextToken: "STRING_VALUE", + * // licenseRecommendations: [ // LicenseRecommendations + * // { // LicenseRecommendation + * // resourceArn: "STRING_VALUE", + * // accountId: "STRING_VALUE", + * // currentLicenseConfiguration: { // LicenseConfiguration + * // numberOfCores: Number("int"), + * // instanceType: "STRING_VALUE", + * // operatingSystem: "STRING_VALUE", + * // licenseEdition: "Enterprise" || "Standard" || "Free" || "NoLicenseEditionFound", + * // licenseName: "SQLServer", + * // licenseModel: "LicenseIncluded" || "BringYourOwnLicense", + * // licenseVersion: "STRING_VALUE", + * // metricsSource: [ // MetricsSource + * // { // MetricSource + * // provider: "CloudWatchApplicationInsights", + * // providerArn: "STRING_VALUE", + * // }, + * // ], + * // }, + * // lookbackPeriodInDays: Number("double"), + * // lastRefreshTimestamp: new Date("TIMESTAMP"), + * // finding: "InsufficientMetrics" || "Optimized" || "NotOptimized", + * // findingReasonCodes: [ // LicenseFindingReasonCodes + * // "InvalidCloudWatchApplicationInsightsSetup" || "CloudWatchApplicationInsightsError" || "LicenseOverprovisioned" || "Optimized", + * // ], + * // licenseRecommendationOptions: [ // LicenseRecommendationOptions + * // { // LicenseRecommendationOption + * // rank: Number("int"), + * // operatingSystem: "STRING_VALUE", + * // licenseEdition: "Enterprise" || "Standard" || "Free" || "NoLicenseEditionFound", + * // licenseModel: "LicenseIncluded" || "BringYourOwnLicense", + * // savingsOpportunity: { // SavingsOpportunity + * // savingsOpportunityPercentage: Number("double"), + * // estimatedMonthlySavings: { // EstimatedMonthlySavings + * // currency: "USD" || "CNY", + * // value: Number("double"), + * // }, + * // }, + * // }, + * // ], + * // tags: [ // Tags + * // { // Tag + * // key: "STRING_VALUE", + * // value: "STRING_VALUE", + * // }, + * // ], + * // }, + * // ], + * // errors: [ // GetRecommendationErrors + * // { // GetRecommendationError + * // identifier: "STRING_VALUE", + * // code: "STRING_VALUE", + * // message: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetLicenseRecommendationsCommandInput - {@link GetLicenseRecommendationsCommandInput} + * @returns {@link GetLicenseRecommendationsCommandOutput} + * @see {@link GetLicenseRecommendationsCommandInput} for command's `input` shape. + * @see {@link GetLicenseRecommendationsCommandOutput} for command's `response` shape. + * @see {@link ComputeOptimizerClientResolvedConfig | config} for ComputeOptimizerClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal error has occurred. Try your call again.

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

The value supplied for the input parameter is out of range or not valid.

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

The request must contain either a valid (registered) Amazon Web Services access key ID + * or X.509 certificate.

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

The account is not opted in to Compute Optimizer.

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

A resource that is required for the action doesn't exist.

+ * + * @throws {@link ServiceUnavailableException} (server fault) + *

The request has failed due to a temporary failure of the server.

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

The request was denied due to request throttling.

+ * + * @throws {@link ComputeOptimizerServiceException} + *

Base exception class for all service exceptions from ComputeOptimizer service.

+ * + */ +export class GetLicenseRecommendationsCommand extends $Command< + GetLicenseRecommendationsCommandInput, + GetLicenseRecommendationsCommandOutput, + ComputeOptimizerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetLicenseRecommendationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ComputeOptimizerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetLicenseRecommendationsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ComputeOptimizerClient"; + const commandName = "GetLicenseRecommendationsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetLicenseRecommendationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetLicenseRecommendationsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_GetLicenseRecommendationsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts b/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts index 7e030f33302b7..688c8ad33440e 100644 --- a/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts +++ b/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts @@ -56,7 +56,7 @@ export interface GetRecommendationPreferencesCommandOutput * // const { ComputeOptimizerClient, GetRecommendationPreferencesCommand } = require("@aws-sdk/client-compute-optimizer"); // CommonJS import * const client = new ComputeOptimizerClient(config); * const input = { // GetRecommendationPreferencesRequest - * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService", // required + * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService" || "License", // required * scope: { // Scope * name: "Organization" || "AccountId" || "ResourceArn", * value: "STRING_VALUE", @@ -74,7 +74,7 @@ export interface GetRecommendationPreferencesCommandOutput * // name: "Organization" || "AccountId" || "ResourceArn", * // value: "STRING_VALUE", * // }, - * // resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService", + * // resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService" || "License", * // enhancedInfrastructureMetrics: "Active" || "Inactive", * // inferredWorkloadTypes: "Active" || "Inactive", * // externalMetricsPreference: { // ExternalMetricsPreference diff --git a/clients/client-compute-optimizer/src/commands/GetRecommendationSummariesCommand.ts b/clients/client-compute-optimizer/src/commands/GetRecommendationSummariesCommand.ts index a38d0303443b4..8e4f235931a20 100644 --- a/clients/client-compute-optimizer/src/commands/GetRecommendationSummariesCommand.ts +++ b/clients/client-compute-optimizer/src/commands/GetRecommendationSummariesCommand.ts @@ -92,7 +92,7 @@ export interface GetRecommendationSummariesCommandOutput extends GetRecommendati * // ], * // }, * // ], - * // recommendationResourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "EcsService", + * // recommendationResourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "EcsService" || "License", * // accountId: "STRING_VALUE", * // savingsOpportunity: { // SavingsOpportunity * // savingsOpportunityPercentage: Number("double"), diff --git a/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts b/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts index 342212cbcd25c..aae655cc1fb9c 100644 --- a/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts +++ b/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts @@ -53,7 +53,7 @@ export interface PutRecommendationPreferencesCommandOutput * // const { ComputeOptimizerClient, PutRecommendationPreferencesCommand } = require("@aws-sdk/client-compute-optimizer"); // CommonJS import * const client = new ComputeOptimizerClient(config); * const input = { // PutRecommendationPreferencesRequest - * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService", // required + * resourceType: "Ec2Instance" || "AutoScalingGroup" || "EbsVolume" || "LambdaFunction" || "NotApplicable" || "EcsService" || "License", // required * scope: { // Scope * name: "Organization" || "AccountId" || "ResourceArn", * value: "STRING_VALUE", diff --git a/clients/client-compute-optimizer/src/commands/index.ts b/clients/client-compute-optimizer/src/commands/index.ts index f5b10f0066821..ae3db57842961 100644 --- a/clients/client-compute-optimizer/src/commands/index.ts +++ b/clients/client-compute-optimizer/src/commands/index.ts @@ -6,6 +6,7 @@ export * from "./ExportEBSVolumeRecommendationsCommand"; export * from "./ExportEC2InstanceRecommendationsCommand"; export * from "./ExportECSServiceRecommendationsCommand"; export * from "./ExportLambdaFunctionRecommendationsCommand"; +export * from "./ExportLicenseRecommendationsCommand"; export * from "./GetAutoScalingGroupRecommendationsCommand"; export * from "./GetEBSVolumeRecommendationsCommand"; export * from "./GetEC2InstanceRecommendationsCommand"; @@ -16,6 +17,7 @@ export * from "./GetEffectiveRecommendationPreferencesCommand"; export * from "./GetEnrollmentStatusCommand"; export * from "./GetEnrollmentStatusesForOrganizationCommand"; export * from "./GetLambdaFunctionRecommendationsCommand"; +export * from "./GetLicenseRecommendationsCommand"; export * from "./GetRecommendationPreferencesCommand"; export * from "./GetRecommendationSummariesCommand"; export * from "./PutRecommendationPreferencesCommand"; diff --git a/clients/client-compute-optimizer/src/endpoint/ruleset.ts b/clients/client-compute-optimizer/src/endpoint/ruleset.ts index 81833e0f9e7d6..2839a48f912fa 100644 --- a/clients/client-compute-optimizer/src/endpoint/ruleset.ts +++ b/clients/client-compute-optimizer/src/endpoint/ruleset.ts @@ -26,5 +26,5 @@ m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack" n=[i], o=[j], p=[{[t]:"Region"}]; -const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://compute-optimizer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://compute-optimizer-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://compute-optimizer.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://compute-optimizer.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]}; +const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://compute-optimizer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://compute-optimizer-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://compute-optimizer.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://compute-optimizer.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}; export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-compute-optimizer/src/models/models_0.ts b/clients/client-compute-optimizer/src/models/models_0.ts index 178457ac06c00..a789dc7c3d4d5 100644 --- a/clients/client-compute-optimizer/src/models/models_0.ts +++ b/clients/client-compute-optimizer/src/models/models_0.ts @@ -830,6 +830,7 @@ export const ResourceType = { EC2_INSTANCE: "Ec2Instance", ECS_SERVICE: "EcsService", LAMBDA_FUNCTION: "LambdaFunction", + LICENSE: "License", NOT_APPLICABLE: "NotApplicable", } as const; @@ -2575,6 +2576,200 @@ export interface ExportLambdaFunctionRecommendationsResponse { s3Destination?: S3Destination; } +/** + * @public + * @enum + */ +export const ExportableLicenseField = { + ACCOUNT_ID: "AccountId", + CURRENT_LICENSE_CONFIGURATION_INSTANCE_TYPE: "CurrentLicenseConfigurationInstanceType", + CURRENT_LICENSE_CONFIGURATION_LICENSE_EDITION: "CurrentLicenseConfigurationLicenseEdition", + CURRENT_LICENSE_CONFIGURATION_LICENSE_MODEL: "CurrentLicenseConfigurationLicenseModel", + CURRENT_LICENSE_CONFIGURATION_LICENSE_NAME: "CurrentLicenseConfigurationLicenseName", + CURRENT_LICENSE_CONFIGURATION_LICENSE_VERSION: "CurrentLicenseConfigurationLicenseVersion", + CURRENT_LICENSE_CONFIGURATION_METRICS_SOURCE: "CurrentLicenseConfigurationMetricsSource", + CURRENT_LICENSE_CONFIGURATION_NUMBER_OF_CORES: "CurrentLicenseConfigurationNumberOfCores", + CURRENT_LICENSE_CONFIGURATION_OPERATING_SYSTEM: "CurrentLicenseConfigurationOperatingSystem", + LAST_REFRESH_TIMESTAMP: "LastRefreshTimestamp", + LICENSE_FINDING: "Finding", + LICENSE_FINDING_REASON_CODES: "FindingReasonCodes", + LOOKBACK_PERIOD_IN_DAYS: "LookbackPeriodInDays", + RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY: "RecommendationOptionsEstimatedMonthlySavingsCurrency", + RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE: "RecommendationOptionsEstimatedMonthlySavingsValue", + RECOMMENDATION_OPTIONS_LICENSE_EDITION: "RecommendationOptionsLicenseEdition", + RECOMMENDATION_OPTIONS_LICENSE_MODEL: "RecommendationOptionsLicenseModel", + RECOMMENDATION_OPTIONS_OPERATING_SYSTEM: "RecommendationOptionsOperatingSystem", + RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE: "RecommendationOptionsSavingsOpportunityPercentage", + RESOURCE_ARN: "ResourceArn", + TAGS: "Tags", +} as const; + +/** + * @public + */ +export type ExportableLicenseField = (typeof ExportableLicenseField)[keyof typeof ExportableLicenseField]; + +/** + * @public + * @enum + */ +export const LicenseRecommendationFilterName = { + LICENSE_FINDING: "Finding", + LICENSE_FINDING_REASON_CODE: "FindingReasonCode", + LICENSE_NAME: "LicenseName", +} as const; + +/** + * @public + */ +export type LicenseRecommendationFilterName = + (typeof LicenseRecommendationFilterName)[keyof typeof LicenseRecommendationFilterName]; + +/** + * @public + *

+ * Describes a filter that returns a more specific list of license recommendations. Use this filter + * with the GetLicenseRecommendation action. + *

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

The name of the filter.

+ *

Specify Finding to return recommendations with a specific finding + * classification.

+ *

Specify FindingReasonCode to return recommendations with a specific + * finding reason code.

+ *

You can filter your license recommendations by tag:key + * and tag-key tags.

+ *

A tag:key is a key and value combination of a tag assigned to your + * license recommendations. Use the tag key in the filter name and the tag value + * as the filter value. For example, to find all license recommendations that have + * a tag with the key of Owner and the value of TeamA, + * specify tag:Owner for the filter name and TeamA for the filter value.

+ *

A tag-key is the key of a tag assigned to your license recommendations. Use + * this filter to find all of your license recommendations that have a tag with a + * specific key. This doesn’t consider the tag value. For example, you can find + * your license recommendations with a tag key value of Owner or without any tag + * keys assigned.

+ */ + name?: LicenseRecommendationFilterName | string; + + /** + * @public + *

The value of the filter.

+ *

The valid values for this parameter are as follows, depending on what you specify for + * the name parameter:

+ *
    + *
  • + *

    If you specify the name parameter as + * Finding, then specify Optimized, NotOptimized, or + * InsufficentMetrics.

    + *
  • + *
  • + *

    If you specify the name parameter as + * FindingReasonCode, then specify Optimized, + * LicenseOverprovisioned, InvalidCloudwatchApplicationInsights, or + * CloudwatchApplicationInsightsError.

    + *
  • + *
+ */ + values?: string[]; +} + +/** + * @public + */ +export interface ExportLicenseRecommendationsRequest { + /** + * @public + *

The IDs of the Amazon Web Services accounts for which to export license + * recommendations.

+ *

If your account is the management account of an organization, use this parameter to + * specify the member account for which you want to export recommendations.

+ *

This parameter can't be specified together with the include member accounts + * parameter. The parameters are mutually exclusive.

+ *

If this parameter is omitted, recommendations + * for member accounts aren't included in the export.

+ *

You can specify multiple account IDs per request.

+ */ + accountIds?: string[]; + + /** + * @public + *

+ * An array of objects to specify a filter that exports a more specific set of license recommendations. + *

+ */ + filters?: LicenseRecommendationFilter[]; + + /** + * @public + *

The recommendations data to include in the export file. For more information about the + * fields that can be exported, see Exported files in the Compute Optimizer User + * Guide.

+ */ + fieldsToExport?: (ExportableLicenseField | string)[]; + + /** + * @public + *

Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and + * key prefix for a recommendations export job.

+ *

You must create the destination Amazon S3 bucket for your recommendations + * export before you create the export job. Compute Optimizer does not create the S3 bucket + * for you. After you create the S3 bucket, ensure that it has the required permission + * policy to allow Compute Optimizer to write the export file to it. If you plan to specify + * an object prefix when you create the export job, you must include the object prefix in + * the policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the + * Compute Optimizer User Guide.

+ */ + s3DestinationConfig: S3DestinationConfig | undefined; + + /** + * @public + *

The format of the export file.

+ *

A CSV file is the only export format currently supported.

+ */ + fileFormat?: FileFormat | string; + + /** + * @public + *

Indicates whether to include recommendations for resources in all member accounts of + * the organization if your account is the management account of an organization.

+ *

The member accounts must also be opted in to Compute Optimizer, and trusted access for + * Compute Optimizer must be enabled in the organization account. For more information, + * see Compute Optimizer and Amazon Web Services Organizations trusted access in the + * Compute Optimizer User Guide.

+ *

If this parameter is omitted, recommendations for member accounts of the organization + * aren't included in the export file .

+ *

This parameter cannot be specified together with the account IDs parameter. The + * parameters are mutually exclusive.

+ */ + includeMemberAccounts?: boolean; +} + +/** + * @public + */ +export interface ExportLicenseRecommendationsResponse { + /** + * @public + *

+ * The identification number of the export job. + *

+ *

To view the status of an export job, use the DescribeRecommendationExportJobs + * action and specify the job ID.

+ */ + jobId?: string; + + /** + * @public + *

Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and + * object keys of a recommendations export file, and its associated metadata file.

+ */ + s3Destination?: S3Destination; +} + /** * @public */ @@ -3406,6 +3601,7 @@ export const RecommendationSourceType = { EC2_INSTANCE: "Ec2Instance", ECS_SERVICE: "EcsService", LAMBDA_FUNCTION: "LambdaFunction", + LICENSE: "License", } as const; /** @@ -5466,6 +5662,460 @@ export interface GetLambdaFunctionRecommendationsResponse { lambdaFunctionRecommendations?: LambdaFunctionRecommendation[]; } +/** + * @public + */ +export interface GetLicenseRecommendationsRequest { + /** + * @public + *

+ * The ARN that identifies the Amazon EC2 instance. + *

+ *

+ * The following is the format of the ARN: + *

+ *

+ * arn:aws:ec2:region:aws_account_id:instance/instance-id + *

+ */ + resourceArns?: string[]; + + /** + * @public + *

+ * The token to advance to the next page of license recommendations. + *

+ */ + nextToken?: string; + + /** + * @public + *

+ * The maximum number of license recommendations to return with a single request. + *

+ *

+ * To retrieve the remaining results, make another request with the returned + * nextToken value. + *

+ */ + maxResults?: number; + + /** + * @public + *

+ * An array of objects to specify a filter that returns a more specific list of license recommendations. + *

+ */ + filters?: LicenseRecommendationFilter[]; + + /** + * @public + *

The ID of the Amazon Web Services account for which to return license recommendations.

+ *

If your account is the management account of an organization, use this parameter to + * specify the member account for which you want to return license recommendations.

+ *

Only one account ID can be specified per request.

+ */ + accountIds?: string[]; +} + +/** + * @public + * @enum + */ +export const LicenseEdition = { + ENTERPRISE: "Enterprise", + FREE: "Free", + NO_LICENSE_EDITION_FOUND: "NoLicenseEditionFound", + STANDARD: "Standard", +} as const; + +/** + * @public + */ +export type LicenseEdition = (typeof LicenseEdition)[keyof typeof LicenseEdition]; + +/** + * @public + * @enum + */ +export const LicenseModel = { + BRING_YOUR_OWN_LICENSE: "BringYourOwnLicense", + LICENSE_INCLUDED: "LicenseIncluded", +} as const; + +/** + * @public + */ +export type LicenseModel = (typeof LicenseModel)[keyof typeof LicenseModel]; + +/** + * @public + * @enum + */ +export const LicenseName = { + SQLSERVER: "SQLServer", +} as const; + +/** + * @public + */ +export type LicenseName = (typeof LicenseName)[keyof typeof LicenseName]; + +/** + * @public + * @enum + */ +export const MetricSourceProvider = { + CloudWatchAppInsights: "CloudWatchApplicationInsights", +} as const; + +/** + * @public + */ +export type MetricSourceProvider = (typeof MetricSourceProvider)[keyof typeof MetricSourceProvider]; + +/** + * @public + *

+ * The list of metric sources required to generate recommendations for commercial software licenses. + *

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

+ * The name of the metric source provider. + *

+ */ + provider?: MetricSourceProvider | string; + + /** + * @public + *

+ * The ARN of the metric source provider. + *

+ */ + providerArn?: string; +} + +/** + * @public + *

+ * Describes the configuration of a license for an Amazon EC2 instance. + *

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

+ * The current number of cores associated with the instance. + *

+ */ + numberOfCores?: number; + + /** + * @public + *

+ * The instance type used in the license. + *

+ */ + instanceType?: string; + + /** + * @public + *

+ * The operating system of the instance. + *

+ */ + operatingSystem?: string; + + /** + * @public + *

+ * The edition of the license for the application that runs on the instance. + *

+ */ + licenseEdition?: LicenseEdition | string; + + /** + * @public + *

+ * The name of the license for the application that runs on the instance. + *

+ */ + licenseName?: LicenseName | string; + + /** + * @public + *

+ * The license type associated with the instance. + *

+ */ + licenseModel?: LicenseModel | string; + + /** + * @public + *

+ * The version of the license for the application that runs on the instance. + *

+ */ + licenseVersion?: string; + + /** + * @public + *

+ * The list of metric sources required to generate recommendations for commercial software licenses. + *

+ */ + metricsSource?: MetricSource[]; +} + +/** + * @public + * @enum + */ +export const LicenseFinding = { + INSUFFICIENT_METRICS: "InsufficientMetrics", + NOT_OPTIMIZED: "NotOptimized", + OPTIMIZED: "Optimized", +} as const; + +/** + * @public + */ +export type LicenseFinding = (typeof LicenseFinding)[keyof typeof LicenseFinding]; + +/** + * @public + * @enum + */ +export const LicenseFindingReasonCode = { + CW_APP_INSIGHTS_DISABLED: "InvalidCloudWatchApplicationInsightsSetup", + CW_APP_INSIGHTS_ERROR: "CloudWatchApplicationInsightsError", + LICENSE_OVER_PROVISIONED: "LicenseOverprovisioned", + OPTIMIZED: "Optimized", +} as const; + +/** + * @public + */ +export type LicenseFindingReasonCode = (typeof LicenseFindingReasonCode)[keyof typeof LicenseFindingReasonCode]; + +/** + * @public + *

+ * Describes the recommendation options for licenses. + *

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

+ * The rank of the license recommendation option. + *

+ *

+ * The top recommendation option is ranked as 1. + *

+ */ + rank?: number; + + /** + * @public + *

+ * The operating system of a license recommendation option. + *

+ */ + operatingSystem?: string; + + /** + * @public + *

+ * The recommended edition of the license for the application that runs on the instance. + *

+ */ + licenseEdition?: LicenseEdition | string; + + /** + * @public + *

+ * The recommended license type associated with the instance. + *

+ */ + licenseModel?: LicenseModel | string; + + /** + * @public + *

Describes the savings opportunity for recommendations of a given resource type or for + * the recommendation option of an individual resource.

+ *

Savings opportunity represents the estimated monthly savings you can achieve by + * implementing a given Compute Optimizer recommendation.

+ * + *

Savings opportunity data requires that you opt in to Cost Explorer, as well as + * activate Receive Amazon EC2 resource + * recommendations in the Cost Explorer preferences page. That + * creates a connection between Cost Explorer and Compute Optimizer. With this + * connection, Cost Explorer generates savings estimates considering the price of + * existing resources, the price of recommended resources, and historical usage data. + * Estimated monthly savings reflects the projected dollar savings associated with each + * of the recommendations generated. For more information, see Enabling Cost Explorer and Optimizing your cost + * with Rightsizing Recommendations in the Cost Management User + * Guide.

+ *
+ */ + savingsOpportunity?: SavingsOpportunity; +} + +/** + * @public + *

+ * Describes a license recommendation for an EC2 instance. + *

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

+ * The ARN that identifies the Amazon EC2 instance. + *

+ */ + resourceArn?: string; + + /** + * @public + *

+ * The Amazon Web Services account ID of the license. + *

+ */ + accountId?: string; + + /** + * @public + *

+ * An object that describes the current configuration of an instance that runs on a license. + *

+ */ + currentLicenseConfiguration?: LicenseConfiguration; + + /** + * @public + *

+ * The number of days for which utilization metrics were analyzed for an instance that runs on a license. + *

+ */ + lookbackPeriodInDays?: number; + + /** + * @public + *

+ * The timestamp of when the license recommendation was last generated. + *

+ */ + lastRefreshTimestamp?: Date; + + /** + * @public + *

+ * The finding classification for an instance that runs on a license. + *

+ *

Findings include:

+ *
    + *
  • + *

    + * InsufficentMetrics — When Compute Optimizer detects that your CloudWatch + * Application Insights isn't enabled or is enabled with insufficient permissions.

    + *
  • + *
  • + *

    + * NotOptimized — When Compute Optimizer detects that your EC2 infrastructure + * isn't using any of the SQL server license features you're paying for, a license is considered + * not optimized.

    + *
  • + *
  • + *

    + * Optimized — When Compute Optimizer detects that all specifications of your + * license meet the performance requirements of your workload.

    + *
  • + *
+ */ + finding?: LicenseFinding | string; + + /** + * @public + *

+ * The reason for the finding classification for an instance that runs on a license. + *

+ *

Finding reason codes include:

+ *
    + *
  • + *

    + * Optimized — All specifications of your + * license meet the performance requirements of your workload.

    + *
  • + *
  • + *

    + * LicenseOverprovisioned — A license is considered over-provisioned when your license can be + * downgraded while still meeting the performance requirements of your workload.

    + *
  • + *
  • + *

    + * InvalidCloudwatchApplicationInsights — CloudWatch + * Application Insights isn't configured properly.

    + *
  • + *
  • + *

    + * CloudwatchApplicationInsightsError — There is a CloudWatch + * Application Insights error.

    + *
  • + *
+ */ + findingReasonCodes?: (LicenseFindingReasonCode | string)[]; + + /** + * @public + *

+ * An array of objects that describe the license recommendation options. + *

+ */ + licenseRecommendationOptions?: LicenseRecommendationOption[]; + + /** + * @public + *

+ * A list of tags assigned to an EC2 instance. + *

+ */ + tags?: Tag[]; +} + +/** + * @public + */ +export interface GetLicenseRecommendationsResponse { + /** + * @public + *

+ * The token to use to advance to the next page of license recommendations. + *

+ */ + nextToken?: string; + + /** + * @public + *

+ * An array of objects that describe license recommendations. + *

+ */ + licenseRecommendations?: LicenseRecommendation[]; + + /** + * @public + *

+ * An array of objects that describe errors of the request. + *

+ */ + errors?: GetRecommendationError[]; +} + /** * @public */ diff --git a/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts b/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts index 65ebeaf7b4742..4736d6454bdb2 100644 --- a/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts +++ b/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts @@ -50,6 +50,10 @@ import { ExportLambdaFunctionRecommendationsCommandInput, ExportLambdaFunctionRecommendationsCommandOutput, } from "../commands/ExportLambdaFunctionRecommendationsCommand"; +import { + ExportLicenseRecommendationsCommandInput, + ExportLicenseRecommendationsCommandOutput, +} from "../commands/ExportLicenseRecommendationsCommand"; import { GetAutoScalingGroupRecommendationsCommandInput, GetAutoScalingGroupRecommendationsCommandOutput, @@ -90,6 +94,10 @@ import { GetLambdaFunctionRecommendationsCommandInput, GetLambdaFunctionRecommendationsCommandOutput, } from "../commands/GetLambdaFunctionRecommendationsCommand"; +import { + GetLicenseRecommendationsCommandInput, + GetLicenseRecommendationsCommandOutput, +} from "../commands/GetLicenseRecommendationsCommand"; import { GetRecommendationPreferencesCommandInput, GetRecommendationPreferencesCommandOutput, @@ -131,12 +139,14 @@ import { ExportableECSServiceField, ExportableInstanceField, ExportableLambdaFunctionField, + ExportableLicenseField, ExportableVolumeField, ExportAutoScalingGroupRecommendationsRequest, ExportEBSVolumeRecommendationsRequest, ExportEC2InstanceRecommendationsRequest, ExportECSServiceRecommendationsRequest, ExportLambdaFunctionRecommendationsRequest, + ExportLicenseRecommendationsRequest, ExternalMetricsPreference, Filter, GetAutoScalingGroupRecommendationsRequest, @@ -158,6 +168,8 @@ import { GetEnrollmentStatusResponse, GetLambdaFunctionRecommendationsRequest, GetLambdaFunctionRecommendationsResponse, + GetLicenseRecommendationsRequest, + GetLicenseRecommendationsResponse, GetRecommendationPreferencesRequest, GetRecommendationSummariesRequest, GetRecommendationSummariesResponse, @@ -172,6 +184,9 @@ import { LambdaFunctionRecommendation, LambdaFunctionRecommendationFilter, LambdaFunctionUtilizationMetric, + LicenseRecommendation, + LicenseRecommendationFilter, + LicenseRecommendationOption, LimitExceededException, MissingAuthenticationToken, OptInRequiredException, @@ -287,6 +302,19 @@ export const se_ExportLambdaFunctionRecommendationsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0ExportLicenseRecommendationsCommand + */ +export const se_ExportLicenseRecommendationsCommand = async ( + input: ExportLicenseRecommendationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ExportLicenseRecommendations"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0GetAutoScalingGroupRecommendationsCommand */ @@ -417,6 +445,19 @@ export const se_GetLambdaFunctionRecommendationsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0GetLicenseRecommendationsCommand + */ +export const se_GetLicenseRecommendationsCommand = async ( + input: GetLicenseRecommendationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetLicenseRecommendations"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0GetRecommendationPreferencesCommand */ @@ -938,6 +979,73 @@ const de_ExportLambdaFunctionRecommendationsCommandError = async ( } }; +/** + * deserializeAws_json1_0ExportLicenseRecommendationsCommand + */ +export const de_ExportLicenseRecommendationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ExportLicenseRecommendationsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ExportLicenseRecommendationsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ExportLicenseRecommendationsCommandError + */ +const de_ExportLicenseRecommendationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.computeoptimizer#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.computeoptimizer#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidParameterValueException": + case "com.amazonaws.computeoptimizer#InvalidParameterValueException": + throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.computeoptimizer#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "MissingAuthenticationToken": + case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": + throw await de_MissingAuthenticationTokenRes(parsedOutput, context); + case "OptInRequiredException": + case "com.amazonaws.computeoptimizer#OptInRequiredException": + throw await de_OptInRequiredExceptionRes(parsedOutput, context); + case "ServiceUnavailableException": + case "com.amazonaws.computeoptimizer#ServiceUnavailableException": + throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.computeoptimizer#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_0GetAutoScalingGroupRecommendationsCommand */ @@ -1596,6 +1704,73 @@ const de_GetLambdaFunctionRecommendationsCommandError = async ( } }; +/** + * deserializeAws_json1_0GetLicenseRecommendationsCommand + */ +export const de_GetLicenseRecommendationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetLicenseRecommendationsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetLicenseRecommendationsResponse(data, context); + const response: GetLicenseRecommendationsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0GetLicenseRecommendationsCommandError + */ +const de_GetLicenseRecommendationsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.computeoptimizer#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.computeoptimizer#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidParameterValueException": + case "com.amazonaws.computeoptimizer#InvalidParameterValueException": + throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); + case "MissingAuthenticationToken": + case "com.amazonaws.computeoptimizer#MissingAuthenticationToken": + throw await de_MissingAuthenticationTokenRes(parsedOutput, context); + case "OptInRequiredException": + case "com.amazonaws.computeoptimizer#OptInRequiredException": + throw await de_OptInRequiredExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.computeoptimizer#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceUnavailableException": + case "com.amazonaws.computeoptimizer#ServiceUnavailableException": + throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.computeoptimizer#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_0GetRecommendationPreferencesCommand */ @@ -2026,6 +2201,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_ExportableLambdaFunctionFields omitted. +// se_ExportableLicenseFields omitted. + // se_ExportableVolumeFields omitted. // se_ExportAutoScalingGroupRecommendationsRequest omitted. @@ -2038,6 +2215,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_ExportLambdaFunctionRecommendationsRequest omitted. +// se_ExportLicenseRecommendationsRequest omitted. + // se_ExternalMetricsPreference omitted. // se_Filter omitted. @@ -2097,6 +2276,8 @@ const se_GetECSServiceRecommendationProjectedMetricsRequest = ( // se_GetLambdaFunctionRecommendationsRequest omitted. +// se_GetLicenseRecommendationsRequest omitted. + // se_GetRecommendationPreferencesRequest omitted. // se_GetRecommendationSummariesRequest omitted. @@ -2113,12 +2294,18 @@ const se_GetECSServiceRecommendationProjectedMetricsRequest = ( // se_LambdaFunctionRecommendationFilters omitted. +// se_LicenseRecommendationFilter omitted. + +// se_LicenseRecommendationFilters omitted. + // se_PutRecommendationPreferencesRequest omitted. // se_RecommendationPreferenceNames omitted. // se_RecommendationPreferences omitted. +// se_ResourceArns omitted. + // se_S3DestinationConfig omitted. // se_Scope omitted. @@ -2460,6 +2647,8 @@ const de_EstimatedMonthlySavings = (output: any, context: __SerdeContext): Estim // de_ExportLambdaFunctionRecommendationsResponse omitted. +// de_ExportLicenseRecommendationsResponse omitted. + // de_ExternalMetricsPreference omitted. // de_ExternalMetricStatus omitted. @@ -2585,6 +2774,20 @@ const de_GetLambdaFunctionRecommendationsResponse = ( }) as any; }; +/** + * deserializeAws_json1_0GetLicenseRecommendationsResponse + */ +const de_GetLicenseRecommendationsResponse = ( + output: any, + context: __SerdeContext +): GetLicenseRecommendationsResponse => { + return take(output, { + errors: _json, + licenseRecommendations: (_: any) => de_LicenseRecommendations(_, context), + nextToken: __expectString, + }) as any; +}; + // de_GetRecommendationError omitted. // de_GetRecommendationErrors omitted. @@ -2806,10 +3009,72 @@ const de_LambdaFunctionUtilizationMetrics = ( return retVal; }; +// de_LicenseConfiguration omitted. + +// de_LicenseFindingReasonCodes omitted. + +/** + * deserializeAws_json1_0LicenseRecommendation + */ +const de_LicenseRecommendation = (output: any, context: __SerdeContext): LicenseRecommendation => { + return take(output, { + accountId: __expectString, + currentLicenseConfiguration: _json, + finding: __expectString, + findingReasonCodes: _json, + lastRefreshTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + licenseRecommendationOptions: (_: any) => de_LicenseRecommendationOptions(_, context), + lookbackPeriodInDays: __limitedParseDouble, + resourceArn: __expectString, + tags: _json, + }) as any; +}; + +/** + * deserializeAws_json1_0LicenseRecommendationOption + */ +const de_LicenseRecommendationOption = (output: any, context: __SerdeContext): LicenseRecommendationOption => { + return take(output, { + licenseEdition: __expectString, + licenseModel: __expectString, + operatingSystem: __expectString, + rank: __expectInt32, + savingsOpportunity: (_: any) => de_SavingsOpportunity(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_0LicenseRecommendationOptions + */ +const de_LicenseRecommendationOptions = (output: any, context: __SerdeContext): LicenseRecommendationOption[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_LicenseRecommendationOption(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_0LicenseRecommendations + */ +const de_LicenseRecommendations = (output: any, context: __SerdeContext): LicenseRecommendation[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_LicenseRecommendation(entry, context); + }); + return retVal; +}; + // de_LimitExceededException omitted. // de_MemorySizeConfiguration omitted. +// de_MetricSource omitted. + +// de_MetricsSource omitted. + /** * deserializeAws_json1_0MetricValues */ diff --git a/codegen/sdk-codegen/aws-models/compute-optimizer.json b/codegen/sdk-codegen/aws-models/compute-optimizer.json index 93ea80f18d92e..5370709e09a67 100644 --- a/codegen/sdk-codegen/aws-models/compute-optimizer.json +++ b/codegen/sdk-codegen/aws-models/compute-optimizer.json @@ -320,6 +320,9 @@ { "target": "com.amazonaws.computeoptimizer#ExportLambdaFunctionRecommendations" }, + { + "target": "com.amazonaws.computeoptimizer#ExportLicenseRecommendations" + }, { "target": "com.amazonaws.computeoptimizer#GetAutoScalingGroupRecommendations" }, @@ -350,6 +353,9 @@ { "target": "com.amazonaws.computeoptimizer#GetLambdaFunctionRecommendations" }, + { + "target": "com.amazonaws.computeoptimizer#GetLicenseRecommendations" + }, { "target": "com.amazonaws.computeoptimizer#GetRecommendationPreferences" }, @@ -437,52 +443,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -490,13 +500,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -506,224 +525,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://compute-optimizer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://compute-optimizer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://compute-optimizer-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://compute-optimizer-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://compute-optimizer.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://compute-optimizer.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://compute-optimizer.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://compute-optimizer.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2804,43 +2774,143 @@ "smithy.api#output": {} } }, - "com.amazonaws.computeoptimizer#ExportableAutoScalingGroupField": { - "type": "enum", + "com.amazonaws.computeoptimizer#ExportLicenseRecommendations": { + "type": "operation", + "input": { + "target": "com.amazonaws.computeoptimizer#ExportLicenseRecommendationsRequest" + }, + "output": { + "target": "com.amazonaws.computeoptimizer#ExportLicenseRecommendationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.computeoptimizer#AccessDeniedException" + }, + { + "target": "com.amazonaws.computeoptimizer#InternalServerException" + }, + { + "target": "com.amazonaws.computeoptimizer#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.computeoptimizer#LimitExceededException" + }, + { + "target": "com.amazonaws.computeoptimizer#MissingAuthenticationToken" + }, + { + "target": "com.amazonaws.computeoptimizer#OptInRequiredException" + }, + { + "target": "com.amazonaws.computeoptimizer#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.computeoptimizer#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Export optimization recommendations for your licenses.\n

\n

Recommendations are exported in a comma-separated values (CSV) file, and its metadata\n in a JavaScript Object Notation (JSON) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting\n Recommendations in the Compute Optimizer User\n Guide.

\n

You can have only one license export job in progress per Amazon Web Services Region.

" + } + }, + "com.amazonaws.computeoptimizer#ExportLicenseRecommendationsRequest": { + "type": "structure", "members": { - "ACCOUNT_ID": { - "target": "smithy.api#Unit", + "accountIds": { + "target": "com.amazonaws.computeoptimizer#AccountIds", "traits": { - "smithy.api#enumValue": "AccountId" + "smithy.api#documentation": "

The IDs of the Amazon Web Services accounts for which to export license\n recommendations.

\n

If your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.

\n

This parameter can't be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.

\n

If this parameter is omitted, recommendations \n for member accounts aren't included in the export.

\n

You can specify multiple account IDs per request.

" } }, - "AUTO_SCALING_GROUP_ARN": { - "target": "smithy.api#Unit", + "filters": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendationFilters", "traits": { - "smithy.api#enumValue": "AutoScalingGroupArn" + "smithy.api#documentation": "

\n An array of objects to specify a filter that exports a more specific set of license recommendations.\n

" } }, - "AUTO_SCALING_GROUP_NAME": { - "target": "smithy.api#Unit", + "fieldsToExport": { + "target": "com.amazonaws.computeoptimizer#ExportableLicenseFields", "traits": { - "smithy.api#enumValue": "AutoScalingGroupName" + "smithy.api#documentation": "

The recommendations data to include in the export file. For more information about the\n fields that can be exported, see Exported files in the Compute Optimizer User\n Guide.

" } }, - "FINDING": { - "target": "smithy.api#Unit", + "s3DestinationConfig": { + "target": "com.amazonaws.computeoptimizer#S3DestinationConfig", "traits": { - "smithy.api#enumValue": "Finding" + "smithy.api#required": {} } }, - "UTILIZATION_METRICS_CPU_MAXIMUM": { - "target": "smithy.api#Unit", + "fileFormat": { + "target": "com.amazonaws.computeoptimizer#FileFormat", "traits": { - "smithy.api#enumValue": "UtilizationMetricsCpuMaximum" + "smithy.api#documentation": "

The format of the export file.

\n

A CSV file is the only export format currently supported.

" } }, - "UTILIZATION_METRICS_MEMORY_MAXIMUM": { - "target": "smithy.api#Unit", + "includeMemberAccounts": { + "target": "com.amazonaws.computeoptimizer#IncludeMemberAccounts", "traits": { - "smithy.api#enumValue": "UtilizationMetricsMemoryMaximum" + "smithy.api#default": false, + "smithy.api#documentation": "

Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.

\n

The member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.

\n

If this parameter is omitted, recommendations for member accounts of the organization \n aren't included in the export file .

\n

This parameter cannot be specified together with the account IDs parameter. The\n parameters are mutually exclusive.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.computeoptimizer#ExportLicenseRecommendationsResponse": { + "type": "structure", + "members": { + "jobId": { + "target": "com.amazonaws.computeoptimizer#JobId", + "traits": { + "smithy.api#documentation": "

\n The identification number of the export job.\n

\n

To view the status of an export job, use the DescribeRecommendationExportJobs \n action and specify the job ID.

" + } + }, + "s3Destination": { + "target": "com.amazonaws.computeoptimizer#S3Destination" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.computeoptimizer#ExportableAutoScalingGroupField": { + "type": "enum", + "members": { + "ACCOUNT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AccountId" + } + }, + "AUTO_SCALING_GROUP_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AutoScalingGroupArn" + } + }, + "AUTO_SCALING_GROUP_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AutoScalingGroupName" + } + }, + "FINDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Finding" + } + }, + "UTILIZATION_METRICS_CPU_MAXIMUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UtilizationMetricsCpuMaximum" + } + }, + "UTILIZATION_METRICS_MEMORY_MAXIMUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UtilizationMetricsMemoryMaximum" } }, "UTILIZATION_METRICS_EBS_READ_OPS_PER_SECOND_MAXIMUM": { @@ -3820,6 +3890,143 @@ "target": "com.amazonaws.computeoptimizer#ExportableLambdaFunctionField" } }, + "com.amazonaws.computeoptimizer#ExportableLicenseField": { + "type": "enum", + "members": { + "ACCOUNT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AccountId" + } + }, + "RESOURCE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceArn" + } + }, + "LOOKBACK_PERIOD_IN_DAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LookbackPeriodInDays" + } + }, + "LAST_REFRESH_TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastRefreshTimestamp" + } + }, + "LICENSE_FINDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Finding" + } + }, + "LICENSE_FINDING_REASON_CODES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FindingReasonCodes" + } + }, + "CURRENT_LICENSE_CONFIGURATION_NUMBER_OF_CORES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationNumberOfCores" + } + }, + "CURRENT_LICENSE_CONFIGURATION_INSTANCE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationInstanceType" + } + }, + "CURRENT_LICENSE_CONFIGURATION_OPERATING_SYSTEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationOperatingSystem" + } + }, + "CURRENT_LICENSE_CONFIGURATION_LICENSE_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationLicenseName" + } + }, + "CURRENT_LICENSE_CONFIGURATION_LICENSE_EDITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationLicenseEdition" + } + }, + "CURRENT_LICENSE_CONFIGURATION_LICENSE_MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationLicenseModel" + } + }, + "CURRENT_LICENSE_CONFIGURATION_LICENSE_VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationLicenseVersion" + } + }, + "CURRENT_LICENSE_CONFIGURATION_METRICS_SOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CurrentLicenseConfigurationMetricsSource" + } + }, + "RECOMMENDATION_OPTIONS_OPERATING_SYSTEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RecommendationOptionsOperatingSystem" + } + }, + "RECOMMENDATION_OPTIONS_LICENSE_EDITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RecommendationOptionsLicenseEdition" + } + }, + "RECOMMENDATION_OPTIONS_LICENSE_MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RecommendationOptionsLicenseModel" + } + }, + "RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RecommendationOptionsSavingsOpportunityPercentage" + } + }, + "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RecommendationOptionsEstimatedMonthlySavingsCurrency" + } + }, + "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RecommendationOptionsEstimatedMonthlySavingsValue" + } + }, + "TAGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Tags" + } + } + } + }, + "com.amazonaws.computeoptimizer#ExportableLicenseFields": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#ExportableLicenseField" + } + }, "com.amazonaws.computeoptimizer#ExportableVolumeField": { "type": "enum", "members": { @@ -5233,6 +5440,108 @@ "smithy.api#output": {} } }, + "com.amazonaws.computeoptimizer#GetLicenseRecommendations": { + "type": "operation", + "input": { + "target": "com.amazonaws.computeoptimizer#GetLicenseRecommendationsRequest" + }, + "output": { + "target": "com.amazonaws.computeoptimizer#GetLicenseRecommendationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.computeoptimizer#AccessDeniedException" + }, + { + "target": "com.amazonaws.computeoptimizer#InternalServerException" + }, + { + "target": "com.amazonaws.computeoptimizer#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.computeoptimizer#MissingAuthenticationToken" + }, + { + "target": "com.amazonaws.computeoptimizer#OptInRequiredException" + }, + { + "target": "com.amazonaws.computeoptimizer#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.computeoptimizer#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.computeoptimizer#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns license recommendations for Amazon EC2 instances that run on a specific license.

\n

Compute Optimizer generates recommendations for licenses that meet a specific set of requirements. For more\n information, see the Supported resources and\n requirements in the Compute Optimizer User\n Guide.

" + } + }, + "com.amazonaws.computeoptimizer#GetLicenseRecommendationsRequest": { + "type": "structure", + "members": { + "resourceArns": { + "target": "com.amazonaws.computeoptimizer#ResourceArns", + "traits": { + "smithy.api#documentation": "

\n The ARN that identifies the Amazon EC2 instance.\n

\n

\n The following is the format of the ARN:\n

\n

\n arn:aws:ec2:region:aws_account_id:instance/instance-id\n

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

\n The token to advance to the next page of license recommendations.\n

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

\n The maximum number of license recommendations to return with a single request.\n

\n

\n To retrieve the remaining results, make another request with the returned\n nextToken value.\n

" + } + }, + "filters": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendationFilters", + "traits": { + "smithy.api#documentation": "

\n An array of objects to specify a filter that returns a more specific list of license recommendations.\n

" + } + }, + "accountIds": { + "target": "com.amazonaws.computeoptimizer#AccountIds", + "traits": { + "smithy.api#documentation": "

The ID of the Amazon Web Services account for which to return license recommendations.

\n

If your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return license recommendations.

\n

Only one account ID can be specified per request.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.computeoptimizer#GetLicenseRecommendationsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.computeoptimizer#NextToken", + "traits": { + "smithy.api#documentation": "

\n The token to use to advance to the next page of license recommendations.\n

" + } + }, + "licenseRecommendations": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendations", + "traits": { + "smithy.api#documentation": "

\n An array of objects that describe license recommendations.\n

" + } + }, + "errors": { + "target": "com.amazonaws.computeoptimizer#GetRecommendationErrors", + "traits": { + "smithy.api#documentation": "

\n An array of objects that describe errors of the request.\n

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.computeoptimizer#GetRecommendationError": { "type": "structure", "members": { @@ -6387,10 +6696,345 @@ "com.amazonaws.computeoptimizer#LastUpdatedTimestamp": { "type": "timestamp" }, - "com.amazonaws.computeoptimizer#LimitExceededException": { + "com.amazonaws.computeoptimizer#LicenseConfiguration": { "type": "structure", "members": { - "message": { + "numberOfCores": { + "target": "com.amazonaws.computeoptimizer#NumberOfCores", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

\n The current number of cores associated with the instance.\n

" + } + }, + "instanceType": { + "target": "com.amazonaws.computeoptimizer#InstanceType", + "traits": { + "smithy.api#documentation": "

\n The instance type used in the license.\n

" + } + }, + "operatingSystem": { + "target": "com.amazonaws.computeoptimizer#OperatingSystem", + "traits": { + "smithy.api#documentation": "

\n The operating system of the instance. \n

" + } + }, + "licenseEdition": { + "target": "com.amazonaws.computeoptimizer#LicenseEdition", + "traits": { + "smithy.api#documentation": "

\n The edition of the license for the application that runs on the instance.\n

" + } + }, + "licenseName": { + "target": "com.amazonaws.computeoptimizer#LicenseName", + "traits": { + "smithy.api#documentation": "

\n The name of the license for the application that runs on the instance.\n

" + } + }, + "licenseModel": { + "target": "com.amazonaws.computeoptimizer#LicenseModel", + "traits": { + "smithy.api#documentation": "

\n The license type associated with the instance.\n

" + } + }, + "licenseVersion": { + "target": "com.amazonaws.computeoptimizer#LicenseVersion", + "traits": { + "smithy.api#documentation": "

\n The version of the license for the application that runs on the instance.\n

" + } + }, + "metricsSource": { + "target": "com.amazonaws.computeoptimizer#MetricsSource", + "traits": { + "smithy.api#documentation": "

\n The list of metric sources required to generate recommendations for commercial software licenses.\n

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

\n Describes the configuration of a license for an Amazon EC2 instance.\n

" + } + }, + "com.amazonaws.computeoptimizer#LicenseEdition": { + "type": "enum", + "members": { + "ENTERPRISE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Enterprise" + } + }, + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Standard" + } + }, + "FREE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Free" + } + }, + "NO_LICENSE_EDITION_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NoLicenseEditionFound" + } + } + } + }, + "com.amazonaws.computeoptimizer#LicenseFinding": { + "type": "enum", + "members": { + "INSUFFICIENT_METRICS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InsufficientMetrics" + } + }, + "OPTIMIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Optimized" + } + }, + "NOT_OPTIMIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotOptimized" + } + } + } + }, + "com.amazonaws.computeoptimizer#LicenseFindingReasonCode": { + "type": "enum", + "members": { + "CW_APP_INSIGHTS_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidCloudWatchApplicationInsightsSetup" + } + }, + "CW_APP_INSIGHTS_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CloudWatchApplicationInsightsError" + } + }, + "LICENSE_OVER_PROVISIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LicenseOverprovisioned" + } + }, + "OPTIMIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Optimized" + } + } + } + }, + "com.amazonaws.computeoptimizer#LicenseFindingReasonCodes": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#LicenseFindingReasonCode" + } + }, + "com.amazonaws.computeoptimizer#LicenseModel": { + "type": "enum", + "members": { + "LICENSE_INCLUDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LicenseIncluded" + } + }, + "BRING_YOUR_OWN_LICENSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BringYourOwnLicense" + } + } + } + }, + "com.amazonaws.computeoptimizer#LicenseName": { + "type": "enum", + "members": { + "SQLSERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQLServer" + } + } + } + }, + "com.amazonaws.computeoptimizer#LicenseRecommendation": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.computeoptimizer#ResourceArn", + "traits": { + "smithy.api#documentation": "

\n The ARN that identifies the Amazon EC2 instance.\n

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

\n The Amazon Web Services account ID of the license. \n

" + } + }, + "currentLicenseConfiguration": { + "target": "com.amazonaws.computeoptimizer#LicenseConfiguration", + "traits": { + "smithy.api#documentation": "

\n An object that describes the current configuration of an instance that runs on a license.\n

" + } + }, + "lookbackPeriodInDays": { + "target": "com.amazonaws.computeoptimizer#LookBackPeriodInDays", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

\n The number of days for which utilization metrics were analyzed for an instance that runs on a license.\n

" + } + }, + "lastRefreshTimestamp": { + "target": "com.amazonaws.computeoptimizer#LastRefreshTimestamp", + "traits": { + "smithy.api#documentation": "

\n The timestamp of when the license recommendation was last generated.\n

" + } + }, + "finding": { + "target": "com.amazonaws.computeoptimizer#LicenseFinding", + "traits": { + "smithy.api#documentation": "

\n The finding classification for an instance that runs on a license.\n

\n

Findings include:

\n
    \n
  • \n

    \n InsufficentMetrics — When Compute Optimizer detects that your CloudWatch\n Application Insights isn't enabled or is enabled with insufficient permissions.

    \n
  • \n
  • \n

    \n NotOptimized — When Compute Optimizer detects that your EC2 infrastructure \n isn't using any of the SQL server license features you're paying for, a license is considered \n not optimized.

    \n
  • \n
  • \n

    \n Optimized — When Compute Optimizer detects that all specifications of your \n license meet the performance requirements of your workload.

    \n
  • \n
" + } + }, + "findingReasonCodes": { + "target": "com.amazonaws.computeoptimizer#LicenseFindingReasonCodes", + "traits": { + "smithy.api#documentation": "

\n The reason for the finding classification for an instance that runs on a license.\n

\n

Finding reason codes include:

\n
    \n
  • \n

    \n Optimized — All specifications of your \n license meet the performance requirements of your workload.

    \n
  • \n
  • \n

    \n LicenseOverprovisioned — A license is considered over-provisioned when your license can be \n downgraded while still meeting the performance requirements of your workload.

    \n
  • \n
  • \n

    \n InvalidCloudwatchApplicationInsights — CloudWatch\n Application Insights isn't configured properly.

    \n
  • \n
  • \n

    \n CloudwatchApplicationInsightsError — There is a CloudWatch\n Application Insights error.

    \n
  • \n
" + } + }, + "licenseRecommendationOptions": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendationOptions", + "traits": { + "smithy.api#documentation": "

\n An array of objects that describe the license recommendation options.\n

" + } + }, + "tags": { + "target": "com.amazonaws.computeoptimizer#Tags", + "traits": { + "smithy.api#documentation": "

\n A list of tags assigned to an EC2 instance.\n

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

\n Describes a license recommendation for an EC2 instance.\n

" + } + }, + "com.amazonaws.computeoptimizer#LicenseRecommendationFilter": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendationFilterName", + "traits": { + "smithy.api#documentation": "

The name of the filter.

\n

Specify Finding to return recommendations with a specific finding\n classification.

\n

Specify FindingReasonCode to return recommendations with a specific\n finding reason code.

\n

You can filter your license recommendations by tag:key \n and tag-key tags.

\n

A tag:key is a key and value combination of a tag assigned to your \n license recommendations. Use the tag key in the filter name and the tag value \n as the filter value. For example, to find all license recommendations that have \n a tag with the key of Owner and the value of TeamA, \n specify tag:Owner for the filter name and TeamA for the filter value.

\n

A tag-key is the key of a tag assigned to your license recommendations. Use \n this filter to find all of your license recommendations that have a tag with a \n specific key. This doesn’t consider the tag value. For example, you can find \n your license recommendations with a tag key value of Owner or without any tag \n keys assigned.

" + } + }, + "values": { + "target": "com.amazonaws.computeoptimizer#FilterValues", + "traits": { + "smithy.api#documentation": "

The value of the filter.

\n

The valid values for this parameter are as follows, depending on what you specify for\n the name parameter:

\n
    \n
  • \n

    If you specify the name parameter as\n Finding, then specify Optimized, NotOptimized, or\n InsufficentMetrics.

    \n
  • \n
  • \n

    If you specify the name parameter as\n FindingReasonCode, then specify Optimized,\n LicenseOverprovisioned, InvalidCloudwatchApplicationInsights, or\n CloudwatchApplicationInsightsError.

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

\n Describes a filter that returns a more specific list of license recommendations. Use this filter \n with the GetLicenseRecommendation action.\n

" + } + }, + "com.amazonaws.computeoptimizer#LicenseRecommendationFilterName": { + "type": "enum", + "members": { + "LICENSE_FINDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Finding" + } + }, + "LICENSE_FINDING_REASON_CODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FindingReasonCode" + } + }, + "LICENSE_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LicenseName" + } + } + } + }, + "com.amazonaws.computeoptimizer#LicenseRecommendationFilters": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendationFilter" + } + }, + "com.amazonaws.computeoptimizer#LicenseRecommendationOption": { + "type": "structure", + "members": { + "rank": { + "target": "com.amazonaws.computeoptimizer#Rank", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

\n The rank of the license recommendation option.\n

\n

\n The top recommendation option is ranked as 1.\n

" + } + }, + "operatingSystem": { + "target": "com.amazonaws.computeoptimizer#OperatingSystem", + "traits": { + "smithy.api#documentation": "

\n The operating system of a license recommendation option.\n

" + } + }, + "licenseEdition": { + "target": "com.amazonaws.computeoptimizer#LicenseEdition", + "traits": { + "smithy.api#documentation": "

\n The recommended edition of the license for the application that runs on the instance.\n

" + } + }, + "licenseModel": { + "target": "com.amazonaws.computeoptimizer#LicenseModel", + "traits": { + "smithy.api#documentation": "

\n The recommended license type associated with the instance.\n

" + } + }, + "savingsOpportunity": { + "target": "com.amazonaws.computeoptimizer#SavingsOpportunity" + } + }, + "traits": { + "smithy.api#documentation": "

\n Describes the recommendation options for licenses.\n

" + } + }, + "com.amazonaws.computeoptimizer#LicenseRecommendationOptions": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendationOption" + } + }, + "com.amazonaws.computeoptimizer#LicenseRecommendations": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#LicenseRecommendation" + } + }, + "com.amazonaws.computeoptimizer#LicenseVersion": { + "type": "string" + }, + "com.amazonaws.computeoptimizer#LimitExceededException": { + "type": "structure", + "members": { + "message": { "target": "com.amazonaws.computeoptimizer#ErrorMessage" } }, @@ -6566,6 +7210,40 @@ } } }, + "com.amazonaws.computeoptimizer#MetricProviderArn": { + "type": "string" + }, + "com.amazonaws.computeoptimizer#MetricSource": { + "type": "structure", + "members": { + "provider": { + "target": "com.amazonaws.computeoptimizer#MetricSourceProvider", + "traits": { + "smithy.api#documentation": "

\n The name of the metric source provider.\n

" + } + }, + "providerArn": { + "target": "com.amazonaws.computeoptimizer#MetricProviderArn", + "traits": { + "smithy.api#documentation": "

\n The ARN of the metric source provider.\n

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

\n The list of metric sources required to generate recommendations for commercial software licenses.\n

" + } + }, + "com.amazonaws.computeoptimizer#MetricSourceProvider": { + "type": "enum", + "members": { + "CloudWatchAppInsights": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CloudWatchApplicationInsights" + } + } + } + }, "com.amazonaws.computeoptimizer#MetricStatistic": { "type": "enum", "members": { @@ -6595,6 +7273,12 @@ "target": "com.amazonaws.computeoptimizer#MetricValue" } }, + "com.amazonaws.computeoptimizer#MetricsSource": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#MetricSource" + } + }, "com.amazonaws.computeoptimizer#MigrationEffort": { "type": "enum", "members": { @@ -6655,6 +7339,12 @@ "com.amazonaws.computeoptimizer#NullableMemoryReservation": { "type": "integer" }, + "com.amazonaws.computeoptimizer#NumberOfCores": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, "com.amazonaws.computeoptimizer#NumberOfInvocations": { "type": "long", "traits": { @@ -6664,6 +7354,9 @@ "com.amazonaws.computeoptimizer#NumberOfMemberAccountsOptedIn": { "type": "integer" }, + "com.amazonaws.computeoptimizer#OperatingSystem": { + "type": "string" + }, "com.amazonaws.computeoptimizer#OptInRequiredException": { "type": "structure", "members": { @@ -7099,6 +7792,12 @@ "traits": { "smithy.api#enumValue": "EcsService" } + }, + "LICENSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "License" + } } } }, @@ -7197,6 +7896,12 @@ "com.amazonaws.computeoptimizer#ResourceArn": { "type": "string" }, + "com.amazonaws.computeoptimizer#ResourceArns": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#ResourceArn" + } + }, "com.amazonaws.computeoptimizer#ResourceNotFoundException": { "type": "structure", "members": { @@ -7248,6 +7953,12 @@ "traits": { "smithy.api#enumValue": "EcsService" } + }, + "LICENSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "License" + } } } },