diff --git a/clients/client-compute-optimizer/src/commands/ExportAutoScalingGroupRecommendationsCommand.ts b/clients/client-compute-optimizer/src/commands/ExportAutoScalingGroupRecommendationsCommand.ts index 491a035437cd2..d8326263ed71e 100644 --- a/clients/client-compute-optimizer/src/commands/ExportAutoScalingGroupRecommendationsCommand.ts +++ b/clients/client-compute-optimizer/src/commands/ExportAutoScalingGroupRecommendationsCommand.ts @@ -62,7 +62,7 @@ export interface ExportAutoScalingGroupRecommendationsCommandOutput * }, * ], * fieldsToExport: [ // ExportableAutoScalingGroupFields - * "AccountId" || "AutoScalingGroupArn" || "AutoScalingGroupName" || "Finding" || "UtilizationMetricsCpuMaximum" || "UtilizationMetricsMemoryMaximum" || "UtilizationMetricsEbsReadOpsPerSecondMaximum" || "UtilizationMetricsEbsWriteOpsPerSecondMaximum" || "UtilizationMetricsEbsReadBytesPerSecondMaximum" || "UtilizationMetricsEbsWriteBytesPerSecondMaximum" || "UtilizationMetricsDiskReadOpsPerSecondMaximum" || "UtilizationMetricsDiskWriteOpsPerSecondMaximum" || "UtilizationMetricsDiskReadBytesPerSecondMaximum" || "UtilizationMetricsDiskWriteBytesPerSecondMaximum" || "UtilizationMetricsNetworkInBytesPerSecondMaximum" || "UtilizationMetricsNetworkOutBytesPerSecondMaximum" || "UtilizationMetricsNetworkPacketsInPerSecondMaximum" || "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" || "LookbackPeriodInDays" || "CurrentConfigurationInstanceType" || "CurrentConfigurationDesiredCapacity" || "CurrentConfigurationMinSize" || "CurrentConfigurationMaxSize" || "CurrentOnDemandPrice" || "CurrentStandardOneYearNoUpfrontReservedPrice" || "CurrentStandardThreeYearNoUpfrontReservedPrice" || "CurrentVCpus" || "CurrentMemory" || "CurrentStorage" || "CurrentNetwork" || "RecommendationOptionsConfigurationInstanceType" || "RecommendationOptionsConfigurationDesiredCapacity" || "RecommendationOptionsConfigurationMinSize" || "RecommendationOptionsConfigurationMaxSize" || "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" || "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" || "RecommendationOptionsPerformanceRisk" || "RecommendationOptionsOnDemandPrice" || "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" || "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" || "RecommendationOptionsVcpus" || "RecommendationOptionsMemory" || "RecommendationOptionsStorage" || "RecommendationOptionsNetwork" || "LastRefreshTimestamp" || "CurrentPerformanceRisk" || "RecommendationOptionsSavingsOpportunityPercentage" || "RecommendationOptionsEstimatedMonthlySavingsCurrency" || "RecommendationOptionsEstimatedMonthlySavingsValue" || "EffectiveRecommendationPreferencesCpuVendorArchitectures" || "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" || "EffectiveRecommendationPreferencesInferredWorkloadTypes" || "EffectiveRecommendationPreferencesPreferredResources" || "EffectiveRecommendationPreferencesLookBackPeriod" || "InferredWorkloadTypes" || "RecommendationOptionsMigrationEffort" || "CurrentInstanceGpuInfo" || "RecommendationOptionsInstanceGpuInfo" || "UtilizationMetricsGpuPercentageMaximum" || "UtilizationMetricsGpuMemoryPercentageMaximum" || "RecommendationOptionsProjectedUtilizationMetricsGpuPercentageMaximum" || "RecommendationOptionsProjectedUtilizationMetricsGpuMemoryPercentageMaximum" || "EffectiveRecommendationPreferencesSavingsEstimationMode" || "RecommendationOptionsSavingsOpportunityAfterDiscountsPercentage" || "RecommendationOptionsEstimatedMonthlySavingsCurrencyAfterDiscounts" || "RecommendationOptionsEstimatedMonthlySavingsValueAfterDiscounts", + * "AccountId" || "AutoScalingGroupArn" || "AutoScalingGroupName" || "Finding" || "UtilizationMetricsCpuMaximum" || "UtilizationMetricsMemoryMaximum" || "UtilizationMetricsEbsReadOpsPerSecondMaximum" || "UtilizationMetricsEbsWriteOpsPerSecondMaximum" || "UtilizationMetricsEbsReadBytesPerSecondMaximum" || "UtilizationMetricsEbsWriteBytesPerSecondMaximum" || "UtilizationMetricsDiskReadOpsPerSecondMaximum" || "UtilizationMetricsDiskWriteOpsPerSecondMaximum" || "UtilizationMetricsDiskReadBytesPerSecondMaximum" || "UtilizationMetricsDiskWriteBytesPerSecondMaximum" || "UtilizationMetricsNetworkInBytesPerSecondMaximum" || "UtilizationMetricsNetworkOutBytesPerSecondMaximum" || "UtilizationMetricsNetworkPacketsInPerSecondMaximum" || "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" || "LookbackPeriodInDays" || "CurrentConfigurationInstanceType" || "CurrentConfigurationDesiredCapacity" || "CurrentConfigurationMinSize" || "CurrentConfigurationMaxSize" || "CurrentConfigurationAllocationStrategy" || "CurrentConfigurationMixedInstanceTypes" || "CurrentConfigurationType" || "CurrentOnDemandPrice" || "CurrentStandardOneYearNoUpfrontReservedPrice" || "CurrentStandardThreeYearNoUpfrontReservedPrice" || "CurrentVCpus" || "CurrentMemory" || "CurrentStorage" || "CurrentNetwork" || "RecommendationOptionsConfigurationInstanceType" || "RecommendationOptionsConfigurationDesiredCapacity" || "RecommendationOptionsConfigurationMinSize" || "RecommendationOptionsConfigurationMaxSize" || "RecommendationOptionsConfigurationEstimatedInstanceHourReductionPercentage" || "RecommendationOptionsConfigurationAllocationStrategy" || "RecommendationOptionsConfigurationMixedInstanceTypes" || "RecommendationOptionsConfigurationType" || "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" || "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" || "RecommendationOptionsPerformanceRisk" || "RecommendationOptionsOnDemandPrice" || "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" || "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" || "RecommendationOptionsVcpus" || "RecommendationOptionsMemory" || "RecommendationOptionsStorage" || "RecommendationOptionsNetwork" || "LastRefreshTimestamp" || "CurrentPerformanceRisk" || "RecommendationOptionsSavingsOpportunityPercentage" || "RecommendationOptionsEstimatedMonthlySavingsCurrency" || "RecommendationOptionsEstimatedMonthlySavingsValue" || "EffectiveRecommendationPreferencesCpuVendorArchitectures" || "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" || "EffectiveRecommendationPreferencesInferredWorkloadTypes" || "EffectiveRecommendationPreferencesPreferredResources" || "EffectiveRecommendationPreferencesLookBackPeriod" || "InferredWorkloadTypes" || "RecommendationOptionsMigrationEffort" || "CurrentInstanceGpuInfo" || "RecommendationOptionsInstanceGpuInfo" || "UtilizationMetricsGpuPercentageMaximum" || "UtilizationMetricsGpuMemoryPercentageMaximum" || "RecommendationOptionsProjectedUtilizationMetricsGpuPercentageMaximum" || "RecommendationOptionsProjectedUtilizationMetricsGpuMemoryPercentageMaximum" || "EffectiveRecommendationPreferencesSavingsEstimationMode" || "RecommendationOptionsSavingsOpportunityAfterDiscountsPercentage" || "RecommendationOptionsEstimatedMonthlySavingsCurrencyAfterDiscounts" || "RecommendationOptionsEstimatedMonthlySavingsValueAfterDiscounts", * ], * s3DestinationConfig: { // S3DestinationConfig * bucket: "STRING_VALUE", diff --git a/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts b/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts index 5bde3ed06fbb8..be2c8ace82b9b 100644 --- a/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts +++ b/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts @@ -93,6 +93,12 @@ export interface GetAutoScalingGroupRecommendationsCommandOutput * // minSize: Number("int"), * // maxSize: Number("int"), * // instanceType: "STRING_VALUE", + * // allocationStrategy: "Prioritized" || "LowestPrice", + * // estimatedInstanceHourReductionPercentage: Number("double"), + * // type: "SingleInstanceType" || "MixedInstanceTypes", + * // mixedInstanceTypes: [ // MixedInstanceTypes + * // "STRING_VALUE", + * // ], * // }, * // currentInstanceGpuInfo: { // GpuInfo * // gpus: [ // Gpus @@ -109,6 +115,12 @@ export interface GetAutoScalingGroupRecommendationsCommandOutput * // minSize: Number("int"), * // maxSize: Number("int"), * // instanceType: "STRING_VALUE", + * // allocationStrategy: "Prioritized" || "LowestPrice", + * // estimatedInstanceHourReductionPercentage: Number("double"), + * // type: "SingleInstanceType" || "MixedInstanceTypes", + * // mixedInstanceTypes: [ + * // "STRING_VALUE", + * // ], * // }, * // instanceGpuInfo: { * // gpus: [ diff --git a/clients/client-compute-optimizer/src/models/models_0.ts b/clients/client-compute-optimizer/src/models/models_0.ts index dc0425d4457bb..e10afeb9a95fa 100644 --- a/clients/client-compute-optimizer/src/models/models_0.ts +++ b/clients/client-compute-optimizer/src/models/models_0.ts @@ -72,6 +72,34 @@ export interface AccountEnrollmentStatus { lastUpdatedTimestamp?: Date | undefined; } +/** + * @public + * @enum + */ +export const AllocationStrategy = { + LOWEST_PRICE: "LowestPrice", + PRIORITIZED: "Prioritized", +} as const; + +/** + * @public + */ +export type AllocationStrategy = (typeof AllocationStrategy)[keyof typeof AllocationStrategy]; + +/** + * @public + * @enum + */ +export const AsgType = { + MIXED_INSTANCE_TYPE: "MixedInstanceTypes", + SINGLE_INSTANCE_TYPE: "SingleInstanceType", +} as const; + +/** + * @public + */ +export type AsgType = (typeof AsgType)[keyof typeof AsgType]; + /** * @public * @enum @@ -87,35 +115,67 @@ export const AutoScalingConfiguration = { export type AutoScalingConfiguration = (typeof AutoScalingConfiguration)[keyof typeof AutoScalingConfiguration]; /** - *
Describes the configuration of an Auto Scaling group.
+ *Describes the configuration of an EC2 Auto Scaling group.
* @public */ export interface AutoScalingGroupConfiguration { /** - *The desired capacity, or number of instances, for the Auto Scaling group.
+ *The desired capacity, or number of instances, for the EC2 Auto Scaling group.
* @public */ desiredCapacity?: number | undefined; /** - *The minimum size, or minimum number of instances, for the Auto Scaling + *
The minimum size, or minimum number of instances, for the EC2 Auto Scaling * group.
* @public */ minSize?: number | undefined; /** - *The maximum size, or maximum number of instances, for the Auto Scaling + *
The maximum size, or maximum number of instances, for the EC2 Auto Scaling * group.
* @public */ maxSize?: number | undefined; /** - *The instance type for the Auto Scaling group.
+ *The instance type for the EC2 Auto Scaling group.
* @public */ instanceType?: string | undefined; + + /** + *+ * Describes the allocation strategy that the EC2 Auto Scaling group uses. This field is only available for EC2 Auto Scaling groups with mixed instance types. + *
+ * @public + */ + allocationStrategy?: AllocationStrategy | undefined; + + /** + *+ * Describes the projected percentage reduction in instance hours after adopting the recommended configuration. This field is only available for EC2 Auto Scaling groups with scaling policies. + *
+ * @public + */ + estimatedInstanceHourReductionPercentage?: number | undefined; + + /** + *+ * Describes whether the EC2 Auto Scaling group has a single instance type or a mixed instance type configuration. + *
+ * @public + */ + type?: AsgType | undefined; + + /** + *+ * List the instance types within an EC2 Auto Scaling group that has mixed instance types. + *
+ * @public + */ + mixedInstanceTypes?: string[] | undefined; } /** @@ -1719,10 +1779,13 @@ export const ExportableAutoScalingGroupField = { ACCOUNT_ID: "AccountId", AUTO_SCALING_GROUP_ARN: "AutoScalingGroupArn", AUTO_SCALING_GROUP_NAME: "AutoScalingGroupName", + CURRENT_CONFIGURATION_ALLOCATION_STRATEGY: "CurrentConfigurationAllocationStrategy", CURRENT_CONFIGURATION_DESIRED_CAPACITY: "CurrentConfigurationDesiredCapacity", CURRENT_CONFIGURATION_INSTANCE_TYPE: "CurrentConfigurationInstanceType", CURRENT_CONFIGURATION_MAX_SIZE: "CurrentConfigurationMaxSize", CURRENT_CONFIGURATION_MIN_SIZE: "CurrentConfigurationMinSize", + CURRENT_CONFIGURATION_MIXED_INSTANCE_TYPES: "CurrentConfigurationMixedInstanceTypes", + CURRENT_CONFIGURATION_TYPE: "CurrentConfigurationType", CURRENT_INSTANCE_GPU_INFO: "CurrentInstanceGpuInfo", CURRENT_MEMORY: "CurrentMemory", CURRENT_NETWORK: "CurrentNetwork", @@ -1746,10 +1809,15 @@ export const ExportableAutoScalingGroupField = { INFERRED_WORKLOAD_TYPES: "InferredWorkloadTypes", LAST_REFRESH_TIMESTAMP: "LastRefreshTimestamp", LOOKBACK_PERIOD_IN_DAYS: "LookbackPeriodInDays", + RECOMMENDATION_OPTIONS_CONFIGURATION_ALLOCATION_STRATEGY: "RecommendationOptionsConfigurationAllocationStrategy", RECOMMENDATION_OPTIONS_CONFIGURATION_DESIRED_CAPACITY: "RecommendationOptionsConfigurationDesiredCapacity", + RECOMMENDATION_OPTIONS_CONFIGURATION_ESTIMATED_INSTANCE_HOUR_REDUCTION_PERCENTAGE: + "RecommendationOptionsConfigurationEstimatedInstanceHourReductionPercentage", RECOMMENDATION_OPTIONS_CONFIGURATION_INSTANCE_TYPE: "RecommendationOptionsConfigurationInstanceType", RECOMMENDATION_OPTIONS_CONFIGURATION_MAX_SIZE: "RecommendationOptionsConfigurationMaxSize", RECOMMENDATION_OPTIONS_CONFIGURATION_MIN_SIZE: "RecommendationOptionsConfigurationMinSize", + RECOMMENDATION_OPTIONS_CONFIGURATION_MIXED_INSTANCE_TYPES: "RecommendationOptionsConfigurationMixedInstanceTypes", + RECOMMENDATION_OPTIONS_CONFIGURATION_TYPE: "RecommendationOptionsConfigurationType", RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY: "RecommendationOptionsEstimatedMonthlySavingsCurrency", RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY_AFTER_DISCOUNTS: "RecommendationOptionsEstimatedMonthlySavingsCurrencyAfterDiscounts", 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 55ae2a1570e4d..6d73b30ff61c1 100644 --- a/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts +++ b/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts @@ -139,6 +139,7 @@ import { ComputeOptimizerServiceException as __BaseException } from "../models/C import { AccessDeniedException, AccountEnrollmentStatus, + AutoScalingGroupConfiguration, AutoScalingGroupEstimatedMonthlySavings, AutoScalingGroupRecommendation, AutoScalingGroupRecommendationOption, @@ -1608,7 +1609,21 @@ const de_AccountEnrollmentStatuses = (output: any, context: __SerdeContext): Acc return retVal; }; -// de_AutoScalingGroupConfiguration omitted. +/** + * deserializeAws_json1_0AutoScalingGroupConfiguration + */ +const de_AutoScalingGroupConfiguration = (output: any, context: __SerdeContext): AutoScalingGroupConfiguration => { + return take(output, { + allocationStrategy: __expectString, + desiredCapacity: __expectInt32, + estimatedInstanceHourReductionPercentage: __limitedParseDouble, + instanceType: __expectString, + maxSize: __expectInt32, + minSize: __expectInt32, + mixedInstanceTypes: _json, + type: __expectString, + }) as any; +}; /** * deserializeAws_json1_0AutoScalingGroupEstimatedMonthlySavings @@ -1631,7 +1646,7 @@ const de_AutoScalingGroupRecommendation = (output: any, context: __SerdeContext) accountId: __expectString, autoScalingGroupArn: __expectString, autoScalingGroupName: __expectString, - currentConfiguration: _json, + currentConfiguration: (_: any) => de_AutoScalingGroupConfiguration(_, context), currentInstanceGpuInfo: _json, currentPerformanceRisk: __expectString, effectiveRecommendationPreferences: _json, @@ -1652,7 +1667,7 @@ const de_AutoScalingGroupRecommendationOption = ( context: __SerdeContext ): AutoScalingGroupRecommendationOption => { return take(output, { - configuration: _json, + configuration: (_: any) => de_AutoScalingGroupConfiguration(_, context), instanceGpuInfo: _json, migrationEffort: __expectString, performanceRisk: __limitedParseDouble, @@ -2667,6 +2682,8 @@ const de_MetricValues = (output: any, context: __SerdeContext): number[] => { // de_MissingAuthenticationToken omitted. +// de_MixedInstanceTypes omitted. + // de_OptInRequiredException omitted. // de_PlatformDifferences omitted.