Skip to content

Commit 57c1525

Browse files
author
awstools
committed
feat(client-cost-optimization-hub): This release enables AWS Cost Optimization Hub to show cost optimization recommendations for Amazon Auto Scaling Groups, including those with single and mixed instance types.
1 parent 83f7355 commit 57c1525

File tree

5 files changed

+93
-14
lines changed

5 files changed

+93
-14
lines changed

clients/client-cost-optimization-hub/src/commands/GetRecommendationCommand.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export interface GetRecommendationCommandOutput extends GetRecommendationRespons
6767
* // estimatedMonthlyCost: Number("double"),
6868
* // implementationEffort: "VeryLow" || "Low" || "Medium" || "High" || "VeryHigh",
6969
* // restartNeeded: true || false,
70-
* // actionType: "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete",
70+
* // actionType: "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete" || "ScaleIn",
7171
* // rollbackPossible: true || false,
7272
* // currentResourceDetails: { // ResourceDetails Union: only one key present
7373
* // lambdaFunction: { // LambdaFunction
@@ -199,6 +199,13 @@ export interface GetRecommendationCommandOutput extends GetRecommendationRespons
199199
* // instance: {
200200
* // type: "STRING_VALUE",
201201
* // },
202+
* // mixedInstances: [ // MixedInstanceConfigurationList
203+
* // { // MixedInstanceConfiguration
204+
* // type: "STRING_VALUE",
205+
* // },
206+
* // ],
207+
* // type: "SingleInstanceType" || "MixedInstanceTypes",
208+
* // allocationStrategy: "Prioritized" || "LowestPrice",
202209
* // },
203210
* // costCalculation: {
204211
* // usages: [
@@ -471,6 +478,13 @@ export interface GetRecommendationCommandOutput extends GetRecommendationRespons
471478
* // instance: {
472479
* // type: "STRING_VALUE",
473480
* // },
481+
* // mixedInstances: [
482+
* // {
483+
* // type: "STRING_VALUE",
484+
* // },
485+
* // ],
486+
* // type: "SingleInstanceType" || "MixedInstanceTypes",
487+
* // allocationStrategy: "Prioritized" || "LowestPrice",
474488
* // },
475489
* // costCalculation: "<ResourceCostCalculation>",
476490
* // },

clients/client-cost-optimization-hub/src/commands/ListRecommendationSummariesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface ListRecommendationSummariesCommandOutput
6363
* "Ec2Instance" || "LambdaFunction" || "EbsVolume" || "EcsService" || "Ec2AutoScalingGroup" || "Ec2InstanceSavingsPlans" || "ComputeSavingsPlans" || "SageMakerSavingsPlans" || "Ec2ReservedInstances" || "RdsReservedInstances" || "OpenSearchReservedInstances" || "RedshiftReservedInstances" || "ElastiCacheReservedInstances" || "RdsDbInstanceStorage" || "RdsDbInstance",
6464
* ],
6565
* actionTypes: [ // ActionTypeList
66-
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete",
66+
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete" || "ScaleIn",
6767
* ],
6868
* tags: [ // TagList
6969
* { // Tag

clients/client-cost-optimization-hub/src/commands/ListRecommendationsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface ListRecommendationsCommandOutput extends ListRecommendationsRes
5656
* "Ec2Instance" || "LambdaFunction" || "EbsVolume" || "EcsService" || "Ec2AutoScalingGroup" || "Ec2InstanceSavingsPlans" || "ComputeSavingsPlans" || "SageMakerSavingsPlans" || "Ec2ReservedInstances" || "RdsReservedInstances" || "OpenSearchReservedInstances" || "RedshiftReservedInstances" || "ElastiCacheReservedInstances" || "RdsDbInstanceStorage" || "RdsDbInstance",
5757
* ],
5858
* actionTypes: [ // ActionTypeList
59-
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete",
59+
* "Rightsize" || "Stop" || "Upgrade" || "PurchaseSavingsPlans" || "PurchaseReservedInstances" || "MigrateToGraviton" || "Delete" || "ScaleIn",
6060
* ],
6161
* tags: [ // TagList
6262
* { // Tag

clients/client-cost-optimization-hub/src/models/models_0.ts

Lines changed: 72 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export const ActionType = {
7878
PURCHASE_RESERVED_INSTANCES: "PurchaseReservedInstances",
7979
PURCHASE_SAVINGS_PLANS: "PurchaseSavingsPlans",
8080
RIGHTSIZE: "Rightsize",
81+
SCALE_IN: "ScaleIn",
8182
STOP: "Stop",
8283
UPGRADE: "Upgrade",
8384
} as const;
@@ -87,6 +88,20 @@ export const ActionType = {
8788
*/
8889
export type ActionType = (typeof ActionType)[keyof typeof ActionType];
8990

91+
/**
92+
* @public
93+
* @enum
94+
*/
95+
export const AllocationStrategy = {
96+
LOWEST_PRICE: "LowestPrice",
97+
PRIORITIZED: "Prioritized",
98+
} as const;
99+
100+
/**
101+
* @public
102+
*/
103+
export type AllocationStrategy = (typeof AllocationStrategy)[keyof typeof AllocationStrategy];
104+
90105
/**
91106
* <p>Describes the Amazon Elastic Block Store performance configuration of the current and
92107
* recommended resource configuration for a recommendation.</p>
@@ -421,8 +436,7 @@ export interface StorageConfiguration {
421436
}
422437

423438
/**
424-
* <p>The Amazon Elastic Block Store volume configuration used for
425-
* recommendations.</p>
439+
* <p>The Amazon Elastic Block Store volume configuration used for recommendations.</p>
426440
* @public
427441
*/
428442
export interface EbsVolumeConfiguration {
@@ -558,14 +572,13 @@ export interface ResourceCostCalculation {
558572
}
559573

560574
/**
561-
* <p>Describes the Amazon Elastic Block Store volume configuration of the current and
562-
* recommended resource configuration for a recommendation.</p>
575+
* <p>Describes the Amazon Elastic Block Store volume configuration of the current and recommended
576+
* resource configuration for a recommendation.</p>
563577
* @public
564578
*/
565579
export interface EbsVolume {
566580
/**
567-
* <p>The Amazon Elastic Block Store volume configuration used for
568-
* recommendations.</p>
581+
* <p>The Amazon Elastic Block Store volume configuration used for recommendations.</p>
569582
* @public
570583
*/
571584
configuration?: EbsVolumeConfiguration | undefined;
@@ -578,27 +591,74 @@ export interface EbsVolume {
578591
}
579592

580593
/**
581-
* <p>The Instance configuration used for recommendations.</p>
594+
* <p>The instance configuration used for recommendations.</p>
582595
* @public
583596
*/
584597
export interface InstanceConfiguration {
585598
/**
586-
* <p>Details about the type.</p>
599+
* <p>The instance type of the configuration.</p>
587600
* @public
588601
*/
589602
type?: string | undefined;
590603
}
591604

592605
/**
593-
* <p>The EC2 auto scaling group configuration used for recommendations.</p>
606+
* <p>The configuration for the EC2 Auto Scaling group with mixed instance types.</p>
607+
* @public
608+
*/
609+
export interface MixedInstanceConfiguration {
610+
/**
611+
* <p>The instance type of the configuration.</p>
612+
* @public
613+
*/
614+
type?: string | undefined;
615+
}
616+
617+
/**
618+
* @public
619+
* @enum
620+
*/
621+
export const Ec2AutoScalingGroupType = {
622+
MIXED_INSTANCE_TYPES: "MixedInstanceTypes",
623+
SINGLE_INSTANCE_TYPE: "SingleInstanceType",
624+
} as const;
625+
626+
/**
627+
* @public
628+
*/
629+
export type Ec2AutoScalingGroupType = (typeof Ec2AutoScalingGroupType)[keyof typeof Ec2AutoScalingGroupType];
630+
631+
/**
632+
* <p>The EC2 Auto Scaling group configuration used for recommendations.</p>
594633
* @public
595634
*/
596635
export interface Ec2AutoScalingGroupConfiguration {
597636
/**
598-
* <p>Details about the instance.</p>
637+
* <p>Details about the instance for the EC2 Auto Scaling group with a single instance
638+
* type.</p>
599639
* @public
600640
*/
601641
instance?: InstanceConfiguration | undefined;
642+
643+
/**
644+
* <p>A list of instance types for an EC2 Auto Scaling group with mixed instance types.</p>
645+
* @public
646+
*/
647+
mixedInstances?: MixedInstanceConfiguration[] | undefined;
648+
649+
/**
650+
* <p>The type of EC2 Auto Scaling group, showing whether it consists of a single instance type
651+
* or mixed instance types.</p>
652+
* @public
653+
*/
654+
type?: Ec2AutoScalingGroupType | undefined;
655+
656+
/**
657+
* <p>The strategy used for allocating instances, based on a predefined priority order or based
658+
* on the lowest available price.</p>
659+
* @public
660+
*/
661+
allocationStrategy?: AllocationStrategy | undefined;
602662
}
603663

604664
/**
@@ -1810,7 +1870,8 @@ export namespace ResourceDetails {
18101870
}
18111871

18121872
/**
1813-
* <p>The SageMaker Savings Plans recommendation details.</p>
1873+
* <p>The SageMaker AI
1874+
* Savings Plans recommendation details.</p>
18141875
* @public
18151876
*/
18161877
export interface SageMakerSavingsPlansMember {

clients/client-cost-optimization-hub/src/protocols/Aws_json1_0.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,10 @@ const de_ListRecommendationSummariesResponse = (
757757
}) as any;
758758
};
759759

760+
// de_MixedInstanceConfiguration omitted.
761+
762+
// de_MixedInstanceConfigurationList omitted.
763+
760764
/**
761765
* deserializeAws_json1_0OpenSearchReservedInstances
762766
*/

0 commit comments

Comments
 (0)