Skip to content

Commit

Permalink
feat(client-cost-optimization-hub): This release enables AWS Cost Opt…
Browse files Browse the repository at this point in the history
…imization Hub to show cost optimization recommendations for Amazon Auto Scaling Groups, including those with single and mixed instance types.
  • Loading branch information
awstools committed Feb 6, 2025
1 parent 83f7355 commit 57c1525
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface GetRecommendationCommandOutput extends GetRecommendationRespons
* // estimatedMonthlyCost: Number("double"),
* // implementationEffort: "VeryLow" || "Low" || "Medium" || "High" || "VeryHigh",
* // restartNeeded: true || false,
* // actionType: "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete",
* // actionType: "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete" || "ScaleIn",
* // rollbackPossible: true || false,
* // currentResourceDetails: { // ResourceDetails Union: only one key present
* // lambdaFunction: { // LambdaFunction
Expand Down Expand Up @@ -199,6 +199,13 @@ export interface GetRecommendationCommandOutput extends GetRecommendationRespons
* // instance: {
* // type: "STRING_VALUE",
* // },
* // mixedInstances: [ // MixedInstanceConfigurationList
* // { // MixedInstanceConfiguration
* // type: "STRING_VALUE",
* // },
* // ],
* // type: "SingleInstanceType" || "MixedInstanceTypes",
* // allocationStrategy: "Prioritized" || "LowestPrice",
* // },
* // costCalculation: {
* // usages: [
Expand Down Expand Up @@ -471,6 +478,13 @@ export interface GetRecommendationCommandOutput extends GetRecommendationRespons
* // instance: {
* // type: "STRING_VALUE",
* // },
* // mixedInstances: [
* // {
* // type: "STRING_VALUE",
* // },
* // ],
* // type: "SingleInstanceType" || "MixedInstanceTypes",
* // allocationStrategy: "Prioritized" || "LowestPrice",
* // },
* // costCalculation: "<ResourceCostCalculation>",
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface ListRecommendationSummariesCommandOutput
* "Ec2Instance" || "LambdaFunction" || "EbsVolume" || "EcsService" || "Ec2AutoScalingGroup" || "Ec2InstanceSavingsPlans" || "ComputeSavingsPlans" || "SageMakerSavingsPlans" || "Ec2ReservedInstances" || "RdsReservedInstances" || "OpenSearchReservedInstances" || "RedshiftReservedInstances" || "ElastiCacheReservedInstances" || "RdsDbInstanceStorage" || "RdsDbInstance",
* ],
* actionTypes: [ // ActionTypeList
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete",
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete" || "ScaleIn",
* ],
* tags: [ // TagList
* { // Tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface ListRecommendationsCommandOutput extends ListRecommendationsRes
* "Ec2Instance" || "LambdaFunction" || "EbsVolume" || "EcsService" || "Ec2AutoScalingGroup" || "Ec2InstanceSavingsPlans" || "ComputeSavingsPlans" || "SageMakerSavingsPlans" || "Ec2ReservedInstances" || "RdsReservedInstances" || "OpenSearchReservedInstances" || "RedshiftReservedInstances" || "ElastiCacheReservedInstances" || "RdsDbInstanceStorage" || "RdsDbInstance",
* ],
* actionTypes: [ // ActionTypeList
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete",
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete" || "ScaleIn",
* ],
* tags: [ // TagList
* { // Tag
Expand Down
83 changes: 72 additions & 11 deletions clients/client-cost-optimization-hub/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const ActionType = {
PURCHASE_RESERVED_INSTANCES: "PurchaseReservedInstances",
PURCHASE_SAVINGS_PLANS: "PurchaseSavingsPlans",
RIGHTSIZE: "Rightsize",
SCALE_IN: "ScaleIn",
STOP: "Stop",
UPGRADE: "Upgrade",
} as const;
Expand All @@ -87,6 +88,20 @@ export const ActionType = {
*/
export type ActionType = (typeof ActionType)[keyof typeof ActionType];

/**
* @public
* @enum
*/
export const AllocationStrategy = {
LOWEST_PRICE: "LowestPrice",
PRIORITIZED: "Prioritized",
} as const;

/**
* @public
*/
export type AllocationStrategy = (typeof AllocationStrategy)[keyof typeof AllocationStrategy];

/**
* <p>Describes the Amazon Elastic Block Store performance configuration of the current and
* recommended resource configuration for a recommendation.</p>
Expand Down Expand Up @@ -421,8 +436,7 @@ export interface StorageConfiguration {
}

/**
* <p>The Amazon Elastic Block Store volume configuration used for
* recommendations.</p>
* <p>The Amazon Elastic Block Store volume configuration used for recommendations.</p>
* @public
*/
export interface EbsVolumeConfiguration {
Expand Down Expand Up @@ -558,14 +572,13 @@ export interface ResourceCostCalculation {
}

/**
* <p>Describes the Amazon Elastic Block Store volume configuration of the current and
* recommended resource configuration for a recommendation.</p>
* <p>Describes the Amazon Elastic Block Store volume configuration of the current and recommended
* resource configuration for a recommendation.</p>
* @public
*/
export interface EbsVolume {
/**
* <p>The Amazon Elastic Block Store volume configuration used for
* recommendations.</p>
* <p>The Amazon Elastic Block Store volume configuration used for recommendations.</p>
* @public
*/
configuration?: EbsVolumeConfiguration | undefined;
Expand All @@ -578,27 +591,74 @@ export interface EbsVolume {
}

/**
* <p>The Instance configuration used for recommendations.</p>
* <p>The instance configuration used for recommendations.</p>
* @public
*/
export interface InstanceConfiguration {
/**
* <p>Details about the type.</p>
* <p>The instance type of the configuration.</p>
* @public
*/
type?: string | undefined;
}

/**
* <p>The EC2 auto scaling group configuration used for recommendations.</p>
* <p>The configuration for the EC2 Auto Scaling group with mixed instance types.</p>
* @public
*/
export interface MixedInstanceConfiguration {
/**
* <p>The instance type of the configuration.</p>
* @public
*/
type?: string | undefined;
}

/**
* @public
* @enum
*/
export const Ec2AutoScalingGroupType = {
MIXED_INSTANCE_TYPES: "MixedInstanceTypes",
SINGLE_INSTANCE_TYPE: "SingleInstanceType",
} as const;

/**
* @public
*/
export type Ec2AutoScalingGroupType = (typeof Ec2AutoScalingGroupType)[keyof typeof Ec2AutoScalingGroupType];

/**
* <p>The EC2 Auto Scaling group configuration used for recommendations.</p>
* @public
*/
export interface Ec2AutoScalingGroupConfiguration {
/**
* <p>Details about the instance.</p>
* <p>Details about the instance for the EC2 Auto Scaling group with a single instance
* type.</p>
* @public
*/
instance?: InstanceConfiguration | undefined;

/**
* <p>A list of instance types for an EC2 Auto Scaling group with mixed instance types.</p>
* @public
*/
mixedInstances?: MixedInstanceConfiguration[] | undefined;

/**
* <p>The type of EC2 Auto Scaling group, showing whether it consists of a single instance type
* or mixed instance types.</p>
* @public
*/
type?: Ec2AutoScalingGroupType | undefined;

/**
* <p>The strategy used for allocating instances, based on a predefined priority order or based
* on the lowest available price.</p>
* @public
*/
allocationStrategy?: AllocationStrategy | undefined;
}

/**
Expand Down Expand Up @@ -1810,7 +1870,8 @@ export namespace ResourceDetails {
}

/**
* <p>The SageMaker Savings Plans recommendation details.</p>
* <p>The SageMaker AI
* Savings Plans recommendation details.</p>
* @public
*/
export interface SageMakerSavingsPlansMember {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,10 @@ const de_ListRecommendationSummariesResponse = (
}) as any;
};

// de_MixedInstanceConfiguration omitted.

// de_MixedInstanceConfigurationList omitted.

/**
* deserializeAws_json1_0OpenSearchReservedInstances
*/
Expand Down

0 comments on commit 57c1525

Please sign in to comment.