java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.sagemaker.CfnDomainPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:04.906Z") @Stability(Stable) public class CfnDomainPropsMixin extends Mixin implements software.constructs.IMixin
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 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.sagemaker.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnDomainPropsMixin cfnDomainPropsMixin = CfnDomainPropsMixin.Builder.create(CfnDomainMixinProps.builder()
         .appNetworkAccessType("appNetworkAccessType")
         .appSecurityGroupManagement("appSecurityGroupManagement")
         .authMode("authMode")
         .defaultSpaceSettings(DefaultSpaceSettingsProperty.builder()
                 .customFileSystemConfigs(List.of(CustomFileSystemConfigProperty.builder()
                         .efsFileSystemConfig(EFSFileSystemConfigProperty.builder()
                                 .fileSystemId("fileSystemId")
                                 .fileSystemPath("fileSystemPath")
                                 .build())
                         .fSxLustreFileSystemConfig(FSxLustreFileSystemConfigProperty.builder()
                                 .fileSystemId("fileSystemId")
                                 .fileSystemPath("fileSystemPath")
                                 .build())
                         .s3FileSystemConfig(S3FileSystemConfigProperty.builder()
                                 .mountPath("mountPath")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build()))
                 .customPosixUserConfig(CustomPosixUserConfigProperty.builder()
                         .gid(123)
                         .uid(123)
                         .build())
                 .executionRole("executionRole")
                 .jupyterLabAppSettings(JupyterLabAppSettingsProperty.builder()
                         .appLifecycleManagement(AppLifecycleManagementProperty.builder()
                                 .idleSettings(IdleSettingsProperty.builder()
                                         .idleTimeoutInMinutes(123)
                                         .lifecycleManagement("lifecycleManagement")
                                         .maxIdleTimeoutInMinutes(123)
                                         .minIdleTimeoutInMinutes(123)
                                         .build())
                                 .build())
                         .builtInLifecycleConfigArn("builtInLifecycleConfigArn")
                         .codeRepositories(List.of(CodeRepositoryProperty.builder()
                                 .repositoryUrl("repositoryUrl")
                                 .build()))
                         .customImages(List.of(CustomImageProperty.builder()
                                 .appImageConfigName("appImageConfigName")
                                 .imageName("imageName")
                                 .imageVersionNumber(123)
                                 .build()))
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                         .build())
                 .jupyterServerAppSettings(JupyterServerAppSettingsProperty.builder()
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                         .build())
                 .kernelGatewayAppSettings(KernelGatewayAppSettingsProperty.builder()
                         .customImages(List.of(CustomImageProperty.builder()
                                 .appImageConfigName("appImageConfigName")
                                 .imageName("imageName")
                                 .imageVersionNumber(123)
                                 .build()))
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                         .build())
                 .securityGroups(List.of("securityGroups"))
                 .spaceStorageSettings(DefaultSpaceStorageSettingsProperty.builder()
                         .defaultEbsStorageSettings(DefaultEbsStorageSettingsProperty.builder()
                                 .defaultEbsVolumeSizeInGb(123)
                                 .maximumEbsVolumeSizeInGb(123)
                                 .build())
                         .build())
                 .build())
         .defaultUserSettings(UserSettingsProperty.builder()
                 .autoMountHomeEfs("autoMountHomeEfs")
                 .codeEditorAppSettings(CodeEditorAppSettingsProperty.builder()
                         .appLifecycleManagement(AppLifecycleManagementProperty.builder()
                                 .idleSettings(IdleSettingsProperty.builder()
                                         .idleTimeoutInMinutes(123)
                                         .lifecycleManagement("lifecycleManagement")
                                         .maxIdleTimeoutInMinutes(123)
                                         .minIdleTimeoutInMinutes(123)
                                         .build())
                                 .build())
                         .builtInLifecycleConfigArn("builtInLifecycleConfigArn")
                         .customImages(List.of(CustomImageProperty.builder()
                                 .appImageConfigName("appImageConfigName")
                                 .imageName("imageName")
                                 .imageVersionNumber(123)
                                 .build()))
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                         .build())
                 .customFileSystemConfigs(List.of(CustomFileSystemConfigProperty.builder()
                         .efsFileSystemConfig(EFSFileSystemConfigProperty.builder()
                                 .fileSystemId("fileSystemId")
                                 .fileSystemPath("fileSystemPath")
                                 .build())
                         .fSxLustreFileSystemConfig(FSxLustreFileSystemConfigProperty.builder()
                                 .fileSystemId("fileSystemId")
                                 .fileSystemPath("fileSystemPath")
                                 .build())
                         .s3FileSystemConfig(S3FileSystemConfigProperty.builder()
                                 .mountPath("mountPath")
                                 .s3Uri("s3Uri")
                                 .build())
                         .build()))
                 .customPosixUserConfig(CustomPosixUserConfigProperty.builder()
                         .gid(123)
                         .uid(123)
                         .build())
                 .defaultLandingUri("defaultLandingUri")
                 .executionRole("executionRole")
                 .jupyterLabAppSettings(JupyterLabAppSettingsProperty.builder()
                         .appLifecycleManagement(AppLifecycleManagementProperty.builder()
                                 .idleSettings(IdleSettingsProperty.builder()
                                         .idleTimeoutInMinutes(123)
                                         .lifecycleManagement("lifecycleManagement")
                                         .maxIdleTimeoutInMinutes(123)
                                         .minIdleTimeoutInMinutes(123)
                                         .build())
                                 .build())
                         .builtInLifecycleConfigArn("builtInLifecycleConfigArn")
                         .codeRepositories(List.of(CodeRepositoryProperty.builder()
                                 .repositoryUrl("repositoryUrl")
                                 .build()))
                         .customImages(List.of(CustomImageProperty.builder()
                                 .appImageConfigName("appImageConfigName")
                                 .imageName("imageName")
                                 .imageVersionNumber(123)
                                 .build()))
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                         .build())
                 .jupyterServerAppSettings(JupyterServerAppSettingsProperty.builder()
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                         .build())
                 .kernelGatewayAppSettings(KernelGatewayAppSettingsProperty.builder()
                         .customImages(List.of(CustomImageProperty.builder()
                                 .appImageConfigName("appImageConfigName")
                                 .imageName("imageName")
                                 .imageVersionNumber(123)
                                 .build()))
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                         .build())
                 .rSessionAppSettings(RSessionAppSettingsProperty.builder()
                         .customImages(List.of(CustomImageProperty.builder()
                                 .appImageConfigName("appImageConfigName")
                                 .imageName("imageName")
                                 .imageVersionNumber(123)
                                 .build()))
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .build())
                 .rStudioServerProAppSettings(RStudioServerProAppSettingsProperty.builder()
                         .accessStatus("accessStatus")
                         .userGroup("userGroup")
                         .build())
                 .securityGroups(List.of("securityGroups"))
                 .sharingSettings(SharingSettingsProperty.builder()
                         .notebookOutputOption("notebookOutputOption")
                         .s3KmsKeyId("s3KmsKeyId")
                         .s3OutputPath("s3OutputPath")
                         .build())
                 .spaceStorageSettings(DefaultSpaceStorageSettingsProperty.builder()
                         .defaultEbsStorageSettings(DefaultEbsStorageSettingsProperty.builder()
                                 .defaultEbsVolumeSizeInGb(123)
                                 .maximumEbsVolumeSizeInGb(123)
                                 .build())
                         .build())
                 .studioWebPortal("studioWebPortal")
                 .studioWebPortalSettings(StudioWebPortalSettingsProperty.builder()
                         .hiddenAppTypes(List.of("hiddenAppTypes"))
                         .hiddenInstanceTypes(List.of("hiddenInstanceTypes"))
                         .hiddenMlTools(List.of("hiddenMlTools"))
                         .hiddenSageMakerImageVersionAliases(List.of(HiddenSageMakerImageProperty.builder()
                                 .sageMakerImageName("sageMakerImageName")
                                 .versionAliases(List.of("versionAliases"))
                                 .build()))
                         .build())
                 .build())
         .domainName("domainName")
         .domainSettings(DomainSettingsProperty.builder()
                 .dockerSettings(DockerSettingsProperty.builder()
                         .enableDockerAccess("enableDockerAccess")
                         .vpcOnlyTrustedAccounts(List.of("vpcOnlyTrustedAccounts"))
                         .build())
                 .executionRoleIdentityConfig("executionRoleIdentityConfig")
                 .ipAddressType("ipAddressType")
                 .rStudioServerProDomainSettings(RStudioServerProDomainSettingsProperty.builder()
                         .defaultResourceSpec(ResourceSpecProperty.builder()
                                 .instanceType("instanceType")
                                 .lifecycleConfigArn("lifecycleConfigArn")
                                 .sageMakerImageArn("sageMakerImageArn")
                                 .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                 .build())
                         .domainExecutionRoleArn("domainExecutionRoleArn")
                         .rStudioConnectUrl("rStudioConnectUrl")
                         .rStudioPackageManagerUrl("rStudioPackageManagerUrl")
                         .build())
                 .securityGroupIds(List.of("securityGroupIds"))
                 .unifiedStudioSettings(UnifiedStudioSettingsProperty.builder()
                         .domainAccountId("domainAccountId")
                         .domainId("domainId")
                         .domainRegion("domainRegion")
                         .environmentId("environmentId")
                         .projectId("projectId")
                         .projectS3Path("projectS3Path")
                         .studioWebPortalAccess("studioWebPortalAccess")
                         .build())
                 .build())
         .kmsKeyId("kmsKeyId")
         .subnetIds(List.of("subnetIds"))
         .tagPropagation("tagPropagation")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .vpcId("vpcId")
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnDomainPropsMixin

      protected CfnDomainPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDomainPropsMixin

      protected CfnDomainPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDomainPropsMixin

      @Stability(Stable) public CfnDomainPropsMixin(@NotNull CfnDomainMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::SageMaker::Domain.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnDomainPropsMixin

      @Stability(Stable) public CfnDomainPropsMixin(@NotNull CfnDomainMixinProps props)
      Create a mixin to apply properties to AWS::SageMaker::Domain.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnDomainMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()