Class: AWSCDK::Sagemaker::CfnDomain::UserSettingsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_domain.rb

Overview

A collection of settings that apply to users of Amazon SageMaker Studio.

These settings are specified when the CreateUserProfile API is called, and as DefaultUserSettings when the CreateDomain API is called.

SecurityGroups is aggregated when specified in both calls. For all other settings in UserSettings , the values specified in CreateUserProfile take precedence over those specified in CreateDomain .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution_role:, auto_mount_home_efs: nil, code_editor_app_settings: nil, custom_file_system_configs: nil, custom_posix_user_config: nil, default_landing_uri: nil, jupyter_lab_app_settings: nil, jupyter_server_app_settings: nil, kernel_gateway_app_settings: nil, r_session_app_settings: nil, r_studio_server_pro_app_settings: nil, security_groups: nil, sharing_settings: nil, space_storage_settings: nil, studio_web_portal: nil, studio_web_portal_settings: nil) ⇒ UserSettingsProperty

Returns a new instance of UserSettingsProperty.

Parameters:



2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
# File 'sagemaker/cfn_domain.rb', line 2297

def initialize(execution_role:, auto_mount_home_efs: nil, code_editor_app_settings: nil, custom_file_system_configs: nil, custom_posix_user_config: nil, default_landing_uri: nil, jupyter_lab_app_settings: nil, jupyter_server_app_settings: nil, kernel_gateway_app_settings: nil, r_session_app_settings: nil, r_studio_server_pro_app_settings: nil, security_groups: nil, sharing_settings: nil, space_storage_settings: nil, studio_web_portal: nil, studio_web_portal_settings: nil)
  @execution_role = execution_role
  Jsii::Type.check_type(@execution_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRole")
  @auto_mount_home_efs = auto_mount_home_efs
  Jsii::Type.check_type(@auto_mount_home_efs, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "autoMountHomeEfs") unless @auto_mount_home_efs.nil?
  @code_editor_app_settings = code_editor_app_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::CodeEditorAppSettingsProperty.new(**code_editor_app_settings.transform_keys(&:to_sym)) : code_editor_app_settings
  Jsii::Type.check_type(@code_editor_app_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLkNvZGVFZGl0b3JBcHBTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "codeEditorAppSettings") unless @code_editor_app_settings.nil?
  @custom_file_system_configs = custom_file_system_configs
  Jsii::Type.check_type(@custom_file_system_configs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2FnZW1ha2VyLkNmbkRvbWFpbi5DdXN0b21GaWxlU3lzdGVtQ29uZmlnUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "customFileSystemConfigs") unless @custom_file_system_configs.nil?
  @custom_posix_user_config = custom_posix_user_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::CustomPosixUserConfigProperty.new(**custom_posix_user_config.transform_keys(&:to_sym)) : custom_posix_user_config
  Jsii::Type.check_type(@custom_posix_user_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLkN1c3RvbVBvc2l4VXNlckNvbmZpZ1Byb3BlcnR5In1dfX0=")), "customPosixUserConfig") unless @custom_posix_user_config.nil?
  @default_landing_uri = default_landing_uri
  Jsii::Type.check_type(@default_landing_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultLandingUri") unless @default_landing_uri.nil?
  @jupyter_lab_app_settings = jupyter_lab_app_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::JupyterLabAppSettingsProperty.new(**jupyter_lab_app_settings.transform_keys(&:to_sym)) : jupyter_lab_app_settings
  Jsii::Type.check_type(@jupyter_lab_app_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLkp1cHl0ZXJMYWJBcHBTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "jupyterLabAppSettings") unless @jupyter_lab_app_settings.nil?
  @jupyter_server_app_settings = jupyter_server_app_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::JupyterServerAppSettingsProperty.new(**jupyter_server_app_settings.transform_keys(&:to_sym)) : jupyter_server_app_settings
  Jsii::Type.check_type(@jupyter_server_app_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLkp1cHl0ZXJTZXJ2ZXJBcHBTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "jupyterServerAppSettings") unless @jupyter_server_app_settings.nil?
  @kernel_gateway_app_settings = kernel_gateway_app_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::KernelGatewayAppSettingsProperty.new(**kernel_gateway_app_settings.transform_keys(&:to_sym)) : kernel_gateway_app_settings
  Jsii::Type.check_type(@kernel_gateway_app_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLktlcm5lbEdhdGV3YXlBcHBTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "kernelGatewayAppSettings") unless @kernel_gateway_app_settings.nil?
  @r_session_app_settings = r_session_app_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::RSessionAppSettingsProperty.new(**r_session_app_settings.transform_keys(&:to_sym)) : r_session_app_settings
  Jsii::Type.check_type(@r_session_app_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLlJTZXNzaW9uQXBwU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "rSessionAppSettings") unless @r_session_app_settings.nil?
  @r_studio_server_pro_app_settings = r_studio_server_pro_app_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::RStudioServerProAppSettingsProperty.new(**r_studio_server_pro_app_settings.transform_keys(&:to_sym)) : r_studio_server_pro_app_settings
  Jsii::Type.check_type(@r_studio_server_pro_app_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLlJTdHVkaW9TZXJ2ZXJQcm9BcHBTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "rStudioServerProAppSettings") unless @r_studio_server_pro_app_settings.nil?
  @security_groups = security_groups
  Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "securityGroups") unless @security_groups.nil?
  @sharing_settings = sharing_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::SharingSettingsProperty.new(**sharing_settings.transform_keys(&:to_sym)) : sharing_settings
  Jsii::Type.check_type(@sharing_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLlNoYXJpbmdTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "sharingSettings") unless @sharing_settings.nil?
  @space_storage_settings = space_storage_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::DefaultSpaceStorageSettingsProperty.new(**space_storage_settings.transform_keys(&:to_sym)) : space_storage_settings
  Jsii::Type.check_type(@space_storage_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLkRlZmF1bHRTcGFjZVN0b3JhZ2VTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "spaceStorageSettings") unless @space_storage_settings.nil?
  @studio_web_portal = studio_web_portal
  Jsii::Type.check_type(@studio_web_portal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "studioWebPortal") unless @studio_web_portal.nil?
  @studio_web_portal_settings = studio_web_portal_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::StudioWebPortalSettingsProperty.new(**studio_web_portal_settings.transform_keys(&:to_sym)) : studio_web_portal_settings
  Jsii::Type.check_type(@studio_web_portal_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLlN0dWRpb1dlYlBvcnRhbFNldHRpbmdzUHJvcGVydHkifV19fQ==")), "studioWebPortalSettings") unless @studio_web_portal_settings.nil?
end

Instance Attribute Details

#auto_mount_home_efsString? (readonly)

Indicates whether auto-mounting of an EFS volume is supported for the user profile.

The DefaultAsDomain value is only supported for user profiles. Do not use the DefaultAsDomain value when setting this parameter for a domain.

SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces.



2347
2348
2349
# File 'sagemaker/cfn_domain.rb', line 2347

def auto_mount_home_efs
  @auto_mount_home_efs
end

#code_editor_app_settingsAWSCDK::IResolvable, ... (readonly)

The Code Editor application settings.

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.



2354
2355
2356
# File 'sagemaker/cfn_domain.rb', line 2354

def code_editor_app_settings
  @code_editor_app_settings
end

#custom_file_system_configsAWSCDK::IResolvable, ... (readonly)

The settings for assigning a custom file system to a user profile.

Permitted users can access this file system in Amazon SageMaker AI Studio.

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.



2363
2364
2365
# File 'sagemaker/cfn_domain.rb', line 2363

def custom_file_system_configs
  @custom_file_system_configs
end

#custom_posix_user_configAWSCDK::IResolvable, ... (readonly)

Details about the POSIX identity that is used for file system operations.

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.



2370
2371
2372
# File 'sagemaker/cfn_domain.rb', line 2370

def custom_posix_user_config
  @custom_posix_user_config
end

#default_landing_uriString? (readonly)

The default experience that the user is directed to when accessing the domain. The supported values are:.

  • studio:: : Indicates that Studio is the default experience. This value can only be passed if StudioWebPortal is set to ENABLED .
  • app:JupyterServer: : Indicates that Studio Classic is the default experience.


2378
2379
2380
# File 'sagemaker/cfn_domain.rb', line 2378

def default_landing_uri
  @default_landing_uri
end

#execution_roleString (readonly)

The execution role for the user.

SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces.



2338
2339
2340
# File 'sagemaker/cfn_domain.rb', line 2338

def execution_role
  @execution_role
end

#jupyter_lab_app_settingsAWSCDK::IResolvable, ... (readonly)

The settings for the JupyterLab application.

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.



2385
2386
2387
# File 'sagemaker/cfn_domain.rb', line 2385

def jupyter_lab_app_settings
  @jupyter_lab_app_settings
end

#jupyter_server_app_settingsAWSCDK::IResolvable, ... (readonly)

The Jupyter server's app settings.



2390
2391
2392
# File 'sagemaker/cfn_domain.rb', line 2390

def jupyter_server_app_settings
  @jupyter_server_app_settings
end

#kernel_gateway_app_settingsAWSCDK::IResolvable, ... (readonly)

The kernel gateway app settings.



2395
2396
2397
# File 'sagemaker/cfn_domain.rb', line 2395

def kernel_gateway_app_settings
  @kernel_gateway_app_settings
end

#r_session_app_settingsAWSCDK::IResolvable, ... (readonly)

A collection of settings that configure the RSessionGateway app.



2400
2401
2402
# File 'sagemaker/cfn_domain.rb', line 2400

def r_session_app_settings
  @r_session_app_settings
end

#r_studio_server_pro_app_settingsAWSCDK::IResolvable, ... (readonly)

A collection of settings that configure user interaction with the RStudioServerPro app.



2405
2406
2407
# File 'sagemaker/cfn_domain.rb', line 2405

def r_studio_server_pro_app_settings
  @r_studio_server_pro_app_settings
end

#security_groupsArray<String>? (readonly)

The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for communication.

Optional when the CreateDomain.AppNetworkAccessType parameter is set to PublicInternetOnly .

Required when the CreateDomain.AppNetworkAccessType parameter is set to VpcOnly , unless specified as part of the DefaultUserSettings for the domain.

Amazon SageMaker AI adds a security group to allow NFS traffic from Amazon SageMaker AI Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.



2418
2419
2420
# File 'sagemaker/cfn_domain.rb', line 2418

def security_groups
  @security_groups
end

#sharing_settingsAWSCDK::IResolvable, ... (readonly)

Specifies options for sharing Amazon SageMaker AI Studio notebooks.



2423
2424
2425
# File 'sagemaker/cfn_domain.rb', line 2423

def sharing_settings
  @sharing_settings
end

#space_storage_settingsAWSCDK::IResolvable, ... (readonly)

The storage settings for a space.

SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.



2430
2431
2432
# File 'sagemaker/cfn_domain.rb', line 2430

def space_storage_settings
  @space_storage_settings
end

#studio_web_portalString? (readonly)

Whether the user can access Studio.

If this value is set to DISABLED , the user cannot access Studio, even if that is the default experience for the domain.



2437
2438
2439
# File 'sagemaker/cfn_domain.rb', line 2437

def studio_web_portal
  @studio_web_portal
end

#studio_web_portal_settingsAWSCDK::IResolvable, ... (readonly)

Studio settings.

If these settings are applied on a user level, they take priority over the settings applied on a domain level.



2444
2445
2446
# File 'sagemaker/cfn_domain.rb', line 2444

def studio_web_portal_settings
  @studio_web_portal_settings
end

Class Method Details

.jsii_propertiesObject



2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
# File 'sagemaker/cfn_domain.rb', line 2446

def self.jsii_properties
  {
    :execution_role => "executionRole",
    :auto_mount_home_efs => "autoMountHomeEfs",
    :code_editor_app_settings => "codeEditorAppSettings",
    :custom_file_system_configs => "customFileSystemConfigs",
    :custom_posix_user_config => "customPosixUserConfig",
    :default_landing_uri => "defaultLandingUri",
    :jupyter_lab_app_settings => "jupyterLabAppSettings",
    :jupyter_server_app_settings => "jupyterServerAppSettings",
    :kernel_gateway_app_settings => "kernelGatewayAppSettings",
    :r_session_app_settings => "rSessionAppSettings",
    :r_studio_server_pro_app_settings => "rStudioServerProAppSettings",
    :security_groups => "securityGroups",
    :sharing_settings => "sharingSettings",
    :space_storage_settings => "spaceStorageSettings",
    :studio_web_portal => "studioWebPortal",
    :studio_web_portal_settings => "studioWebPortalSettings",
  }
end

Instance Method Details

#to_jsiiObject



2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
# File 'sagemaker/cfn_domain.rb', line 2467

def to_jsii
  result = {}
  result.merge!({
    "executionRole" => @execution_role,
    "autoMountHomeEfs" => @auto_mount_home_efs,
    "codeEditorAppSettings" => @code_editor_app_settings,
    "customFileSystemConfigs" => @custom_file_system_configs,
    "customPosixUserConfig" => @custom_posix_user_config,
    "defaultLandingUri" => @default_landing_uri,
    "jupyterLabAppSettings" => @jupyter_lab_app_settings,
    "jupyterServerAppSettings" => @jupyter_server_app_settings,
    "kernelGatewayAppSettings" => @kernel_gateway_app_settings,
    "rSessionAppSettings" => @r_session_app_settings,
    "rStudioServerProAppSettings" => @r_studio_server_pro_app_settings,
    "securityGroups" => @security_groups,
    "sharingSettings" => @sharing_settings,
    "spaceStorageSettings" => @space_storage_settings,
    "studioWebPortal" => @studio_web_portal,
    "studioWebPortalSettings" => @studio_web_portal_settings,
  })
  result.compact
end