Skip to content

Commit 28cf47d

Browse files
author
awstools
committed
feat(client-pcs): Add support for Amazon EC2 Capacity Blocks for ML
1 parent 11455fd commit 28cf47d

File tree

5 files changed

+28
-21
lines changed

5 files changed

+28
-21
lines changed

clients/client-pcs/src/commands/CreateComputeNodeGroupCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface CreateComputeNodeGroupCommandOutput extends CreateComputeNodeGr
4444
* subnetIds: [ // StringList // required
4545
* "STRING_VALUE",
4646
* ],
47-
* purchaseOption: "ONDEMAND" || "SPOT",
47+
* purchaseOption: "ONDEMAND" || "SPOT" || "CAPACITY_BLOCK",
4848
* customLaunchTemplate: { // CustomLaunchTemplate
4949
* id: "STRING_VALUE", // required
5050
* version: "STRING_VALUE", // required
@@ -90,7 +90,7 @@ export interface CreateComputeNodeGroupCommandOutput extends CreateComputeNodeGr
9090
* // subnetIds: [ // SubnetIdList // required
9191
* // "STRING_VALUE",
9292
* // ],
93-
* // purchaseOption: "ONDEMAND" || "SPOT",
93+
* // purchaseOption: "ONDEMAND" || "SPOT" || "CAPACITY_BLOCK",
9494
* // customLaunchTemplate: { // CustomLaunchTemplate
9595
* // id: "STRING_VALUE", // required
9696
* // version: "STRING_VALUE", // required

clients/client-pcs/src/commands/GetComputeNodeGroupCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface GetComputeNodeGroupCommandOutput extends GetComputeNodeGroupRes
5656
* // subnetIds: [ // SubnetIdList // required
5757
* // "STRING_VALUE",
5858
* // ],
59-
* // purchaseOption: "ONDEMAND" || "SPOT",
59+
* // purchaseOption: "ONDEMAND" || "SPOT" || "CAPACITY_BLOCK",
6060
* // customLaunchTemplate: { // CustomLaunchTemplate
6161
* // id: "STRING_VALUE", // required
6262
* // version: "STRING_VALUE", // required

clients/client-pcs/src/commands/UpdateComputeNodeGroupCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface UpdateComputeNodeGroupCommandOutput extends UpdateComputeNodeGr
4848
* id: "STRING_VALUE", // required
4949
* version: "STRING_VALUE", // required
5050
* },
51-
* purchaseOption: "ONDEMAND" || "SPOT",
51+
* purchaseOption: "ONDEMAND" || "SPOT" || "CAPACITY_BLOCK",
5252
* spotOptions: { // SpotOptions
5353
* allocationStrategy: "lowest-price" || "capacity-optimized" || "price-capacity-optimized",
5454
* },
@@ -82,7 +82,7 @@ export interface UpdateComputeNodeGroupCommandOutput extends UpdateComputeNodeGr
8282
* // subnetIds: [ // SubnetIdList // required
8383
* // "STRING_VALUE",
8484
* // ],
85-
* // purchaseOption: "ONDEMAND" || "SPOT",
85+
* // purchaseOption: "ONDEMAND" || "SPOT" || "CAPACITY_BLOCK",
8686
* // customLaunchTemplate: { // CustomLaunchTemplate
8787
* // id: "STRING_VALUE", // required
8888
* // version: "STRING_VALUE", // required

clients/client-pcs/src/models/models_0.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export interface InstanceConfig {
142142
* @enum
143143
*/
144144
export const PurchaseOption = {
145+
CAPACITY_BLOCK: "CAPACITY_BLOCK",
145146
ONDEMAND: "ONDEMAND",
146147
SPOT: "SPOT",
147148
} as const;
@@ -220,7 +221,7 @@ export type SpotAllocationStrategy = (typeof SpotAllocationStrategy)[keyof typeo
220221
*/
221222
export interface SpotOptions {
222223
/**
223-
* <p>The Amazon EC2 allocation strategy Amazon Web Services PCS uses to provision EC2 instances. Amazon Web Services PCS supports <b>lowest price</b>, <b>capacity optimized</b>, and <b>price capacity optimized</b>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to <b>price capacity optimized</b>.</p>
224+
* <p>The Amazon EC2 allocation strategy PCS uses to provision EC2 instances. PCS supports <b>lowest price</b>, <b>capacity optimized</b>, and <b>price capacity optimized</b>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to <b>price capacity optimized</b>.</p>
224225
* @public
225226
*/
226227
allocationStrategy?: SpotAllocationStrategy | undefined;
@@ -255,7 +256,7 @@ export interface CreateComputeNodeGroupRequest {
255256
subnetIds: string[] | undefined;
256257

257258
/**
258-
* <p>Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html">Instance purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>
259+
* <p>Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html">Amazon EC2 billing and purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about PCS support for Capacity Blocks, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html">Using Amazon EC2 Capacity Blocks for ML with PCS</a> in the <i>PCS User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>
259260
* @public
260261
*/
261262
purchaseOption?: PurchaseOption | undefined;
@@ -279,7 +280,7 @@ export interface CreateComputeNodeGroupRequest {
279280
scalingConfiguration: ScalingConfigurationRequest | undefined;
280281

281282
/**
282-
* <p>A list of EC2 instance configurations that Amazon Web Services PCS can provision in the compute node group.</p>
283+
* <p>A list of EC2 instance configurations that PCS can provision in the compute node group.</p>
283284
* @public
284285
*/
285286
instanceConfigs: InstanceConfig[] | undefined;
@@ -439,7 +440,7 @@ export interface ComputeNodeGroup {
439440
subnetIds: string[] | undefined;
440441

441442
/**
442-
* <p>Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html">Instance purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>
443+
* <p>Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html">Amazon EC2 billing and purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about PCS support for Capacity Blocks, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html">Using Amazon EC2 Capacity Blocks for ML with PCS</a> in the <i>PCS User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>
443444
* @public
444445
*/
445446
purchaseOption?: PurchaseOption | undefined;
@@ -463,7 +464,7 @@ export interface ComputeNodeGroup {
463464
scalingConfiguration: ScalingConfiguration | undefined;
464465

465466
/**
466-
* <p>A list of EC2 instance configurations that Amazon Web Services PCS can provision in the compute node group.</p>
467+
* <p>A list of EC2 instance configurations that PCS can provision in the compute node group.</p>
467468
* @public
468469
*/
469470
instanceConfigs: InstanceConfig[] | undefined;
@@ -888,7 +889,7 @@ export interface UpdateComputeNodeGroupRequest {
888889
customLaunchTemplate?: CustomLaunchTemplate | undefined;
889890

890891
/**
891-
* <p>Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html">Instance purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>
892+
* <p>Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html">Amazon EC2 billing and purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about PCS support for Capacity Blocks, see <a href="https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html">Using Amazon EC2 Capacity Blocks for ML with PCS</a> in the <i>PCS User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>
892893
* @public
893894
*/
894895
purchaseOption?: PurchaseOption | undefined;
@@ -955,7 +956,7 @@ export type NetworkType = (typeof NetworkType)[keyof typeof NetworkType];
955956
*/
956957
export interface NetworkingRequest {
957958
/**
958-
* <p>The list of subnet IDs where Amazon Web Services PCS creates an Elastic Network Interface (ENI) to enable communication between managed controllers and Amazon Web Services PCS resources. Subnet IDs have the form <code>subnet-0123456789abcdef0</code>.</p> <p>Subnets can't be in Outposts, Wavelength or an Amazon Web Services Local Zone.</p> <note> <p>Amazon Web Services PCS currently supports only 1 subnet in this list.</p> </note>
959+
* <p>The list of subnet IDs where PCS creates an Elastic Network Interface (ENI) to enable communication between managed controllers and PCS resources. Subnet IDs have the form <code>subnet-0123456789abcdef0</code>.</p> <p>Subnets can't be in Outposts, Wavelength or an Amazon Web Services Local Zone.</p> <note> <p>PCS currently supports only 1 subnet in this list.</p> </note>
959960
* @public
960961
*/
961962
subnetIds?: string[] | undefined;
@@ -1188,7 +1189,7 @@ export interface Scheduler {
11881189
*/
11891190
export interface SlurmAuthKey {
11901191
/**
1191-
* <p>The Amazon Resource Name (ARN) of the the shared Slurm key.</p>
1192+
* <p>The Amazon Resource Name (ARN) of the shared Slurm key.</p>
11921193
* @public
11931194
*/
11941195
secretArn: string | undefined;

codegen/sdk-codegen/aws-models/pcs.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@
11891189
"purchaseOption": {
11901190
"target": "com.amazonaws.pcs#PurchaseOption",
11911191
"traits": {
1192-
"smithy.api#documentation": "<p>Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html\">Instance purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>"
1192+
"smithy.api#documentation": "<p>Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html\">Amazon EC2 billing and purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about PCS support for Capacity Blocks, see <a href=\"https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html\">Using Amazon EC2 Capacity Blocks for ML with PCS</a> in the <i>PCS User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>"
11931193
}
11941194
},
11951195
"customLaunchTemplate": {
@@ -1214,7 +1214,7 @@
12141214
"instanceConfigs": {
12151215
"target": "com.amazonaws.pcs#InstanceList",
12161216
"traits": {
1217-
"smithy.api#documentation": "<p>A list of EC2 instance configurations that Amazon Web Services PCS can provision in the compute node group.</p>",
1217+
"smithy.api#documentation": "<p>A list of EC2 instance configurations that PCS can provision in the compute node group.</p>",
12181218
"smithy.api#required": {}
12191219
}
12201220
},
@@ -1708,7 +1708,7 @@
17081708
"purchaseOption": {
17091709
"target": "com.amazonaws.pcs#PurchaseOption",
17101710
"traits": {
1711-
"smithy.api#documentation": "<p>Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html\">Instance purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>"
1711+
"smithy.api#documentation": "<p>Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html\">Amazon EC2 billing and purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about PCS support for Capacity Blocks, see <a href=\"https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html\">Using Amazon EC2 Capacity Blocks for ML with PCS</a> in the <i>PCS User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>"
17121712
}
17131713
},
17141714
"customLaunchTemplate": {
@@ -1734,7 +1734,7 @@
17341734
"instanceConfigs": {
17351735
"target": "com.amazonaws.pcs#InstanceList",
17361736
"traits": {
1737-
"smithy.api#documentation": "<p>A list of EC2 instance configurations that Amazon Web Services PCS can provision in the compute node group.</p>",
1737+
"smithy.api#documentation": "<p>A list of EC2 instance configurations that PCS can provision in the compute node group.</p>",
17381738
"smithy.api#required": {}
17391739
}
17401740
},
@@ -2913,7 +2913,7 @@
29132913
"subnetIds": {
29142914
"target": "com.amazonaws.pcs#SubnetIdList",
29152915
"traits": {
2916-
"smithy.api#documentation": "<p>The list of subnet IDs where Amazon Web Services PCS creates an Elastic Network Interface (ENI) to enable communication between managed controllers and Amazon Web Services PCS resources. Subnet IDs have the form <code>subnet-0123456789abcdef0</code>.</p> <p>Subnets can't be in Outposts, Wavelength or an Amazon Web Services Local Zone.</p> <note> <p>Amazon Web Services PCS currently supports only 1 subnet in this list.</p> </note>"
2916+
"smithy.api#documentation": "<p>The list of subnet IDs where PCS creates an Elastic Network Interface (ENI) to enable communication between managed controllers and PCS resources. Subnet IDs have the form <code>subnet-0123456789abcdef0</code>.</p> <p>Subnets can't be in Outposts, Wavelength or an Amazon Web Services Local Zone.</p> <note> <p>PCS currently supports only 1 subnet in this list.</p> </note>"
29172917
}
29182918
},
29192919
"securityGroupIds": {
@@ -2947,6 +2947,12 @@
29472947
"traits": {
29482948
"smithy.api#enumValue": "SPOT"
29492949
}
2950+
},
2951+
"CAPACITY_BLOCK": {
2952+
"target": "smithy.api#Unit",
2953+
"traits": {
2954+
"smithy.api#enumValue": "CAPACITY_BLOCK"
2955+
}
29502956
}
29512957
}
29522958
},
@@ -3538,7 +3544,7 @@
35383544
"secretArn": {
35393545
"target": "smithy.api#String",
35403546
"traits": {
3541-
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the the shared Slurm key.</p>",
3547+
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the shared Slurm key.</p>",
35423548
"smithy.api#required": {}
35433549
}
35443550
},
@@ -3611,7 +3617,7 @@
36113617
"allocationStrategy": {
36123618
"target": "com.amazonaws.pcs#SpotAllocationStrategy",
36133619
"traits": {
3614-
"smithy.api#documentation": "<p>The Amazon EC2 allocation strategy Amazon Web Services PCS uses to provision EC2 instances. Amazon Web Services PCS supports <b>lowest price</b>, <b>capacity optimized</b>, and <b>price capacity optimized</b>. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html\">Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to <b>price capacity optimized</b>.</p>"
3620+
"smithy.api#documentation": "<p>The Amazon EC2 allocation strategy PCS uses to provision EC2 instances. PCS supports <b>lowest price</b>, <b>capacity optimized</b>, and <b>price capacity optimized</b>. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html\">Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to <b>price capacity optimized</b>.</p>"
36153621
}
36163622
}
36173623
},
@@ -3899,7 +3905,7 @@
38993905
"purchaseOption": {
39003906
"target": "com.amazonaws.pcs#PurchaseOption",
39013907
"traits": {
3902-
"smithy.api#documentation": "<p>Specifies how EC2 instances are purchased on your behalf. Amazon Web Services PCS supports On-Demand and Spot instances. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html\">Instance purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>"
3908+
"smithy.api#documentation": "<p>Specifies how EC2 instances are purchased on your behalf. PCS supports On-Demand Instances, Spot Instances, and Amazon EC2 Capacity Blocks for ML. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html\">Amazon EC2 billing and purchasing options</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information about PCS support for Capacity Blocks, see <a href=\"https://docs.aws.amazon.com/pcs/latest/userguide/capacity-blocks.html\">Using Amazon EC2 Capacity Blocks for ML with PCS</a> in the <i>PCS User Guide</i>. If you don't provide this option, it defaults to On-Demand.</p>"
39033909
}
39043910
},
39053911
"spotOptions": {

0 commit comments

Comments
 (0)