Skip to content

Commit 0238160

Browse files
author
awstools
committed
feat(client-sagemaker): Add support for SageMaker Hyperpod continuous scaling and custom AMI; Introduce new APIs: ListClusterEvents, DescribeClusterEvent, BatchAddClusterNodes
1 parent 4c21198 commit 0238160

42 files changed

Lines changed: 17223 additions & 14405 deletions

Some content is hidden

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

clients/client-sagemaker/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@ AttachClusterNodeVolume
234234

235235
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/AttachClusterNodeVolumeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/AttachClusterNodeVolumeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/AttachClusterNodeVolumeCommandOutput/)
236236

237+
</details>
238+
<details>
239+
<summary>
240+
BatchAddClusterNodes
241+
</summary>
242+
243+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/BatchAddClusterNodesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/BatchAddClusterNodesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/BatchAddClusterNodesCommandOutput/)
244+
237245
</details>
238246
<details>
239247
<summary>
@@ -1290,6 +1298,14 @@ DescribeCluster
12901298

12911299
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/DescribeClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/DescribeClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/DescribeClusterCommandOutput/)
12921300

1301+
</details>
1302+
<details>
1303+
<summary>
1304+
DescribeClusterEvent
1305+
</summary>
1306+
1307+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/DescribeClusterEventCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/DescribeClusterEventCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/DescribeClusterEventCommandOutput/)
1308+
12931309
</details>
12941310
<details>
12951311
<summary>
@@ -1922,6 +1938,14 @@ ListCandidatesForAutoMLJob
19221938

19231939
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/ListCandidatesForAutoMLJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/ListCandidatesForAutoMLJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/ListCandidatesForAutoMLJobCommandOutput/)
19241940

1941+
</details>
1942+
<details>
1943+
<summary>
1944+
ListClusterEvents
1945+
</summary>
1946+
1947+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/ListClusterEventsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/ListClusterEventsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/ListClusterEventsCommandOutput/)
1948+
19251949
</details>
19261950
<details>
19271951
<summary>

clients/client-sagemaker/src/SageMaker.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ import {
1818
AttachClusterNodeVolumeCommandInput,
1919
AttachClusterNodeVolumeCommandOutput,
2020
} from "./commands/AttachClusterNodeVolumeCommand";
21+
import {
22+
BatchAddClusterNodesCommand,
23+
BatchAddClusterNodesCommandInput,
24+
BatchAddClusterNodesCommandOutput,
25+
} from "./commands/BatchAddClusterNodesCommand";
2126
import {
2227
BatchDeleteClusterNodesCommand,
2328
BatchDeleteClusterNodesCommandInput,
@@ -622,6 +627,11 @@ import {
622627
DescribeClusterCommandInput,
623628
DescribeClusterCommandOutput,
624629
} from "./commands/DescribeClusterCommand";
630+
import {
631+
DescribeClusterEventCommand,
632+
DescribeClusterEventCommandInput,
633+
DescribeClusterEventCommandOutput,
634+
} from "./commands/DescribeClusterEventCommand";
625635
import {
626636
DescribeClusterNodeCommand,
627637
DescribeClusterNodeCommandInput,
@@ -1001,6 +1011,11 @@ import {
10011011
ListCandidatesForAutoMLJobCommandInput,
10021012
ListCandidatesForAutoMLJobCommandOutput,
10031013
} from "./commands/ListCandidatesForAutoMLJobCommand";
1014+
import {
1015+
ListClusterEventsCommand,
1016+
ListClusterEventsCommandInput,
1017+
ListClusterEventsCommandOutput,
1018+
} from "./commands/ListClusterEventsCommand";
10041019
import {
10051020
ListClusterNodesCommand,
10061021
ListClusterNodesCommandInput,
@@ -1701,6 +1716,7 @@ const commands = {
17011716
AddTagsCommand,
17021717
AssociateTrialComponentCommand,
17031718
AttachClusterNodeVolumeCommand,
1719+
BatchAddClusterNodesCommand,
17041720
BatchDeleteClusterNodesCommand,
17051721
BatchDescribeModelPackageCommand,
17061722
CreateActionCommand,
@@ -1833,6 +1849,7 @@ const commands = {
18331849
DescribeAutoMLJobCommand,
18341850
DescribeAutoMLJobV2Command,
18351851
DescribeClusterCommand,
1852+
DescribeClusterEventCommand,
18361853
DescribeClusterNodeCommand,
18371854
DescribeClusterSchedulerConfigCommand,
18381855
DescribeCodeRepositoryCommand,
@@ -1912,6 +1929,7 @@ const commands = {
19121929
ListAssociationsCommand,
19131930
ListAutoMLJobsCommand,
19141931
ListCandidatesForAutoMLJobCommand,
1932+
ListClusterEventsCommand,
19151933
ListClusterNodesCommand,
19161934
ListClustersCommand,
19171935
ListClusterSchedulerConfigsCommand,
@@ -2123,6 +2141,23 @@ export interface SageMaker {
21232141
cb: (err: any, data?: AttachClusterNodeVolumeCommandOutput) => void
21242142
): void;
21252143

2144+
/**
2145+
* @see {@link BatchAddClusterNodesCommand}
2146+
*/
2147+
batchAddClusterNodes(
2148+
args: BatchAddClusterNodesCommandInput,
2149+
options?: __HttpHandlerOptions
2150+
): Promise<BatchAddClusterNodesCommandOutput>;
2151+
batchAddClusterNodes(
2152+
args: BatchAddClusterNodesCommandInput,
2153+
cb: (err: any, data?: BatchAddClusterNodesCommandOutput) => void
2154+
): void;
2155+
batchAddClusterNodes(
2156+
args: BatchAddClusterNodesCommandInput,
2157+
options: __HttpHandlerOptions,
2158+
cb: (err: any, data?: BatchAddClusterNodesCommandOutput) => void
2159+
): void;
2160+
21262161
/**
21272162
* @see {@link BatchDeleteClusterNodesCommand}
21282163
*/
@@ -4174,6 +4209,23 @@ export interface SageMaker {
41744209
cb: (err: any, data?: DescribeClusterCommandOutput) => void
41754210
): void;
41764211

4212+
/**
4213+
* @see {@link DescribeClusterEventCommand}
4214+
*/
4215+
describeClusterEvent(
4216+
args: DescribeClusterEventCommandInput,
4217+
options?: __HttpHandlerOptions
4218+
): Promise<DescribeClusterEventCommandOutput>;
4219+
describeClusterEvent(
4220+
args: DescribeClusterEventCommandInput,
4221+
cb: (err: any, data?: DescribeClusterEventCommandOutput) => void
4222+
): void;
4223+
describeClusterEvent(
4224+
args: DescribeClusterEventCommandInput,
4225+
options: __HttpHandlerOptions,
4226+
cb: (err: any, data?: DescribeClusterEventCommandOutput) => void
4227+
): void;
4228+
41774229
/**
41784230
* @see {@link DescribeClusterNodeCommand}
41794231
*/
@@ -5455,6 +5507,23 @@ export interface SageMaker {
54555507
cb: (err: any, data?: ListCandidatesForAutoMLJobCommandOutput) => void
54565508
): void;
54575509

5510+
/**
5511+
* @see {@link ListClusterEventsCommand}
5512+
*/
5513+
listClusterEvents(
5514+
args: ListClusterEventsCommandInput,
5515+
options?: __HttpHandlerOptions
5516+
): Promise<ListClusterEventsCommandOutput>;
5517+
listClusterEvents(
5518+
args: ListClusterEventsCommandInput,
5519+
cb: (err: any, data?: ListClusterEventsCommandOutput) => void
5520+
): void;
5521+
listClusterEvents(
5522+
args: ListClusterEventsCommandInput,
5523+
options: __HttpHandlerOptions,
5524+
cb: (err: any, data?: ListClusterEventsCommandOutput) => void
5525+
): void;
5526+
54585527
/**
54595528
* @see {@link ListClusterNodesCommand}
54605529
*/

clients/client-sagemaker/src/SageMakerClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ import {
6363
AttachClusterNodeVolumeCommandInput,
6464
AttachClusterNodeVolumeCommandOutput,
6565
} from "./commands/AttachClusterNodeVolumeCommand";
66+
import {
67+
BatchAddClusterNodesCommandInput,
68+
BatchAddClusterNodesCommandOutput,
69+
} from "./commands/BatchAddClusterNodesCommand";
6670
import {
6771
BatchDeleteClusterNodesCommandInput,
6872
BatchDeleteClusterNodesCommandOutput,
@@ -381,6 +385,10 @@ import {
381385
DescribeAutoMLJobV2CommandOutput,
382386
} from "./commands/DescribeAutoMLJobV2Command";
383387
import { DescribeClusterCommandInput, DescribeClusterCommandOutput } from "./commands/DescribeClusterCommand";
388+
import {
389+
DescribeClusterEventCommandInput,
390+
DescribeClusterEventCommandOutput,
391+
} from "./commands/DescribeClusterEventCommand";
384392
import {
385393
DescribeClusterNodeCommandInput,
386394
DescribeClusterNodeCommandOutput,
@@ -622,6 +630,7 @@ import {
622630
ListCandidatesForAutoMLJobCommandInput,
623631
ListCandidatesForAutoMLJobCommandOutput,
624632
} from "./commands/ListCandidatesForAutoMLJobCommand";
633+
import { ListClusterEventsCommandInput, ListClusterEventsCommandOutput } from "./commands/ListClusterEventsCommand";
625634
import { ListClusterNodesCommandInput, ListClusterNodesCommandOutput } from "./commands/ListClusterNodesCommand";
626635
import {
627636
ListClusterSchedulerConfigsCommandInput,
@@ -1021,6 +1030,7 @@ export type ServiceInputTypes =
10211030
| AddTagsCommandInput
10221031
| AssociateTrialComponentCommandInput
10231032
| AttachClusterNodeVolumeCommandInput
1033+
| BatchAddClusterNodesCommandInput
10241034
| BatchDeleteClusterNodesCommandInput
10251035
| BatchDescribeModelPackageCommandInput
10261036
| CreateActionCommandInput
@@ -1153,6 +1163,7 @@ export type ServiceInputTypes =
11531163
| DescribeAutoMLJobCommandInput
11541164
| DescribeAutoMLJobV2CommandInput
11551165
| DescribeClusterCommandInput
1166+
| DescribeClusterEventCommandInput
11561167
| DescribeClusterNodeCommandInput
11571168
| DescribeClusterSchedulerConfigCommandInput
11581169
| DescribeCodeRepositoryCommandInput
@@ -1232,6 +1243,7 @@ export type ServiceInputTypes =
12321243
| ListAssociationsCommandInput
12331244
| ListAutoMLJobsCommandInput
12341245
| ListCandidatesForAutoMLJobCommandInput
1246+
| ListClusterEventsCommandInput
12351247
| ListClusterNodesCommandInput
12361248
| ListClusterSchedulerConfigsCommandInput
12371249
| ListClustersCommandInput
@@ -1390,6 +1402,7 @@ export type ServiceOutputTypes =
13901402
| AddTagsCommandOutput
13911403
| AssociateTrialComponentCommandOutput
13921404
| AttachClusterNodeVolumeCommandOutput
1405+
| BatchAddClusterNodesCommandOutput
13931406
| BatchDeleteClusterNodesCommandOutput
13941407
| BatchDescribeModelPackageCommandOutput
13951408
| CreateActionCommandOutput
@@ -1522,6 +1535,7 @@ export type ServiceOutputTypes =
15221535
| DescribeAutoMLJobCommandOutput
15231536
| DescribeAutoMLJobV2CommandOutput
15241537
| DescribeClusterCommandOutput
1538+
| DescribeClusterEventCommandOutput
15251539
| DescribeClusterNodeCommandOutput
15261540
| DescribeClusterSchedulerConfigCommandOutput
15271541
| DescribeCodeRepositoryCommandOutput
@@ -1601,6 +1615,7 @@ export type ServiceOutputTypes =
16011615
| ListAssociationsCommandOutput
16021616
| ListAutoMLJobsCommandOutput
16031617
| ListCandidatesForAutoMLJobCommandOutput
1618+
| ListClusterEventsCommandOutput
16041619
| ListClusterNodesCommandOutput
16051620
| ListClusterSchedulerConfigsCommandOutput
16061621
| ListClustersCommandOutput
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { BatchAddClusterNodesRequest, BatchAddClusterNodesResponse } from "../models/models_0";
9+
import { de_BatchAddClusterNodesCommand, se_BatchAddClusterNodesCommand } from "../protocols/Aws_json1_1";
10+
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link BatchAddClusterNodesCommand}.
21+
*/
22+
export interface BatchAddClusterNodesCommandInput extends BatchAddClusterNodesRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link BatchAddClusterNodesCommand}.
27+
*/
28+
export interface BatchAddClusterNodesCommandOutput extends BatchAddClusterNodesResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Adds nodes to a HyperPod cluster by incrementing the target count for one or more instance groups. This operation returns a unique <code>NodeLogicalId</code> for each node being added, which can be used to track the provisioning status of the node. This API provides a safer alternative to <code>UpdateCluster</code> for scaling operations by avoiding unintended configuration changes.</p> <note> <p>This API is only supported for clusters using <code>Continuous</code> as the <code>NodeProvisioningMode</code>.</p> </note>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { SageMakerClient, BatchAddClusterNodesCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
36+
* // const { SageMakerClient, BatchAddClusterNodesCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import
37+
* const client = new SageMakerClient(config);
38+
* const input = { // BatchAddClusterNodesRequest
39+
* ClusterName: "STRING_VALUE", // required
40+
* ClientToken: "STRING_VALUE",
41+
* NodesToAdd: [ // AddClusterNodeSpecificationList // required
42+
* { // AddClusterNodeSpecification
43+
* InstanceGroupName: "STRING_VALUE", // required
44+
* IncrementTargetCountBy: Number("int"), // required
45+
* },
46+
* ],
47+
* };
48+
* const command = new BatchAddClusterNodesCommand(input);
49+
* const response = await client.send(command);
50+
* // { // BatchAddClusterNodesResponse
51+
* // Successful: [ // NodeAdditionResultList // required
52+
* // { // NodeAdditionResult
53+
* // NodeLogicalId: "STRING_VALUE", // required
54+
* // InstanceGroupName: "STRING_VALUE", // required
55+
* // Status: "Running" || "Failure" || "Pending" || "ShuttingDown" || "SystemUpdating" || "DeepHealthCheckInProgress" || "NotFound", // required
56+
* // },
57+
* // ],
58+
* // Failed: [ // BatchAddClusterNodesErrorList // required
59+
* // { // BatchAddClusterNodesError
60+
* // InstanceGroupName: "STRING_VALUE", // required
61+
* // ErrorCode: "InstanceGroupNotFound" || "InvalidInstanceGroupStatus", // required
62+
* // FailedCount: Number("int"), // required
63+
* // Message: "STRING_VALUE",
64+
* // },
65+
* // ],
66+
* // };
67+
*
68+
* ```
69+
*
70+
* @param BatchAddClusterNodesCommandInput - {@link BatchAddClusterNodesCommandInput}
71+
* @returns {@link BatchAddClusterNodesCommandOutput}
72+
* @see {@link BatchAddClusterNodesCommandInput} for command's `input` shape.
73+
* @see {@link BatchAddClusterNodesCommandOutput} for command's `response` shape.
74+
* @see {@link SageMakerClientResolvedConfig | config} for SageMakerClient's `config` shape.
75+
*
76+
* @throws {@link ResourceLimitExceeded} (client fault)
77+
* <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
78+
*
79+
* @throws {@link ResourceNotFound} (client fault)
80+
* <p>Resource being access is not found.</p>
81+
*
82+
* @throws {@link SageMakerServiceException}
83+
* <p>Base exception class for all service exceptions from SageMaker service.</p>
84+
*
85+
*
86+
* @public
87+
*/
88+
export class BatchAddClusterNodesCommand extends $Command
89+
.classBuilder<
90+
BatchAddClusterNodesCommandInput,
91+
BatchAddClusterNodesCommandOutput,
92+
SageMakerClientResolvedConfig,
93+
ServiceInputTypes,
94+
ServiceOutputTypes
95+
>()
96+
.ep(commonParams)
97+
.m(function (this: any, Command: any, cs: any, config: SageMakerClientResolvedConfig, o: any) {
98+
return [
99+
getSerdePlugin(config, this.serialize, this.deserialize),
100+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
101+
];
102+
})
103+
.s("SageMaker", "BatchAddClusterNodes", {})
104+
.n("SageMakerClient", "BatchAddClusterNodesCommand")
105+
.f(void 0, void 0)
106+
.ser(se_BatchAddClusterNodesCommand)
107+
.de(de_BatchAddClusterNodesCommand)
108+
.build() {
109+
/** @internal type navigation helper, not in runtime. */
110+
protected declare static __types: {
111+
api: {
112+
input: BatchAddClusterNodesRequest;
113+
output: BatchAddClusterNodesResponse;
114+
};
115+
sdk: {
116+
input: BatchAddClusterNodesCommandInput;
117+
output: BatchAddClusterNodesCommandOutput;
118+
};
119+
};
120+
}

0 commit comments

Comments
 (0)