Skip to content

Commit 4769d4c

Browse files
author
awstools
committedJan 29, 2024
feat(client-auto-scaling): EC2 Auto Scaling customers who use attribute 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.
1 parent 3e47615 commit 4769d4c

8 files changed

+201
-33
lines changed
 

‎clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export interface CreateAutoScalingGroupCommandOutput extends __MetadataBearer {}
9595
* "current" || "previous",
9696
* ],
9797
* SpotMaxPricePercentageOverLowestPrice: Number("int"),
98+
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
9899
* OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
99100
* BareMetal: "included" || "excluded" || "required",
100101
* BurstablePerformance: "included" || "excluded" || "required",

‎clients/client-auto-scaling/src/commands/DescribeAutoScalingGroupsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export interface DescribeAutoScalingGroupsCommandOutput extends AutoScalingGroup
104104
* // "current" || "previous",
105105
* // ],
106106
* // SpotMaxPricePercentageOverLowestPrice: Number("int"),
107+
* // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
107108
* // OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
108109
* // BareMetal: "included" || "excluded" || "required",
109110
* // BurstablePerformance: "included" || "excluded" || "required",

‎clients/client-auto-scaling/src/commands/DescribeInstanceRefreshesCommand.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export interface DescribeInstanceRefreshesCommandOutput extends DescribeInstance
2828

2929
/**
3030
* @public
31-
* <p>Gets information about the instance refreshes for the specified Auto Scaling group.</p>
31+
* <p>Gets information about the instance refreshes for the specified Auto Scaling group from the
32+
* previous six weeks.</p>
3233
* <p>This operation is part of the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html">instance refresh
3334
* feature</a> in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group
3435
* after you make configuration changes.</p>
@@ -134,6 +135,7 @@ export interface DescribeInstanceRefreshesCommandOutput extends DescribeInstance
134135
* // "current" || "previous",
135136
* // ],
136137
* // SpotMaxPricePercentageOverLowestPrice: Number("int"),
138+
* // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
137139
* // OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
138140
* // BareMetal: "included" || "excluded" || "required",
139141
* // BurstablePerformance: "included" || "excluded" || "required",

‎clients/client-auto-scaling/src/commands/StartInstanceRefreshCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export interface StartInstanceRefreshCommandOutput extends StartInstanceRefreshA
100100
* "current" || "previous",
101101
* ],
102102
* SpotMaxPricePercentageOverLowestPrice: Number("int"),
103+
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
103104
* OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
104105
* BareMetal: "included" || "excluded" || "required",
105106
* BurstablePerformance: "included" || "excluded" || "required",

‎clients/client-auto-scaling/src/commands/UpdateAutoScalingGroupCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export interface UpdateAutoScalingGroupCommandOutput extends __MetadataBearer {}
121121
* "current" || "previous",
122122
* ],
123123
* SpotMaxPricePercentageOverLowestPrice: Number("int"),
124+
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
124125
* OnDemandMaxPricePercentageOverLowestPrice: Number("int"),
125126
* BareMetal: "included" || "excluded" || "required",
126127
* BurstablePerformance: "included" || "excluded" || "required",

‎clients/client-auto-scaling/src/models/models_0.ts

+61-25
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ export interface Alarm {
287287
export interface AlarmSpecification {
288288
/**
289289
* @public
290-
* <p>The names of one or more CloudWatch alarms to monitor for the instance refresh. You can specify up to 10 alarms.</p>
290+
* <p>The names of one or more CloudWatch alarms to monitor for the instance refresh. You can
291+
* specify up to 10 alarms.</p>
291292
*/
292293
Alarms?: string[];
293294
}
@@ -753,8 +754,7 @@ export interface InstanceMaintenancePolicy {
753754
* <p>Specifies the lower threshold as a percentage of the desired capacity of the Auto Scaling
754755
* group. It represents the minimum percentage of the group to keep in service, healthy,
755756
* and ready to use to support your workload when replacing instances. Value range is 0 to
756-
* 100. After it's set, a value of <code>-1</code> will clear the previously set
757-
* value.</p>
757+
* 100. To clear a previously set value, specify a value of <code>-1</code>.</p>
758758
*/
759759
MinHealthyPercentage?: number;
760760

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

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

13751382
/**
13761383
* @public
1377-
* <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay
1378-
* for an On-Demand Instance, expressed as a percentage higher than the least expensive
1379-
* current generation M, C, or R instance type with your specified attributes. When
1380-
* Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types
1381-
* whose price is higher than your threshold. The parameter accepts an integer, which
1382-
* Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value,
1383-
* such as <code>999999</code>. </p>
1384+
* <p>[Price protection] The price protection threshold for Spot Instances, as a percentage
1385+
* of an identified On-Demand price. The identified On-Demand price is the price of the
1386+
* lowest priced current generation C, M, or R instance type with your specified
1387+
* attributes. If no current generation C, M, or R instance type matches your attributes,
1388+
* then the identified price is from either the lowest priced current generation instance
1389+
* types or, failing that, the lowest priced previous generation instance types that match
1390+
* your attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will
1391+
* exclude instance types whose price exceeds your specified threshold.</p>
1392+
* <p>The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage.</p>
1393+
* <p>To indicate no price protection threshold, specify a high value, such as
1394+
* <code>999999</code>. </p>
13841395
* <p>If you set <code>DesiredCapacityType</code> to <code>vcpu</code> or
1385-
* <code>memory-mib</code>, the price protection threshold is applied based on the per
1386-
* vCPU or per memory price instead of the per instance price. </p>
1396+
* <code>memory-mib</code>, the price protection threshold is based on the per-vCPU or
1397+
* per-memory price instead of the per instance price. </p>
1398+
* <note>
1399+
* <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or
1400+
* <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If
1401+
* you don't specify either, then <code>SpotMaxPricePercentageOverLowestPrice</code> is
1402+
* used and the value for that parameter defaults to <code>100</code>.</p>
1403+
* </note>
1404+
*/
1405+
MaxSpotPriceAsPercentageOfOptimalOnDemandPrice?: number;
1406+
1407+
/**
1408+
* @public
1409+
* <p>[Price protection] The price protection threshold for On-Demand Instances, as a
1410+
* percentage higher than an identified On-Demand price. The identified On-Demand price is
1411+
* the price of the lowest priced current generation C, M, or R instance type with your
1412+
* specified attributes. If no current generation C, M, or R instance type matches your
1413+
* attributes, then the identified price is from either the lowest priced current
1414+
* generation instance types or, failing that, the lowest priced previous generation
1415+
* instance types that match your attributes. When Amazon EC2 Auto Scaling selects instance types with
1416+
* your attributes, we will exclude instance types whose price exceeds your specified
1417+
* threshold. </p>
1418+
* <p>The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage.</p>
1419+
* <p>To turn off price protection, specify a high value, such as <code>999999</code>. </p>
1420+
* <p>If you set <code>DesiredCapacityType</code> to <code>vcpu</code> or
1421+
* <code>memory-mib</code>, the price protection threshold is applied based on the
1422+
* per-vCPU or per-memory price instead of the per instance price. </p>
13871423
* <p>Default: <code>20</code>
13881424
* </p>
13891425
*/
@@ -5017,8 +5053,8 @@ export interface Metric {
50175053

50185054
/**
50195055
* @public
5020-
* <p>This structure defines the CloudWatch metric to return, along with the statistic, period,
5021-
* and unit.</p>
5056+
* <p>This structure defines the CloudWatch metric to return, along with the statistic and
5057+
* unit.</p>
50225058
* <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
50235059
* concepts</a> in the <i>Amazon CloudWatch User Guide</i>.</p>
50245060
*/

‎clients/client-auto-scaling/src/protocols/Aws_query.ts

+7
Original file line numberDiff line numberDiff line change
@@ -6454,6 +6454,9 @@ const se_InstanceRequirements = (input: InstanceRequirements, context: __SerdeCo
64546454
if (input[_SMPPOLP] != null) {
64556455
entries[_SMPPOLP] = input[_SMPPOLP];
64566456
}
6457+
if (input[_MSPAPOOODP] != null) {
6458+
entries[_MSPAPOOODP] = input[_MSPAPOOODP];
6459+
}
64576460
if (input[_ODMPPOLP] != null) {
64586461
entries[_ODMPPOLP] = input[_ODMPPOLP];
64596462
}
@@ -9576,6 +9579,9 @@ const de_InstanceRequirements = (output: any, context: __SerdeContext): Instance
95769579
if (output[_SMPPOLP] != null) {
95779580
contents[_SMPPOLP] = __strictParseInt32(output[_SMPPOLP]) as number;
95789581
}
9582+
if (output[_MSPAPOOODP] != null) {
9583+
contents[_MSPAPOOODP] = __strictParseInt32(output[_MSPAPOOODP]) as number;
9584+
}
95799585
if (output[_ODMPPOLP] != null) {
95809586
contents[_ODMPPOLP] = __strictParseInt32(output[_ODMPPOLP]) as number;
95819587
}
@@ -11415,6 +11421,7 @@ const _MNOLC = "MaxNumberOfLaunchConfigurations";
1141511421
const _MO = "MetadataOptions";
1141611422
const _MR = "MaxRecords";
1141711423
const _MS = "MinSize";
11424+
const _MSPAPOOODP = "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice";
1141811425
const _MSa = "MaxSize";
1141911426
const _MSe = "MetricStat";
1142011427
const _MSet = "MetricSpecifications";

0 commit comments

Comments
 (0)
Please sign in to comment.