Skip to content

Commit

Permalink
feat(client-ec2): Capacity Blocks for ML are a new EC2 purchasing opt…
Browse files Browse the repository at this point in the history
…ion for reserving GPU instances on a future date to support short duration machine learning (ML) workloads. Capacity Blocks automatically place instances close together inside Amazon EC2 UltraClusters for low-latency, high-throughput networking.
  • Loading branch information
awstools committed Oct 31, 2023
1 parent eed5dcc commit 5f73bcd
Show file tree
Hide file tree
Showing 41 changed files with 2,826 additions and 1,495 deletions.
16 changes: 16 additions & 0 deletions clients/client-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,14 @@ DescribeByoipCidrs

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/describebyoipcidrscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describebyoipcidrscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describebyoipcidrscommandoutput.html)

</details>
<details>
<summary>
DescribeCapacityBlockOfferings
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/describecapacityblockofferingscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describecapacityblockofferingscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describecapacityblockofferingscommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -4540,6 +4548,14 @@ ProvisionPublicIpv4PoolCidr

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/provisionpublicipv4poolcidrcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/provisionpublicipv4poolcidrcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/provisionpublicipv4poolcidrcommandoutput.html)

</details>
<details>
<summary>
PurchaseCapacityBlock
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/purchasecapacityblockcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/purchasecapacityblockcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/purchasecapacityblockcommandoutput.html)

</details>
<details>
<summary>
Expand Down
46 changes: 46 additions & 0 deletions clients/client-ec2/src/EC2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,11 @@ import {
DescribeByoipCidrsCommandInput,
DescribeByoipCidrsCommandOutput,
} from "./commands/DescribeByoipCidrsCommand";
import {
DescribeCapacityBlockOfferingsCommand,
DescribeCapacityBlockOfferingsCommandInput,
DescribeCapacityBlockOfferingsCommandOutput,
} from "./commands/DescribeCapacityBlockOfferingsCommand";
import {
DescribeCapacityReservationFleetsCommand,
DescribeCapacityReservationFleetsCommandInput,
Expand Down Expand Up @@ -2629,6 +2634,11 @@ import {
ProvisionPublicIpv4PoolCidrCommandInput,
ProvisionPublicIpv4PoolCidrCommandOutput,
} from "./commands/ProvisionPublicIpv4PoolCidrCommand";
import {
PurchaseCapacityBlockCommand,
PurchaseCapacityBlockCommandInput,
PurchaseCapacityBlockCommandOutput,
} from "./commands/PurchaseCapacityBlockCommand";
import {
PurchaseHostReservationCommand,
PurchaseHostReservationCommandInput,
Expand Down Expand Up @@ -3163,6 +3173,7 @@ const commands = {
DescribeAwsNetworkPerformanceMetricSubscriptionsCommand,
DescribeBundleTasksCommand,
DescribeByoipCidrsCommand,
DescribeCapacityBlockOfferingsCommand,
DescribeCapacityReservationFleetsCommand,
DescribeCapacityReservationsCommand,
DescribeCarrierGatewaysCommand,
Expand Down Expand Up @@ -3476,6 +3487,7 @@ const commands = {
ProvisionByoipCidrCommand,
ProvisionIpamPoolCidrCommand,
ProvisionPublicIpv4PoolCidrCommand,
PurchaseCapacityBlockCommand,
PurchaseHostReservationCommand,
PurchaseReservedInstancesOfferingCommand,
PurchaseScheduledInstancesCommand,
Expand Down Expand Up @@ -7196,6 +7208,23 @@ export interface EC2 {
cb: (err: any, data?: DescribeByoipCidrsCommandOutput) => void
): void;

/**
* @see {@link DescribeCapacityBlockOfferingsCommand}
*/
describeCapacityBlockOfferings(
args: DescribeCapacityBlockOfferingsCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeCapacityBlockOfferingsCommandOutput>;
describeCapacityBlockOfferings(
args: DescribeCapacityBlockOfferingsCommandInput,
cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void
): void;
describeCapacityBlockOfferings(
args: DescribeCapacityBlockOfferingsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void
): void;

/**
* @see {@link DescribeCapacityReservationFleetsCommand}
*/
Expand Down Expand Up @@ -12391,6 +12420,23 @@ export interface EC2 {
cb: (err: any, data?: ProvisionPublicIpv4PoolCidrCommandOutput) => void
): void;

/**
* @see {@link PurchaseCapacityBlockCommand}
*/
purchaseCapacityBlock(
args: PurchaseCapacityBlockCommandInput,
options?: __HttpHandlerOptions
): Promise<PurchaseCapacityBlockCommandOutput>;
purchaseCapacityBlock(
args: PurchaseCapacityBlockCommandInput,
cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void
): void;
purchaseCapacityBlock(
args: PurchaseCapacityBlockCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void
): void;

/**
* @see {@link PurchaseHostReservationCommand}
*/
Expand Down
12 changes: 12 additions & 0 deletions clients/client-ec2/src/EC2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,10 @@ import {
DescribeBundleTasksCommandOutput,
} from "./commands/DescribeBundleTasksCommand";
import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput } from "./commands/DescribeByoipCidrsCommand";
import {
DescribeCapacityBlockOfferingsCommandInput,
DescribeCapacityBlockOfferingsCommandOutput,
} from "./commands/DescribeCapacityBlockOfferingsCommand";
import {
DescribeCapacityReservationFleetsCommandInput,
DescribeCapacityReservationFleetsCommandOutput,
Expand Down Expand Up @@ -1873,6 +1877,10 @@ import {
ProvisionPublicIpv4PoolCidrCommandInput,
ProvisionPublicIpv4PoolCidrCommandOutput,
} from "./commands/ProvisionPublicIpv4PoolCidrCommand";
import {
PurchaseCapacityBlockCommandInput,
PurchaseCapacityBlockCommandOutput,
} from "./commands/PurchaseCapacityBlockCommand";
import {
PurchaseHostReservationCommandInput,
PurchaseHostReservationCommandOutput,
Expand Down Expand Up @@ -2319,6 +2327,7 @@ export type ServiceInputTypes =
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandInput
| DescribeBundleTasksCommandInput
| DescribeByoipCidrsCommandInput
| DescribeCapacityBlockOfferingsCommandInput
| DescribeCapacityReservationFleetsCommandInput
| DescribeCapacityReservationsCommandInput
| DescribeCarrierGatewaysCommandInput
Expand Down Expand Up @@ -2632,6 +2641,7 @@ export type ServiceInputTypes =
| ProvisionByoipCidrCommandInput
| ProvisionIpamPoolCidrCommandInput
| ProvisionPublicIpv4PoolCidrCommandInput
| PurchaseCapacityBlockCommandInput
| PurchaseHostReservationCommandInput
| PurchaseReservedInstancesOfferingCommandInput
| PurchaseScheduledInstancesCommandInput
Expand Down Expand Up @@ -2924,6 +2934,7 @@ export type ServiceOutputTypes =
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandOutput
| DescribeBundleTasksCommandOutput
| DescribeByoipCidrsCommandOutput
| DescribeCapacityBlockOfferingsCommandOutput
| DescribeCapacityReservationFleetsCommandOutput
| DescribeCapacityReservationsCommandOutput
| DescribeCarrierGatewaysCommandOutput
Expand Down Expand Up @@ -3237,6 +3248,7 @@ export type ServiceOutputTypes =
| ProvisionByoipCidrCommandOutput
| ProvisionIpamPoolCidrCommandOutput
| ProvisionPublicIpv4PoolCidrCommandOutput
| PurchaseCapacityBlockCommandOutput
| PurchaseHostReservationCommandOutput
| PurchaseReservedInstancesOfferingCommandOutput
| PurchaseScheduledInstancesCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export interface CreateCapacityReservationCommandOutput extends CreateCapacityRe
* // AvailableInstanceCount: Number("int"),
* // EbsOptimized: true || false,
* // EphemeralStorage: true || false,
* // State: "active" || "expired" || "cancelled" || "pending" || "failed",
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed",
* // StartDate: new Date("TIMESTAMP"),
* // EndDate: new Date("TIMESTAMP"),
* // EndDateType: "unlimited" || "limited",
Expand All @@ -123,6 +123,7 @@ export interface CreateCapacityReservationCommandOutput extends CreateCapacityRe
* // Count: Number("int"),
* // },
* // ],
* // ReservationType: "default" || "capacity-block",
* // },
* // };
*
Expand Down
2 changes: 1 addition & 1 deletion clients/client-ec2/src/commands/CreateFleetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB
* TotalTargetCapacity: Number("int"), // required
* OnDemandTargetCapacity: Number("int"),
* SpotTargetCapacity: Number("int"),
* DefaultTargetCapacityType: "spot" || "on-demand",
* DefaultTargetCapacityType: "spot" || "on-demand" || "capacity-block",
* TargetCapacityUnitType: "vcpu" || "memory-mib" || "units",
* },
* TerminateInstancesWithExpiration: true || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR
* "STRING_VALUE",
* ],
* InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptionsRequest
* MarketType: "spot",
* MarketType: "spot" || "capacity-block",
* SpotOptions: { // LaunchTemplateSpotMarketOptionsRequest
* MaxPrice: "STRING_VALUE",
* SpotInstanceType: "one-time" || "persistent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
* "STRING_VALUE",
* ],
* InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptionsRequest
* MarketType: "spot",
* MarketType: "spot" || "capacity-block",
* SpotOptions: { // LaunchTemplateSpotMarketOptionsRequest
* MaxPrice: "STRING_VALUE",
* SpotInstanceType: "one-time" || "persistent",
Expand Down Expand Up @@ -432,7 +432,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
* // "STRING_VALUE",
* // ],
* // InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptions
* // MarketType: "spot",
* // MarketType: "spot" || "capacity-block",
* // SpotOptions: { // LaunchTemplateSpotMarketOptions
* // MaxPrice: "STRING_VALUE",
* // SpotInstanceType: "one-time" || "persistent",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import {
} from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DeletePublicIpv4PoolRequest } from "../models/models_2";
import { DeletePublicIpv4PoolResult } from "../models/models_3";
import { DeletePublicIpv4PoolRequest, DeletePublicIpv4PoolResult } from "../models/models_3";
import { de_DeletePublicIpv4PoolCommand, se_DeletePublicIpv4PoolCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Loading

0 comments on commit 5f73bcd

Please sign in to comment.