Skip to content

Commit 8e57ba3

Browse files
author
awstools
committed
feat(client-sagemaker): This release enables administrators to attribute user activity and API calls from Studio notebooks, Data Wrangler and Canvas to specific users even when users share the same execution IAM role. ExecutionRoleIdentityConfig at Sagemaker domain level enables this feature.
1 parent 761dfd0 commit 8e57ba3

File tree

6 files changed

+154
-104
lines changed

6 files changed

+154
-104
lines changed

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

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7860,6 +7860,11 @@ export interface UserSettings {
78607860
RSessionAppSettings?: RSessionAppSettings;
78617861
}
78627862

7863+
export enum ExecutionRoleIdentityConfig {
7864+
DISABLED = "DISABLED",
7865+
USER_PROFILE_NAME = "USER_PROFILE_NAME",
7866+
}
7867+
78637868
/**
78647869
* <p>A collection of settings that configure the <code>RStudioServerPro</code> Domain-level
78657870
* app.</p>
@@ -7904,6 +7909,12 @@ export interface DomainSettings {
79047909
* app.</p>
79057910
*/
79067911
RStudioServerProDomainSettings?: RStudioServerProDomainSettings;
7912+
7913+
/**
7914+
* <p>The configuration for attaching a SageMaker user profile name to the execution role as a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">
7915+
* <code>sts:SourceIdentity</code> key</a>.</p>
7916+
*/
7917+
ExecutionRoleIdentityConfig?: ExecutionRoleIdentityConfig | string;
79077918
}
79087919

79097920
export interface CreateDomainRequest {
@@ -9832,16 +9843,6 @@ export enum TrainingJobEarlyStoppingType {
98329843
OFF = "Off",
98339844
}
98349845

9835-
/**
9836-
* <p>The job completion criteria.</p>
9837-
*/
9838-
export interface TuningJobCompletionCriteria {
9839-
/**
9840-
* <p>The value of the objective metric.</p>
9841-
*/
9842-
TargetObjectiveMetricValue: number | undefined;
9843-
}
9844-
98459846
/**
98469847
* @internal
98479848
*/
@@ -11344,10 +11345,3 @@ export const ParameterRangesFilterSensitiveLog = (obj: ParameterRanges): any =>
1134411345
export const ResourceLimitsFilterSensitiveLog = (obj: ResourceLimits): any => ({
1134511346
...obj,
1134611347
});
11347-
11348-
/**
11349-
* @internal
11350-
*/
11351-
export const TuningJobCompletionCriteriaFilterSensitiveLog = (obj: TuningJobCompletionCriteria): any => ({
11352-
...obj,
11353-
});

clients/client-sagemaker/src/models/models_1.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,21 @@ import {
102102
TransformJobDefinition,
103103
TransformOutput,
104104
TransformResources,
105-
TuningJobCompletionCriteria,
106105
UserContext,
107106
UserSettings,
108107
VpcConfig,
109108
} from "./models_0";
110109

110+
/**
111+
* <p>The job completion criteria.</p>
112+
*/
113+
export interface TuningJobCompletionCriteria {
114+
/**
115+
* <p>The value of the objective metric.</p>
116+
*/
117+
TargetObjectiveMetricValue: number | undefined;
118+
}
119+
111120
/**
112121
* <p>Configures a hyperparameter tuning job.</p>
113122
*/
@@ -9161,12 +9170,12 @@ export interface DescribeFlowDefinitionRequest {
91619170
FlowDefinitionName: string | undefined;
91629171
}
91639172

9164-
export enum FlowDefinitionStatus {
9165-
ACTIVE = "Active",
9166-
DELETING = "Deleting",
9167-
FAILED = "Failed",
9168-
INITIALIZING = "Initializing",
9169-
}
9173+
/**
9174+
* @internal
9175+
*/
9176+
export const TuningJobCompletionCriteriaFilterSensitiveLog = (obj: TuningJobCompletionCriteria): any => ({
9177+
...obj,
9178+
});
91709179

91719180
/**
91729181
* @internal

clients/client-sagemaker/src/models/models_2.ts

Lines changed: 14 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
ContainerDefinition,
3434
ContextSummary,
3535
EdgeOutputConfig,
36+
ExecutionRoleIdentityConfig,
3637
FeatureDefinition,
3738
FeatureType,
3839
FlowDefinitionOutputConfig,
@@ -83,7 +84,6 @@ import {
8384
ExperimentSource,
8485
FeatureGroupStatus,
8586
FeatureParameter,
86-
FlowDefinitionStatus,
8787
HumanTaskConfig,
8888
HyperParameterTrainingJobDefinition,
8989
HyperParameterTuningJobConfig,
@@ -142,6 +142,13 @@ import {
142142
TrialComponentStatus,
143143
} from "./models_1";
144144

145+
export enum FlowDefinitionStatus {
146+
ACTIVE = "Active",
147+
DELETING = "Deleting",
148+
FAILED = "Failed",
149+
INITIALIZING = "Initializing",
150+
}
151+
145152
export interface DescribeFlowDefinitionResponse {
146153
/**
147154
* <p>The Amazon Resource Name (ARN) of the flow defintion.</p>
@@ -4269,6 +4276,12 @@ export interface DomainSettingsForUpdate {
42694276
* update.</p>
42704277
*/
42714278
RStudioServerProDomainSettingsForUpdate?: RStudioServerProDomainSettingsForUpdate;
4279+
4280+
/**
4281+
* <p>The configuration for attaching a SageMaker user profile name to the execution role as a <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html">
4282+
* <code>sts:SourceIdentity</code> key</a>. This configuration can only be modified if there are no apps in the <code>InService</code> or <code>Pending</code> state.</p>
4283+
*/
4284+
ExecutionRoleIdentityConfig?: ExecutionRoleIdentityConfig | string;
42724285
}
42734286

42744287
/**
@@ -8803,75 +8816,6 @@ export interface ListNotebookInstancesInput {
88038816
AdditionalCodeRepositoryEquals?: string;
88048817
}
88058818

8806-
/**
8807-
* <p>Provides summary information for an SageMaker notebook instance.</p>
8808-
*/
8809-
export interface NotebookInstanceSummary {
8810-
/**
8811-
* <p>The name of the notebook instance that you want a summary for.</p>
8812-
*/
8813-
NotebookInstanceName: string | undefined;
8814-
8815-
/**
8816-
* <p>The Amazon Resource Name (ARN) of the notebook instance.</p>
8817-
*/
8818-
NotebookInstanceArn: string | undefined;
8819-
8820-
/**
8821-
* <p>The status of the notebook instance.</p>
8822-
*/
8823-
NotebookInstanceStatus?: NotebookInstanceStatus | string;
8824-
8825-
/**
8826-
* <p>The URL that you use to connect to the Jupyter notebook running in your notebook
8827-
* instance. </p>
8828-
*/
8829-
Url?: string;
8830-
8831-
/**
8832-
* <p>The type of ML compute instance that the notebook instance is running on.</p>
8833-
*/
8834-
InstanceType?: _InstanceType | string;
8835-
8836-
/**
8837-
* <p>A timestamp that shows when the notebook instance was created.</p>
8838-
*/
8839-
CreationTime?: Date;
8840-
8841-
/**
8842-
* <p>A timestamp that shows when the notebook instance was last modified.</p>
8843-
*/
8844-
LastModifiedTime?: Date;
8845-
8846-
/**
8847-
* <p>The name of a notebook instance lifecycle configuration associated with this notebook
8848-
* instance.</p>
8849-
* <p>For information about notebook instance lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step
8850-
* 2.1: (Optional) Customize a Notebook Instance</a>.</p>
8851-
*/
8852-
NotebookInstanceLifecycleConfigName?: string;
8853-
8854-
/**
8855-
* <p>The Git repository associated with the notebook instance as its default code
8856-
* repository. This can be either the name of a Git repository stored as a resource in your
8857-
* account, or the URL of a Git repository in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a>
8858-
* or in any other Git repository. When you open a notebook instance, it opens in the
8859-
* directory that contains this repository. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git
8860-
* Repositories with SageMaker Notebook Instances</a>.</p>
8861-
*/
8862-
DefaultCodeRepository?: string;
8863-
8864-
/**
8865-
* <p>An array of up to three Git repositories associated with the notebook instance. These
8866-
* can be either the names of Git repositories stored as resources in your account, or the
8867-
* URL of Git repositories in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a>
8868-
* or in any other Git repository. These repositories are cloned at the same level as the
8869-
* default repository of your notebook instance. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git
8870-
* Repositories with SageMaker Notebook Instances</a>.</p>
8871-
*/
8872-
AdditionalCodeRepositories?: string[];
8873-
}
8874-
88758819
/**
88768820
* @internal
88778821
*/
@@ -10612,10 +10556,3 @@ export const ListNotebookInstanceLifecycleConfigsOutputFilterSensitiveLog = (
1061210556
export const ListNotebookInstancesInputFilterSensitiveLog = (obj: ListNotebookInstancesInput): any => ({
1061310557
...obj,
1061410558
});
10615-
10616-
/**
10617-
* @internal
10618-
*/
10619-
export const NotebookInstanceSummaryFilterSensitiveLog = (obj: NotebookInstanceSummary): any => ({
10620-
...obj,
10621-
});

clients/client-sagemaker/src/models/models_3.ts

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import {
9797
MetricData,
9898
ModelPackageGroupStatus,
9999
ModelPackageStatusDetails,
100-
NotebookInstanceSummary,
100+
NotebookInstanceStatus,
101101
PipelineExecutionStatus,
102102
PipelineExperimentConfig,
103103
PipelineStatus,
@@ -120,6 +120,75 @@ import {
120120
Workteam,
121121
} from "./models_2";
122122

123+
/**
124+
* <p>Provides summary information for an SageMaker notebook instance.</p>
125+
*/
126+
export interface NotebookInstanceSummary {
127+
/**
128+
* <p>The name of the notebook instance that you want a summary for.</p>
129+
*/
130+
NotebookInstanceName: string | undefined;
131+
132+
/**
133+
* <p>The Amazon Resource Name (ARN) of the notebook instance.</p>
134+
*/
135+
NotebookInstanceArn: string | undefined;
136+
137+
/**
138+
* <p>The status of the notebook instance.</p>
139+
*/
140+
NotebookInstanceStatus?: NotebookInstanceStatus | string;
141+
142+
/**
143+
* <p>The URL that you use to connect to the Jupyter notebook running in your notebook
144+
* instance. </p>
145+
*/
146+
Url?: string;
147+
148+
/**
149+
* <p>The type of ML compute instance that the notebook instance is running on.</p>
150+
*/
151+
InstanceType?: _InstanceType | string;
152+
153+
/**
154+
* <p>A timestamp that shows when the notebook instance was created.</p>
155+
*/
156+
CreationTime?: Date;
157+
158+
/**
159+
* <p>A timestamp that shows when the notebook instance was last modified.</p>
160+
*/
161+
LastModifiedTime?: Date;
162+
163+
/**
164+
* <p>The name of a notebook instance lifecycle configuration associated with this notebook
165+
* instance.</p>
166+
* <p>For information about notebook instance lifestyle configurations, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step
167+
* 2.1: (Optional) Customize a Notebook Instance</a>.</p>
168+
*/
169+
NotebookInstanceLifecycleConfigName?: string;
170+
171+
/**
172+
* <p>The Git repository associated with the notebook instance as its default code
173+
* repository. This can be either the name of a Git repository stored as a resource in your
174+
* account, or the URL of a Git repository in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a>
175+
* or in any other Git repository. When you open a notebook instance, it opens in the
176+
* directory that contains this repository. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git
177+
* Repositories with SageMaker Notebook Instances</a>.</p>
178+
*/
179+
DefaultCodeRepository?: string;
180+
181+
/**
182+
* <p>An array of up to three Git repositories associated with the notebook instance. These
183+
* can be either the names of Git repositories stored as resources in your account, or the
184+
* URL of Git repositories in <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html">Amazon Web Services CodeCommit</a>
185+
* or in any other Git repository. These repositories are cloned at the same level as the
186+
* default repository of your notebook instance. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html">Associating Git
187+
* Repositories with SageMaker Notebook Instances</a>.</p>
188+
*/
189+
AdditionalCodeRepositories?: string[];
190+
}
191+
123192
export interface ListNotebookInstancesOutput {
124193
/**
125194
* <p>If the response to the previous <code>ListNotebookInstances</code> request was
@@ -4986,6 +5055,13 @@ export interface SearchRequest {
49865055
MaxResults?: number;
49875056
}
49885057

5058+
/**
5059+
* @internal
5060+
*/
5061+
export const NotebookInstanceSummaryFilterSensitiveLog = (obj: NotebookInstanceSummary): any => ({
5062+
...obj,
5063+
});
5064+
49895065
/**
49905066
* @internal
49915067
*/

clients/client-sagemaker/src/protocols/Aws_json1_1.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,6 @@ import {
911911
TransformOutput,
912912
TransformResources,
913913
TransformS3DataSource,
914-
TuningJobCompletionCriteria,
915914
UiTemplate,
916915
USD,
917916
UserContext,
@@ -1186,6 +1185,7 @@ import {
11861185
TrialComponentArtifact,
11871186
TrialComponentParameterValue,
11881187
TrialComponentStatus,
1188+
TuningJobCompletionCriteria,
11891189
UiConfig,
11901190
WorkforceVpcConfigRequest,
11911191
} from "../models/models_1";
@@ -1407,7 +1407,6 @@ import {
14071407
MonitoringSchedule,
14081408
MonitoringScheduleSummary,
14091409
NotebookInstanceLifecycleConfigSummary,
1410-
NotebookInstanceSummary,
14111410
ObjectiveStatusCounters,
14121411
OidcConfigForResponse,
14131412
PipelineExperimentConfig,
@@ -1471,6 +1470,7 @@ import {
14711470
ModelPackageGroup,
14721471
ModelStepMetadata,
14731472
NestedFilters,
1473+
NotebookInstanceSummary,
14741474
Parameter,
14751475
Parent,
14761476
Pipeline,
@@ -18135,6 +18135,9 @@ const serializeAws_json1_1DomainSecurityGroupIds = (input: string[], context: __
1813518135

1813618136
const serializeAws_json1_1DomainSettings = (input: DomainSettings, context: __SerdeContext): any => {
1813718137
return {
18138+
...(input.ExecutionRoleIdentityConfig != null && {
18139+
ExecutionRoleIdentityConfig: input.ExecutionRoleIdentityConfig,
18140+
}),
1813818141
...(input.RStudioServerProDomainSettings != null && {
1813918142
RStudioServerProDomainSettings: serializeAws_json1_1RStudioServerProDomainSettings(
1814018143
input.RStudioServerProDomainSettings,
@@ -18149,6 +18152,9 @@ const serializeAws_json1_1DomainSettings = (input: DomainSettings, context: __Se
1814918152

1815018153
const serializeAws_json1_1DomainSettingsForUpdate = (input: DomainSettingsForUpdate, context: __SerdeContext): any => {
1815118154
return {
18155+
...(input.ExecutionRoleIdentityConfig != null && {
18156+
ExecutionRoleIdentityConfig: input.ExecutionRoleIdentityConfig,
18157+
}),
1815218158
...(input.RStudioServerProDomainSettingsForUpdate != null && {
1815318159
RStudioServerProDomainSettingsForUpdate: serializeAws_json1_1RStudioServerProDomainSettingsForUpdate(
1815418160
input.RStudioServerProDomainSettingsForUpdate,
@@ -26931,6 +26937,7 @@ const deserializeAws_json1_1DomainSecurityGroupIds = (output: any, context: __Se
2693126937

2693226938
const deserializeAws_json1_1DomainSettings = (output: any, context: __SerdeContext): DomainSettings => {
2693326939
return {
26940+
ExecutionRoleIdentityConfig: __expectString(output.ExecutionRoleIdentityConfig),
2693426941
RStudioServerProDomainSettings:
2693526942
output.RStudioServerProDomainSettings != null
2693626943
? deserializeAws_json1_1RStudioServerProDomainSettings(output.RStudioServerProDomainSettings, context)

0 commit comments

Comments
 (0)