Class: AWSCDK::Sagemaker::CfnDomainProps

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

Overview

Properties for defining a CfnDomain.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auth_mode:, default_user_settings:, domain_name:, app_network_access_type: nil, app_security_group_management: nil, default_space_settings: nil, domain_settings: nil, home_efs_file_system_creation: nil, kms_key_id: nil, subnet_ids: nil, tag_propagation: nil, tags: nil, vpc_id: nil) ⇒ CfnDomainProps

Returns a new instance of CfnDomainProps.

Parameters:

  • auth_mode (String)

    The mode of authentication that members use to access the Domain.

  • default_user_settings (AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnDomain::UserSettingsProperty)

    The default user settings.

  • domain_name (String)

    The domain name.

  • app_network_access_type (String, nil) (defaults to: nil)

    Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly .

  • app_security_group_management (String, nil) (defaults to: nil)

    The entity that creates and manages the required security groups for inter-app communication in VpcOnly mode.

  • default_space_settings (AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnDomain::DefaultSpaceSettingsProperty, nil) (defaults to: nil)

    The default settings for shared spaces that users create in the domain.

  • domain_settings (AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnDomain::DomainSettingsProperty, nil) (defaults to: nil)

    A collection of settings that apply to the SageMaker Domain .

  • home_efs_file_system_creation (String, nil) (defaults to: nil)

    Indicates whether a home EFS file system is created for the domain.

  • kms_key_id (String, nil) (defaults to: nil)

    SageMaker uses AWS KMS to encrypt the EFS volume attached to the Domain with an AWS managed customer master key (CMK) by default.

  • subnet_ids (Array<String, AWSCDK::Interfaces::AWSEC2::ISubnetRef>, nil) (defaults to: nil)

    The VPC subnets that Studio uses for communication.

  • tag_propagation (String, nil) (defaults to: nil)

    Indicates whether the tags added to Domain, User Profile and Space entity is propagated to all SageMaker resources.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Tags to associated with the Domain.

  • vpc_id (String, AWSCDK::Interfaces::AWSEC2::IVPCRef, nil) (defaults to: nil)

    The ID of the Amazon Virtual Private Cloud (Amazon VPC) that Studio uses for communication.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'sagemaker/cfn_domain_props.rb', line 22

def initialize(auth_mode:, default_user_settings:, domain_name:, app_network_access_type: nil, app_security_group_management: nil, default_space_settings: nil, domain_settings: nil, home_efs_file_system_creation: nil, kms_key_id: nil, subnet_ids: nil, tag_propagation: nil, tags: nil, vpc_id: nil)
  @auth_mode = auth_mode
  Jsii::Type.check_type(@auth_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authMode")
  @default_user_settings = .is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::UserSettingsProperty.new(**.transform_keys(&:to_sym)) : 
  Jsii::Type.check_type(@default_user_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLlVzZXJTZXR0aW5nc1Byb3BlcnR5In1dfX0=")), "defaultUserSettings")
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  @app_network_access_type = app_network_access_type
  Jsii::Type.check_type(@app_network_access_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "appNetworkAccessType") unless @app_network_access_type.nil?
  @app_security_group_management = app_security_group_management
  Jsii::Type.check_type(@app_security_group_management, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "appSecurityGroupManagement") unless @app_security_group_management.nil?
  @default_space_settings = default_space_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::DefaultSpaceSettingsProperty.new(**default_space_settings.transform_keys(&:to_sym)) : default_space_settings
  Jsii::Type.check_type(@default_space_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLkRlZmF1bHRTcGFjZVNldHRpbmdzUHJvcGVydHkifV19fQ==")), "defaultSpaceSettings") unless @default_space_settings.nil?
  @domain_settings = domain_settings.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnDomain::DomainSettingsProperty.new(**domain_settings.transform_keys(&:to_sym)) : domain_settings
  Jsii::Type.check_type(@domain_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuRG9tYWluLkRvbWFpblNldHRpbmdzUHJvcGVydHkifV19fQ==")), "domainSettings") unless @domain_settings.nil?
  @home_efs_file_system_creation = home_efs_file_system_creation
  Jsii::Type.check_type(@home_efs_file_system_creation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "homeEfsFileSystemCreation") unless @home_efs_file_system_creation.nil?
  @kms_key_id = kms_key_id
  Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.nil?
  @subnet_ids = subnet_ids
  Jsii::Type.check_type(@subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU3VibmV0UmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "subnetIds") unless @subnet_ids.nil?
  @tag_propagation = tag_propagation
  Jsii::Type.check_type(@tag_propagation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagPropagation") unless @tag_propagation.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @vpc_id = vpc_id
  Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVZQQ1JlZiJ9XX19")), "vpcId") unless @vpc_id.nil?
end

Instance Attribute Details

#app_network_access_typeString? (readonly)

Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly .

  • PublicInternetOnly - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI , which allows direct internet access
  • VpcOnly - All Studio traffic is through the specified VPC and subnets

Valid Values : PublicInternetOnly | VpcOnly



77
78
79
# File 'sagemaker/cfn_domain_props.rb', line 77

def app_network_access_type
  @app_network_access_type
end

#app_security_group_managementString? (readonly)

The entity that creates and manages the required security groups for inter-app communication in VpcOnly mode.

Required when CreateDomain.AppNetworkAccessType is VpcOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided. If setting up the domain for use with RStudio, this value must be set to Service .

Allowed Values : Service | Customer



86
87
88
# File 'sagemaker/cfn_domain_props.rb', line 86

def app_security_group_management
  @app_security_group_management
end

#auth_modeString (readonly)

The mode of authentication that members use to access the Domain.

Valid Values : SSO | IAM



57
58
59
# File 'sagemaker/cfn_domain_props.rb', line 57

def auth_mode
  @auth_mode
end

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

The default settings for shared spaces that users create in the domain.

SageMaker applies these settings only to shared spaces. It doesn't apply them to private spaces.



93
94
95
# File 'sagemaker/cfn_domain_props.rb', line 93

def default_space_settings
  @default_space_settings
end

#default_user_settingsAWSCDK::IResolvable, AWSCDK::Sagemaker::CfnDomain::UserSettingsProperty (readonly)

The default user settings.



62
63
64
# File 'sagemaker/cfn_domain_props.rb', line 62

def 
  @default_user_settings
end

#domain_nameString (readonly)

The domain name.



67
68
69
# File 'sagemaker/cfn_domain_props.rb', line 67

def domain_name
  @domain_name
end

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

A collection of settings that apply to the SageMaker Domain .

These settings are specified through the CreateDomain API call.



100
101
102
# File 'sagemaker/cfn_domain_props.rb', line 100

def domain_settings
  @domain_settings
end

#home_efs_file_system_creationString? (readonly)

Indicates whether a home EFS file system is created for the domain.

Set to Disabled to skip EFS creation and reduce domain creation time.



107
108
109
# File 'sagemaker/cfn_domain_props.rb', line 107

def home_efs_file_system_creation
  @home_efs_file_system_creation
end

#kms_key_idString? (readonly)

SageMaker uses AWS KMS to encrypt the EFS volume attached to the Domain with an AWS managed customer master key (CMK) by default.

For more control, specify a customer managed CMK.

Length Constraints : Maximum length of 2048.

Pattern : .*



118
119
120
# File 'sagemaker/cfn_domain_props.rb', line 118

def kms_key_id
  @kms_key_id
end

#subnet_idsArray<String, AWSCDK::Interfaces::AWSEC2::ISubnetRef>? (readonly)

The VPC subnets that Studio uses for communication.

Length Constraints : Maximum length of 32.

Array members : Minimum number of 1 item. Maximum number of 16 items.

Pattern : [-0-9a-zA-Z]+



129
130
131
# File 'sagemaker/cfn_domain_props.rb', line 129

def subnet_ids
  @subnet_ids
end

#tag_propagationString? (readonly)

Indicates whether the tags added to Domain, User Profile and Space entity is propagated to all SageMaker resources.



134
135
136
# File 'sagemaker/cfn_domain_props.rb', line 134

def tag_propagation
  @tag_propagation
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Tags to associated with the Domain.

Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API.

Tags that you specify for the Domain are also added to all apps that are launched in the Domain.

Array members : Minimum number of 0 items. Maximum number of 50 items.



145
146
147
# File 'sagemaker/cfn_domain_props.rb', line 145

def tags
  @tags
end

#vpc_idString, ... (readonly)

The ID of the Amazon Virtual Private Cloud (Amazon VPC) that Studio uses for communication.

Length Constraints : Maximum length of 32.

Pattern : [-0-9a-zA-Z]+



154
155
156
# File 'sagemaker/cfn_domain_props.rb', line 154

def vpc_id
  @vpc_id
end

Class Method Details

.jsii_propertiesObject



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'sagemaker/cfn_domain_props.rb', line 156

def self.jsii_properties
  {
    :auth_mode => "authMode",
    :default_user_settings => "defaultUserSettings",
    :domain_name => "domainName",
    :app_network_access_type => "appNetworkAccessType",
    :app_security_group_management => "appSecurityGroupManagement",
    :default_space_settings => "defaultSpaceSettings",
    :domain_settings => "domainSettings",
    :home_efs_file_system_creation => "homeEfsFileSystemCreation",
    :kms_key_id => "kmsKeyId",
    :subnet_ids => "subnetIds",
    :tag_propagation => "tagPropagation",
    :tags => "tags",
    :vpc_id => "vpcId",
  }
end

Instance Method Details

#to_jsiiObject



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'sagemaker/cfn_domain_props.rb', line 174

def to_jsii
  result = {}
  result.merge!({
    "authMode" => @auth_mode,
    "defaultUserSettings" => @default_user_settings,
    "domainName" => @domain_name,
    "appNetworkAccessType" => @app_network_access_type,
    "appSecurityGroupManagement" => @app_security_group_management,
    "defaultSpaceSettings" => @default_space_settings,
    "domainSettings" => @domain_settings,
    "homeEfsFileSystemCreation" => @home_efs_file_system_creation,
    "kmsKeyId" => @kms_key_id,
    "subnetIds" => @subnet_ids,
    "tagPropagation" => @tag_propagation,
    "tags" => @tags,
    "vpcId" => @vpc_id,
  })
  result.compact
end