From 2f67543b31542ae8b0c74df82a5ed7287cedbdfa Mon Sep 17 00:00:00 2001
From: awstools
Date: Thu, 28 Mar 2024 18:22:34 +0000
Subject: [PATCH] feat(client-compute-optimizer): This release enables AWS
Compute Optimizer to analyze and generate recommendations with a new
customization preference, Memory Utilization.
---
...tAutoScalingGroupRecommendationsCommand.ts | 4 +-
.../GetEC2InstanceRecommendationsCommand.ts | 4 +-
...fectiveRecommendationPreferencesCommand.ts | 4 +-
.../GetRecommendationPreferencesCommand.ts | 4 +-
.../PutRecommendationPreferencesCommand.ts | 4 +-
.../src/models/models_0.ts | 50 +++++++++++++++----
.../aws-models/compute-optimizer.json | 26 +++++++---
7 files changed, 68 insertions(+), 28 deletions(-)
diff --git a/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts b/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts
index a2fd16583e6e..dee6fa37fc58 100644
--- a/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts
+++ b/clients/client-compute-optimizer/src/commands/GetAutoScalingGroupRecommendationsCommand.ts
@@ -149,10 +149,10 @@ export interface GetAutoScalingGroupRecommendationsCommandOutput
* // lookBackPeriod: "DAYS_14" || "DAYS_32" || "DAYS_93",
* // utilizationPreferences: [ // UtilizationPreferences
* // { // UtilizationPreference
- * // metricName: "CpuUtilization",
+ * // metricName: "CpuUtilization" || "MemoryUtilization",
* // metricParameters: { // CustomizableMetricParameters
* // threshold: "P90" || "P95" || "P99_5",
- * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_0",
+ * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_10" || "PERCENT_0",
* // },
* // },
* // ],
diff --git a/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts b/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts
index 10a75a61028c..1d91b48d3fd4 100644
--- a/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts
+++ b/clients/client-compute-optimizer/src/commands/GetEC2InstanceRecommendationsCommand.ts
@@ -148,10 +148,10 @@ export interface GetEC2InstanceRecommendationsCommandOutput
* // lookBackPeriod: "DAYS_14" || "DAYS_32" || "DAYS_93",
* // utilizationPreferences: [ // UtilizationPreferences
* // { // UtilizationPreference
- * // metricName: "CpuUtilization",
+ * // metricName: "CpuUtilization" || "MemoryUtilization",
* // metricParameters: { // CustomizableMetricParameters
* // threshold: "P90" || "P95" || "P99_5",
- * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_0",
+ * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_10" || "PERCENT_0",
* // },
* // },
* // ],
diff --git a/clients/client-compute-optimizer/src/commands/GetEffectiveRecommendationPreferencesCommand.ts b/clients/client-compute-optimizer/src/commands/GetEffectiveRecommendationPreferencesCommand.ts
index 199254d54b89..e5f030516ce2 100644
--- a/clients/client-compute-optimizer/src/commands/GetEffectiveRecommendationPreferencesCommand.ts
+++ b/clients/client-compute-optimizer/src/commands/GetEffectiveRecommendationPreferencesCommand.ts
@@ -61,10 +61,10 @@ export interface GetEffectiveRecommendationPreferencesCommandOutput
* // lookBackPeriod: "DAYS_14" || "DAYS_32" || "DAYS_93",
* // utilizationPreferences: [ // UtilizationPreferences
* // { // UtilizationPreference
- * // metricName: "CpuUtilization",
+ * // metricName: "CpuUtilization" || "MemoryUtilization",
* // metricParameters: { // CustomizableMetricParameters
* // threshold: "P90" || "P95" || "P99_5",
- * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_0",
+ * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_10" || "PERCENT_0",
* // },
* // },
* // ],
diff --git a/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts b/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts
index a33c9322cc43..b7e81329a75c 100644
--- a/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts
+++ b/clients/client-compute-optimizer/src/commands/GetRecommendationPreferencesCommand.ts
@@ -74,10 +74,10 @@ export interface GetRecommendationPreferencesCommandOutput
* // lookBackPeriod: "DAYS_14" || "DAYS_32" || "DAYS_93",
* // utilizationPreferences: [ // UtilizationPreferences
* // { // UtilizationPreference
- * // metricName: "CpuUtilization",
+ * // metricName: "CpuUtilization" || "MemoryUtilization",
* // metricParameters: { // CustomizableMetricParameters
* // threshold: "P90" || "P95" || "P99_5",
- * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_0",
+ * // headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_10" || "PERCENT_0",
* // },
* // },
* // ],
diff --git a/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts b/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts
index 40221d5e0865..c37b2a9f7f50 100644
--- a/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts
+++ b/clients/client-compute-optimizer/src/commands/PutRecommendationPreferencesCommand.ts
@@ -57,10 +57,10 @@ export interface PutRecommendationPreferencesCommandOutput
* lookBackPeriod: "DAYS_14" || "DAYS_32" || "DAYS_93",
* utilizationPreferences: [ // UtilizationPreferences
* { // UtilizationPreference
- * metricName: "CpuUtilization",
+ * metricName: "CpuUtilization" || "MemoryUtilization",
* metricParameters: { // CustomizableMetricParameters
* threshold: "P90" || "P95" || "P99_5",
- * headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_0",
+ * headroom: "PERCENT_30" || "PERCENT_20" || "PERCENT_10" || "PERCENT_0",
* },
* },
* ],
diff --git a/clients/client-compute-optimizer/src/models/models_0.ts b/clients/client-compute-optimizer/src/models/models_0.ts
index 17b8afdc914a..38438a0d944c 100644
--- a/clients/client-compute-optimizer/src/models/models_0.ts
+++ b/clients/client-compute-optimizer/src/models/models_0.ts
@@ -395,6 +395,7 @@ export interface InstanceSavingsEstimationMode {
*/
export const CustomizableMetricName = {
CPU_UTILIZATION: "CpuUtilization",
+ MEMORY_UTILIZATION: "MemoryUtilization",
} as const;
/**
@@ -408,6 +409,7 @@ export type CustomizableMetricName = (typeof CustomizableMetricName)[keyof typeo
*/
export const CustomizableMetricHeadroom = {
PERCENT_0: "PERCENT_0",
+ PERCENT_10: "PERCENT_10",
PERCENT_20: "PERCENT_20",
PERCENT_30: "PERCENT_30",
} as const;
@@ -444,14 +446,28 @@ export interface CustomizableMetricParameters {
*
* The threshold value used for the specified metric parameter.
*
+ *
+ * You can only specify the threshold value for CPU utilization.
+ *
* @public
*/
threshold?: CustomizableMetricThreshold;
/**
*
- * The headroom threshold value in percentage used for the specified metric parameter.
+ * The headroom value in percentage used for the specified metric parameter.
*
+ * The following lists the valid values for CPU and memory utilization.
+ *
* @public
*/
headroom?: CustomizableMetricHeadroom;
@@ -471,9 +487,6 @@ export interface UtilizationPreference {
*
* The name of the resource utilization metric name to customize.
*
- *
- * Compute Optimizer only supports CpuUtilization
.
- *
* @public
*/
metricName?: CustomizableMetricName;
@@ -555,7 +568,7 @@ export interface EffectiveRecommendationPreferences {
/**
*
- * The resource’s CPU utilization threshold preferences, such as threshold and headroom, that
+ * The resource’s CPU and memory utilization preferences, such as threshold and headroom, that
* are used to generate rightsizing recommendations.
*
*
@@ -5893,7 +5906,7 @@ export interface GetEffectiveRecommendationPreferencesResponse {
/**
*
- * The resource’s CPU utilization threshold preferences, such as threshold and headroom,
+ * The resource’s CPU and memory utilization preferences, such as threshold and headroom,
* that were used to generate rightsizing recommendations. It considers all applicable preferences
* that you set at the resource, account, and organization level.
*
@@ -7194,7 +7207,7 @@ export interface RecommendationPreferencesDetail {
/**
*
- * The preference to control the resource’s CPU utilization thresholds - threshold and headroom.
+ * The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom.
* If the preference isn’t set, this object is null.
*
*
@@ -7648,9 +7661,10 @@ export interface PutRecommendationPreferencesRequest {
/**
*
- * The preference to control the resource’s CPU utilization thresholds - threshold and headroom. When this
- * preference isn't specified, we use the following default values:
+ * The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. When this
+ * preference isn't specified, we use the following default values.
*
+ * CPU utilization:
*
* -
*
@@ -7658,11 +7672,25 @@ export interface PutRecommendationPreferencesRequest {
*
* -
*
- * PERCENT_17
for headroom
+ * PERCENT_20
for headroom
+ *
+ *
+ * Memory utilization:
+ *
*
- * You can only set this preference for the Amazon EC2 instance resource type.
+ *
*
* @public
*/
diff --git a/codegen/sdk-codegen/aws-models/compute-optimizer.json b/codegen/sdk-codegen/aws-models/compute-optimizer.json
index 47f9c581adfd..3cebcdd050f9 100644
--- a/codegen/sdk-codegen/aws-models/compute-optimizer.json
+++ b/codegen/sdk-codegen/aws-models/compute-optimizer.json
@@ -1480,6 +1480,12 @@
"smithy.api#enumValue": "PERCENT_20"
}
},
+ "PERCENT_10": {
+ "target": "smithy.api#Unit",
+ "traits": {
+ "smithy.api#enumValue": "PERCENT_10"
+ }
+ },
"PERCENT_0": {
"target": "smithy.api#Unit",
"traits": {
@@ -1496,6 +1502,12 @@
"traits": {
"smithy.api#enumValue": "CpuUtilization"
}
+ },
+ "MEMORY_UTILIZATION": {
+ "target": "smithy.api#Unit",
+ "traits": {
+ "smithy.api#enumValue": "MemoryUtilization"
+ }
}
}
},
@@ -1505,13 +1517,13 @@
"threshold": {
"target": "com.amazonaws.computeoptimizer#CustomizableMetricThreshold",
"traits": {
- "smithy.api#documentation": "\n The threshold value used for the specified metric parameter.\n
"
+ "smithy.api#documentation": "\n The threshold value used for the specified metric parameter.\n
\n \n You can only specify the threshold value for CPU utilization.
\n "
}
},
"headroom": {
"target": "com.amazonaws.computeoptimizer#CustomizableMetricHeadroom",
"traits": {
- "smithy.api#documentation": "\n The headroom threshold value in percentage used for the specified metric parameter.\n
"
+ "smithy.api#documentation": "\n The headroom value in percentage used for the specified metric parameter.\n
\n The following lists the valid values for CPU and memory utilization.
\n "
}
}
},
@@ -2539,7 +2551,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
- "smithy.api#documentation": "\n The resource’s CPU utilization threshold preferences, such as threshold and headroom, that \n are used to generate rightsizing recommendations. \n
\n \n This preference is only available for the Amazon EC2 instance resource type.
\n "
+ "smithy.api#documentation": "\n The resource’s CPU and memory utilization preferences, such as threshold and headroom, that \n are used to generate rightsizing recommendations. \n
\n \n This preference is only available for the Amazon EC2 instance resource type.
\n "
}
},
"preferredResources": {
@@ -5811,7 +5823,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
- "smithy.api#documentation": "\n The resource’s CPU utilization threshold preferences, such as threshold and headroom, \n that were used to generate rightsizing recommendations. It considers all applicable preferences \n that you set at the resource, account, and organization level.\n
\n To validate that the preference is applied to your last generated set of recommendations, review the \n effectiveRecommendationPreferences
value in the response of the \n GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions.
"
+ "smithy.api#documentation": "\n The resource’s CPU and memory utilization preferences, such as threshold and headroom, \n that were used to generate rightsizing recommendations. It considers all applicable preferences \n that you set at the resource, account, and organization level.\n
\n To validate that the preference is applied to your last generated set of recommendations, review the \n effectiveRecommendationPreferences
value in the response of the \n GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions.
"
}
},
"preferredResources": {
@@ -8591,7 +8603,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
- "smithy.api#documentation": "\n The preference to control the resource’s CPU utilization thresholds - threshold and headroom. When this \n preference isn't specified, we use the following default values:\n
\n \n \n You can only set this preference for the Amazon EC2 instance resource type.
\n "
+ "smithy.api#documentation": "\n The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. When this \n preference isn't specified, we use the following default values.\n
\n CPU utilization:
\n \n Memory utilization:
\n \n \n \n "
}
},
"preferredResources": {
@@ -8816,7 +8828,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
- "smithy.api#documentation": "\n The preference to control the resource’s CPU utilization thresholds - threshold and headroom. \n If the preference isn’t set, this object is null. \n
\n \n This preference is only available for the Amazon EC2 instance resource type.
\n "
+ "smithy.api#documentation": "\n The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. \n If the preference isn’t set, this object is null. \n
\n \n This preference is only available for the Amazon EC2 instance resource type.
\n "
}
},
"preferredResources": {
@@ -9516,7 +9528,7 @@
"metricName": {
"target": "com.amazonaws.computeoptimizer#CustomizableMetricName",
"traits": {
- "smithy.api#documentation": "\n The name of the resource utilization metric name to customize. \n
\n \n Compute Optimizer only supports CpuUtilization
.
\n "
+ "smithy.api#documentation": "\n The name of the resource utilization metric name to customize. \n
"
}
},
"metricParameters": {