Skip to content

Commit d8adec8

Browse files
author
awstools
committed
feat(client-ec2): Added support for the force option for the EC2 instance terminate command. This feature enables customers to recover resources associated with an instance stuck in the shutting-down state as a result of rare issues caused by a frozen operating system or an underlying hardware problem.
1 parent 91553bb commit d8adec8

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

clients/client-ec2/src/commands/TerminateInstancesCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export interface TerminateInstancesCommandOutput extends TerminateInstancesResul
105105
* InstanceIds: [ // InstanceIdStringList // required
106106
* "STRING_VALUE",
107107
* ],
108+
* Force: true || false,
108109
* SkipOsShutdown: true || false,
109110
* DryRun: true || false,
110111
* };

clients/client-ec2/src/models/models_8.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,6 +4045,15 @@ export interface TerminateInstancesRequest {
40454045
*/
40464046
InstanceIds: string[] | undefined;
40474047

4048+
/**
4049+
* <p>Forces the instances to terminate. The instance will first attempt a graceful
4050+
* shutdown, which includes flushing file system caches and metadata. If the graceful
4051+
* shutdown fails to complete within the timeout period, the instance shuts down forcibly
4052+
* without flushing the file system caches and metadata.</p>
4053+
* @public
4054+
*/
4055+
Force?: boolean | undefined;
4056+
40484057
/**
40494058
* <p>Specifies whether to bypass the graceful OS shutdown process when the instance is
40504059
* terminated.</p>

clients/client-ec2/src/protocols/Aws_ec2.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58231,6 +58231,9 @@ const se_TerminateInstancesRequest = (input: TerminateInstancesRequest, context:
5823158231
entries[loc] = value;
5823258232
});
5823358233
}
58234+
if (input[_F] != null) {
58235+
entries[_F] = input[_F];
58236+
}
5823458237
if (input[_SOS] != null) {
5823558238
entries[_SOS] = input[_SOS];
5823658239
}

codegen/sdk-codegen/aws-models/ec2.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110872,6 +110872,12 @@
110872110872
"smithy.api#xmlName": "InstanceId"
110873110873
}
110874110874
},
110875+
"Force": {
110876+
"target": "com.amazonaws.ec2#Boolean",
110877+
"traits": {
110878+
"smithy.api#documentation": "<p>Forces the instances to terminate. The instance will first attempt a graceful\n shutdown, which includes flushing file system caches and metadata. If the graceful\n shutdown fails to complete within the timeout period, the instance shuts down forcibly\n without flushing the file system caches and metadata.</p>"
110879+
}
110880+
},
110875110881
"SkipOsShutdown": {
110876110882
"target": "com.amazonaws.ec2#Boolean",
110877110883
"traits": {

0 commit comments

Comments
 (0)