@aws-sdk/client-ec2 3.501.0 → 3.502.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -37814,6 +37814,9 @@ var se_InstanceRequirements = /* @__PURE__ */ __name((input, context) => {
37814
37814
  entries[loc] = value;
37815
37815
  });
37816
37816
  }
37817
+ if (input[_MSPAPOOODP] != null) {
37818
+ entries[_MSPAPOOODP] = input[_MSPAPOOODP];
37819
+ }
37817
37820
  return entries;
37818
37821
  }, "se_InstanceRequirements");
37819
37822
  var se_InstanceRequirementsRequest = /* @__PURE__ */ __name((input, context) => {
@@ -37980,6 +37983,9 @@ var se_InstanceRequirementsRequest = /* @__PURE__ */ __name((input, context) =>
37980
37983
  entries[loc] = value;
37981
37984
  });
37982
37985
  }
37986
+ if (input[_MSPAPOOODP] != null) {
37987
+ entries[_MSPAPOOODP] = input[_MSPAPOOODP];
37988
+ }
37983
37989
  return entries;
37984
37990
  }, "se_InstanceRequirementsRequest");
37985
37991
  var se_InstanceRequirementsWithMetadataRequest = /* @__PURE__ */ __name((input, context) => {
@@ -56658,6 +56664,9 @@ var de_InstanceRequirements = /* @__PURE__ */ __name((output, context) => {
56658
56664
  } else if (output[_aITS] != null && output[_aITS][_i] != null) {
56659
56665
  contents[_AIT] = de_AllowedInstanceTypeSet((0, import_smithy_client.getArrayIfSingleItem)(output[_aITS][_i]), context);
56660
56666
  }
56667
+ if (output[_mSPAPOOODP] != null) {
56668
+ contents[_MSPAPOOODP] = (0, import_smithy_client.strictParseInt32)(output[_mSPAPOOODP]);
56669
+ }
56661
56670
  return contents;
56662
56671
  }, "de_InstanceRequirements");
56663
56672
  var de_InstanceSet = /* @__PURE__ */ __name((output, context) => {
@@ -68064,6 +68073,7 @@ var _MSDIH = "MaxSlotDurationInHours";
68064
68073
  var _MSDIHi = "MinSlotDurationInHours";
68065
68074
  var _MSFR = "ModifySpotFleetRequest";
68066
68075
  var _MSGR = "ModifySecurityGroupRules";
68076
+ var _MSPAPOOODP = "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice";
68067
68077
  var _MST = "ModifySnapshotTier";
68068
68078
  var _MSa = "ManagementState";
68069
68079
  var _MSo = "MoveStatus";
@@ -69910,6 +69920,7 @@ var _mPSa = "matchPathSet";
69910
69920
  var _mR = "maxResults";
69911
69921
  var _mRS = "modificationResultSet";
69912
69922
  var _mS = "messageSet";
69923
+ var _mSPAPOOODP = "maxSpotPriceAsPercentageOfOptimalOnDemandPrice";
69913
69924
  var _mSa = "managementState";
69914
69925
  var _mSai = "maintenanceStrategies";
69915
69926
  var _mSo = "moveStatus";
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
- const client_sts_1 = require("@aws-sdk/client-sts");
7
6
  const core_1 = require("@aws-sdk/core");
8
7
  const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
8
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
@@ -30,7 +29,7 @@ const getRuntimeConfig = (config) => {
30
29
  runtime: "node",
31
30
  defaultsMode,
32
31
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
33
- credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
32
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
34
33
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
35
34
  (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
36
35
  maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
@@ -36107,6 +36107,9 @@ const se_InstanceRequirements = (input, context) => {
36107
36107
  entries[loc] = value;
36108
36108
  });
36109
36109
  }
36110
+ if (input[_MSPAPOOODP] != null) {
36111
+ entries[_MSPAPOOODP] = input[_MSPAPOOODP];
36112
+ }
36110
36113
  return entries;
36111
36114
  };
36112
36115
  const se_InstanceRequirementsRequest = (input, context) => {
@@ -36272,6 +36275,9 @@ const se_InstanceRequirementsRequest = (input, context) => {
36272
36275
  entries[loc] = value;
36273
36276
  });
36274
36277
  }
36278
+ if (input[_MSPAPOOODP] != null) {
36279
+ entries[_MSPAPOOODP] = input[_MSPAPOOODP];
36280
+ }
36275
36281
  return entries;
36276
36282
  };
36277
36283
  const se_InstanceRequirementsWithMetadataRequest = (input, context) => {
@@ -55471,6 +55477,9 @@ const de_InstanceRequirements = (output, context) => {
55471
55477
  else if (output[_aITS] != null && output[_aITS][_i] != null) {
55472
55478
  contents[_AIT] = de_AllowedInstanceTypeSet(__getArrayIfSingleItem(output[_aITS][_i]), context);
55473
55479
  }
55480
+ if (output[_mSPAPOOODP] != null) {
55481
+ contents[_MSPAPOOODP] = __strictParseInt32(output[_mSPAPOOODP]);
55482
+ }
55474
55483
  return contents;
55475
55484
  };
55476
55485
  const de_InstanceSet = (output, context) => {
@@ -67628,6 +67637,7 @@ const _MSDIH = "MaxSlotDurationInHours";
67628
67637
  const _MSDIHi = "MinSlotDurationInHours";
67629
67638
  const _MSFR = "ModifySpotFleetRequest";
67630
67639
  const _MSGR = "ModifySecurityGroupRules";
67640
+ const _MSPAPOOODP = "MaxSpotPriceAsPercentageOfOptimalOnDemandPrice";
67631
67641
  const _MST = "ModifySnapshotTier";
67632
67642
  const _MSa = "ManagementState";
67633
67643
  const _MSo = "MoveStatus";
@@ -69474,6 +69484,7 @@ const _mPSa = "matchPathSet";
69474
69484
  const _mR = "maxResults";
69475
69485
  const _mRS = "modificationResultSet";
69476
69486
  const _mS = "messageSet";
69487
+ const _mSPAPOOODP = "maxSpotPriceAsPercentageOfOptimalOnDemandPrice";
69477
69488
  const _mSa = "managementState";
69478
69489
  const _mSai = "maintenanceStrategies";
69479
69490
  const _mSo = "moveStatus";
@@ -1,5 +1,4 @@
1
1
  import packageInfo from "../package.json";
2
- import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
3
2
  import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
4
3
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
5
4
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
@@ -26,7 +25,7 @@ export const getRuntimeConfig = (config) => {
26
25
  runtime: "node",
27
26
  defaultsMode,
28
27
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
29
- credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
28
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
30
29
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
31
30
  defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
32
31
  maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
@@ -159,6 +159,7 @@ declare const CreateFleetCommand_base: {
159
159
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
160
160
  * "STRING_VALUE",
161
161
  * ],
162
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
162
163
  * },
163
164
  * ImageId: "STRING_VALUE",
164
165
  * },
@@ -279,6 +280,7 @@ declare const CreateFleetCommand_base: {
279
280
  * // AllowedInstanceTypes: [ // AllowedInstanceTypeSet
280
281
  * // "STRING_VALUE",
281
282
  * // ],
283
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
282
284
  * // },
283
285
  * // ImageId: "STRING_VALUE",
284
286
  * // },
@@ -373,6 +375,7 @@ declare const CreateFleetCommand_base: {
373
375
  * // AllowedInstanceTypes: [
374
376
  * // "STRING_VALUE",
375
377
  * // ],
378
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
376
379
  * // },
377
380
  * // ImageId: "STRING_VALUE",
378
381
  * // },
@@ -284,6 +284,7 @@ declare const CreateLaunchTemplateCommand_base: {
284
284
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
285
285
  * "STRING_VALUE",
286
286
  * ],
287
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
287
288
  * },
288
289
  * PrivateDnsNameOptions: { // LaunchTemplatePrivateDnsNameOptionsRequest
289
290
  * HostnameType: "ip-name" || "resource-name",
@@ -285,6 +285,7 @@ declare const CreateLaunchTemplateVersionCommand_base: {
285
285
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
286
286
  * "STRING_VALUE",
287
287
  * ],
288
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
288
289
  * },
289
290
  * PrivateDnsNameOptions: { // LaunchTemplatePrivateDnsNameOptionsRequest
290
291
  * HostnameType: "ip-name" || "resource-name",
@@ -548,6 +549,7 @@ declare const CreateLaunchTemplateVersionCommand_base: {
548
549
  * // AllowedInstanceTypes: [ // AllowedInstanceTypeSet
549
550
  * // "STRING_VALUE",
550
551
  * // ],
552
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
551
553
  * // },
552
554
  * // PrivateDnsNameOptions: { // LaunchTemplatePrivateDnsNameOptions
553
555
  * // HostnameType: "ip-name" || "resource-name",
@@ -149,6 +149,7 @@ declare const DescribeFleetsCommand_base: {
149
149
  * // AllowedInstanceTypes: [ // AllowedInstanceTypeSet
150
150
  * // "STRING_VALUE",
151
151
  * // ],
152
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
152
153
  * // },
153
154
  * // ImageId: "STRING_VALUE",
154
155
  * // },
@@ -283,6 +284,7 @@ declare const DescribeFleetsCommand_base: {
283
284
  * // AllowedInstanceTypes: [
284
285
  * // "STRING_VALUE",
285
286
  * // ],
287
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
286
288
  * // },
287
289
  * // ImageId: "STRING_VALUE",
288
290
  * // },
@@ -377,6 +379,7 @@ declare const DescribeFleetsCommand_base: {
377
379
  * // AllowedInstanceTypes: [
378
380
  * // "STRING_VALUE",
379
381
  * // ],
382
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
380
383
  * // },
381
384
  * // ImageId: "STRING_VALUE",
382
385
  * // },
@@ -308,6 +308,7 @@ declare const DescribeLaunchTemplateVersionsCommand_base: {
308
308
  * // AllowedInstanceTypes: [ // AllowedInstanceTypeSet
309
309
  * // "STRING_VALUE",
310
310
  * // ],
311
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
311
312
  * // },
312
313
  * // PrivateDnsNameOptions: { // LaunchTemplatePrivateDnsNameOptions
313
314
  * // HostnameType: "ip-name" || "resource-name",
@@ -247,6 +247,7 @@ declare const DescribeSpotFleetRequestsCommand_base: {
247
247
  * // AllowedInstanceTypes: [ // AllowedInstanceTypeSet
248
248
  * // "STRING_VALUE",
249
249
  * // ],
250
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
250
251
  * // },
251
252
  * // },
252
253
  * // ],
@@ -332,6 +333,7 @@ declare const DescribeSpotFleetRequestsCommand_base: {
332
333
  * // AllowedInstanceTypes: [
333
334
  * // "STRING_VALUE",
334
335
  * // ],
336
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
335
337
  * // },
336
338
  * // },
337
339
  * // ],
@@ -117,6 +117,7 @@ declare const GetInstanceTypesFromInstanceRequirementsCommand_base: {
117
117
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
118
118
  * "STRING_VALUE",
119
119
  * ],
120
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
120
121
  * },
121
122
  * MaxResults: Number("int"),
122
123
  * NextToken: "STRING_VALUE",
@@ -285,6 +285,7 @@ declare const GetLaunchTemplateDataCommand_base: {
285
285
  * // AllowedInstanceTypes: [ // AllowedInstanceTypeSet
286
286
  * // "STRING_VALUE",
287
287
  * // ],
288
+ * // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
288
289
  * // },
289
290
  * // PrivateDnsNameOptions: { // LaunchTemplatePrivateDnsNameOptions
290
291
  * // HostnameType: "ip-name" || "resource-name",
@@ -124,6 +124,7 @@ declare const GetSpotPlacementScoresCommand_base: {
124
124
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
125
125
  * "STRING_VALUE",
126
126
  * ],
127
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
127
128
  * },
128
129
  * },
129
130
  * DryRun: true || false,
@@ -150,6 +150,7 @@ declare const ModifyFleetCommand_base: {
150
150
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
151
151
  * "STRING_VALUE",
152
152
  * ],
153
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
153
154
  * },
154
155
  * ImageId: "STRING_VALUE",
155
156
  * },
@@ -141,6 +141,7 @@ declare const ModifySpotFleetRequestCommand_base: {
141
141
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
142
142
  * "STRING_VALUE",
143
143
  * ],
144
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
144
145
  * },
145
146
  * },
146
147
  * ],
@@ -257,6 +257,7 @@ declare const RequestSpotFleetCommand_base: {
257
257
  * AllowedInstanceTypes: [ // AllowedInstanceTypeSet
258
258
  * "STRING_VALUE",
259
259
  * ],
260
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
260
261
  * },
261
262
  * },
262
263
  * ],
@@ -342,6 +343,7 @@ declare const RequestSpotFleetCommand_base: {
342
343
  * AllowedInstanceTypes: [
343
344
  * "STRING_VALUE",
344
345
  * ],
346
+ * MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: Number("int"),
345
347
  * },
346
348
  * },
347
349
  * ],
@@ -1650,17 +1650,25 @@ export interface InstanceRequirementsRequest {
1650
1650
  InstanceGenerations?: InstanceGeneration[];
1651
1651
  /**
1652
1652
  * @public
1653
- * <p>The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance,
1654
- * expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified
1655
- * attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance
1656
- * types priced above your threshold.</p>
1653
+ * <p>[Price protection] The price protection threshold for Spot Instances, as a percentage higher than
1654
+ * an identified Spot price. The identified Spot price is the Spot price of the lowest priced
1655
+ * current generation C, M, or R instance type with your specified attributes. If no current
1656
+ * generation C, M, or R instance type matches your attributes, then the identified Spot price
1657
+ * is from the lowest priced current generation instance types, and failing that, from the
1658
+ * lowest priced previous generation instance types that match your attributes. When Amazon EC2
1659
+ * selects instance types with your attributes, it will exclude instance types whose Spot
1660
+ * price exceeds your specified threshold.</p>
1657
1661
  * <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
1658
- * <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
1659
- * <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p>
1660
- * <note>
1661
- * <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or
1662
+ * <p>To indicate no price protection threshold, specify a high value, such as <code>999999</code>.</p>
1663
+ * <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or
1662
1664
  * <code>memory-mib</code>, the price protection threshold is applied based on the
1663
1665
  * per-vCPU or per-memory price instead of the per-instance price.</p>
1666
+ * <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p>
1667
+ * <note>
1668
+ * <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or
1669
+ * <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you
1670
+ * don't specify either, then <code>SpotMaxPricePercentageOverLowestPrice</code> is used
1671
+ * and the value for that parameter defaults to <code>100</code>.</p>
1664
1672
  * </note>
1665
1673
  * <p>Default: <code>100</code>
1666
1674
  * </p>
@@ -1668,12 +1676,14 @@ export interface InstanceRequirementsRequest {
1668
1676
  SpotMaxPricePercentageOverLowestPrice?: number;
1669
1677
  /**
1670
1678
  * @public
1671
- * <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance,
1672
- * expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified
1673
- * attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance
1674
- * types priced above your threshold.</p>
1679
+ * <p>[Price protection] The price protection threshold for On-Demand Instances, as a percentage higher than
1680
+ * an identified On-Demand price. The identified On-Demand price is the price of the lowest
1681
+ * priced current generation C, M, or R instance type with your specified attributes. When
1682
+ * Amazon EC2 selects instance types with your attributes, it will exclude instance types whose
1683
+ * price exceeds your specified threshold.</p>
1675
1684
  * <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
1676
- * <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
1685
+ * <p>To indicate no price protection threshold, specify a high value, such as
1686
+ * <code>999999</code>.</p>
1677
1687
  * <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p>
1678
1688
  * <note>
1679
1689
  * <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or
@@ -1911,6 +1921,30 @@ export interface InstanceRequirementsRequest {
1911
1921
  * <p>Default: All instance types</p>
1912
1922
  */
1913
1923
  AllowedInstanceTypes?: string[];
1924
+ /**
1925
+ * @public
1926
+ * <p>[Price protection] The price protection threshold for Spot Instances, as a percentage of an
1927
+ * identified On-Demand price. The identified On-Demand price is the price of the lowest
1928
+ * priced current generation C, M, or R instance type with your specified attributes. If no
1929
+ * current generation C, M, or R instance type matches your attributes, then the identified
1930
+ * price is from the lowest priced current generation instance types, and failing that, from
1931
+ * the lowest priced previous generation instance types that match your attributes. When Amazon EC2
1932
+ * selects instance types with your attributes, it will exclude instance types whose price
1933
+ * exceeds your specified threshold.</p>
1934
+ * <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
1935
+ * <p>To indicate no price protection threshold, specify a high value, such as
1936
+ * <code>999999</code>.</p>
1937
+ * <p>If you set <code>DesiredCapacityType</code> to <code>vcpu</code> or
1938
+ * <code>memory-mib</code>, the price protection threshold is based on the per vCPU or per
1939
+ * memory price instead of the per instance price.</p>
1940
+ * <note>
1941
+ * <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or
1942
+ * <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you
1943
+ * don't specify either, then <code>SpotMaxPricePercentageOverLowestPrice</code> is used
1944
+ * and the value for that parameter defaults to <code>100</code>.</p>
1945
+ * </note>
1946
+ */
1947
+ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice?: number;
1914
1948
  }
1915
1949
  /**
1916
1950
  * @public
@@ -2875,17 +2909,26 @@ export interface InstanceRequirements {
2875
2909
  InstanceGenerations?: InstanceGeneration[];
2876
2910
  /**
2877
2911
  * @public
2878
- * <p>The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance,
2879
- * expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified
2880
- * attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance
2881
- * types priced above your threshold.</p>
2912
+ * <p>[Price protection] The price protection threshold for Spot Instances, as a percentage higher than
2913
+ * an identified Spot price. The identified Spot price is the Spot price of the lowest priced
2914
+ * current generation C, M, or R instance type with your specified attributes. If no current
2915
+ * generation C, M, or R instance type matches your attributes, then the identified Spot price
2916
+ * is from the lowest priced current generation instance types, and failing that, from the
2917
+ * lowest priced previous generation instance types that match your attributes. When Amazon EC2
2918
+ * selects instance types with your attributes, it will exclude instance types whose Spot
2919
+ * price exceeds your specified threshold.</p>
2882
2920
  * <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
2883
- * <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
2921
+ * <p>To indicate no price protection threshold, specify a high value, such as
2922
+ * <code>999999</code>.</p>
2923
+ * <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or
2924
+ * <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU
2925
+ * or per-memory price instead of the per-instance price.</p>
2884
2926
  * <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p>
2885
2927
  * <note>
2886
- * <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or
2887
- * <code>memory-mib</code>, the price protection threshold is applied based on the
2888
- * per-vCPU or per-memory price instead of the per-instance price.</p>
2928
+ * <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or
2929
+ * <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you
2930
+ * don't specify either, then <code>SpotMaxPricePercentageOverLowestPrice</code> is used
2931
+ * and the value for that parameter defaults to <code>100</code>.</p>
2889
2932
  * </note>
2890
2933
  * <p>Default: <code>100</code>
2891
2934
  * </p>
@@ -2893,10 +2936,11 @@ export interface InstanceRequirements {
2893
2936
  SpotMaxPricePercentageOverLowestPrice?: number;
2894
2937
  /**
2895
2938
  * @public
2896
- * <p>The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance,
2897
- * expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified
2898
- * attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance
2899
- * types priced above your threshold.</p>
2939
+ * <p>[Price protection] The price protection threshold for On-Demand Instances, as a percentage higher
2940
+ * than an identified On-Demand price. The identified On-Demand price is the price of the
2941
+ * lowest priced current generation C, M, or R instance type with your specified attributes.
2942
+ * When Amazon EC2 selects instance types with your attributes, it will exclude instance types
2943
+ * whose price exceeds your specified threshold.</p>
2900
2944
  * <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
2901
2945
  * <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
2902
2946
  * <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p>
@@ -3136,6 +3180,30 @@ export interface InstanceRequirements {
3136
3180
  * <p>Default: All instance types</p>
3137
3181
  */
3138
3182
  AllowedInstanceTypes?: string[];
3183
+ /**
3184
+ * @public
3185
+ * <p>[Price protection] The price protection threshold for Spot Instances, as a percentage of an
3186
+ * identified On-Demand price. The identified On-Demand price is the price of the lowest
3187
+ * priced current generation C, M, or R instance type with your specified attributes. If no
3188
+ * current generation C, M, or R instance type matches your attributes, then the identified
3189
+ * price is from the lowest priced current generation instance types, and failing that, from
3190
+ * the lowest priced previous generation instance types that match your attributes. When Amazon EC2
3191
+ * selects instance types with your attributes, it will exclude instance types whose price
3192
+ * exceeds your specified threshold.</p>
3193
+ * <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
3194
+ * <p>To indicate no price protection threshold, specify a high value, such as
3195
+ * <code>999999</code>.</p>
3196
+ * <p>If you set <code>DesiredCapacityType</code> to <code>vcpu</code> or
3197
+ * <code>memory-mib</code>, the price protection threshold is based on the per vCPU or per
3198
+ * memory price instead of the per instance price.</p>
3199
+ * <note>
3200
+ * <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or
3201
+ * <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you
3202
+ * don't specify either, then <code>SpotMaxPricePercentageOverLowestPrice</code> is used
3203
+ * and the value for that parameter defaults to <code>100</code>.</p>
3204
+ * </note>
3205
+ */
3206
+ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice?: number;
3139
3207
  }
3140
3208
  /**
3141
3209
  * @public
@@ -7,7 +7,7 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
7
7
  runtime: string;
8
8
  defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
9
9
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
10
- credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
10
+ credentialDefaultProvider: (init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit | undefined) => import("@smithy/types").MemoizedProvider<import("@smithy/types").AwsCredentialIdentity>;
11
11
  defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
12
12
  maxAttempts: number | import("@smithy/types").Provider<number>;
13
13
  region: string | import("@smithy/types").Provider<string>;
@@ -434,6 +434,7 @@ export interface InstanceRequirementsRequest {
434
434
  AcceleratorTotalMemoryMiB?: AcceleratorTotalMemoryMiBRequest;
435
435
  NetworkBandwidthGbps?: NetworkBandwidthGbpsRequest;
436
436
  AllowedInstanceTypes?: string[];
437
+ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice?: number;
437
438
  }
438
439
  export interface Placement {
439
440
  AvailabilityZone?: string;
@@ -622,6 +623,7 @@ export interface InstanceRequirements {
622
623
  AcceleratorTotalMemoryMiB?: AcceleratorTotalMemoryMiB;
623
624
  NetworkBandwidthGbps?: NetworkBandwidthGbps;
624
625
  AllowedInstanceTypes?: string[];
626
+ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice?: number;
625
627
  }
626
628
  export interface PlacementResponse {
627
629
  GroupName?: string;
@@ -7,8 +7,12 @@ export declare const getRuntimeConfig: (config: EC2ClientConfig) => {
7
7
  >;
8
8
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
9
9
  credentialDefaultProvider: (
10
- input: any
11
- ) => import("@smithy/types").AwsCredentialIdentityProvider;
10
+ init?:
11
+ | import("@aws-sdk/credential-provider-node").DefaultProviderInit
12
+ | undefined
13
+ ) => import("@smithy/types").MemoizedProvider<
14
+ import("@smithy/types").AwsCredentialIdentity
15
+ >;
12
16
  defaultUserAgentProvider: import("@smithy/types").Provider<
13
17
  import("@smithy/types").UserAgent
14
18
  >;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-ec2",
3
3
  "description": "AWS SDK for JavaScript Ec2 Client for Node.js, Browser and React Native",
4
- "version": "3.501.0",
4
+ "version": "3.502.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-ec2",
@@ -20,19 +20,19 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.501.0",
23
+ "@aws-sdk/client-sts": "3.502.0",
24
24
  "@aws-sdk/core": "3.496.0",
25
- "@aws-sdk/credential-provider-node": "3.501.0",
26
- "@aws-sdk/middleware-host-header": "3.496.0",
27
- "@aws-sdk/middleware-logger": "3.496.0",
28
- "@aws-sdk/middleware-recursion-detection": "3.496.0",
29
- "@aws-sdk/middleware-sdk-ec2": "3.496.0",
30
- "@aws-sdk/middleware-user-agent": "3.496.0",
31
- "@aws-sdk/region-config-resolver": "3.496.0",
32
- "@aws-sdk/types": "3.496.0",
33
- "@aws-sdk/util-endpoints": "3.496.0",
34
- "@aws-sdk/util-user-agent-browser": "3.496.0",
35
- "@aws-sdk/util-user-agent-node": "3.496.0",
25
+ "@aws-sdk/credential-provider-node": "3.502.0",
26
+ "@aws-sdk/middleware-host-header": "3.502.0",
27
+ "@aws-sdk/middleware-logger": "3.502.0",
28
+ "@aws-sdk/middleware-recursion-detection": "3.502.0",
29
+ "@aws-sdk/middleware-sdk-ec2": "3.502.0",
30
+ "@aws-sdk/middleware-user-agent": "3.502.0",
31
+ "@aws-sdk/region-config-resolver": "3.502.0",
32
+ "@aws-sdk/types": "3.502.0",
33
+ "@aws-sdk/util-endpoints": "3.502.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.502.0",
35
+ "@aws-sdk/util-user-agent-node": "3.502.0",
36
36
  "@smithy/config-resolver": "^2.1.1",
37
37
  "@smithy/core": "^1.3.1",
38
38
  "@smithy/fetch-http-handler": "^2.4.1",