From 16531e45649f2a963f6cf6510699bf0527246499 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 28 Dec 2023 19:40:57 +0000 Subject: [PATCH] feat(client-sagemaker): Amazon SageMaker Studio now supports Docker access from within app container --- .../src/commands/CreateDomainCommand.ts | 6 ++ .../src/commands/DescribeDomainCommand.ts | 6 ++ .../commands/DescribeTrainingJobCommand.ts | 3 +- .../src/commands/UpdateDomainCommand.ts | 6 ++ .../client-sagemaker/src/models/models_1.ts | 62 ++++++++----------- .../client-sagemaker/src/models/models_2.ts | 49 +++++++++++---- .../client-sagemaker/src/models/models_3.ts | 32 ++++++---- .../client-sagemaker/src/models/models_4.ts | 15 ++++- .../src/protocols/Aws_json1_1.ts | 34 +++++++++- codegen/sdk-codegen/aws-models/sagemaker.json | 38 ++++++++++++ 10 files changed, 182 insertions(+), 69 deletions(-) diff --git a/clients/client-sagemaker/src/commands/CreateDomainCommand.ts b/clients/client-sagemaker/src/commands/CreateDomainCommand.ts index 650d2088831b..4521407ab739 100644 --- a/clients/client-sagemaker/src/commands/CreateDomainCommand.ts +++ b/clients/client-sagemaker/src/commands/CreateDomainCommand.ts @@ -246,6 +246,12 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad * DefaultResourceSpec: "", * }, * ExecutionRoleIdentityConfig: "USER_PROFILE_NAME" || "DISABLED", + * DockerSettings: { // DockerSettings + * EnableDockerAccess: "ENABLED" || "DISABLED", + * VpcOnlyTrustedAccounts: [ // VpcOnlyTrustedAccounts + * "STRING_VALUE", + * ], + * }, * }, * SubnetIds: [ // Subnets // required * "STRING_VALUE", diff --git a/clients/client-sagemaker/src/commands/DescribeDomainCommand.ts b/clients/client-sagemaker/src/commands/DescribeDomainCommand.ts index b595b7fd65d2..20a20a43efdb 100644 --- a/clients/client-sagemaker/src/commands/DescribeDomainCommand.ts +++ b/clients/client-sagemaker/src/commands/DescribeDomainCommand.ts @@ -217,6 +217,12 @@ export interface DescribeDomainCommandOutput extends DescribeDomainResponse, __M * // DefaultResourceSpec: "", * // }, * // ExecutionRoleIdentityConfig: "USER_PROFILE_NAME" || "DISABLED", + * // DockerSettings: { // DockerSettings + * // EnableDockerAccess: "ENABLED" || "DISABLED", + * // VpcOnlyTrustedAccounts: [ // VpcOnlyTrustedAccounts + * // "STRING_VALUE", + * // ], + * // }, * // }, * // AppNetworkAccessType: "PublicInternetOnly" || "VpcOnly", * // HomeEfsFileSystemKmsKeyId: "STRING_VALUE", diff --git a/clients/client-sagemaker/src/commands/DescribeTrainingJobCommand.ts b/clients/client-sagemaker/src/commands/DescribeTrainingJobCommand.ts index b9f90121a044..1971acd42b78 100644 --- a/clients/client-sagemaker/src/commands/DescribeTrainingJobCommand.ts +++ b/clients/client-sagemaker/src/commands/DescribeTrainingJobCommand.ts @@ -5,8 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { commonParams } from "../endpoint/EndpointParameters"; -import { DescribeTrainingJobRequest } from "../models/models_2"; -import { DescribeTrainingJobResponse } from "../models/models_3"; +import { DescribeTrainingJobRequest, DescribeTrainingJobResponse } from "../models/models_3"; import { de_DescribeTrainingJobCommand, se_DescribeTrainingJobCommand } from "../protocols/Aws_json1_1"; import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient"; diff --git a/clients/client-sagemaker/src/commands/UpdateDomainCommand.ts b/clients/client-sagemaker/src/commands/UpdateDomainCommand.ts index 7b5efb93124f..619a0b92abd7 100644 --- a/clients/client-sagemaker/src/commands/UpdateDomainCommand.ts +++ b/clients/client-sagemaker/src/commands/UpdateDomainCommand.ts @@ -201,6 +201,12 @@ export interface UpdateDomainCommandOutput extends UpdateDomainResponse, __Metad * SecurityGroupIds: [ // DomainSecurityGroupIds * "STRING_VALUE", * ], + * DockerSettings: { // DockerSettings + * EnableDockerAccess: "ENABLED" || "DISABLED", + * VpcOnlyTrustedAccounts: [ // VpcOnlyTrustedAccounts + * "STRING_VALUE", + * ], + * }, * }, * AppSecurityGroupManagement: "Service" || "Customer", * DefaultSpaceSettings: { // DefaultSpaceSettings diff --git a/clients/client-sagemaker/src/models/models_1.ts b/clients/client-sagemaker/src/models/models_1.ts index 283fee37b299..a4a455fc8201 100644 --- a/clients/client-sagemaker/src/models/models_1.ts +++ b/clients/client-sagemaker/src/models/models_1.ts @@ -38,6 +38,7 @@ import { ContextSource, ContinuousParameterRange, ConvergenceDetected, + FeatureStatus, HyperParameterScalingType, HyperParameterTuningJobObjective, InferenceSpecification, @@ -1275,6 +1276,24 @@ export interface UserSettings { CustomFileSystemConfigs?: CustomFileSystemConfig[]; } +/** + * @public + *

A collection of settings that configure the domain's Docker interaction.

+ */ +export interface DockerSettings { + /** + * @public + *

Indicates whether the domain can access Docker.

+ */ + EnableDockerAccess?: FeatureStatus; + + /** + * @public + *

The list of Amazon Web Services accounts that are trusted when the domain is created in VPC-only mode.

+ */ + VpcOnlyTrustedAccounts?: string[]; +} + /** * @public * @enum @@ -1349,6 +1368,12 @@ export interface DomainSettings { * sts:SourceIdentity key.

*/ ExecutionRoleIdentityConfig?: ExecutionRoleIdentityConfig; + + /** + * @public + *

A collection of settings that configure the domain's Docker interaction.

+ */ + DockerSettings?: DockerSettings; } /** @@ -11752,43 +11777,6 @@ export interface InfraCheckConfig { EnableInfraCheck?: boolean; } -/** - * @public - *

Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and - * storage paths.

- */ -export interface ProfilerConfig { - /** - * @public - *

Path to Amazon S3 storage location for system and framework metrics.

- */ - S3OutputPath?: string; - - /** - * @public - *

A time interval for capturing system metrics in milliseconds. Available values are - * 100, 200, 500, 1000 (1 second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds.

- */ - ProfilingIntervalInMilliseconds?: number; - - /** - * @public - *

Configuration information for capturing framework metrics. Available key strings for different profiling options are - * DetailedProfilingConfig, PythonProfilingConfig, and DataLoaderProfilingConfig. - * The following codes are configuration structures for the ProfilingParameters parameter. To learn more about - * how to configure the ProfilingParameters parameter, - * see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job. - *

- */ - ProfilingParameters?: Record; - - /** - * @public - *

Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it off, set to True.

- */ - DisableProfiler?: boolean; -} - /** * @internal */ diff --git a/clients/client-sagemaker/src/models/models_2.ts b/clients/client-sagemaker/src/models/models_2.ts index 29a4e44cf9c1..fc90185cf2ce 100644 --- a/clients/client-sagemaker/src/models/models_2.ts +++ b/clients/client-sagemaker/src/models/models_2.ts @@ -159,7 +159,6 @@ import { ProductionVariantManagedInstanceScaling, ProductionVariantRoutingConfig, ProductionVariantServerlessConfig, - ProfilerConfig, RecommendationJobInputConfig, RecommendationJobStoppingConditions, RecommendationJobType, @@ -176,6 +175,43 @@ import { VendorGuidance, } from "./models_1"; +/** + * @public + *

Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and + * storage paths.

+ */ +export interface ProfilerConfig { + /** + * @public + *

Path to Amazon S3 storage location for system and framework metrics.

+ */ + S3OutputPath?: string; + + /** + * @public + *

A time interval for capturing system metrics in milliseconds. Available values are + * 100, 200, 500, 1000 (1 second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds.

+ */ + ProfilingIntervalInMilliseconds?: number; + + /** + * @public + *

Configuration information for capturing framework metrics. Available key strings for different profiling options are + * DetailedProfilingConfig, PythonProfilingConfig, and DataLoaderProfilingConfig. + * The following codes are configuration structures for the ProfilingParameters parameter. To learn more about + * how to configure the ProfilingParameters parameter, + * see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job. + *

+ */ + ProfilingParameters?: Record; + + /** + * @public + *

Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it off, set to True.

+ */ + DisableProfiler?: boolean; +} + /** * @public *

Configuration information for profiling rules.

@@ -10013,17 +10049,6 @@ export interface DescribeSubscribedWorkteamResponse { SubscribedWorkteam: SubscribedWorkteam | undefined; } -/** - * @public - */ -export interface DescribeTrainingJobRequest { - /** - * @public - *

The name of the training job.

- */ - TrainingJobName: string | undefined; -} - /** * @internal */ diff --git a/clients/client-sagemaker/src/models/models_3.ts b/clients/client-sagemaker/src/models/models_3.ts index c691ea1e5295..c9c20ae0c182 100644 --- a/clients/client-sagemaker/src/models/models_3.ts +++ b/clients/client-sagemaker/src/models/models_3.ts @@ -53,6 +53,7 @@ import { _InstanceType, DebugHookConfig, DebugRuleConfiguration, + DockerSettings, EdgeOutputConfig, ExecutionRoleIdentityConfig, ExperimentConfig, @@ -71,7 +72,6 @@ import { MonitoringType, OfflineStoreConfig, OnlineStoreConfig, - ProfilerConfig, RecommendationJobType, ResourceLimits, RetryStrategy, @@ -122,6 +122,7 @@ import { OfflineStoreStatusValue, PipelineExecutionStatus, ProductionVariantSummary, + ProfilerConfig, ProfilerRuleConfiguration, RecommendationJobStatus, RecommendationMetrics, @@ -137,6 +138,17 @@ import { TrialComponentStatus, } from "./models_2"; +/** + * @public + */ +export interface DescribeTrainingJobRequest { + /** + * @public + *

The name of the training job.

+ */ + TrainingJobName: string | undefined; +} + /** * @public *

The name, value, and date and time of a metric that was emitted to Amazon CloudWatch.

@@ -2353,6 +2365,12 @@ export interface DomainSettingsForUpdate { * communication between Domain-level apps and user apps.

*/ SecurityGroupIds?: string[]; + + /** + * @public + *

A collection of settings that configure the domain's Docker interaction.

+ */ + DockerSettings?: DockerSettings; } /** @@ -11104,15 +11122,3 @@ export interface TransformJobStepMetadata { */ Arn?: string; } - -/** - * @public - *

Metadata for a tuning step.

- */ -export interface TuningJobStepMetaData { - /** - * @public - *

The Amazon Resource Name (ARN) of the tuning job that was run by this step execution.

- */ - Arn?: string; -} diff --git a/clients/client-sagemaker/src/models/models_4.ts b/clients/client-sagemaker/src/models/models_4.ts index ff24555f801c..5dfc52b27df1 100644 --- a/clients/client-sagemaker/src/models/models_4.ts +++ b/clients/client-sagemaker/src/models/models_4.ts @@ -74,7 +74,6 @@ import { ProcessingResources, ProcessingStoppingCondition, Processor, - ProfilerConfig, ProvisioningParameter, RetryStrategy, RootAccess, @@ -113,6 +112,7 @@ import { PipelineExperimentConfig, PipelineStatus, ProcessingJobStatus, + ProfilerConfig, ProfilerRuleConfiguration, ProjectStatus, ScheduleStatus, @@ -165,7 +165,6 @@ import { TrialComponentMetricSummary, TrialComponentSource, TrialSource, - TuningJobStepMetaData, UserProfileStatus, WarmPoolResourceStatus, WarmPoolStatus, @@ -173,6 +172,18 @@ import { Workteam, } from "./models_3"; +/** + * @public + *

Metadata for a tuning step.

+ */ +export interface TuningJobStepMetaData { + /** + * @public + *

The Amazon Resource Name (ARN) of the tuning job that was run by this step execution.

+ */ + Arn?: string; +} + /** * @public *

Metadata for a step execution.

diff --git a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts index 6b775c3b0087..357e0e43314b 100644 --- a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts +++ b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts @@ -1146,6 +1146,7 @@ import { DeploymentConfig, DeploymentStage, DeviceSelectionConfig, + DockerSettings, DomainSettings, DriftCheckBaselines, DriftCheckBias, @@ -1265,7 +1266,6 @@ import { ProductionVariantManagedInstanceScaling, ProductionVariantRoutingConfig, ProductionVariantServerlessConfig, - ProfilerConfig, ProvisioningParameter, PublicWorkforceTaskPrice, RealTimeInferenceConfig, @@ -1504,7 +1504,6 @@ import { DescribeStudioLifecycleConfigResponse, DescribeSubscribedWorkteamRequest, DescribeSubscribedWorkteamResponse, - DescribeTrainingJobRequest, EdgeDeploymentStatus, EdgeModel, EdgePresetDeploymentOutput, @@ -1548,6 +1547,7 @@ import { PipelineExperimentConfig, ProductionVariantStatus, ProductionVariantSummary, + ProfilerConfig, ProfilerRuleConfiguration, RealTimeInferenceRecommendation, RecommendationMetrics, @@ -1568,6 +1568,7 @@ import { WorkforceVpcConfigRequest, } from "../models/models_2"; import { + DescribeTrainingJobRequest, DescribeTrainingJobResponse, DescribeTransformJobRequest, DescribeTransformJobResponse, @@ -1802,7 +1803,6 @@ import { TrialComponentMetricSummary, TrialComponentSource, TrialSource, - TuningJobStepMetaData, WarmPoolStatus, Workforce, WorkforceVpcConfigResponse, @@ -1932,6 +1932,7 @@ import { TrialComponentSourceDetail, TrialComponentSummary, TrialSummary, + TuningJobStepMetaData, UpdateActionRequest, UpdateActionResponse, UpdateAppImageConfigRequest, @@ -21319,6 +21320,8 @@ const se_DesiredWeightAndCapacityList = (input: DesiredWeightAndCapacity[], cont // se_DisassociateTrialComponentRequest omitted. +// se_DockerSettings omitted. + // se_DomainSecurityGroupIds omitted. // se_DomainSettings omitted. @@ -23611,6 +23614,8 @@ const se_UpdateTrialComponentRequest = (input: UpdateTrialComponentRequest, cont // se_VpcConfig omitted. +// se_VpcOnlyTrustedAccounts omitted. + // se_VpcSecurityGroupIds omitted. // se_WorkforceSecurityGroupIds omitted. @@ -28083,6 +28088,16 @@ const de_DisassociateTrialComponentResponse = ( }) as any; }; +/** + * deserializeAws_json1_1DockerSettings + */ +const de_DockerSettings = (output: any, context: __SerdeContext): DockerSettings => { + return take(output, { + EnableDockerAccess: __expectString, + VpcOnlyTrustedAccounts: (_: any) => de_VpcOnlyTrustedAccounts(_, context), + }) as any; +}; + /** * deserializeAws_json1_1DomainDetails */ @@ -28127,6 +28142,7 @@ const de_DomainSecurityGroupIds = (output: any, context: __SerdeContext): string */ const de_DomainSettings = (output: any, context: __SerdeContext): DomainSettings => { return take(output, { + DockerSettings: (_: any) => de_DockerSettings(_, context), ExecutionRoleIdentityConfig: __expectString, RStudioServerProDomainSettings: (_: any) => de_RStudioServerProDomainSettings(_, context), SecurityGroupIds: (_: any) => de_DomainSecurityGroupIds(_, context), @@ -36414,6 +36430,18 @@ const de_VpcConfig = (output: any, context: __SerdeContext): VpcConfig => { }) as any; }; +/** + * deserializeAws_json1_1VpcOnlyTrustedAccounts + */ +const de_VpcOnlyTrustedAccounts = (output: any, context: __SerdeContext): string[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __expectString(entry) as any; + }); + return retVal; +}; + /** * deserializeAws_json1_1VpcSecurityGroupIds */ diff --git a/codegen/sdk-codegen/aws-models/sagemaker.json b/codegen/sdk-codegen/aws-models/sagemaker.json index 3a1f39c837c6..a33a9629ee0e 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker.json +++ b/codegen/sdk-codegen/aws-models/sagemaker.json @@ -24322,6 +24322,26 @@ "smithy.api#output": {} } }, + "com.amazonaws.sagemaker#DockerSettings": { + "type": "structure", + "members": { + "EnableDockerAccess": { + "target": "com.amazonaws.sagemaker#FeatureStatus", + "traits": { + "smithy.api#documentation": "

Indicates whether the domain can access Docker.

" + } + }, + "VpcOnlyTrustedAccounts": { + "target": "com.amazonaws.sagemaker#VpcOnlyTrustedAccounts", + "traits": { + "smithy.api#documentation": "

The list of Amazon Web Services accounts that are trusted when the domain is created in VPC-only mode.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A collection of settings that configure the domain's Docker interaction.

" + } + }, "com.amazonaws.sagemaker#DocumentSchemaVersion": { "type": "string", "traits": { @@ -24459,6 +24479,12 @@ "traits": { "smithy.api#documentation": "

The configuration for attaching a SageMaker user profile name to the execution role as a\n sts:SourceIdentity key.

" } + }, + "DockerSettings": { + "target": "com.amazonaws.sagemaker#DockerSettings", + "traits": { + "smithy.api#documentation": "

A collection of settings that configure the domain's Docker interaction.

" + } } }, "traits": { @@ -24485,6 +24511,12 @@ "traits": { "smithy.api#documentation": "

The security groups for the Amazon Virtual Private Cloud that the Domain uses for\n communication between Domain-level apps and user apps.

" } + }, + "DockerSettings": { + "target": "com.amazonaws.sagemaker#DockerSettings", + "traits": { + "smithy.api#documentation": "

A collection of settings that configure the domain's Docker interaction.

" + } } }, "traits": { @@ -65448,6 +65480,12 @@ "smithy.api#pattern": "^[-0-9a-zA-Z]+$" } }, + "com.amazonaws.sagemaker#VpcOnlyTrustedAccounts": { + "type": "list", + "member": { + "target": "com.amazonaws.sagemaker#AccountId" + } + }, "com.amazonaws.sagemaker#VpcSecurityGroupIds": { "type": "list", "member": {