Skip to content

Commit

Permalink
feat(client-ec2): This release updates the documentation for Instance…
Browse files Browse the repository at this point in the history
…InterruptionBehavior and HibernationOptionsRequest to more accurately describe the behavior of these two parameters when using Spot hibernation.
  • Loading branch information
awstools committed Oct 24, 2023
1 parent 2c3ba68 commit 4e920f1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
7 changes: 4 additions & 3 deletions clients/client-ec2/src/models/models_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10400,9 +10400,10 @@ export interface DescribeSpotPriceHistoryRequest {
* <li>
* <p>
* <code>timestamp</code> - The time stamp of the Spot price history, in UTC format
* (for example,
* <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).
* You can use wildcards (* and ?). Greater than or less than comparison is not
* (for example, <i>ddd MMM dd
* HH</i>:<i>mm</i>:<i>ss</i> UTC
* <i>YYYY</i>). You can use wildcards (<code>*</code> and
* <code>?</code>). Greater than or less than comparison is not
* supported.</p>
* </li>
* </ul>
Expand Down
32 changes: 30 additions & 2 deletions clients/client-ec2/src/models/models_7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ export interface HibernationOptionsRequest {
/**
* @public
* <p>Set to <code>true</code> to enable your instance for hibernation.</p>
* <p>For Spot Instances, if you set <code>Configured</code> to <code>true</code>, either
* omit the <code>InstanceInterruptionBehavior</code> parameter (for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotMarketOptions.html">
* <code>SpotMarketOptions</code>
* </a>), or set it to
* <code>hibernate</code>. When <code>Configured</code> is true:</p>
* <ul>
* <li>
* <p>If you omit <code>InstanceInterruptionBehavior</code>, it defaults to
* <code>hibernate</code>.</p>
* </li>
* <li>
* <p>If you set <code>InstanceInterruptionBehavior</code> to a value other than
* <code>hibernate</code>, you'll get an error.</p>
* </li>
* </ul>
* <p>Default: <code>false</code>
* </p>
*/
Expand Down Expand Up @@ -129,8 +144,21 @@ export interface SpotMarketOptions {

/**
* @public
* <p>The behavior when a Spot Instance is interrupted. The default is
* <code>terminate</code>.</p>
* <p>The behavior when a Spot Instance is interrupted.</p>
* <p>If <code>Configured</code> (for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html">
* <code>HibernationOptions</code>
* </a>) is set to <code>true</code>, the
* <code>InstanceInterruptionBehavior</code> parameter is automatically set to
* <code>hibernate</code>. If you set it to <code>stop</code> or
* <code>terminate</code>, you'll get an error.</p>
* <p>If <code>Configured</code> (for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html">
* <code>HibernationOptions</code>
* </a>) is set to <code>false</code> or
* <code>null</code>, the <code>InstanceInterruptionBehavior</code> parameter is
* automatically set to <code>terminate</code>. You can also set it to <code>stop</code> or
* <code>hibernate</code>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/interruption-behavior.html">Interruption
* behavior</a> in the <i>Amazon EC2 User Guide</i>.</p>
*/
InstanceInterruptionBehavior?: InstanceInterruptionBehavior;
}
Expand Down
8 changes: 4 additions & 4 deletions codegen/sdk-codegen/aws-models/ec2.json
Original file line number Diff line number Diff line change
Expand Up @@ -36359,7 +36359,7 @@
"Filters": {
"target": "com.amazonaws.ec2#FilterList",
"traits": {
"smithy.api#documentation": "<p>The filters.</p>\n <ul>\n <li>\n <p>\n <code>availability-zone</code> - The Availability Zone for which prices should\n be returned.</p>\n </li>\n <li>\n <p>\n <code>instance-type</code> - The type of instance (for example,\n <code>m3.medium</code>).</p>\n </li>\n <li>\n <p>\n <code>product-description</code> - The product description for the Spot price\n (<code>Linux/UNIX</code> | <code>Red Hat Enterprise Linux</code> |\n <code>SUSE Linux</code> | <code>Windows</code> | <code>Linux/UNIX (Amazon\n VPC)</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> |\n <code>SUSE Linux (Amazon VPC)</code> | <code>Windows (Amazon\n VPC)</code>).</p>\n </li>\n <li>\n <p>\n <code>spot-price</code> - The Spot price. The value must match exactly (or use\n wildcards; greater than or less than comparison is not supported).</p>\n </li>\n <li>\n <p>\n <code>timestamp</code> - The time stamp of the Spot price history, in UTC format\n (for example,\n <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).\n You can use wildcards (* and ?). Greater than or less than comparison is not\n supported.</p>\n </li>\n </ul>",
"smithy.api#documentation": "<p>The filters.</p>\n <ul>\n <li>\n <p>\n <code>availability-zone</code> - The Availability Zone for which prices should\n be returned.</p>\n </li>\n <li>\n <p>\n <code>instance-type</code> - The type of instance (for example,\n <code>m3.medium</code>).</p>\n </li>\n <li>\n <p>\n <code>product-description</code> - The product description for the Spot price\n (<code>Linux/UNIX</code> | <code>Red Hat Enterprise Linux</code> |\n <code>SUSE Linux</code> | <code>Windows</code> | <code>Linux/UNIX (Amazon\n VPC)</code> | <code>Red Hat Enterprise Linux (Amazon VPC)</code> |\n <code>SUSE Linux (Amazon VPC)</code> | <code>Windows (Amazon\n VPC)</code>).</p>\n </li>\n <li>\n <p>\n <code>spot-price</code> - The Spot price. The value must match exactly (or use\n wildcards; greater than or less than comparison is not supported).</p>\n </li>\n <li>\n <p>\n <code>timestamp</code> - The time stamp of the Spot price history, in UTC format\n (for example, <i>ddd MMM dd\n HH</i>:<i>mm</i>:<i>ss</i> UTC\n <i>YYYY</i>). You can use wildcards (<code>*</code> and\n <code>?</code>). Greater than or less than comparison is not\n supported.</p>\n </li>\n </ul>",
"smithy.api#xmlName": "Filter"
}
},
Expand Down Expand Up @@ -51050,7 +51050,7 @@
"target": "com.amazonaws.ec2#SpotPlacementScores",
"traits": {
"aws.protocols#ec2QueryName": "SpotPlacementScoreSet",
"smithy.api#documentation": "<p>The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale\n from 1 to 10. Each score
 reflects how likely it is that each Region or Availability Zone\n will succeed at fulfilling the specified target capacity
 <i>at the time of the Spot\n placement score request</i>. A score of <code>10</code> means that your Spot\n capacity request is highly likely to succeed in that Region or Availability Zone. </p>\n <p>If you request a Spot placement score for Regions, a high score assumes that your fleet\n request will be configured to use all Availability Zones and the\n <code>capacity-optimized</code> allocation strategy. If you request a Spot placement\n score for Availability Zones, a high score assumes that your fleet request will be\n configured to use a single Availability Zone and the <code>capacity-optimized</code>\n allocation strategy.</p>\n <p>Different
 Regions or Availability Zones might return the same score.</p>\n <note>\n <p>The Spot placement score serves as a recommendation only. No score guarantees that your\n Spot request will be fully or partially fulfilled.</p>\n </note>",
"smithy.api#documentation": "<p>The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale\n from 1 to 10. Each score\u2028 reflects how likely it is that each Region or Availability Zone\n will succeed at fulfilling the specified target capacity\u2028 <i>at the time of the Spot\n placement score request</i>. A score of <code>10</code> means that your Spot\n capacity request is highly likely to succeed in that Region or Availability Zone. </p>\n <p>If you request a Spot placement score for Regions, a high score assumes that your fleet\n request will be configured to use all Availability Zones and the\n <code>capacity-optimized</code> allocation strategy. If you request a Spot placement\n score for Availability Zones, a high score assumes that your fleet request will be\n configured to use a single Availability Zone and the <code>capacity-optimized</code>\n allocation strategy.</p>\n <p>Different\u2028 Regions or Availability Zones might return the same score.</p>\n <note>\n <p>The Spot placement score serves as a recommendation only. No score guarantees that your\n Spot request will be fully or partially fulfilled.</p>\n </note>",
"smithy.api#xmlName": "spotPlacementScoreSet"
}
},
Expand Down Expand Up @@ -52269,7 +52269,7 @@
"Configured": {
"target": "com.amazonaws.ec2#Boolean",
"traits": {
"smithy.api#documentation": "<p>Set to <code>true</code> to enable your instance for hibernation.</p>\n <p>Default: <code>false</code>\n </p>"
"smithy.api#documentation": "<p>Set to <code>true</code> to enable your instance for hibernation.</p>\n <p>For Spot Instances, if you set <code>Configured</code> to <code>true</code>, either\n omit the <code>InstanceInterruptionBehavior</code> parameter (for <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotMarketOptions.html\">\n <code>SpotMarketOptions</code>\n </a>), or set it to\n <code>hibernate</code>. When <code>Configured</code> is true:</p>\n <ul>\n <li>\n <p>If you omit <code>InstanceInterruptionBehavior</code>, it defaults to\n <code>hibernate</code>.</p>\n </li>\n <li>\n <p>If you set <code>InstanceInterruptionBehavior</code> to a value other than\n <code>hibernate</code>, you'll get an error.</p>\n </li>\n </ul>\n <p>Default: <code>false</code>\n </p>"
}
}
},
Expand Down Expand Up @@ -91470,7 +91470,7 @@
"InstanceInterruptionBehavior": {
"target": "com.amazonaws.ec2#InstanceInterruptionBehavior",
"traits": {
"smithy.api#documentation": "<p>The behavior when a Spot Instance is interrupted. The default is\n <code>terminate</code>.</p>"
"smithy.api#documentation": "<p>The behavior when a Spot Instance is interrupted.</p>\n <p>If <code>Configured</code> (for <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html\">\n <code>HibernationOptions</code>\n </a>) is set to <code>true</code>, the\n <code>InstanceInterruptionBehavior</code> parameter is automatically set to\n <code>hibernate</code>. If you set it to <code>stop</code> or\n <code>terminate</code>, you'll get an error.</p>\n <p>If <code>Configured</code> (for <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html\">\n <code>HibernationOptions</code>\n </a>) is set to <code>false</code> or\n <code>null</code>, the <code>InstanceInterruptionBehavior</code> parameter is\n automatically set to <code>terminate</code>. You can also set it to <code>stop</code> or\n <code>hibernate</code>.</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/interruption-behavior.html\">Interruption\n behavior</a> in the <i>Amazon EC2 User Guide</i>.</p>"
}
}
},
Expand Down

0 comments on commit 4e920f1

Please sign in to comment.