Skip to content

Commit

Permalink
feat(client-auto-scaling): EC2 Auto Scaling customers who use attribu…
Browse files Browse the repository at this point in the history
…te based instance-type selection can now intuitively define their Spot instances price protection limit as a percentage of the lowest priced On-Demand instance type.
  • Loading branch information
awstools committed Jan 29, 2024
1 parent 3e47615 commit 4769d4c
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export interface CreateAutoScalingGroupCommandOutput extends __MetadataBearer {}
* "current" || "previous",
* ],
* SpotMaxPricePercentageOverLowestPrice: Number("int"),
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
* OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
* BareMetal: "included" || "excluded" || "required",
* BurstablePerformance: "included" || "excluded" || "required",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export interface DescribeAutoScalingGroupsCommandOutput extends AutoScalingGroup
* // "current" || "previous",
* // ],
* // SpotMaxPricePercentageOverLowestPrice: Number("int"),
* // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
* // OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
* // BareMetal: "included" || "excluded" || "required",
* // BurstablePerformance: "included" || "excluded" || "required",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export interface DescribeInstanceRefreshesCommandOutput extends DescribeInstance

/**
* @public
* <p>Gets information about the instance refreshes for the specified Auto Scaling group.</p>
* <p>Gets information about the instance refreshes for the specified Auto Scaling group from the
* previous six weeks.</p>
* <p>This operation is part of the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html">instance refresh
* feature</a> in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group
* after you make configuration changes.</p>
Expand Down Expand Up @@ -134,6 +135,7 @@ export interface DescribeInstanceRefreshesCommandOutput extends DescribeInstance
* // "current" || "previous",
* // ],
* // SpotMaxPricePercentageOverLowestPrice: Number("int"),
* // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
* // OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
* // BareMetal: "included" || "excluded" || "required",
* // BurstablePerformance: "included" || "excluded" || "required",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export interface StartInstanceRefreshCommandOutput extends StartInstanceRefreshA
* "current" || "previous",
* ],
* SpotMaxPricePercentageOverLowestPrice: Number("int"),
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
* OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
* BareMetal: "included" || "excluded" || "required",
* BurstablePerformance: "included" || "excluded" || "required",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export interface UpdateAutoScalingGroupCommandOutput extends __MetadataBearer {}
* "current" || "previous",
* ],
* SpotMaxPricePercentageOverLowestPrice: Number("int"),
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
* OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
* BareMetal: "included" || "excluded" || "required",
* BurstablePerformance: "included" || "excluded" || "required",
Expand Down
86 changes: 61 additions & 25 deletions clients/client-auto-scaling/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ export interface Alarm {
export interface AlarmSpecification {
/**
* @public
* <p>The names of one or more CloudWatch alarms to monitor for the instance refresh. You can specify up to 10 alarms.</p>
* <p>The names of one or more CloudWatch alarms to monitor for the instance refresh. You can
* specify up to 10 alarms.</p>
*/
Alarms?: string[];
}
Expand Down Expand Up @@ -753,8 +754,7 @@ export interface InstanceMaintenancePolicy {
* <p>Specifies the lower threshold as a percentage of the desired capacity of the Auto Scaling
* group. It represents the minimum percentage of the group to keep in service, healthy,
* and ready to use to support your workload when replacing instances. Value range is 0 to
* 100. After it's set, a value of <code>-1</code> will clear the previously set
* value.</p>
* 100. To clear a previously set value, specify a value of <code>-1</code>.</p>
*/
MinHealthyPercentage?: number;

Expand All @@ -763,8 +763,7 @@ export interface InstanceMaintenancePolicy {
* <p>Specifies the upper threshold as a percentage of the desired capacity of the Auto Scaling
* group. It represents the maximum percentage of the group that can be in service and
* healthy, or pending, to support your workload when replacing instances. Value range is
* 100 to 200. After it's set, a value of <code>-1</code> will clear the previously set
* value. </p>
* 100 to 200. To clear a previously set value, specify a value of <code>-1</code>.</p>
* <p>Both <code>MinHealthyPercentage</code> and <code>MaxHealthyPercentage</code> must be
* specified, and the difference between them cannot be greater than 100. A large range
* increases the number of instances that can be replaced at the same time.</p>
Expand Down Expand Up @@ -1357,33 +1356,70 @@ export interface InstanceRequirements {

/**
* @public
* <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for
* a Spot Instance, expressed as a percentage higher than the least expensive current
* generation M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling
* selects instance types with your attributes, we will exclude instance types whose price
* is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling
* interprets as a percentage. To turn off price protection, specify a high value, such as
* <code>999999</code>. </p>
* <p>[Price protection] The price protection threshold for Spot Instances, as a percentage
* higher than an identified Spot price. The identified Spot price is the price of the
* lowest priced current generation C, M, or R instance type with your specified
* attributes. If no current generation C, M, or R instance type matches your attributes,
* then the identified price is from either the lowest priced current generation instance
* types or, failing that, the lowest priced previous generation instance types that match
* your attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will
* exclude instance types whose price exceeds your specified threshold.</p>
* <p>The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage.</p>
* <p>To turn off price protection, specify a high value, such as <code>999999</code>. </p>
* <p>If you set <code>DesiredCapacityType</code> to <code>vcpu</code> or
* <code>memory-mib</code>, the price protection threshold is applied based on the per
* vCPU or per memory price instead of the per instance price. </p>
* <code>memory-mib</code>, the price protection threshold is based on the per-vCPU or
* per-memory price instead of the per instance price. </p>
* <note>
* <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or
* <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be
* specified.</p>
* </note>
* <p>Default: <code>100</code>
* </p>
*/
SpotMaxPricePercentageOverLowestPrice?: number;

/**
* @public
* <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay
* for an On-Demand Instance, expressed as a percentage higher than the least expensive
* current generation M, C, or R instance type with your specified attributes. When
* Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types
* whose price is higher than your threshold. The parameter accepts an integer, which
* Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value,
* such as <code>999999</code>. </p>
* <p>[Price protection] The price protection threshold for Spot Instances, as a percentage
* of an identified On-Demand price. The identified On-Demand price is the price of the
* lowest priced current generation C, M, or R instance type with your specified
* attributes. If no current generation C, M, or R instance type matches your attributes,
* then the identified price is from either the lowest priced current generation instance
* types or, failing that, the lowest priced previous generation instance types that match
* your attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will
* exclude instance types whose price exceeds your specified threshold.</p>
* <p>The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage.</p>
* <p>To indicate no price protection threshold, specify a high value, such as
* <code>999999</code>. </p>
* <p>If you set <code>DesiredCapacityType</code> to <code>vcpu</code> or
* <code>memory-mib</code>, the price protection threshold is applied based on the per
* vCPU or per memory price instead of the per instance price. </p>
* <code>memory-mib</code>, the price protection threshold is based on the per-vCPU or
* per-memory price instead of the per instance price. </p>
* <note>
* <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or
* <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If
* you don't specify either, then <code>SpotMaxPricePercentageOverLowestPrice</code> is
* used and the value for that parameter defaults to <code>100</code>.</p>
* </note>
*/
MaxSpotPriceAsPercentageOfOptimalOnDemandPrice?: number;

/**
* @public
* <p>[Price protection] The price protection threshold for On-Demand Instances, as a
* percentage higher than an identified On-Demand price. The identified On-Demand price is
* the price of the lowest priced current generation C, M, or R instance type with your
* specified attributes. If no current generation C, M, or R instance type matches your
* attributes, then the identified price is from either the lowest priced current
* generation instance types or, failing that, the lowest priced previous generation
* instance types that match your attributes. When Amazon EC2 Auto Scaling selects instance types with
* your attributes, we will exclude instance types whose price exceeds your specified
* threshold. </p>
* <p>The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage.</p>
* <p>To turn off price protection, specify a high value, such as <code>999999</code>. </p>
* <p>If you set <code>DesiredCapacityType</code> to <code>vcpu</code> or
* <code>memory-mib</code>, the price protection threshold is applied based on the
* per-vCPU or per-memory price instead of the per instance price. </p>
* <p>Default: <code>20</code>
* </p>
*/
Expand Down Expand Up @@ -5017,8 +5053,8 @@ export interface Metric {

/**
* @public
* <p>This structure defines the CloudWatch metric to return, along with the statistic, period,
* and unit.</p>
* <p>This structure defines the CloudWatch metric to return, along with the statistic and
* unit.</p>
* <p>For more information about the CloudWatch terminology below, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html">Amazon CloudWatch
* concepts</a> in the <i>Amazon CloudWatch User Guide</i>.</p>
*/
Expand Down
7 changes: 7 additions & 0 deletions clients/client-auto-scaling/src/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6454,6 +6454,9 @@ const se_InstanceRequirements = (input: InstanceRequirements, context: __SerdeCo
if (input[_SMPPOLP] != null) {
entries[_SMPPOLP] = input[_SMPPOLP];
}
if (input[_MSPAPOOODP] != null) {
entries[_MSPAPOOODP] = input[_MSPAPOOODP];
}
if (input[_ODMPPOLP] != null) {
entries[_ODMPPOLP] = input[_ODMPPOLP];
}
Expand Down Expand Up @@ -9576,6 +9579,9 @@ const de_InstanceRequirements = (output: any, context: __SerdeContext): Instance
if (output[_SMPPOLP] != null) {
contents[_SMPPOLP] = __strictParseInt32(output[_SMPPOLP]) as number;
}
if (output[_MSPAPOOODP] != null) {
contents[_MSPAPOOODP] = __strictParseInt32(output[_MSPAPOOODP]) as number;
}
if (output[_ODMPPOLP] != null) {
contents[_ODMPPOLP] = __strictParseInt32(output[_ODMPPOLP]) as number;
}
Expand Down Expand Up @@ -11415,6 +11421,7 @@ const _MNOLC = "MaxNumberOfLaunchConfigurations";
const _MO = "MetadataOptions";
const _MR = "MaxRecords";
const _MS = "MinSize";
const _MSPAPOOODP = "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice";
const _MSa = "MaxSize";
const _MSe = "MetricStat";
const _MSet = "MetricSpecifications";
Expand Down

0 comments on commit 4769d4c

Please sign in to comment.