Skip to content

Commit

Permalink
feat(client-compute-optimizer): This release enables AWS Compute Opti…
Browse files Browse the repository at this point in the history
…mizer to analyze and generate recommendations with a new customization preference, Memory Utilization.
  • Loading branch information
awstools committed Mar 28, 2024
1 parent 539621d commit 2f67543
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
* // },
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
* // },
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
* // },
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
* // },
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
* },
* },
* ],
Expand Down
50 changes: 39 additions & 11 deletions clients/client-compute-optimizer/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ export interface InstanceSavingsEstimationMode {
*/
export const CustomizableMetricName = {
CPU_UTILIZATION: "CpuUtilization",
MEMORY_UTILIZATION: "MemoryUtilization",
} as const;

/**
Expand All @@ -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;
Expand Down Expand Up @@ -444,14 +446,28 @@ export interface CustomizableMetricParameters {
* <p>
* The threshold value used for the specified metric parameter.
* </p>
* <note>
* <p>You can only specify the threshold value for CPU utilization.</p>
* </note>
* @public
*/
threshold?: CustomizableMetricThreshold;

/**
* <p>
* The headroom threshold value in percentage used for the specified metric parameter.
* The headroom value in percentage used for the specified metric parameter.
* </p>
* <p>The following lists the valid values for CPU and memory utilization.</p>
* <ul>
* <li>
* <p>CPU utilization: <code>PERCENT_30 | PERCENT_20 | PERCENT_0</code>
* </p>
* </li>
* <li>
* <p>Memory utilization: <code>PERCENT_30 | PERCENT_20 | PERCENT_10</code>
* </p>
* </li>
* </ul>
* @public
*/
headroom?: CustomizableMetricHeadroom;
Expand All @@ -471,9 +487,6 @@ export interface UtilizationPreference {
* <p>
* The name of the resource utilization metric name to customize.
* </p>
* <note>
* <p>Compute Optimizer only supports <code>CpuUtilization</code>.</p>
* </note>
* @public
*/
metricName?: CustomizableMetricName;
Expand Down Expand Up @@ -555,7 +568,7 @@ export interface EffectiveRecommendationPreferences {

/**
* <p>
* 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.
* </p>
* <note>
Expand Down Expand Up @@ -5893,7 +5906,7 @@ export interface GetEffectiveRecommendationPreferencesResponse {

/**
* <p>
* 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.
* </p>
Expand Down Expand Up @@ -7194,7 +7207,7 @@ export interface RecommendationPreferencesDetail {

/**
* <p>
* 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.
* </p>
* <note>
Expand Down Expand Up @@ -7648,21 +7661,36 @@ export interface PutRecommendationPreferencesRequest {

/**
* <p>
* 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.
* </p>
* <p>CPU utilization:</p>
* <ul>
* <li>
* <p>
* <code>P99_5</code> for threshold</p>
* </li>
* <li>
* <p>
* <code>PERCENT_17</code> for headroom</p>
* <code>PERCENT_20</code> for headroom</p>
* </li>
* </ul>
* <p>Memory utilization:</p>
* <ul>
* <li>
* <p>
* <code>PERCENT_20</code> for headroom</p>
* </li>
* </ul>
* <note>
* <p>You can only set this preference for the Amazon EC2 instance resource type.</p>
* <ul>
* <li>
* <p>You can only set CPU and memory utilization preferences for the Amazon EC2 instance resource type.</p>
* </li>
* <li>
* <p>The threshold setting isn’t available for memory utilization.</p>
* </li>
* </ul>
* </note>
* @public
*/
Expand Down
26 changes: 19 additions & 7 deletions codegen/sdk-codegen/aws-models/compute-optimizer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -1496,6 +1502,12 @@
"traits": {
"smithy.api#enumValue": "CpuUtilization"
}
},
"MEMORY_UTILIZATION": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "MemoryUtilization"
}
}
}
},
Expand All @@ -1505,13 +1517,13 @@
"threshold": {
"target": "com.amazonaws.computeoptimizer#CustomizableMetricThreshold",
"traits": {
"smithy.api#documentation": "<p>\n The threshold value used for the specified metric parameter.\n </p>"
"smithy.api#documentation": "<p>\n The threshold value used for the specified metric parameter.\n </p>\n <note>\n <p>You can only specify the threshold value for CPU utilization.</p>\n </note>"
}
},
"headroom": {
"target": "com.amazonaws.computeoptimizer#CustomizableMetricHeadroom",
"traits": {
"smithy.api#documentation": "<p>\n The headroom threshold value in percentage used for the specified metric parameter.\n </p>"
"smithy.api#documentation": "<p>\n The headroom value in percentage used for the specified metric parameter.\n </p>\n <p>The following lists the valid values for CPU and memory utilization.</p>\n <ul>\n <li>\n <p>CPU utilization: <code>PERCENT_30 | PERCENT_20 | PERCENT_0</code>\n </p>\n </li>\n <li>\n <p>Memory utilization: <code>PERCENT_30 | PERCENT_20 | PERCENT_10</code>\n </p>\n </li>\n </ul>"
}
}
},
Expand Down Expand Up @@ -2539,7 +2551,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
"smithy.api#documentation": "<p>\n The resource’s CPU utilization threshold preferences, such as threshold and headroom, that \n are used to generate rightsizing recommendations. \n </p>\n <note>\n <p>This preference is only available for the Amazon EC2 instance resource type.</p>\n </note>"
"smithy.api#documentation": "<p>\n The resource’s CPU and memory utilization preferences, such as threshold and headroom, that \n are used to generate rightsizing recommendations. \n </p>\n <note>\n <p>This preference is only available for the Amazon EC2 instance resource type.</p>\n </note>"
}
},
"preferredResources": {
Expand Down Expand Up @@ -5811,7 +5823,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
"smithy.api#documentation": "<p>\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 </p>\n <p>To validate that the preference is applied to your last generated set of recommendations, review the \n <code>effectiveRecommendationPreferences</code> value in the response of the \n GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions.</p>"
"smithy.api#documentation": "<p>\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 </p>\n <p>To validate that the preference is applied to your last generated set of recommendations, review the \n <code>effectiveRecommendationPreferences</code> value in the response of the \n GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions.</p>"
}
},
"preferredResources": {
Expand Down Expand Up @@ -8591,7 +8603,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
"smithy.api#documentation": "<p>\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 </p>\n <ul>\n <li>\n <p>\n <code>P99_5</code> for threshold</p>\n </li>\n <li>\n <p>\n <code>PERCENT_17</code> for headroom</p>\n </li>\n </ul>\n <note>\n <p>You can only set this preference for the Amazon EC2 instance resource type.</p>\n </note>"
"smithy.api#documentation": "<p>\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 </p>\n <p>CPU utilization:</p>\n <ul>\n <li>\n <p>\n <code>P99_5</code> for threshold</p>\n </li>\n <li>\n <p>\n <code>PERCENT_20</code> for headroom</p>\n </li>\n </ul>\n <p>Memory utilization:</p>\n <ul>\n <li>\n <p>\n <code>PERCENT_20</code> for headroom</p>\n </li>\n </ul>\n <note>\n <ul>\n <li>\n <p>You can only set CPU and memory utilization preferences for the Amazon EC2 instance resource type.</p>\n </li>\n <li>\n <p>The threshold setting isn’t available for memory utilization.</p>\n </li>\n </ul>\n </note>"
}
},
"preferredResources": {
Expand Down Expand Up @@ -8816,7 +8828,7 @@
"utilizationPreferences": {
"target": "com.amazonaws.computeoptimizer#UtilizationPreferences",
"traits": {
"smithy.api#documentation": "<p>\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 </p>\n <note>\n <p>This preference is only available for the Amazon EC2 instance resource type.</p>\n </note>"
"smithy.api#documentation": "<p>\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 </p>\n <note>\n <p>This preference is only available for the Amazon EC2 instance resource type.</p>\n </note>"
}
},
"preferredResources": {
Expand Down Expand Up @@ -9516,7 +9528,7 @@
"metricName": {
"target": "com.amazonaws.computeoptimizer#CustomizableMetricName",
"traits": {
"smithy.api#documentation": "<p>\n The name of the resource utilization metric name to customize. \n </p>\n <note>\n <p>Compute Optimizer only supports <code>CpuUtilization</code>.</p>\n </note>"
"smithy.api#documentation": "<p>\n The name of the resource utilization metric name to customize. \n </p>"
}
},
"metricParameters": {
Expand Down

0 comments on commit 2f67543

Please sign in to comment.