Skip to content

Commit 06c4781

Browse files
Added support for skip-os-shutdown option for the EC2 instance stop and terminate operations. This feature enables customers to bypass the graceful OS shutdown, supporting faster state transitions when instance data preservation isn't critical.
1 parent dfaf769 commit 06c4781

18 files changed

+351
-156
lines changed

generator/ServiceModels/ec2/ec2-2016-11-15.api.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25773,7 +25773,7 @@
2577325773
"locationName":"subnetId"
2577425774
},
2577525775
"AvailabilityZone":{
25776-
"shape":"String",
25776+
"shape":"AvailabilityZoneName",
2577725777
"locationName":"availabilityZone"
2577825778
},
2577925779
"WeightedCapacity":{
@@ -25822,7 +25822,7 @@
2582225822
"InstanceType":{"shape":"InstanceType"},
2582325823
"MaxPrice":{"shape":"String"},
2582425824
"SubnetId":{"shape":"SubnetId"},
25825-
"AvailabilityZone":{"shape":"String"},
25825+
"AvailabilityZone":{"shape":"AvailabilityZoneName"},
2582625826
"WeightedCapacity":{"shape":"Double"},
2582725827
"Priority":{"shape":"Double"},
2582825828
"Placement":{"shape":"Placement"},
@@ -47502,6 +47502,7 @@
4750247502
"locationName":"InstanceId"
4750347503
},
4750447504
"Hibernate":{"shape":"Boolean"},
47505+
"SkipOsShutdown":{"shape":"Boolean"},
4750547506
"DryRun":{
4750647507
"shape":"Boolean",
4750747508
"locationName":"dryRun"
@@ -48299,6 +48300,7 @@
4829948300
"shape":"InstanceIdStringList",
4830048301
"locationName":"InstanceId"
4830148302
},
48303+
"SkipOsShutdown":{"shape":"Boolean"},
4830248304
"DryRun":{
4830348305
"shape":"Boolean",
4830448306
"locationName":"dryRun"

generator/ServiceModels/ec2/ec2-2016-11-15.docs.json

Lines changed: 22 additions & 20 deletions
Large diffs are not rendered by default.

generator/ServiceModels/ec2/ec2-2016-11-15.normal.json

Lines changed: 27 additions & 19 deletions
Large diffs are not rendered by default.

sdk/src/Services/EC2/Generated/Model/CreateCapacityReservationRequest.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,8 @@ internal bool IsSetEphemeralStorage()
323323
/// <note>
324324
/// <para>
325325
/// You can request future-dated Capacity Reservations for an instance count with a minimum
326-
/// of 100 vCPUs. For example, if you request a future-dated Capacity Reservation for
327-
/// <c>m5.xlarge</c> instances, you must request at least 25 instances (<i>25 * m5.xlarge
328-
/// = 100 vCPUs</i>).
326+
/// of 64 vCPUs. For example, if you request a future-dated Capacity Reservation for <c>m5.xlarge</c>
327+
/// instances, you must request at least 25 instances (<i>16 * m5.xlarge = 64 vCPUs</i>).
329328
/// </para>
330329
/// </note>
331330
/// <para>
@@ -413,7 +412,7 @@ internal bool IsSetInstancePlatform()
413412
/// <note>
414413
/// <para>
415414
/// You can request future-dated Capacity Reservations for instance types in the C, M,
416-
/// R, I, and T instance families only.
415+
/// R, I, T, and G instance families only.
417416
/// </para>
418417
/// </note>
419418
/// <para>

sdk/src/Services/EC2/Generated/Model/DescribeInstanceTypesRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public partial class DescribeInstanceTypesRequest : AmazonEC2Request
118118
/// </para>
119119
/// </li> <li>
120120
/// <para>
121-
/// <c>free-tier-eligible</c> - Indicates whether the instance type is eligible to use
122-
/// in the free tier (<c>true</c> | <c>false</c>).
121+
/// <c>free-tier-eligible</c> - A Boolean that indicates whether this instance type can
122+
/// be used under the Amazon Web Services Free Tier (<c>true</c> | <c>false</c>).
123123
/// </para>
124124
/// </li> <li>
125125
/// <para>

sdk/src/Services/EC2/Generated/Model/EbsBlockDevice.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ public partial class EbsBlockDevice
6060
/// </para>
6161
///
6262
/// <para>
63-
/// This parameter is not supported when using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>,
63+
/// This parameter is not supported when using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet.html">CreateFleet</a>,
64+
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>,
6465
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a>,
66+
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html">RequestSpotFleet</a>,
67+
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a>,
6568
/// and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>.
6669
/// </para>
6770
/// </summary>
@@ -91,8 +94,11 @@ internal bool IsSetAvailabilityZone()
9194
/// </para>
9295
///
9396
/// <para>
94-
/// This parameter is not supported when using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>,
97+
/// This parameter is not supported when using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet.html">CreateFleet</a>,
98+
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>,
9599
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a>,
100+
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html">RequestSpotFleet</a>,
101+
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html">RequestSpotInstances</a>,
96102
/// and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances</a>.
97103
/// </para>
98104
/// </summary>

sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/StopInstancesRequestMarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public IRequest Marshall(StopInstancesRequest publicRequest)
7676
publicRequestlistValueIndex++;
7777
}
7878
}
79+
if(publicRequest.IsSetSkipOsShutdown())
80+
{
81+
request.Parameters.Add("SkipOsShutdown", StringUtils.FromBool(publicRequest.SkipOsShutdown));
82+
}
7983
}
8084
return request;
8185
}

sdk/src/Services/EC2/Generated/Model/Internal/MarshallTransformations/TerminateInstancesRequestMarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ public IRequest Marshall(TerminateInstancesRequest publicRequest)
6868
publicRequestlistValueIndex++;
6969
}
7070
}
71+
if(publicRequest.IsSetSkipOsShutdown())
72+
{
73+
request.Parameters.Add("SkipOsShutdown", StringUtils.FromBool(publicRequest.SkipOsShutdown));
74+
}
7175
}
7276
return request;
7377
}

sdk/src/Services/EC2/Generated/Model/RunInstancesRequest.cs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ internal bool IsSetCapacityReservationSpecification()
236236
/// </para>
237237
///
238238
/// <para>
239-
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
240-
/// Idempotency</a>.
239+
/// For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring
240+
/// idempotency in Amazon EC2 API requests</a>.
241241
/// </para>
242242
///
243243
/// <para>
@@ -309,8 +309,8 @@ internal bool IsSetCreditSpecification()
309309
/// Gets and sets the property DisableApiStop.
310310
/// <para>
311311
/// Indicates whether an instance is enabled for stop protection. For more information,
312-
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop
313-
/// protection</a>.
312+
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html">Enable
313+
/// stop protection for your EC2 instances</a>.
314314
/// </para>
315315
/// </summary>
316316
public bool DisableApiStop
@@ -450,9 +450,8 @@ internal bool IsSetEnablePrimaryIpv6()
450450
/// Gets and sets the property EnclaveOptions.
451451
/// <para>
452452
/// Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
453-
/// For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html">What
454-
/// is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves
455-
/// User Guide</i>.
453+
/// For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/">Amazon
454+
/// Web Services Nitro Enclaves User Guide</a>.
456455
/// </para>
457456
///
458457
/// <para>
@@ -582,8 +581,8 @@ internal bool IsSetInstanceMarketOptions()
582581
/// <summary>
583582
/// Gets and sets the property InstanceType.
584583
/// <para>
585-
/// The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Amazon
586-
/// EC2 instance types</a> in the <i>Amazon EC2 User Guide</i>.
584+
/// The instance type. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/instance-types.html">Amazon
585+
/// EC2 Instance Types Guide</a>.
587586
/// </para>
588587
/// </summary>
589588
public InstanceType InstanceType
@@ -676,8 +675,8 @@ internal bool IsSetKernelId()
676675
/// <summary>
677676
/// Gets and sets the property KeyName.
678677
/// <para>
679-
/// The name of the key pair. You can create a key pair using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html">CreateKeyPair</a>
680-
/// or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.
678+
/// The name of the key pair. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html">Create
679+
/// a key pair for your EC2 instance</a>.
681680
/// </para>
682681
/// <important>
683682
/// <para>
@@ -783,8 +782,8 @@ internal bool IsSetMaxCount()
783782
/// <summary>
784783
/// Gets and sets the property MetadataOptions.
785784
/// <para>
786-
/// The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance
787-
/// metadata and user data</a>.
785+
/// The metadata options for the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html">Configure
786+
/// the Instance Metadata Service options</a>.
788787
/// </para>
789788
/// </summary>
790789
public InstanceMetadataOptionsRequest MetadataOptions
@@ -996,7 +995,7 @@ internal bool IsSetRamdiskId()
996995
/// <summary>
997996
/// Gets and sets the property SecurityGroupIds.
998997
/// <para>
999-
/// The IDs of the security groups. You can create a security group using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html">CreateSecurityGroup</a>.
998+
/// The IDs of the security groups.
1000999
/// </para>
10011000
///
10021001
/// <para>
@@ -1113,8 +1112,8 @@ internal bool IsSetTagSpecifications()
11131112
/// <para>
11141113
/// The user data to make available to the instance. User data must be base64-encoded.
11151114
/// Depending on the tool or SDK that you're using, the base64-encoding might be performed
1116-
/// for you. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html">Work
1117-
/// with instance user data</a>.
1115+
/// for you. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Run
1116+
/// commands at launch using instance user data</a>.
11181117
/// </para>
11191118
/// </summary>
11201119
[AWSProperty(Sensitive=true)]

sdk/src/Services/EC2/Generated/Model/StartDeclarativePoliciesReportRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ namespace Amazon.EC2.Model
4545
///
4646
/// <para>
4747
/// The report is saved to your specified S3 bucket, using the following path structure
48-
/// (with the <i>italicized placeholders</i> representing your specific values):
48+
/// (with the capitalized placeholders representing your specific values):
4949
/// </para>
5050
///
5151
/// <para>
52-
/// <c>s3://<i>amzn-s3-demo-bucket</i>/<i>your-optional-s3-prefix</i>/ec2_<i>targetId</i>_<i>reportId</i>_<i>yyyyMMdd</i>T<i>hhmm</i>Z.csv</c>
52+
/// <c>s3://AMZN-S3-DEMO-BUCKET/YOUR-OPTIONAL-S3-PREFIX/ec2_TARGETID_REPORTID_YYYYMMDDTHHMMZ.csv</c>
5353
///
5454
/// </para>
5555
///

0 commit comments

Comments
 (0)