Skip to content

Commit

Permalink
feat(client-auto-scaling): Adds bake time for Auto Scaling group Inst…
Browse files Browse the repository at this point in the history
…ance Refresh
  • Loading branch information
awstools committed Oct 31, 2024
1 parent 2f50238 commit 2392739
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clients/client-auto-scaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ based on user-defined scaling policies, scheduled actions, and health checks.</p

## Installing

To install the this package, simply type add or install @aws-sdk/client-auto-scaling
To install this package, simply type add or install @aws-sdk/client-auto-scaling
using your favorite package manager:

- `npm install @aws-sdk/client-auto-scaling`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface DescribeInstanceRefreshesCommandOutput extends DescribeInstance
* // { // InstanceRefresh
* // InstanceRefreshId: "STRING_VALUE",
* // AutoScalingGroupName: "STRING_VALUE",
* // Status: "Pending" || "InProgress" || "Successful" || "Failed" || "Cancelling" || "Cancelled" || "RollbackInProgress" || "RollbackFailed" || "RollbackSuccessful",
* // Status: "Pending" || "InProgress" || "Successful" || "Failed" || "Cancelling" || "Cancelled" || "RollbackInProgress" || "RollbackFailed" || "RollbackSuccessful" || "Baking",
* // StatusReason: "STRING_VALUE",
* // StartTime: new Date("TIMESTAMP"),
* // EndTime: new Date("TIMESTAMP"),
Expand Down Expand Up @@ -93,6 +93,7 @@ export interface DescribeInstanceRefreshesCommandOutput extends DescribeInstance
* // ],
* // },
* // MaxHealthyPercentage: Number("int"),
* // BakeTime: Number("int"),
* // },
* // DesiredConfiguration: { // DesiredConfiguration
* // LaunchTemplate: { // LaunchTemplateSpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export interface StartInstanceRefreshCommandOutput extends StartInstanceRefreshA
* ],
* },
* MaxHealthyPercentage: Number("int"),
* BakeTime: Number("int"),
* },
* };
* const command = new StartInstanceRefreshCommand(input);
Expand Down
16 changes: 16 additions & 0 deletions clients/client-auto-scaling/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3880,6 +3880,14 @@ export interface RefreshPreferences {
* @public
*/
MaxHealthyPercentage?: number;

/**
* <p>
* The amount of time, in seconds, to wait at the end of an instance refresh before the instance refresh is considered complete.
* </p>
* @public
*/
BakeTime?: number;
}

/**
Expand Down Expand Up @@ -3992,6 +4000,7 @@ export interface RollbackDetails {
* @enum
*/
export const InstanceRefreshStatus = {
Baking: "Baking",
Cancelled: "Cancelled",
Cancelling: "Cancelling",
Failed: "Failed",
Expand Down Expand Up @@ -4069,6 +4078,10 @@ export interface InstanceRefresh {
* <p>
* <code>RollbackSuccessful</code> - The rollback completed successfully.</p>
* </li>
* <li>
* <p>
* <code>Baking</code> - Waiting the specified bake time after an instance refresh has finished updating instances.</p>
* </li>
* </ul>
* @public
*/
Expand Down Expand Up @@ -7977,6 +7990,9 @@ export interface StartInstanceRefreshType {
* <li>
* <p>Skip matching</p>
* </li>
* <li>
* <p>Bake time</p>
* </li>
* </ul>
* @public
*/
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 @@ -5780,6 +5780,9 @@ const se_RefreshPreferences = (input: RefreshPreferences, context: __SerdeContex
if (input[_MHPa] != null) {
entries[_MHPa] = input[_MHPa];
}
if (input[_BTa] != null) {
entries[_BTa] = input[_BTa];
}
return entries;
};

Expand Down Expand Up @@ -8796,6 +8799,9 @@ const de_RefreshPreferences = (output: any, context: __SerdeContext): RefreshPre
if (output[_MHPa] != null) {
contents[_MHPa] = __strictParseInt32(output[_MHPa]) as number;
}
if (output[_BTa] != null) {
contents[_BTa] = __strictParseInt32(output[_BTa]) as number;
}
return contents;
};

Expand Down Expand Up @@ -9430,6 +9436,7 @@ const _BM = "BareMetal";
const _BP = "BurstablePerformance";
const _BPSUGA = "BatchPutScheduledUpdateGroupAction";
const _BT = "BreachThreshold";
const _BTa = "BakeTime";
const _C = "Context";
const _CASG = "CreateAutoScalingGroup";
const _CCMS = "CustomizedCapacityMetricSpecification";
Expand Down
25 changes: 23 additions & 2 deletions codegen/sdk-codegen/aws-models/auto-scaling.json
Original file line number Diff line number Diff line change
Expand Up @@ -2305,6 +2305,15 @@
"target": "com.amazonaws.autoscaling#XmlStringMaxLen255"
}
},
"com.amazonaws.autoscaling#BakeTime": {
"type": "integer",
"traits": {
"smithy.api#range": {
"min": 0,
"max": 172800
}
}
},
"com.amazonaws.autoscaling#BareMetal": {
"type": "enum",
"members": {
Expand Down Expand Up @@ -6409,7 +6418,7 @@
"Status": {
"target": "com.amazonaws.autoscaling#InstanceRefreshStatus",
"traits": {
"smithy.api#documentation": "<p>The current status for the instance refresh operation:</p>\n <ul>\n <li>\n <p>\n <code>Pending</code> - The request was created, but the instance refresh has\n not started.</p>\n </li>\n <li>\n <p>\n <code>InProgress</code> - An instance refresh is in progress.</p>\n </li>\n <li>\n <p>\n <code>Successful</code> - An instance refresh completed successfully.</p>\n </li>\n <li>\n <p>\n <code>Failed</code> - An instance refresh failed to complete. You can\n troubleshoot using the status reason and the scaling activities. </p>\n </li>\n <li>\n <p>\n <code>Cancelling</code> - An ongoing instance refresh is being\n cancelled.</p>\n </li>\n <li>\n <p>\n <code>Cancelled</code> - The instance refresh is cancelled. </p>\n </li>\n <li>\n <p>\n <code>RollbackInProgress</code> - An instance refresh is being rolled\n back.</p>\n </li>\n <li>\n <p>\n <code>RollbackFailed</code> - The rollback failed to complete. You can\n troubleshoot using the status reason and the scaling activities.</p>\n </li>\n <li>\n <p>\n <code>RollbackSuccessful</code> - The rollback completed successfully.</p>\n </li>\n </ul>"
"smithy.api#documentation": "<p>The current status for the instance refresh operation:</p>\n <ul>\n <li>\n <p>\n <code>Pending</code> - The request was created, but the instance refresh has\n not started.</p>\n </li>\n <li>\n <p>\n <code>InProgress</code> - An instance refresh is in progress.</p>\n </li>\n <li>\n <p>\n <code>Successful</code> - An instance refresh completed successfully.</p>\n </li>\n <li>\n <p>\n <code>Failed</code> - An instance refresh failed to complete. You can\n troubleshoot using the status reason and the scaling activities. </p>\n </li>\n <li>\n <p>\n <code>Cancelling</code> - An ongoing instance refresh is being\n cancelled.</p>\n </li>\n <li>\n <p>\n <code>Cancelled</code> - The instance refresh is cancelled. </p>\n </li>\n <li>\n <p>\n <code>RollbackInProgress</code> - An instance refresh is being rolled\n back.</p>\n </li>\n <li>\n <p>\n <code>RollbackFailed</code> - The rollback failed to complete. You can\n troubleshoot using the status reason and the scaling activities.</p>\n </li>\n <li>\n <p>\n <code>RollbackSuccessful</code> - The rollback completed successfully.</p>\n </li>\n <li>\n <p>\n <code>Baking</code> - Waiting the specified bake time after an instance refresh has finished updating instances.</p>\n </li>\n </ul>"
}
},
"StatusReason": {
Expand Down Expand Up @@ -6590,6 +6599,12 @@
"traits": {
"smithy.api#enumValue": "RollbackSuccessful"
}
},
"Baking": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "Baking"
}
}
}
},
Expand Down Expand Up @@ -9274,6 +9289,12 @@
"traits": {
"smithy.api#documentation": "<p>Specifies the maximum percentage of the group that can be in service and healthy, or\n pending, to support your workload when replacing instances. The value is expressed as a\n percentage of the desired capacity of the Auto Scaling group. Value range is 100 to 200.</p>\n <p>If you specify <code>MaxHealthyPercentage</code>, you must also specify\n <code>MinHealthyPercentage</code>, and the difference between them cannot be greater\n than 100. A larger range increases the number of instances that can be replaced at the\n same time.</p>\n <p>If you do not specify this property, the default is 100 percent, or the percentage set\n in the instance maintenance policy for the Auto Scaling group, if defined.</p>"
}
},
"BakeTime": {
"target": "com.amazonaws.autoscaling#BakeTime",
"traits": {
"smithy.api#documentation": "<p>\n The amount of time, in seconds, to wait at the end of an instance refresh before the instance refresh is considered complete.\n </p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -10229,7 +10250,7 @@
"Preferences": {
"target": "com.amazonaws.autoscaling#RefreshPreferences",
"traits": {
"smithy.api#documentation": "<p>Sets your preferences for the instance refresh so that it performs as expected when\n you start it. Includes the instance warmup time, the minimum and maximum healthy\n percentages, and the behaviors that you want Amazon EC2 Auto Scaling to use if instances that are in\n <code>Standby</code> state or protected from scale in are found. You can also choose\n to enable additional features, such as the following:</p>\n <ul>\n <li>\n <p>Auto rollback</p>\n </li>\n <li>\n <p>Checkpoints</p>\n </li>\n <li>\n <p>CloudWatch alarms</p>\n </li>\n <li>\n <p>Skip matching</p>\n </li>\n </ul>"
"smithy.api#documentation": "<p>Sets your preferences for the instance refresh so that it performs as expected when\n you start it. Includes the instance warmup time, the minimum and maximum healthy\n percentages, and the behaviors that you want Amazon EC2 Auto Scaling to use if instances that are in\n <code>Standby</code> state or protected from scale in are found. You can also choose\n to enable additional features, such as the following:</p>\n <ul>\n <li>\n <p>Auto rollback</p>\n </li>\n <li>\n <p>Checkpoints</p>\n </li>\n <li>\n <p>CloudWatch alarms</p>\n </li>\n <li>\n <p>Skip matching</p>\n </li>\n <li>\n <p>Bake time</p>\n </li>\n </ul>"
}
}
}
Expand Down

0 comments on commit 2392739

Please sign in to comment.