Skip to content

Commit 33f9fd4

Browse files
author
awstools
committed
feat(client-sagemaker): Changes include new StartSession API for SageMaker Studio spaces and CreateHubContentPresignedUrls API for SageMaker JumpStart.
1 parent 517b669 commit 33f9fd4

29 files changed

+1463
-597
lines changed

clients/client-sagemaker/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,14 @@ CreateHub
442442

443443
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/CreateHubCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/CreateHubCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/CreateHubCommandOutput/)
444444

445+
</details>
446+
<details>
447+
<summary>
448+
CreateHubContentPresignedUrls
449+
</summary>
450+
451+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/CreateHubContentPresignedUrlsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/CreateHubContentPresignedUrlsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/CreateHubContentPresignedUrlsCommandOutput/)
452+
445453
</details>
446454
<details>
447455
<summary>
@@ -2594,6 +2602,14 @@ StartPipelineExecution
25942602

25952603
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/StartPipelineExecutionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/StartPipelineExecutionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/StartPipelineExecutionCommandOutput/)
25962604

2605+
</details>
2606+
<details>
2607+
<summary>
2608+
StartSession
2609+
</summary>
2610+
2611+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/StartSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/StartSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/StartSessionCommandOutput/)
2612+
25972613
</details>
25982614
<details>
25992615
<summary>

clients/client-sagemaker/src/SageMaker.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ import {
140140
CreateFlowDefinitionCommandOutput,
141141
} from "./commands/CreateFlowDefinitionCommand";
142142
import { CreateHubCommand, CreateHubCommandInput, CreateHubCommandOutput } from "./commands/CreateHubCommand";
143+
import {
144+
CreateHubContentPresignedUrlsCommand,
145+
CreateHubContentPresignedUrlsCommandInput,
146+
CreateHubContentPresignedUrlsCommandOutput,
147+
} from "./commands/CreateHubContentPresignedUrlsCommand";
143148
import {
144149
CreateHubContentReferenceCommand,
145150
CreateHubContentReferenceCommandInput,
@@ -1385,6 +1390,11 @@ import {
13851390
StartPipelineExecutionCommandInput,
13861391
StartPipelineExecutionCommandOutput,
13871392
} from "./commands/StartPipelineExecutionCommand";
1393+
import {
1394+
StartSessionCommand,
1395+
StartSessionCommandInput,
1396+
StartSessionCommandOutput,
1397+
} from "./commands/StartSessionCommand";
13881398
import {
13891399
StopAutoMLJobCommand,
13901400
StopAutoMLJobCommandInput,
@@ -1697,6 +1707,7 @@ const commands = {
16971707
CreateFeatureGroupCommand,
16981708
CreateFlowDefinitionCommand,
16991709
CreateHubCommand,
1710+
CreateHubContentPresignedUrlsCommand,
17001711
CreateHubContentReferenceCommand,
17011712
CreateHumanTaskUiCommand,
17021713
CreateHyperParameterTuningJobCommand,
@@ -1966,6 +1977,7 @@ const commands = {
19661977
StartMonitoringScheduleCommand,
19671978
StartNotebookInstanceCommand,
19681979
StartPipelineExecutionCommand,
1980+
StartSessionCommand,
19691981
StopAutoMLJobCommand,
19701982
StopCompilationJobCommand,
19711983
StopEdgeDeploymentStageCommand,
@@ -2481,6 +2493,23 @@ export interface SageMaker {
24812493
cb: (err: any, data?: CreateHubCommandOutput) => void
24822494
): void;
24832495

2496+
/**
2497+
* @see {@link CreateHubContentPresignedUrlsCommand}
2498+
*/
2499+
createHubContentPresignedUrls(
2500+
args: CreateHubContentPresignedUrlsCommandInput,
2501+
options?: __HttpHandlerOptions
2502+
): Promise<CreateHubContentPresignedUrlsCommandOutput>;
2503+
createHubContentPresignedUrls(
2504+
args: CreateHubContentPresignedUrlsCommandInput,
2505+
cb: (err: any, data?: CreateHubContentPresignedUrlsCommandOutput) => void
2506+
): void;
2507+
createHubContentPresignedUrls(
2508+
args: CreateHubContentPresignedUrlsCommandInput,
2509+
options: __HttpHandlerOptions,
2510+
cb: (err: any, data?: CreateHubContentPresignedUrlsCommandOutput) => void
2511+
): void;
2512+
24842513
/**
24852514
* @see {@link CreateHubContentReferenceCommand}
24862515
*/
@@ -6792,6 +6821,17 @@ export interface SageMaker {
67926821
cb: (err: any, data?: StartPipelineExecutionCommandOutput) => void
67936822
): void;
67946823

6824+
/**
6825+
* @see {@link StartSessionCommand}
6826+
*/
6827+
startSession(args: StartSessionCommandInput, options?: __HttpHandlerOptions): Promise<StartSessionCommandOutput>;
6828+
startSession(args: StartSessionCommandInput, cb: (err: any, data?: StartSessionCommandOutput) => void): void;
6829+
startSession(
6830+
args: StartSessionCommandInput,
6831+
options: __HttpHandlerOptions,
6832+
cb: (err: any, data?: StartSessionCommandOutput) => void
6833+
): void;
6834+
67956835
/**
67966836
* @see {@link StopAutoMLJobCommand}
67976837
*/

clients/client-sagemaker/src/SageMakerClient.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ import {
122122
CreateFlowDefinitionCommandOutput,
123123
} from "./commands/CreateFlowDefinitionCommand";
124124
import { CreateHubCommandInput, CreateHubCommandOutput } from "./commands/CreateHubCommand";
125+
import {
126+
CreateHubContentPresignedUrlsCommandInput,
127+
CreateHubContentPresignedUrlsCommandOutput,
128+
} from "./commands/CreateHubContentPresignedUrlsCommand";
125129
import {
126130
CreateHubContentReferenceCommandInput,
127131
CreateHubContentReferenceCommandOutput,
@@ -841,6 +845,7 @@ import {
841845
StartPipelineExecutionCommandInput,
842846
StartPipelineExecutionCommandOutput,
843847
} from "./commands/StartPipelineExecutionCommand";
848+
import { StartSessionCommandInput, StartSessionCommandOutput } from "./commands/StartSessionCommand";
844849
import { StopAutoMLJobCommandInput, StopAutoMLJobCommandOutput } from "./commands/StopAutoMLJobCommand";
845850
import { StopCompilationJobCommandInput, StopCompilationJobCommandOutput } from "./commands/StopCompilationJobCommand";
846851
import {
@@ -1026,6 +1031,7 @@ export type ServiceInputTypes =
10261031
| CreateFeatureGroupCommandInput
10271032
| CreateFlowDefinitionCommandInput
10281033
| CreateHubCommandInput
1034+
| CreateHubContentPresignedUrlsCommandInput
10291035
| CreateHubContentReferenceCommandInput
10301036
| CreateHumanTaskUiCommandInput
10311037
| CreateHyperParameterTuningJobCommandInput
@@ -1295,6 +1301,7 @@ export type ServiceInputTypes =
12951301
| StartMonitoringScheduleCommandInput
12961302
| StartNotebookInstanceCommandInput
12971303
| StartPipelineExecutionCommandInput
1304+
| StartSessionCommandInput
12981305
| StopAutoMLJobCommandInput
12991306
| StopCompilationJobCommandInput
13001307
| StopEdgeDeploymentStageCommandInput
@@ -1389,6 +1396,7 @@ export type ServiceOutputTypes =
13891396
| CreateFeatureGroupCommandOutput
13901397
| CreateFlowDefinitionCommandOutput
13911398
| CreateHubCommandOutput
1399+
| CreateHubContentPresignedUrlsCommandOutput
13921400
| CreateHubContentReferenceCommandOutput
13931401
| CreateHumanTaskUiCommandOutput
13941402
| CreateHyperParameterTuningJobCommandOutput
@@ -1658,6 +1666,7 @@ export type ServiceOutputTypes =
16581666
| StartMonitoringScheduleCommandOutput
16591667
| StartNotebookInstanceCommandOutput
16601668
| StartPipelineExecutionCommandOutput
1669+
| StartSessionCommandOutput
16611670
| StopAutoMLJobCommandOutput
16621671
| StopCompilationJobCommandOutput
16631672
| StopEdgeDeploymentStageCommandOutput

clients/client-sagemaker/src/commands/CreateDomainCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad
287287
* SingleSignOnApplicationArn: "STRING_VALUE",
288288
* },
289289
* },
290-
* SubnetIds: [ // Subnets // required
290+
* SubnetIds: [ // Subnets
291291
* "STRING_VALUE",
292292
* ],
293-
* VpcId: "STRING_VALUE", // required
293+
* VpcId: "STRING_VALUE",
294294
* Tags: [ // TagList
295295
* { // Tag
296296
* Key: "STRING_VALUE", // required
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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 { CreateHubContentPresignedUrlsRequest, CreateHubContentPresignedUrlsResponse } from "../models/models_1";
9+
import {
10+
de_CreateHubContentPresignedUrlsCommand,
11+
se_CreateHubContentPresignedUrlsCommand,
12+
} from "../protocols/Aws_json1_1";
13+
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link CreateHubContentPresignedUrlsCommand}.
24+
*/
25+
export interface CreateHubContentPresignedUrlsCommandInput extends CreateHubContentPresignedUrlsRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link CreateHubContentPresignedUrlsCommand}.
30+
*/
31+
export interface CreateHubContentPresignedUrlsCommandOutput
32+
extends CreateHubContentPresignedUrlsResponse,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>Creates presigned URLs for accessing hub content artifacts. This operation generates time-limited, secure URLs that allow direct download of model artifacts and associated files from Amazon SageMaker hub content, including gated models that require end-user license agreement acceptance.</p>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { SageMakerClient, CreateHubContentPresignedUrlsCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
41+
* // const { SageMakerClient, CreateHubContentPresignedUrlsCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import
42+
* const client = new SageMakerClient(config);
43+
* const input = { // CreateHubContentPresignedUrlsRequest
44+
* HubName: "STRING_VALUE", // required
45+
* HubContentType: "Model" || "Notebook" || "ModelReference", // required
46+
* HubContentName: "STRING_VALUE", // required
47+
* HubContentVersion: "STRING_VALUE",
48+
* AccessConfig: { // PresignedUrlAccessConfig
49+
* AcceptEula: true || false,
50+
* ExpectedS3Url: "STRING_VALUE",
51+
* },
52+
* MaxResults: Number("int"),
53+
* NextToken: "STRING_VALUE",
54+
* };
55+
* const command = new CreateHubContentPresignedUrlsCommand(input);
56+
* const response = await client.send(command);
57+
* // { // CreateHubContentPresignedUrlsResponse
58+
* // AuthorizedUrlConfigs: [ // AuthorizedUrlConfigs // required
59+
* // { // AuthorizedUrl
60+
* // Url: "STRING_VALUE",
61+
* // LocalPath: "STRING_VALUE",
62+
* // },
63+
* // ],
64+
* // NextToken: "STRING_VALUE",
65+
* // };
66+
*
67+
* ```
68+
*
69+
* @param CreateHubContentPresignedUrlsCommandInput - {@link CreateHubContentPresignedUrlsCommandInput}
70+
* @returns {@link CreateHubContentPresignedUrlsCommandOutput}
71+
* @see {@link CreateHubContentPresignedUrlsCommandInput} for command's `input` shape.
72+
* @see {@link CreateHubContentPresignedUrlsCommandOutput} for command's `response` shape.
73+
* @see {@link SageMakerClientResolvedConfig | config} for SageMakerClient's `config` shape.
74+
*
75+
* @throws {@link SageMakerServiceException}
76+
* <p>Base exception class for all service exceptions from SageMaker service.</p>
77+
*
78+
*
79+
* @public
80+
*/
81+
export class CreateHubContentPresignedUrlsCommand extends $Command
82+
.classBuilder<
83+
CreateHubContentPresignedUrlsCommandInput,
84+
CreateHubContentPresignedUrlsCommandOutput,
85+
SageMakerClientResolvedConfig,
86+
ServiceInputTypes,
87+
ServiceOutputTypes
88+
>()
89+
.ep(commonParams)
90+
.m(function (this: any, Command: any, cs: any, config: SageMakerClientResolvedConfig, o: any) {
91+
return [
92+
getSerdePlugin(config, this.serialize, this.deserialize),
93+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
94+
];
95+
})
96+
.s("SageMaker", "CreateHubContentPresignedUrls", {})
97+
.n("SageMakerClient", "CreateHubContentPresignedUrlsCommand")
98+
.f(void 0, void 0)
99+
.ser(se_CreateHubContentPresignedUrlsCommand)
100+
.de(de_CreateHubContentPresignedUrlsCommand)
101+
.build() {
102+
/** @internal type navigation helper, not in runtime. */
103+
protected declare static __types: {
104+
api: {
105+
input: CreateHubContentPresignedUrlsRequest;
106+
output: CreateHubContentPresignedUrlsResponse;
107+
};
108+
sdk: {
109+
input: CreateHubContentPresignedUrlsCommandInput;
110+
output: CreateHubContentPresignedUrlsCommandOutput;
111+
};
112+
};
113+
}

clients/client-sagemaker/src/commands/CreateModelPackageCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
CreateModelPackageInput,
1010
CreateModelPackageInputFilterSensitiveLog,
1111
CreateModelPackageOutput,
12-
} from "../models/models_1";
12+
} from "../models/models_2";
1313
import { de_CreateModelPackageCommand, se_CreateModelPackageCommand } from "../protocols/Aws_json1_1";
1414
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";
1515

clients/client-sagemaker/src/commands/CreateModelPackageGroupCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { CreateModelPackageGroupInput } from "../models/models_1";
9-
import { CreateModelPackageGroupOutput } from "../models/models_2";
8+
import { CreateModelPackageGroupInput, CreateModelPackageGroupOutput } from "../models/models_2";
109
import { de_CreateModelPackageGroupCommand, se_CreateModelPackageGroupCommand } from "../protocols/Aws_json1_1";
1110
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";
1211

clients/client-sagemaker/src/commands/CreateSpaceCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export interface CreateSpaceCommandOutput extends CreateSpaceResponse, __Metadat
131131
* },
132132
* },
133133
* ],
134+
* RemoteAccess: "ENABLED" || "DISABLED",
134135
* },
135136
* OwnershipSettings: { // OwnershipSettings
136137
* OwnerUserProfileName: "STRING_VALUE", // required

clients/client-sagemaker/src/commands/DescribeFeatureGroupCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { DescribeFeatureGroupRequest } from "../models/models_2";
9-
import { DescribeFeatureGroupResponse } from "../models/models_3";
8+
import { DescribeFeatureGroupRequest, DescribeFeatureGroupResponse } from "../models/models_3";
109
import { de_DescribeFeatureGroupCommand, se_DescribeFeatureGroupCommand } from "../protocols/Aws_json1_1";
1110
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";
1211

clients/client-sagemaker/src/commands/DescribeSpaceCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export interface DescribeSpaceCommandOutput extends DescribeSpaceResponse, __Met
137137
* // },
138138
* // },
139139
* // ],
140+
* // RemoteAccess: "ENABLED" || "DISABLED",
140141
* // },
141142
* // OwnershipSettings: { // OwnershipSettings
142143
* // OwnerUserProfileName: "STRING_VALUE", // required

0 commit comments

Comments
 (0)