Skip to content

Commit

Permalink
This release changes the CreateFleet CLI and SDK's such that if you d…
Browse files Browse the repository at this point in the history
…o not specify a client token, a randomly generated token is used for the request to ensure idempotency.
  • Loading branch information
aws-sdk-dotnet-automation committed Jan 28, 2025
1 parent 9ae8931 commit 6331051
Show file tree
Hide file tree
Showing 19 changed files with 274 additions and 44 deletions.
5 changes: 4 additions & 1 deletion generator/ServiceModels/ec2/ec2-2016-11-15.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -11509,7 +11509,10 @@
],
"members":{
"DryRun":{"shape":"Boolean"},
"ClientToken":{"shape":"String"},
"ClientToken":{
"shape":"String",
"idempotencyToken":true
},
"SpotOptions":{"shape":"SpotOptionsRequest"},
"OnDemandOptions":{"shape":"OnDemandOptionsRequest"},
"ExcessCapacityTerminationPolicy":{"shape":"FleetExcessCapacityTerminationPolicy"},
Expand Down
18 changes: 9 additions & 9 deletions generator/ServiceModels/ec2/ec2-2016-11-15.docs.json

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions generator/ServiceModels/ec2/ec2-2016-11-15.normal.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ namespace Amazon.EC2.Model
/// elapsed. You can't cancel a future-dated Capacity Reservation during the commitment
/// duration.
/// </para>
/// </li> </ul>
/// </li> </ul> <note>
/// <para>
/// You can't modify or cancel a Capacity Block. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-blocks.html">Capacity
/// Blocks for ML</a>.
/// </para>
/// </note>
/// <para>
/// If a future-dated Capacity Reservation enters the <c>delayed</c> state, the commitment
/// duration is waived, and you can cancel it as soon as it enters the <c>active</c> state.
Expand Down
7 changes: 6 additions & 1 deletion sdk/src/Services/EC2/Generated/Model/CreateFleetRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ public partial class CreateFleetRequest : AmazonEC2Request
/// Gets and sets the property ClientToken.
/// <para>
/// Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// request. If you do not specify a client token, a randomly generated token is used
/// for the request to ensure idempotency.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring
/// idempotency</a>.
/// </para>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ namespace Amazon.EC2.Model
/// Describes Capacity Block offerings available for purchase in the Amazon Web Services
/// Region that you're currently using. With Capacity Blocks, you purchase a specific
/// instance type for a period of time.
///
///
/// <para>
/// To search for an available Capacity Block offering, you specify a reservation duration
/// and instance count. You must select one of the following options.
/// </para>
/// <ul> <li>
/// <para>
/// For reservation durations<b> 1-day increments up 14 days and 7-day increments up to
/// 182 days total</b>
/// </para>
/// </li> <li>
/// <para>
/// For instance count<b> 1, 2, 4, 8, 16, 32, or 64 instances</b>
/// </para>
/// </li> </ul>
/// </summary>
public partial class DescribeCapacityBlockOfferingsRequest : AmazonEC2Request
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ namespace Amazon.EC2.Model
/// </para>
/// </li> <li>
/// <para>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c> | <c>trn2.48xlarge</c>
/// | <c>trn2u.48xlarge</c>
/// </para>
/// </li> </ul> </li> </ul>
/// <para>
Expand Down
10 changes: 8 additions & 2 deletions sdk/src/Services/EC2/Generated/Model/EventInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,14 @@ internal bool IsSetEventDescription()
/// </para>
/// </li> <li>
/// <para>
/// <c>launchSpecUnusable</c> - The price in a launch specification is not valid because
/// it is below the Spot price.
/// <c>launchSpecUnusable</c> - The price specified in a launch specification is not
/// valid because it is below the Spot price for the requested Spot pools.
/// </para>
///
/// <para>
/// Note: Even if a fleet with the <c>maintain</c> request type is in the process of being
/// canceled, it may still publish a <c>launchSpecUnusable</c> event. This does not mean
/// that the canceled fleet is attempting to launch a new instance.
/// </para>
/// </li> <li>
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ internal bool IsSetEbs()
/// <summary>
/// Gets and sets the property NoDevice.
/// <para>
/// suppress the specified device included in the block device mapping.
/// Suppresses the specified device included in the block device mapping.
/// </para>
/// </summary>
public string NoDevice
Expand Down
6 changes: 5 additions & 1 deletion sdk/src/Services/EC2/Generated/Model/InstanceRequirements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,15 @@ internal bool IsSetAcceleratorTotalMemoryMiB()
/// </para>
/// <ul> <li>
/// <para>
/// For instance types with FPGA accelerators, specify <c>fpga</c>.
/// </para>
/// </li> <li>
/// <para>
/// For instance types with GPU accelerators, specify <c>gpu</c>.
/// </para>
/// </li> <li>
/// <para>
/// For instance types with FPGA accelerators, specify <c>fpga</c>.
/// For instance types with Inference accelerators, specify <c>inference</c>.
/// </para>
/// </li> </ul>
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,15 @@ internal bool IsSetAcceleratorTotalMemoryMiB()
/// </para>
/// <ul> <li>
/// <para>
/// To include instance types with GPU hardware, specify <c>gpu</c>.
/// For instance types with FPGA accelerators, specify <c>fpga</c>.
/// </para>
/// </li> <li>
/// <para>
/// To include instance types with FPGA hardware, specify <c>fpga</c>.
/// For instance types with GPU accelerators, specify <c>gpu</c>.
/// </para>
/// </li> <li>
/// <para>
/// For instance types with Inference accelerators, specify <c>inference</c>.
/// </para>
/// </li> </ul>
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public IRequest Marshall(CreateFleetRequest publicRequest)
{
request.Parameters.Add("ClientToken", StringUtils.FromString(publicRequest.ClientToken));
}
else if(!(publicRequest.IsSetClientToken()))
{
request.Parameters.Add("ClientToken", StringUtils.FromString(Guid.NewGuid().ToString()));
}
if(publicRequest.IsSetContext())
{
request.Parameters.Add("Context", StringUtils.FromString(publicRequest.Context));
Expand Down
5 changes: 5 additions & 0 deletions sdk/src/Services/EC2/Generated/Model/SpotMarketOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ internal bool IsSetInstanceInterruptionBehavior()
/// If you specify a maximum price, your Spot Instances will be interrupted more frequently
/// than if you do not specify this parameter.
/// </para>
///
/// <para>
/// If you specify a maximum price, it must be more than USD $0.001. Specifying a value
/// below USD $0.001 will result in an <c>InvalidParameterValue</c> error message.
/// </para>
/// </important>
/// </summary>
public string MaxPrice
Expand Down
26 changes: 24 additions & 2 deletions sdk/src/Services/EC2/Generated/_bcl35/AmazonEC2Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,12 @@ public virtual CancelBundleTaskResponse EndCancelBundleTask(IAsyncResult asyncRe
/// elapsed. You can't cancel a future-dated Capacity Reservation during the commitment
/// duration.
/// </para>
/// </li> </ul>
/// </li> </ul> <note>
/// <para>
/// You can't modify or cancel a Capacity Block. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-blocks.html">Capacity
/// Blocks for ML</a>.
/// </para>
/// </note>
/// <para>
/// If a future-dated Capacity Reservation enters the <c>delayed</c> state, the commitment
/// duration is waived, and you can cancel it as soon as it enters the <c>active</c> state.
Expand Down Expand Up @@ -15450,6 +15455,22 @@ public virtual DescribeCapacityBlockExtensionOfferingsResponse EndDescribeCapaci
/// Describes Capacity Block offerings available for purchase in the Amazon Web Services
/// Region that you're currently using. With Capacity Blocks, you purchase a specific
/// instance type for a period of time.
///
///
/// <para>
/// To search for an available Capacity Block offering, you specify a reservation duration
/// and instance count. You must select one of the following options.
/// </para>
/// <ul> <li>
/// <para>
/// For reservation durations<b> 1-day increments up 14 days and 7-day increments up to
/// 182 days total</b>
/// </para>
/// </li> <li>
/// <para>
/// For instance count<b> 1, 2, 4, 8, 16, 32, or 64 instances</b>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCapacityBlockOfferings service method.</param>
///
Expand Down Expand Up @@ -18549,7 +18570,8 @@ public virtual DescribeInstanceStatusResponse EndDescribeInstanceStatus(IAsyncRe
/// </para>
/// </li> <li>
/// <para>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c> | <c>trn2.48xlarge</c>
/// | <c>trn2u.48xlarge</c>
/// </para>
/// </li> </ul> </li> </ul>
/// <para>
Expand Down
26 changes: 24 additions & 2 deletions sdk/src/Services/EC2/Generated/_bcl35/IAmazonEC2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,12 @@ public partial interface IAmazonEC2 : IAmazonService, IDisposable
/// elapsed. You can't cancel a future-dated Capacity Reservation during the commitment
/// duration.
/// </para>
/// </li> </ul>
/// </li> </ul> <note>
/// <para>
/// You can't modify or cancel a Capacity Block. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-blocks.html">Capacity
/// Blocks for ML</a>.
/// </para>
/// </note>
/// <para>
/// If a future-dated Capacity Reservation enters the <c>delayed</c> state, the commitment
/// duration is waived, and you can cancel it as soon as it enters the <c>active</c> state.
Expand Down Expand Up @@ -11850,6 +11855,22 @@ public partial interface IAmazonEC2 : IAmazonService, IDisposable
/// Describes Capacity Block offerings available for purchase in the Amazon Web Services
/// Region that you're currently using. With Capacity Blocks, you purchase a specific
/// instance type for a period of time.
///
///
/// <para>
/// To search for an available Capacity Block offering, you specify a reservation duration
/// and instance count. You must select one of the following options.
/// </para>
/// <ul> <li>
/// <para>
/// For reservation durations<b> 1-day increments up 14 days and 7-day increments up to
/// 182 days total</b>
/// </para>
/// </li> <li>
/// <para>
/// For instance count<b> 1, 2, 4, 8, 16, 32, or 64 instances</b>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCapacityBlockOfferings service method.</param>
///
Expand Down Expand Up @@ -14284,7 +14305,8 @@ public partial interface IAmazonEC2 : IAmazonService, IDisposable
/// </para>
/// </li> <li>
/// <para>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c> | <c>trn2.48xlarge</c>
/// | <c>trn2u.48xlarge</c>
/// </para>
/// </li> </ul> </li> </ul>
/// <para>
Expand Down
52 changes: 48 additions & 4 deletions sdk/src/Services/EC2/Generated/_bcl45/AmazonEC2Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3202,7 +3202,12 @@ public virtual CancelBundleTaskResponse CancelBundleTask(CancelBundleTaskRequest
/// elapsed. You can't cancel a future-dated Capacity Reservation during the commitment
/// duration.
/// </para>
/// </li> </ul>
/// </li> </ul> <note>
/// <para>
/// You can't modify or cancel a Capacity Block. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-blocks.html">Capacity
/// Blocks for ML</a>.
/// </para>
/// </note>
/// <para>
/// If a future-dated Capacity Reservation enters the <c>delayed</c> state, the commitment
/// duration is waived, and you can cancel it as soon as it enters the <c>active</c> state.
Expand Down Expand Up @@ -3248,7 +3253,12 @@ public virtual CancelCapacityReservationResponse CancelCapacityReservation(Cance
/// elapsed. You can't cancel a future-dated Capacity Reservation during the commitment
/// duration.
/// </para>
/// </li> </ul>
/// </li> </ul> <note>
/// <para>
/// You can't modify or cancel a Capacity Block. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-blocks.html">Capacity
/// Blocks for ML</a>.
/// </para>
/// </note>
/// <para>
/// If a future-dated Capacity Reservation enters the <c>delayed</c> state, the commitment
/// duration is waived, and you can cancel it as soon as it enters the <c>active</c> state.
Expand Down Expand Up @@ -14626,6 +14636,22 @@ public virtual DescribeCapacityBlockExtensionOfferingsResponse DescribeCapacityB
/// Describes Capacity Block offerings available for purchase in the Amazon Web Services
/// Region that you're currently using. With Capacity Blocks, you purchase a specific
/// instance type for a period of time.
///
///
/// <para>
/// To search for an available Capacity Block offering, you specify a reservation duration
/// and instance count. You must select one of the following options.
/// </para>
/// <ul> <li>
/// <para>
/// For reservation durations<b> 1-day increments up 14 days and 7-day increments up to
/// 182 days total</b>
/// </para>
/// </li> <li>
/// <para>
/// For instance count<b> 1, 2, 4, 8, 16, 32, or 64 instances</b>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCapacityBlockOfferings service method.</param>
///
Expand All @@ -14645,6 +14671,22 @@ public virtual DescribeCapacityBlockOfferingsResponse DescribeCapacityBlockOffer
/// Describes Capacity Block offerings available for purchase in the Amazon Web Services
/// Region that you're currently using. With Capacity Blocks, you purchase a specific
/// instance type for a period of time.
///
///
/// <para>
/// To search for an available Capacity Block offering, you specify a reservation duration
/// and instance count. You must select one of the following options.
/// </para>
/// <ul> <li>
/// <para>
/// For reservation durations<b> 1-day increments up 14 days and 7-day increments up to
/// 182 days total</b>
/// </para>
/// </li> <li>
/// <para>
/// For instance count<b> 1, 2, 4, 8, 16, 32, or 64 instances</b>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCapacityBlockOfferings service method.</param>
/// <param name="cancellationToken">
Expand Down Expand Up @@ -17735,7 +17777,8 @@ public virtual DescribeInstanceStatusResponse DescribeInstanceStatus(DescribeIns
/// </para>
/// </li> <li>
/// <para>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c> | <c>trn2.48xlarge</c>
/// | <c>trn2u.48xlarge</c>
/// </para>
/// </li> </ul> </li> </ul>
/// <para>
Expand Down Expand Up @@ -17796,7 +17839,8 @@ public virtual DescribeInstanceTopologyResponse DescribeInstanceTopology(Describ
/// </para>
/// </li> <li>
/// <para>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c>
/// <c>trn1.2xlarge</c> | <c>trn1.32xlarge</c> | <c>trn1n.32xlarge</c> | <c>trn2.48xlarge</c>
/// | <c>trn2u.48xlarge</c>
/// </para>
/// </li> </ul> </li> </ul>
/// <para>
Expand Down
Loading

0 comments on commit 6331051

Please sign in to comment.