Skip to content

Commit 04a3d1a

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 1c290bf commit 04a3d1a

16 files changed

+305
-136
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
@@ -344,9 +344,8 @@ internal bool IsSetEphemeralStorage()
344344
/// <note>
345345
/// <para>
346346
/// You can request future-dated Capacity Reservations for an instance count with a minimum
347-
/// of 100 vCPUs. For example, if you request a future-dated Capacity Reservation for
348-
/// <c>m5.xlarge</c> instances, you must request at least 25 instances (<i>25 * m5.xlarge
349-
/// = 100 vCPUs</i>).
347+
/// of 64 vCPUs. For example, if you request a future-dated Capacity Reservation for <c>m5.xlarge</c>
348+
/// instances, you must request at least 25 instances (<i>16 * m5.xlarge = 64 vCPUs</i>).
350349
/// </para>
351350
/// </note>
352351
/// <para>
@@ -434,7 +433,7 @@ internal bool IsSetInstancePlatform()
434433
/// <note>
435434
/// <para>
436435
/// You can request future-dated Capacity Reservations for instance types in the C, M,
437-
/// R, I, and T instance families only.
436+
/// R, I, T, and G instance families only.
438437
/// </para>
439438
/// </note>
440439
/// <para>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ internal bool IsSetDryRun()
139139
/// </para>
140140
/// </li> <li>
141141
/// <para>
142-
/// <c>free-tier-eligible</c> - Indicates whether the instance type is eligible to use
143-
/// in the free tier (<c>true</c> | <c>false</c>).
142+
/// <c>free-tier-eligible</c> - A Boolean that indicates whether this instance type can
143+
/// be used under the Amazon Web Services Free Tier (<c>true</c> | <c>false</c>).
144144
/// </para>
145145
/// </li> <li>
146146
/// <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
@@ -85,6 +85,10 @@ public IRequest Marshall(StopInstancesRequest publicRequest)
8585
}
8686
}
8787
}
88+
if(publicRequest.IsSetSkipOsShutdown())
89+
{
90+
request.Parameters.Add("SkipOsShutdown", StringUtils.FromBool(publicRequest.SkipOsShutdown));
91+
}
8892
}
8993
return request;
9094
}

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

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

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

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ internal bool IsSetCapacityReservationSpecification()
242242
/// </para>
243243
///
244244
/// <para>
245-
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
246-
/// Idempotency</a>.
245+
/// For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring
246+
/// idempotency in Amazon EC2 API requests</a>.
247247
/// </para>
248248
///
249249
/// <para>
@@ -315,8 +315,8 @@ internal bool IsSetCreditSpecification()
315315
/// Gets and sets the property DisableApiStop.
316316
/// <para>
317317
/// Indicates whether an instance is enabled for stop protection. For more information,
318-
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection">Stop
319-
/// protection</a>.
318+
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html">Enable
319+
/// stop protection for your EC2 instances</a>.
320320
/// </para>
321321
/// </summary>
322322
public bool? DisableApiStop
@@ -486,9 +486,8 @@ internal bool IsSetEnablePrimaryIpv6()
486486
/// Gets and sets the property EnclaveOptions.
487487
/// <para>
488488
/// Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
489-
/// For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html">What
490-
/// is Amazon Web Services Nitro Enclaves?</a> in the <i>Amazon Web Services Nitro Enclaves
491-
/// User Guide</i>.
489+
/// For more information, see <a href="https://docs.aws.amazon.com/enclaves/latest/user/">Amazon
490+
/// Web Services Nitro Enclaves User Guide</a>.
492491
/// </para>
493492
///
494493
/// <para>
@@ -618,8 +617,8 @@ internal bool IsSetInstanceMarketOptions()
618617
/// <summary>
619618
/// Gets and sets the property InstanceType.
620619
/// <para>
621-
/// The instance type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Amazon
622-
/// EC2 instance types</a> in the <i>Amazon EC2 User Guide</i>.
620+
/// The instance type. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/instance-types.html">Amazon
621+
/// EC2 Instance Types Guide</a>.
623622
/// </para>
624623
/// </summary>
625624
public InstanceType InstanceType
@@ -717,8 +716,8 @@ internal bool IsSetKernelId()
717716
/// <summary>
718717
/// Gets and sets the property KeyName.
719718
/// <para>
720-
/// 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>
721-
/// or <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html">ImportKeyPair</a>.
719+
/// 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
720+
/// a key pair for your EC2 instance</a>.
722721
/// </para>
723722
/// <important>
724723
/// <para>
@@ -829,8 +828,8 @@ internal bool IsSetMaxCount()
829828
/// <summary>
830829
/// Gets and sets the property MetadataOptions.
831830
/// <para>
832-
/// 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
833-
/// metadata and user data</a>.
831+
/// 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
832+
/// the Instance Metadata Service options</a>.
834833
/// </para>
835834
/// </summary>
836835
public InstanceMetadataOptionsRequest MetadataOptions
@@ -1047,7 +1046,7 @@ internal bool IsSetRamdiskId()
10471046
/// <summary>
10481047
/// Gets and sets the property SecurityGroupIds.
10491048
/// <para>
1050-
/// 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>.
1049+
/// The IDs of the security groups.
10511050
/// </para>
10521051
///
10531052
/// <para>
@@ -1179,8 +1178,8 @@ internal bool IsSetTagSpecifications()
11791178
/// <para>
11801179
/// The user data to make available to the instance. User data must be base64-encoded.
11811180
/// Depending on the tool or SDK that you're using, the base64-encoding might be performed
1182-
/// for you. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html">Work
1183-
/// with instance user data</a>.
1181+
/// for you. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">Run
1182+
/// commands at launch using instance user data</a>.
11841183
/// </para>
11851184
/// </summary>
11861185
[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)