Skip to content

Commit 074cf4e

Browse files
author
awstools
committed
feat(client-ec2): Adds support for requesting future-dated Capacity Reservations with a minimum commitment duration, enabling IPAM for organizational units within AWS Organizations, reserving EC2 Capacity Blocks that start in 30 minutes, and extending the end date of existing Capacity Blocks.
1 parent 415d379 commit 074cf4e

File tree

67 files changed

+8711
-5983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+8711
-5983
lines changed

Diff for: clients/client-ec2/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,22 @@ DescribeByoipCidrs
20932093

20942094
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DescribeByoipCidrsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeByoipCidrsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeByoipCidrsCommandOutput/)
20952095

2096+
</details>
2097+
<details>
2098+
<summary>
2099+
DescribeCapacityBlockExtensionHistory
2100+
</summary>
2101+
2102+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DescribeCapacityBlockExtensionHistoryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityBlockExtensionHistoryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityBlockExtensionHistoryCommandOutput/)
2103+
2104+
</details>
2105+
<details>
2106+
<summary>
2107+
DescribeCapacityBlockExtensionOfferings
2108+
</summary>
2109+
2110+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DescribeCapacityBlockExtensionOfferingsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityBlockExtensionOfferingsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DescribeCapacityBlockExtensionOfferingsCommandOutput/)
2111+
20962112
</details>
20972113
<details>
20982114
<summary>
@@ -4845,6 +4861,14 @@ PurchaseCapacityBlock
48454861

48464862
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/PurchaseCapacityBlockCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/PurchaseCapacityBlockCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/PurchaseCapacityBlockCommandOutput/)
48474863

4864+
</details>
4865+
<details>
4866+
<summary>
4867+
PurchaseCapacityBlockExtension
4868+
</summary>
4869+
4870+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/PurchaseCapacityBlockExtensionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/PurchaseCapacityBlockExtensionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/PurchaseCapacityBlockExtensionCommandOutput/)
4871+
48484872
</details>
48494873
<details>
48504874
<summary>

Diff for: clients/client-ec2/src/EC2.ts

+70
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,16 @@ import {
11381138
DescribeByoipCidrsCommandInput,
11391139
DescribeByoipCidrsCommandOutput,
11401140
} from "./commands/DescribeByoipCidrsCommand";
1141+
import {
1142+
DescribeCapacityBlockExtensionHistoryCommand,
1143+
DescribeCapacityBlockExtensionHistoryCommandInput,
1144+
DescribeCapacityBlockExtensionHistoryCommandOutput,
1145+
} from "./commands/DescribeCapacityBlockExtensionHistoryCommand";
1146+
import {
1147+
DescribeCapacityBlockExtensionOfferingsCommand,
1148+
DescribeCapacityBlockExtensionOfferingsCommandInput,
1149+
DescribeCapacityBlockExtensionOfferingsCommandOutput,
1150+
} from "./commands/DescribeCapacityBlockExtensionOfferingsCommand";
11411151
import {
11421152
DescribeCapacityBlockOfferingsCommand,
11431153
DescribeCapacityBlockOfferingsCommandInput,
@@ -2834,6 +2844,11 @@ import {
28342844
PurchaseCapacityBlockCommandInput,
28352845
PurchaseCapacityBlockCommandOutput,
28362846
} from "./commands/PurchaseCapacityBlockCommand";
2847+
import {
2848+
PurchaseCapacityBlockExtensionCommand,
2849+
PurchaseCapacityBlockExtensionCommandInput,
2850+
PurchaseCapacityBlockExtensionCommandOutput,
2851+
} from "./commands/PurchaseCapacityBlockExtensionCommand";
28372852
import {
28382853
PurchaseHostReservationCommand,
28392854
PurchaseHostReservationCommandInput,
@@ -3388,6 +3403,8 @@ const commands = {
33883403
DescribeAwsNetworkPerformanceMetricSubscriptionsCommand,
33893404
DescribeBundleTasksCommand,
33903405
DescribeByoipCidrsCommand,
3406+
DescribeCapacityBlockExtensionHistoryCommand,
3407+
DescribeCapacityBlockExtensionOfferingsCommand,
33913408
DescribeCapacityBlockOfferingsCommand,
33923409
DescribeCapacityReservationBillingRequestsCommand,
33933410
DescribeCapacityReservationFleetsCommand,
@@ -3732,6 +3749,7 @@ const commands = {
37323749
ProvisionIpamPoolCidrCommand,
37333750
ProvisionPublicIpv4PoolCidrCommand,
37343751
PurchaseCapacityBlockCommand,
3752+
PurchaseCapacityBlockExtensionCommand,
37353753
PurchaseHostReservationCommand,
37363754
PurchaseReservedInstancesOfferingCommand,
37373755
PurchaseScheduledInstancesCommand,
@@ -7656,6 +7674,41 @@ export interface EC2 {
76567674
cb: (err: any, data?: DescribeByoipCidrsCommandOutput) => void
76577675
): void;
76587676

7677+
/**
7678+
* @see {@link DescribeCapacityBlockExtensionHistoryCommand}
7679+
*/
7680+
describeCapacityBlockExtensionHistory(): Promise<DescribeCapacityBlockExtensionHistoryCommandOutput>;
7681+
describeCapacityBlockExtensionHistory(
7682+
args: DescribeCapacityBlockExtensionHistoryCommandInput,
7683+
options?: __HttpHandlerOptions
7684+
): Promise<DescribeCapacityBlockExtensionHistoryCommandOutput>;
7685+
describeCapacityBlockExtensionHistory(
7686+
args: DescribeCapacityBlockExtensionHistoryCommandInput,
7687+
cb: (err: any, data?: DescribeCapacityBlockExtensionHistoryCommandOutput) => void
7688+
): void;
7689+
describeCapacityBlockExtensionHistory(
7690+
args: DescribeCapacityBlockExtensionHistoryCommandInput,
7691+
options: __HttpHandlerOptions,
7692+
cb: (err: any, data?: DescribeCapacityBlockExtensionHistoryCommandOutput) => void
7693+
): void;
7694+
7695+
/**
7696+
* @see {@link DescribeCapacityBlockExtensionOfferingsCommand}
7697+
*/
7698+
describeCapacityBlockExtensionOfferings(
7699+
args: DescribeCapacityBlockExtensionOfferingsCommandInput,
7700+
options?: __HttpHandlerOptions
7701+
): Promise<DescribeCapacityBlockExtensionOfferingsCommandOutput>;
7702+
describeCapacityBlockExtensionOfferings(
7703+
args: DescribeCapacityBlockExtensionOfferingsCommandInput,
7704+
cb: (err: any, data?: DescribeCapacityBlockExtensionOfferingsCommandOutput) => void
7705+
): void;
7706+
describeCapacityBlockExtensionOfferings(
7707+
args: DescribeCapacityBlockExtensionOfferingsCommandInput,
7708+
options: __HttpHandlerOptions,
7709+
cb: (err: any, data?: DescribeCapacityBlockExtensionOfferingsCommandOutput) => void
7710+
): void;
7711+
76597712
/**
76607713
* @see {@link DescribeCapacityBlockOfferingsCommand}
76617714
*/
@@ -13524,6 +13577,23 @@ export interface EC2 {
1352413577
cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void
1352513578
): void;
1352613579

13580+
/**
13581+
* @see {@link PurchaseCapacityBlockExtensionCommand}
13582+
*/
13583+
purchaseCapacityBlockExtension(
13584+
args: PurchaseCapacityBlockExtensionCommandInput,
13585+
options?: __HttpHandlerOptions
13586+
): Promise<PurchaseCapacityBlockExtensionCommandOutput>;
13587+
purchaseCapacityBlockExtension(
13588+
args: PurchaseCapacityBlockExtensionCommandInput,
13589+
cb: (err: any, data?: PurchaseCapacityBlockExtensionCommandOutput) => void
13590+
): void;
13591+
purchaseCapacityBlockExtension(
13592+
args: PurchaseCapacityBlockExtensionCommandInput,
13593+
options: __HttpHandlerOptions,
13594+
cb: (err: any, data?: PurchaseCapacityBlockExtensionCommandOutput) => void
13595+
): void;
13596+
1352713597
/**
1352813598
* @see {@link PurchaseHostReservationCommand}
1352913599
*/

Diff for: clients/client-ec2/src/EC2Client.ts

+18
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,14 @@ import {
814814
DescribeBundleTasksCommandOutput,
815815
} from "./commands/DescribeBundleTasksCommand";
816816
import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput } from "./commands/DescribeByoipCidrsCommand";
817+
import {
818+
DescribeCapacityBlockExtensionHistoryCommandInput,
819+
DescribeCapacityBlockExtensionHistoryCommandOutput,
820+
} from "./commands/DescribeCapacityBlockExtensionHistoryCommand";
821+
import {
822+
DescribeCapacityBlockExtensionOfferingsCommandInput,
823+
DescribeCapacityBlockExtensionOfferingsCommandOutput,
824+
} from "./commands/DescribeCapacityBlockExtensionOfferingsCommand";
817825
import {
818826
DescribeCapacityBlockOfferingsCommandInput,
819827
DescribeCapacityBlockOfferingsCommandOutput,
@@ -2031,6 +2039,10 @@ import {
20312039
PurchaseCapacityBlockCommandInput,
20322040
PurchaseCapacityBlockCommandOutput,
20332041
} from "./commands/PurchaseCapacityBlockCommand";
2042+
import {
2043+
PurchaseCapacityBlockExtensionCommandInput,
2044+
PurchaseCapacityBlockExtensionCommandOutput,
2045+
} from "./commands/PurchaseCapacityBlockExtensionCommand";
20342046
import {
20352047
PurchaseHostReservationCommandInput,
20362048
PurchaseHostReservationCommandOutput,
@@ -2492,6 +2504,8 @@ export type ServiceInputTypes =
24922504
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandInput
24932505
| DescribeBundleTasksCommandInput
24942506
| DescribeByoipCidrsCommandInput
2507+
| DescribeCapacityBlockExtensionHistoryCommandInput
2508+
| DescribeCapacityBlockExtensionOfferingsCommandInput
24952509
| DescribeCapacityBlockOfferingsCommandInput
24962510
| DescribeCapacityReservationBillingRequestsCommandInput
24972511
| DescribeCapacityReservationFleetsCommandInput
@@ -2836,6 +2850,7 @@ export type ServiceInputTypes =
28362850
| ProvisionIpamPoolCidrCommandInput
28372851
| ProvisionPublicIpv4PoolCidrCommandInput
28382852
| PurchaseCapacityBlockCommandInput
2853+
| PurchaseCapacityBlockExtensionCommandInput
28392854
| PurchaseHostReservationCommandInput
28402855
| PurchaseReservedInstancesOfferingCommandInput
28412856
| PurchaseScheduledInstancesCommandInput
@@ -3140,6 +3155,8 @@ export type ServiceOutputTypes =
31403155
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandOutput
31413156
| DescribeBundleTasksCommandOutput
31423157
| DescribeByoipCidrsCommandOutput
3158+
| DescribeCapacityBlockExtensionHistoryCommandOutput
3159+
| DescribeCapacityBlockExtensionOfferingsCommandOutput
31433160
| DescribeCapacityBlockOfferingsCommandOutput
31443161
| DescribeCapacityReservationBillingRequestsCommandOutput
31453162
| DescribeCapacityReservationFleetsCommandOutput
@@ -3484,6 +3501,7 @@ export type ServiceOutputTypes =
34843501
| ProvisionIpamPoolCidrCommandOutput
34853502
| ProvisionPublicIpv4PoolCidrCommandOutput
34863503
| PurchaseCapacityBlockCommandOutput
3504+
| PurchaseCapacityBlockExtensionCommandOutput
34873505
| PurchaseHostReservationCommandOutput
34883506
| PurchaseReservedInstancesOfferingCommandOutput
34893507
| PurchaseScheduledInstancesCommandOutput

Diff for: clients/client-ec2/src/commands/AcceptCapacityReservationBillingOwnershipCommand.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export interface AcceptCapacityReservationBillingOwnershipCommandOutput
3737
__MetadataBearer {}
3838

3939
/**
40-
* <p>Accepts a request to assign billing of the available capacity of a shared Capacity Reservation to your
41-
* account. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html">
42-
* Billing assignment for shared Amazon EC2 Capacity Reservations</a>.</p>
40+
* <p>Accepts a request to assign billing of the available capacity of a shared Capacity
41+
* Reservation to your account. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html"> Billing assignment for shared
42+
* Amazon EC2 Capacity Reservations</a>.</p>
4343
* @example
4444
* Use a bare-bones client and the command you need to make an API call.
4545
* ```javascript

Diff for: clients/client-ec2/src/commands/AssociateCapacityReservationBillingOwnerCommand.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export interface AssociateCapacityReservationBillingOwnerCommandOutput
3737
__MetadataBearer {}
3838

3939
/**
40-
* <p>Initiates a request to assign billing of the unused capacity of a shared Capacity Reservation to a consumer
41-
* account that is consolidated under the same Amazon Web Services organizations payer account. For more information, see
42-
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html">Billing assignment for shared
43-
* Amazon EC2 Capacity Reservations</a>.</p>
40+
* <p>Initiates a request to assign billing of the unused capacity of a shared Capacity
41+
* Reservation to a consumer account that is consolidated under the same Amazon Web Services
42+
* organizations payer account. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html">Billing assignment for shared
43+
* Amazon EC2 Capacity Reservations</a>.</p>
4444
* @example
4545
* Use a bare-bones client and the command you need to make an API call.
4646
* ```javascript

Diff for: clients/client-ec2/src/commands/CancelCapacityReservationCommand.ts

+17-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,23 @@ export interface CancelCapacityReservationCommandInput extends CancelCapacityRes
2828
export interface CancelCapacityReservationCommandOutput extends CancelCapacityReservationResult, __MetadataBearer {}
2929

3030
/**
31-
* <p>Cancels the specified Capacity Reservation, releases the reserved capacity, and changes the Capacity Reservation's state to
32-
* <code>cancelled</code>.</p>
31+
* <p>Cancels the specified Capacity Reservation, releases the reserved capacity, and changes
32+
* the Capacity Reservation's state to <code>cancelled</code>.</p>
33+
* <p>You can cancel a Capacity Reservation that is in the following states:</p>
34+
* <ul>
35+
* <li>
36+
* <p>
37+
* <code>assessing</code>
38+
* </p>
39+
* </li>
40+
* <li>
41+
* <p>
42+
* <code>active</code> and there is no commitment duration or the commitment
43+
* duration has elapsed. You can't cancel a future-dated Capacity Reservation during the commitment duration.</p>
44+
* </li>
45+
* </ul>
46+
* <p>If a future-dated Capacity Reservation enters the <code>delayed</code> state, the commitment
47+
* duration is waived, and you can cancel it as soon as it enters the <code>active</code> state.</p>
3348
* <p>Instances running in the reserved capacity continue running until you stop them. Stopped
3449
* instances that target the Capacity Reservation can no longer launch. Modify these instances to either
3550
* target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation

Diff for: clients/client-ec2/src/commands/CancelCapacityReservationFleetsCommand.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ export interface CancelCapacityReservationFleetsCommandOutput
3333
__MetadataBearer {}
3434

3535
/**
36-
* <p>Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity Reservation
37-
* Fleet, the following happens:</p>
36+
* <p>Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity
37+
* Reservation Fleet, the following happens:</p>
3838
* <ul>
3939
* <li>
40-
* <p>The Capacity Reservation Fleet's status changes to <code>cancelled</code>.</p>
40+
* <p>The Capacity Reservation Fleet's status changes to
41+
* <code>cancelled</code>.</p>
4142
* </li>
4243
* <li>
43-
* <p>The individual Capacity Reservations in the Fleet are cancelled. Instances running
44-
* in the Capacity Reservations at the time of cancelling the Fleet continue to run in
45-
* shared capacity.</p>
44+
* <p>The individual Capacity Reservations in the Fleet are cancelled. Instances
45+
* running in the Capacity Reservations at the time of cancelling the Fleet
46+
* continue to run in shared capacity.</p>
4647
* </li>
4748
* <li>
4849
* <p>The Fleet stops creating new Capacity Reservations.</p>

Diff for: clients/client-ec2/src/commands/CreateCapacityReservationBySplittingCommand.ts

+16-5
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ export interface CreateCapacityReservationBySplittingCommandOutput
3636
__MetadataBearer {}
3737

3838
/**
39-
* <p>
40-
* Create a new Capacity Reservation by splitting the capacity of the source Capacity Reservation. The new Capacity Reservation will have the same attributes as the source Capacity Reservation except for tags. The source Capacity Reservation must be <code>active</code> and owned by your Amazon Web Services account.
41-
* </p>
39+
* <p> Create a new Capacity Reservation by splitting the capacity of the source Capacity
40+
* Reservation. The new Capacity Reservation will have the same attributes as the source
41+
* Capacity Reservation except for tags. The source Capacity Reservation must be
42+
* <code>active</code> and owned by your Amazon Web Services account. </p>
4243
* @example
4344
* Use a bare-bones client and the command you need to make an API call.
4445
* ```javascript
@@ -78,7 +79,7 @@ export interface CreateCapacityReservationBySplittingCommandOutput
7879
* // AvailableInstanceCount: Number("int"),
7980
* // EbsOptimized: true || false,
8081
* // EphemeralStorage: true || false,
81-
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed",
82+
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed" || "assessing" || "delayed" || "unsupported",
8283
* // StartDate: new Date("TIMESTAMP"),
8384
* // EndDate: new Date("TIMESTAMP"),
8485
* // EndDateType: "unlimited" || "limited",
@@ -101,6 +102,11 @@ export interface CreateCapacityReservationBySplittingCommandOutput
101102
* // ],
102103
* // ReservationType: "default" || "capacity-block",
103104
* // UnusedReservationBillingOwnerId: "STRING_VALUE",
105+
* // CommitmentInfo: { // CapacityReservationCommitmentInfo
106+
* // CommittedInstanceCount: Number("int"),
107+
* // CommitmentEndDate: new Date("TIMESTAMP"),
108+
* // },
109+
* // DeliveryPreference: "fixed" || "incremental",
104110
* // },
105111
* // DestinationCapacityReservation: {
106112
* // CapacityReservationId: "STRING_VALUE",
@@ -115,7 +121,7 @@ export interface CreateCapacityReservationBySplittingCommandOutput
115121
* // AvailableInstanceCount: Number("int"),
116122
* // EbsOptimized: true || false,
117123
* // EphemeralStorage: true || false,
118-
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed",
124+
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed" || "assessing" || "delayed" || "unsupported",
119125
* // StartDate: new Date("TIMESTAMP"),
120126
* // EndDate: new Date("TIMESTAMP"),
121127
* // EndDateType: "unlimited" || "limited",
@@ -138,6 +144,11 @@ export interface CreateCapacityReservationBySplittingCommandOutput
138144
* // ],
139145
* // ReservationType: "default" || "capacity-block",
140146
* // UnusedReservationBillingOwnerId: "STRING_VALUE",
147+
* // CommitmentInfo: {
148+
* // CommittedInstanceCount: Number("int"),
149+
* // CommitmentEndDate: new Date("TIMESTAMP"),
150+
* // },
151+
* // DeliveryPreference: "fixed" || "incremental",
141152
* // },
142153
* // InstanceCount: Number("int"),
143154
* // };

0 commit comments

Comments
 (0)