Skip to content

Commit 5f73bcd

Browse files
author
awstools
committed
feat(client-ec2): Capacity Blocks for ML are a new EC2 purchasing option 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.
1 parent eed5dcc commit 5f73bcd

Some content is hidden

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

41 files changed

+2826
-1495
lines changed

clients/client-ec2/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,6 +2036,14 @@ DescribeByoipCidrs
20362036

20372037
[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)
20382038

2039+
</details>
2040+
<details>
2041+
<summary>
2042+
DescribeCapacityBlockOfferings
2043+
</summary>
2044+
2045+
[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)
2046+
20392047
</details>
20402048
<details>
20412049
<summary>
@@ -4540,6 +4548,14 @@ ProvisionPublicIpv4PoolCidr
45404548

45414549
[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)
45424550

4551+
</details>
4552+
<details>
4553+
<summary>
4554+
PurchaseCapacityBlock
4555+
</summary>
4556+
4557+
[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)
4558+
45434559
</details>
45444560
<details>
45454561
<summary>

clients/client-ec2/src/EC2.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,11 @@ import {
10881088
DescribeByoipCidrsCommandInput,
10891089
DescribeByoipCidrsCommandOutput,
10901090
} from "./commands/DescribeByoipCidrsCommand";
1091+
import {
1092+
DescribeCapacityBlockOfferingsCommand,
1093+
DescribeCapacityBlockOfferingsCommandInput,
1094+
DescribeCapacityBlockOfferingsCommandOutput,
1095+
} from "./commands/DescribeCapacityBlockOfferingsCommand";
10911096
import {
10921097
DescribeCapacityReservationFleetsCommand,
10931098
DescribeCapacityReservationFleetsCommandInput,
@@ -2629,6 +2634,11 @@ import {
26292634
ProvisionPublicIpv4PoolCidrCommandInput,
26302635
ProvisionPublicIpv4PoolCidrCommandOutput,
26312636
} from "./commands/ProvisionPublicIpv4PoolCidrCommand";
2637+
import {
2638+
PurchaseCapacityBlockCommand,
2639+
PurchaseCapacityBlockCommandInput,
2640+
PurchaseCapacityBlockCommandOutput,
2641+
} from "./commands/PurchaseCapacityBlockCommand";
26322642
import {
26332643
PurchaseHostReservationCommand,
26342644
PurchaseHostReservationCommandInput,
@@ -3163,6 +3173,7 @@ const commands = {
31633173
DescribeAwsNetworkPerformanceMetricSubscriptionsCommand,
31643174
DescribeBundleTasksCommand,
31653175
DescribeByoipCidrsCommand,
3176+
DescribeCapacityBlockOfferingsCommand,
31663177
DescribeCapacityReservationFleetsCommand,
31673178
DescribeCapacityReservationsCommand,
31683179
DescribeCarrierGatewaysCommand,
@@ -3476,6 +3487,7 @@ const commands = {
34763487
ProvisionByoipCidrCommand,
34773488
ProvisionIpamPoolCidrCommand,
34783489
ProvisionPublicIpv4PoolCidrCommand,
3490+
PurchaseCapacityBlockCommand,
34793491
PurchaseHostReservationCommand,
34803492
PurchaseReservedInstancesOfferingCommand,
34813493
PurchaseScheduledInstancesCommand,
@@ -7196,6 +7208,23 @@ export interface EC2 {
71967208
cb: (err: any, data?: DescribeByoipCidrsCommandOutput) => void
71977209
): void;
71987210

7211+
/**
7212+
* @see {@link DescribeCapacityBlockOfferingsCommand}
7213+
*/
7214+
describeCapacityBlockOfferings(
7215+
args: DescribeCapacityBlockOfferingsCommandInput,
7216+
options?: __HttpHandlerOptions
7217+
): Promise<DescribeCapacityBlockOfferingsCommandOutput>;
7218+
describeCapacityBlockOfferings(
7219+
args: DescribeCapacityBlockOfferingsCommandInput,
7220+
cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void
7221+
): void;
7222+
describeCapacityBlockOfferings(
7223+
args: DescribeCapacityBlockOfferingsCommandInput,
7224+
options: __HttpHandlerOptions,
7225+
cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void
7226+
): void;
7227+
71997228
/**
72007229
* @see {@link DescribeCapacityReservationFleetsCommand}
72017230
*/
@@ -12391,6 +12420,23 @@ export interface EC2 {
1239112420
cb: (err: any, data?: ProvisionPublicIpv4PoolCidrCommandOutput) => void
1239212421
): void;
1239312422

12423+
/**
12424+
* @see {@link PurchaseCapacityBlockCommand}
12425+
*/
12426+
purchaseCapacityBlock(
12427+
args: PurchaseCapacityBlockCommandInput,
12428+
options?: __HttpHandlerOptions
12429+
): Promise<PurchaseCapacityBlockCommandOutput>;
12430+
purchaseCapacityBlock(
12431+
args: PurchaseCapacityBlockCommandInput,
12432+
cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void
12433+
): void;
12434+
purchaseCapacityBlock(
12435+
args: PurchaseCapacityBlockCommandInput,
12436+
options: __HttpHandlerOptions,
12437+
cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void
12438+
): void;
12439+
1239412440
/**
1239512441
* @see {@link PurchaseHostReservationCommand}
1239612442
*/

clients/client-ec2/src/EC2Client.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,10 @@ import {
771771
DescribeBundleTasksCommandOutput,
772772
} from "./commands/DescribeBundleTasksCommand";
773773
import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput } from "./commands/DescribeByoipCidrsCommand";
774+
import {
775+
DescribeCapacityBlockOfferingsCommandInput,
776+
DescribeCapacityBlockOfferingsCommandOutput,
777+
} from "./commands/DescribeCapacityBlockOfferingsCommand";
774778
import {
775779
DescribeCapacityReservationFleetsCommandInput,
776780
DescribeCapacityReservationFleetsCommandOutput,
@@ -1873,6 +1877,10 @@ import {
18731877
ProvisionPublicIpv4PoolCidrCommandInput,
18741878
ProvisionPublicIpv4PoolCidrCommandOutput,
18751879
} from "./commands/ProvisionPublicIpv4PoolCidrCommand";
1880+
import {
1881+
PurchaseCapacityBlockCommandInput,
1882+
PurchaseCapacityBlockCommandOutput,
1883+
} from "./commands/PurchaseCapacityBlockCommand";
18761884
import {
18771885
PurchaseHostReservationCommandInput,
18781886
PurchaseHostReservationCommandOutput,
@@ -2319,6 +2327,7 @@ export type ServiceInputTypes =
23192327
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandInput
23202328
| DescribeBundleTasksCommandInput
23212329
| DescribeByoipCidrsCommandInput
2330+
| DescribeCapacityBlockOfferingsCommandInput
23222331
| DescribeCapacityReservationFleetsCommandInput
23232332
| DescribeCapacityReservationsCommandInput
23242333
| DescribeCarrierGatewaysCommandInput
@@ -2632,6 +2641,7 @@ export type ServiceInputTypes =
26322641
| ProvisionByoipCidrCommandInput
26332642
| ProvisionIpamPoolCidrCommandInput
26342643
| ProvisionPublicIpv4PoolCidrCommandInput
2644+
| PurchaseCapacityBlockCommandInput
26352645
| PurchaseHostReservationCommandInput
26362646
| PurchaseReservedInstancesOfferingCommandInput
26372647
| PurchaseScheduledInstancesCommandInput
@@ -2924,6 +2934,7 @@ export type ServiceOutputTypes =
29242934
| DescribeAwsNetworkPerformanceMetricSubscriptionsCommandOutput
29252935
| DescribeBundleTasksCommandOutput
29262936
| DescribeByoipCidrsCommandOutput
2937+
| DescribeCapacityBlockOfferingsCommandOutput
29272938
| DescribeCapacityReservationFleetsCommandOutput
29282939
| DescribeCapacityReservationsCommandOutput
29292940
| DescribeCarrierGatewaysCommandOutput
@@ -3237,6 +3248,7 @@ export type ServiceOutputTypes =
32373248
| ProvisionByoipCidrCommandOutput
32383249
| ProvisionIpamPoolCidrCommandOutput
32393250
| ProvisionPublicIpv4PoolCidrCommandOutput
3251+
| PurchaseCapacityBlockCommandOutput
32403252
| PurchaseHostReservationCommandOutput
32413253
| PurchaseReservedInstancesOfferingCommandOutput
32423254
| PurchaseScheduledInstancesCommandOutput

clients/client-ec2/src/commands/CreateCapacityReservationCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export interface CreateCapacityReservationCommandOutput extends CreateCapacityRe
102102
* // AvailableInstanceCount: Number("int"),
103103
* // EbsOptimized: true || false,
104104
* // EphemeralStorage: true || false,
105-
* // State: "active" || "expired" || "cancelled" || "pending" || "failed",
105+
* // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed",
106106
* // StartDate: new Date("TIMESTAMP"),
107107
* // EndDate: new Date("TIMESTAMP"),
108108
* // EndDateType: "unlimited" || "limited",
@@ -123,6 +123,7 @@ export interface CreateCapacityReservationCommandOutput extends CreateCapacityRe
123123
* // Count: Number("int"),
124124
* // },
125125
* // ],
126+
* // ReservationType: "default" || "capacity-block",
126127
* // },
127128
* // };
128129
*

clients/client-ec2/src/commands/CreateFleetCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB
180180
* TotalTargetCapacity: Number("int"), // required
181181
* OnDemandTargetCapacity: Number("int"),
182182
* SpotTargetCapacity: Number("int"),
183-
* DefaultTargetCapacityType: "spot" || "on-demand",
183+
* DefaultTargetCapacityType: "spot" || "on-demand" || "capacity-block",
184184
* TargetCapacityUnitType: "vcpu" || "memory-mib" || "units",
185185
* },
186186
* TerminateInstancesWithExpiration: true || false,

clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR
179179
* "STRING_VALUE",
180180
* ],
181181
* InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptionsRequest
182-
* MarketType: "spot",
182+
* MarketType: "spot" || "capacity-block",
183183
* SpotOptions: { // LaunchTemplateSpotMarketOptionsRequest
184184
* MaxPrice: "STRING_VALUE",
185185
* SpotInstanceType: "one-time" || "persistent",

clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
181181
* "STRING_VALUE",
182182
* ],
183183
* InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptionsRequest
184-
* MarketType: "spot",
184+
* MarketType: "spot" || "capacity-block",
185185
* SpotOptions: { // LaunchTemplateSpotMarketOptionsRequest
186186
* MaxPrice: "STRING_VALUE",
187187
* SpotInstanceType: "one-time" || "persistent",
@@ -432,7 +432,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
432432
* // "STRING_VALUE",
433433
* // ],
434434
* // InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptions
435-
* // MarketType: "spot",
435+
* // MarketType: "spot" || "capacity-block",
436436
* // SpotOptions: { // LaunchTemplateSpotMarketOptions
437437
* // MaxPrice: "STRING_VALUE",
438438
* // SpotInstanceType: "one-time" || "persistent",

clients/client-ec2/src/commands/DeletePublicIpv4PoolCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import {
1515
} from "@smithy/types";
1616

1717
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
18-
import { DeletePublicIpv4PoolRequest } from "../models/models_2";
19-
import { DeletePublicIpv4PoolResult } from "../models/models_3";
18+
import { DeletePublicIpv4PoolRequest, DeletePublicIpv4PoolResult } from "../models/models_3";
2019
import { de_DeletePublicIpv4PoolCommand, se_DeletePublicIpv4PoolCommand } from "../protocols/Aws_ec2";
2120

2221
/**

0 commit comments

Comments
 (0)