Skip to content

Commit

Permalink
feat(client-ec2): Adds support for requesting future-dated Capacity R…
Browse files Browse the repository at this point in the history
…eservations 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.
  • Loading branch information
awstools committed Nov 21, 2024
1 parent 415d379 commit 074cf4e
Show file tree
Hide file tree
Showing 67 changed files with 8,711 additions and 5,983 deletions.
24 changes: 24 additions & 0 deletions clients/client-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2093,6 +2093,22 @@ DescribeByoipCidrs

[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/)

</details>
<details>
<summary>
DescribeCapacityBlockExtensionHistory
</summary>

[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/)

</details>
<details>
<summary>
DescribeCapacityBlockExtensionOfferings
</summary>

[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/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -4845,6 +4861,14 @@ PurchaseCapacityBlock

[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/)

</details>
<details>
<summary>
PurchaseCapacityBlockExtension
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
70 changes: 70 additions & 0 deletions clients/client-ec2/src/EC2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,16 @@ import {
DescribeByoipCidrsCommandInput,
DescribeByoipCidrsCommandOutput,
} from "./commands/DescribeByoipCidrsCommand";
import {
DescribeCapacityBlockExtensionHistoryCommand,
DescribeCapacityBlockExtensionHistoryCommandInput,
DescribeCapacityBlockExtensionHistoryCommandOutput,
} from "./commands/DescribeCapacityBlockExtensionHistoryCommand";
import {
DescribeCapacityBlockExtensionOfferingsCommand,
DescribeCapacityBlockExtensionOfferingsCommandInput,
DescribeCapacityBlockExtensionOfferingsCommandOutput,
} from "./commands/DescribeCapacityBlockExtensionOfferingsCommand";
import {
DescribeCapacityBlockOfferingsCommand,
DescribeCapacityBlockOfferingsCommandInput,
Expand Down Expand Up @@ -2834,6 +2844,11 @@ import {
PurchaseCapacityBlockCommandInput,
PurchaseCapacityBlockCommandOutput,
} from "./commands/PurchaseCapacityBlockCommand";
import {
PurchaseCapacityBlockExtensionCommand,
PurchaseCapacityBlockExtensionCommandInput,
PurchaseCapacityBlockExtensionCommandOutput,
} from "./commands/PurchaseCapacityBlockExtensionCommand";
import {
PurchaseHostReservationCommand,
PurchaseHostReservationCommandInput,
Expand Down Expand Up @@ -3388,6 +3403,8 @@ const commands = {
DescribeAwsNetworkPerformanceMetricSubscriptionsCommand,
DescribeBundleTasksCommand,
DescribeByoipCidrsCommand,
DescribeCapacityBlockExtensionHistoryCommand,
DescribeCapacityBlockExtensionOfferingsCommand,
DescribeCapacityBlockOfferingsCommand,
DescribeCapacityReservationBillingRequestsCommand,
DescribeCapacityReservationFleetsCommand,
Expand Down Expand Up @@ -3732,6 +3749,7 @@ const commands = {
ProvisionIpamPoolCidrCommand,
ProvisionPublicIpv4PoolCidrCommand,
PurchaseCapacityBlockCommand,
PurchaseCapacityBlockExtensionCommand,
PurchaseHostReservationCommand,
PurchaseReservedInstancesOfferingCommand,
PurchaseScheduledInstancesCommand,
Expand Down Expand Up @@ -7656,6 +7674,41 @@ export interface EC2 {
cb: (err: any, data?: DescribeByoipCidrsCommandOutput) => void
): void;

/**
* @see {@link DescribeCapacityBlockExtensionHistoryCommand}
*/
describeCapacityBlockExtensionHistory(): Promise<DescribeCapacityBlockExtensionHistoryCommandOutput>;
describeCapacityBlockExtensionHistory(
args: DescribeCapacityBlockExtensionHistoryCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeCapacityBlockExtensionHistoryCommandOutput>;
describeCapacityBlockExtensionHistory(
args: DescribeCapacityBlockExtensionHistoryCommandInput,
cb: (err: any, data?: DescribeCapacityBlockExtensionHistoryCommandOutput) => void
): void;
describeCapacityBlockExtensionHistory(
args: DescribeCapacityBlockExtensionHistoryCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeCapacityBlockExtensionHistoryCommandOutput) => void
): void;

/**
* @see {@link DescribeCapacityBlockExtensionOfferingsCommand}
*/
describeCapacityBlockExtensionOfferings(
args: DescribeCapacityBlockExtensionOfferingsCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeCapacityBlockExtensionOfferingsCommandOutput>;
describeCapacityBlockExtensionOfferings(
args: DescribeCapacityBlockExtensionOfferingsCommandInput,
cb: (err: any, data?: DescribeCapacityBlockExtensionOfferingsCommandOutput) => void
): void;
describeCapacityBlockExtensionOfferings(
args: DescribeCapacityBlockExtensionOfferingsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeCapacityBlockExtensionOfferingsCommandOutput) => void
): void;

/**
* @see {@link DescribeCapacityBlockOfferingsCommand}
*/
Expand Down Expand Up @@ -13524,6 +13577,23 @@ export interface EC2 {
cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void
): void;

/**
* @see {@link PurchaseCapacityBlockExtensionCommand}
*/
purchaseCapacityBlockExtension(
args: PurchaseCapacityBlockExtensionCommandInput,
options?: __HttpHandlerOptions
): Promise<PurchaseCapacityBlockExtensionCommandOutput>;
purchaseCapacityBlockExtension(
args: PurchaseCapacityBlockExtensionCommandInput,
cb: (err: any, data?: PurchaseCapacityBlockExtensionCommandOutput) => void
): void;
purchaseCapacityBlockExtension(
args: PurchaseCapacityBlockExtensionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PurchaseCapacityBlockExtensionCommandOutput) => void
): void;

/**
* @see {@link PurchaseHostReservationCommand}
*/
Expand Down
18 changes: 18 additions & 0 deletions clients/client-ec2/src/EC2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,14 @@ import {
DescribeBundleTasksCommandOutput,
} from "./commands/DescribeBundleTasksCommand";
import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput } from "./commands/DescribeByoipCidrsCommand";
import {
DescribeCapacityBlockExtensionHistoryCommandInput,
DescribeCapacityBlockExtensionHistoryCommandOutput,
} from "./commands/DescribeCapacityBlockExtensionHistoryCommand";
import {
DescribeCapacityBlockExtensionOfferingsCommandInput,
DescribeCapacityBlockExtensionOfferingsCommandOutput,
} from "./commands/DescribeCapacityBlockExtensionOfferingsCommand";
import {
DescribeCapacityBlockOfferingsCommandInput,
DescribeCapacityBlockOfferingsCommandOutput,
Expand Down Expand Up @@ -2031,6 +2039,10 @@ import {
PurchaseCapacityBlockCommandInput,
PurchaseCapacityBlockCommandOutput,
} from "./commands/PurchaseCapacityBlockCommand";
import {
PurchaseCapacityBlockExtensionCommandInput,
PurchaseCapacityBlockExtensionCommandOutput,
} from "./commands/PurchaseCapacityBlockExtensionCommand";
import {
PurchaseHostReservationCommandInput,
PurchaseHostReservationCommandOutput,
Expand Down Expand Up @@ -2492,6 +2504,8 @@ export type ServiceInputTypes =
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandInput
| DescribeBundleTasksCommandInput
| DescribeByoipCidrsCommandInput
| DescribeCapacityBlockExtensionHistoryCommandInput
| DescribeCapacityBlockExtensionOfferingsCommandInput
| DescribeCapacityBlockOfferingsCommandInput
| DescribeCapacityReservationBillingRequestsCommandInput
| DescribeCapacityReservationFleetsCommandInput
Expand Down Expand Up @@ -2836,6 +2850,7 @@ export type ServiceInputTypes =
| ProvisionIpamPoolCidrCommandInput
| ProvisionPublicIpv4PoolCidrCommandInput
| PurchaseCapacityBlockCommandInput
| PurchaseCapacityBlockExtensionCommandInput
| PurchaseHostReservationCommandInput
| PurchaseReservedInstancesOfferingCommandInput
| PurchaseScheduledInstancesCommandInput
Expand Down Expand Up @@ -3140,6 +3155,8 @@ export type ServiceOutputTypes =
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandOutput
| DescribeBundleTasksCommandOutput
| DescribeByoipCidrsCommandOutput
| DescribeCapacityBlockExtensionHistoryCommandOutput
| DescribeCapacityBlockExtensionOfferingsCommandOutput
| DescribeCapacityBlockOfferingsCommandOutput
| DescribeCapacityReservationBillingRequestsCommandOutput
| DescribeCapacityReservationFleetsCommandOutput
Expand Down Expand Up @@ -3484,6 +3501,7 @@ export type ServiceOutputTypes =
| ProvisionIpamPoolCidrCommandOutput
| ProvisionPublicIpv4PoolCidrCommandOutput
| PurchaseCapacityBlockCommandOutput
| PurchaseCapacityBlockExtensionCommandOutput
| PurchaseHostReservationCommandOutput
| PurchaseReservedInstancesOfferingCommandOutput
| PurchaseScheduledInstancesCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export interface AcceptCapacityReservationBillingOwnershipCommandOutput
__MetadataBearer {}

/**
* <p>Accepts a request to assign billing of the available capacity of a shared Capacity 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 Amazon EC2 Capacity Reservations</a>.</p>
* <p>Accepts a request to assign billing of the available capacity of a shared Capacity
* 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
* Amazon EC2 Capacity Reservations</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export interface AssociateCapacityReservationBillingOwnerCommandOutput
__MetadataBearer {}

/**
* <p>Initiates a request to assign billing of the unused capacity of a shared Capacity Reservation to a consumer
* account that is consolidated under the same Amazon Web Services organizations payer account. For more information, see
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html">Billing assignment for shared
* Amazon EC2 Capacity Reservations</a>.</p>
* <p>Initiates a request to assign billing of the unused capacity of a shared Capacity
* Reservation to a consumer account that is consolidated under the same Amazon Web Services
* organizations payer account. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/assign-billing.html">Billing assignment for shared
* Amazon EC2 Capacity Reservations</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,23 @@ export interface CancelCapacityReservationCommandInput extends CancelCapacityRes
export interface CancelCapacityReservationCommandOutput extends CancelCapacityReservationResult, __MetadataBearer {}

/**
* <p>Cancels the specified Capacity Reservation, releases the reserved capacity, and changes the Capacity Reservation's state to
* <code>cancelled</code>.</p>
* <p>Cancels the specified Capacity Reservation, releases the reserved capacity, and changes
* the Capacity Reservation's state to <code>cancelled</code>.</p>
* <p>You can cancel a Capacity Reservation that is in the following states:</p>
* <ul>
* <li>
* <p>
* <code>assessing</code>
* </p>
* </li>
* <li>
* <p>
* <code>active</code> and there is no commitment duration or the commitment
* duration has elapsed. You can't cancel a future-dated Capacity Reservation during the commitment duration.</p>
* </li>
* </ul>
* <p>If a future-dated Capacity Reservation enters the <code>delayed</code> state, the commitment
* duration is waived, and you can cancel it as soon as it enters the <code>active</code> state.</p>
* <p>Instances running in the reserved capacity continue running until you stop them. Stopped
* instances that target the Capacity Reservation can no longer launch. Modify these instances to either
* target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ export interface CancelCapacityReservationFleetsCommandOutput
__MetadataBearer {}

/**
* <p>Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity Reservation
* Fleet, the following happens:</p>
* <p>Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity
* Reservation Fleet, the following happens:</p>
* <ul>
* <li>
* <p>The Capacity Reservation Fleet's status changes to <code>cancelled</code>.</p>
* <p>The Capacity Reservation Fleet's status changes to
* <code>cancelled</code>.</p>
* </li>
* <li>
* <p>The individual Capacity Reservations in the Fleet are cancelled. Instances running
* in the Capacity Reservations at the time of cancelling the Fleet continue to run in
* shared capacity.</p>
* <p>The individual Capacity Reservations in the Fleet are cancelled. Instances
* running in the Capacity Reservations at the time of cancelling the Fleet
* continue to run in shared capacity.</p>
* </li>
* <li>
* <p>The Fleet stops creating new Capacity Reservations.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ export interface CreateCapacityReservationBySplittingCommandOutput
__MetadataBearer {}

/**
* <p>
* 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.
* </p>
* <p> 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. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -78,7 +79,7 @@ export interface CreateCapacityReservationBySplittingCommandOutput
* // AvailableInstanceCount: Number("int"),
* // EbsOptimized: true || false,
* // EphemeralStorage: true || false,
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed",
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed" || "assessing" || "delayed" || "unsupported",
* // StartDate: new Date("TIMESTAMP"),
* // EndDate: new Date("TIMESTAMP"),
* // EndDateType: "unlimited" || "limited",
Expand All @@ -101,6 +102,11 @@ export interface CreateCapacityReservationBySplittingCommandOutput
* // ],
* // ReservationType: "default" || "capacity-block",
* // UnusedReservationBillingOwnerId: "STRING_VALUE",
* // CommitmentInfo: { // CapacityReservationCommitmentInfo
* // CommittedInstanceCount: Number("int"),
* // CommitmentEndDate: new Date("TIMESTAMP"),
* // },
* // DeliveryPreference: "fixed" || "incremental",
* // },
* // DestinationCapacityReservation: {
* // CapacityReservationId: "STRING_VALUE",
Expand All @@ -115,7 +121,7 @@ export interface CreateCapacityReservationBySplittingCommandOutput
* // AvailableInstanceCount: Number("int"),
* // EbsOptimized: true || false,
* // EphemeralStorage: true || false,
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed",
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed" || "assessing" || "delayed" || "unsupported",
* // StartDate: new Date("TIMESTAMP"),
* // EndDate: new Date("TIMESTAMP"),
* // EndDateType: "unlimited" || "limited",
Expand All @@ -138,6 +144,11 @@ export interface CreateCapacityReservationBySplittingCommandOutput
* // ],
* // ReservationType: "default" || "capacity-block",
* // UnusedReservationBillingOwnerId: "STRING_VALUE",
* // CommitmentInfo: {
* // CommittedInstanceCount: Number("int"),
* // CommitmentEndDate: new Date("TIMESTAMP"),
* // },
* // DeliveryPreference: "fixed" || "incremental",
* // },
* // InstanceCount: Number("int"),
* // };
Expand Down
Loading

0 comments on commit 074cf4e

Please sign in to comment.