class CfnDomainPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.SageMaker.Mixins.CfnDomainPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awssagemaker/mixins#CfnDomainPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.sagemaker.mixins.CfnDomainPropsMixin |
Python | aws_cdk.mixins_preview.aws_sagemaker.mixins.CfnDomainPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_sagemaker » mixins » CfnDomainPropsMixin |
Implements
IMixin
Extends
Mixin
Creates a Domain .
A domain consists of an associated Amazon Elastic File System volume, a list of authorized users, and a variety of security, application, policy, and Amazon Virtual Private Cloud (VPC) configurations. Users within a domain can share notebook files and other artifacts with each other.
EFS storage
When a domain is created, an EFS volume is created for use by all of the users within the domain. Each user receives a private home directory within the EFS volume for notebooks, Git repositories, and data files.
SageMaker AI uses the AWS Key Management Service ( AWS KMS) to encrypt the EFS volume attached to the domain with an AWS managed key by default. For more control, you can specify a customer managed key. For more information, see Protect Data at Rest Using Encryption .
VPC configuration
All traffic between the domain and the Amazon EFS volume is through the specified VPC and subnets. For other traffic, you can specify the AppNetworkAccessType parameter. AppNetworkAccessType corresponds to the network access type that you choose when you onboard to the domain. The following options are available:
PublicInternetOnly- Non-EFS traffic goes through a VPC managed by Amazon SageMaker AI, which allows internet access. This is the default value.VpcOnly- All traffic is through the specified VPC and subnets. Internet access is disabled by default. To allow internet access, you must specify a NAT gateway.
When internet access is disabled, you won't be able to run a Amazon SageMaker AI Studio notebook or to train or host models unless your VPC has an interface endpoint to the SageMaker AI API and runtime or a NAT gateway and your security groups allow outbound connections.
NFS traffic over TCP on port 2049 needs to be allowed in both inbound and outbound rules in order to launch a Amazon SageMaker AI Studio app successfully.
For more information, see Connect Amazon SageMaker AI Studio Notebooks to Resources in a VPC .
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-domain.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as sagemaker_mixins } from '@aws-cdk/mixins-preview/aws-sagemaker';
const cfnDomainPropsMixin = new sagemaker_mixins.CfnDomainPropsMixin({
appNetworkAccessType: 'appNetworkAccessType',
appSecurityGroupManagement: 'appSecurityGroupManagement',
authMode: 'authMode',
defaultSpaceSettings: {
customFileSystemConfigs: [{
efsFileSystemConfig: {
fileSystemId: 'fileSystemId',
fileSystemPath: 'fileSystemPath',
},
fSxLustreFileSystemConfig: {
fileSystemId: 'fileSystemId',
fileSystemPath: 'fileSystemPath',
},
s3FileSystemConfig: {
mountPath: 'mountPath',
s3Uri: 's3Uri',
},
}],
customPosixUserConfig: {
gid: 123,
uid: 123,
},
executionRole: 'executionRole',
jupyterLabAppSettings: {
appLifecycleManagement: {
idleSettings: {
idleTimeoutInMinutes: 123,
lifecycleManagement: 'lifecycleManagement',
maxIdleTimeoutInMinutes: 123,
minIdleTimeoutInMinutes: 123,
},
},
builtInLifecycleConfigArn: 'builtInLifecycleConfigArn',
codeRepositories: [{
repositoryUrl: 'repositoryUrl',
}],
customImages: [{
appImageConfigName: 'appImageConfigName',
imageName: 'imageName',
imageVersionNumber: 123,
}],
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
lifecycleConfigArns: ['lifecycleConfigArns'],
},
jupyterServerAppSettings: {
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
lifecycleConfigArns: ['lifecycleConfigArns'],
},
kernelGatewayAppSettings: {
customImages: [{
appImageConfigName: 'appImageConfigName',
imageName: 'imageName',
imageVersionNumber: 123,
}],
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
lifecycleConfigArns: ['lifecycleConfigArns'],
},
securityGroups: ['securityGroups'],
spaceStorageSettings: {
defaultEbsStorageSettings: {
defaultEbsVolumeSizeInGb: 123,
maximumEbsVolumeSizeInGb: 123,
},
},
},
defaultUserSettings: {
autoMountHomeEfs: 'autoMountHomeEfs',
codeEditorAppSettings: {
appLifecycleManagement: {
idleSettings: {
idleTimeoutInMinutes: 123,
lifecycleManagement: 'lifecycleManagement',
maxIdleTimeoutInMinutes: 123,
minIdleTimeoutInMinutes: 123,
},
},
builtInLifecycleConfigArn: 'builtInLifecycleConfigArn',
customImages: [{
appImageConfigName: 'appImageConfigName',
imageName: 'imageName',
imageVersionNumber: 123,
}],
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
lifecycleConfigArns: ['lifecycleConfigArns'],
},
customFileSystemConfigs: [{
efsFileSystemConfig: {
fileSystemId: 'fileSystemId',
fileSystemPath: 'fileSystemPath',
},
fSxLustreFileSystemConfig: {
fileSystemId: 'fileSystemId',
fileSystemPath: 'fileSystemPath',
},
s3FileSystemConfig: {
mountPath: 'mountPath',
s3Uri: 's3Uri',
},
}],
customPosixUserConfig: {
gid: 123,
uid: 123,
},
defaultLandingUri: 'defaultLandingUri',
executionRole: 'executionRole',
jupyterLabAppSettings: {
appLifecycleManagement: {
idleSettings: {
idleTimeoutInMinutes: 123,
lifecycleManagement: 'lifecycleManagement',
maxIdleTimeoutInMinutes: 123,
minIdleTimeoutInMinutes: 123,
},
},
builtInLifecycleConfigArn: 'builtInLifecycleConfigArn',
codeRepositories: [{
repositoryUrl: 'repositoryUrl',
}],
customImages: [{
appImageConfigName: 'appImageConfigName',
imageName: 'imageName',
imageVersionNumber: 123,
}],
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
lifecycleConfigArns: ['lifecycleConfigArns'],
},
jupyterServerAppSettings: {
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
lifecycleConfigArns: ['lifecycleConfigArns'],
},
kernelGatewayAppSettings: {
customImages: [{
appImageConfigName: 'appImageConfigName',
imageName: 'imageName',
imageVersionNumber: 123,
}],
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
lifecycleConfigArns: ['lifecycleConfigArns'],
},
rSessionAppSettings: {
customImages: [{
appImageConfigName: 'appImageConfigName',
imageName: 'imageName',
imageVersionNumber: 123,
}],
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
},
rStudioServerProAppSettings: {
accessStatus: 'accessStatus',
userGroup: 'userGroup',
},
securityGroups: ['securityGroups'],
sharingSettings: {
notebookOutputOption: 'notebookOutputOption',
s3KmsKeyId: 's3KmsKeyId',
s3OutputPath: 's3OutputPath',
},
spaceStorageSettings: {
defaultEbsStorageSettings: {
defaultEbsVolumeSizeInGb: 123,
maximumEbsVolumeSizeInGb: 123,
},
},
studioWebPortal: 'studioWebPortal',
studioWebPortalSettings: {
hiddenAppTypes: ['hiddenAppTypes'],
hiddenInstanceTypes: ['hiddenInstanceTypes'],
hiddenMlTools: ['hiddenMlTools'],
hiddenSageMakerImageVersionAliases: [{
sageMakerImageName: 'sageMakerImageName',
versionAliases: ['versionAliases'],
}],
},
},
domainName: 'domainName',
domainSettings: {
dockerSettings: {
enableDockerAccess: 'enableDockerAccess',
vpcOnlyTrustedAccounts: ['vpcOnlyTrustedAccounts'],
},
executionRoleIdentityConfig: 'executionRoleIdentityConfig',
ipAddressType: 'ipAddressType',
rStudioServerProDomainSettings: {
defaultResourceSpec: {
instanceType: 'instanceType',
lifecycleConfigArn: 'lifecycleConfigArn',
sageMakerImageArn: 'sageMakerImageArn',
sageMakerImageVersionArn: 'sageMakerImageVersionArn',
},
domainExecutionRoleArn: 'domainExecutionRoleArn',
rStudioConnectUrl: 'rStudioConnectUrl',
rStudioPackageManagerUrl: 'rStudioPackageManagerUrl',
},
securityGroupIds: ['securityGroupIds'],
unifiedStudioSettings: {
domainAccountId: 'domainAccountId',
domainId: 'domainId',
domainRegion: 'domainRegion',
environmentId: 'environmentId',
projectId: 'projectId',
projectS3Path: 'projectS3Path',
studioWebPortalAccess: 'studioWebPortalAccess',
},
},
kmsKeyId: 'kmsKeyId',
subnetIds: ['subnetIds'],
tagPropagation: 'tagPropagation',
tags: [{
key: 'key',
value: 'value',
}],
vpcId: 'vpcId',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnDomainPropsMixin(props: CfnDomainMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Domain Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::SageMaker::Domain.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript