Skip to content
v2.275.0

CfnDomain L1 construct ​

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 ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const cfnDomain = new sagemaker.CfnDomain(this, 'MyCfnDomain', {
  authMode: 'authMode',
  defaultUserSettings: {
    executionRole: 'executionRole',

    // the properties below are optional
    autoMountHomeEfs: 'autoMountHomeEfs',
    codeEditorAppSettings: {
      appLifecycleManagement: {
        idleSettings: {
          idleTimeoutInMinutes: 123,
          lifecycleManagement: 'lifecycleManagement',
          maxIdleTimeoutInMinutes: 123,
          minIdleTimeoutInMinutes: 123,
        },
      },
      builtInLifecycleConfigArn: 'builtInLifecycleConfigArn',
      customImages: [{
        appImageConfigName: 'appImageConfigName',
        imageName: 'imageName',

        // the properties below are optional
        imageVersionNumber: 123,
      }],
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      lifecycleConfigArns: ['lifecycleConfigArns'],
    },
    customFileSystemConfigs: [{
      efsFileSystemConfig: {
        fileSystemId: 'fileSystemId',

        // the properties below are optional
        fileSystemPath: 'fileSystemPath',
      },
      fSxLustreFileSystemConfig: {
        fileSystemId: 'fileSystemId',

        // the properties below are optional
        fileSystemPath: 'fileSystemPath',
      },
      s3FileSystemConfig: {
        mountPath: 'mountPath',
        s3Uri: 's3Uri',
      },
    }],
    customPosixUserConfig: {
      gid: 123,
      uid: 123,
    },
    defaultLandingUri: 'defaultLandingUri',
    jupyterLabAppSettings: {
      appLifecycleManagement: {
        idleSettings: {
          idleTimeoutInMinutes: 123,
          lifecycleManagement: 'lifecycleManagement',
          maxIdleTimeoutInMinutes: 123,
          minIdleTimeoutInMinutes: 123,
        },
      },
      builtInLifecycleConfigArn: 'builtInLifecycleConfigArn',
      codeRepositories: [{
        repositoryUrl: 'repositoryUrl',
      }],
      customImages: [{
        appImageConfigName: 'appImageConfigName',
        imageName: 'imageName',

        // the properties below are optional
        imageVersionNumber: 123,
      }],
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      lifecycleConfigArns: ['lifecycleConfigArns'],
    },
    jupyterServerAppSettings: {
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      lifecycleConfigArns: ['lifecycleConfigArns'],
    },
    kernelGatewayAppSettings: {
      customImages: [{
        appImageConfigName: 'appImageConfigName',
        imageName: 'imageName',

        // the properties below are optional
        imageVersionNumber: 123,
      }],
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      lifecycleConfigArns: ['lifecycleConfigArns'],
    },
    rSessionAppSettings: {
      customImages: [{
        appImageConfigName: 'appImageConfigName',
        imageName: 'imageName',

        // the properties below are optional
        imageVersionNumber: 123,
      }],
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
    },
    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',

  // the properties below are optional
  appNetworkAccessType: 'appNetworkAccessType',
  appSecurityGroupManagement: 'appSecurityGroupManagement',
  defaultSpaceSettings: {
    executionRole: 'executionRole',

    // the properties below are optional
    customFileSystemConfigs: [{
      efsFileSystemConfig: {
        fileSystemId: 'fileSystemId',

        // the properties below are optional
        fileSystemPath: 'fileSystemPath',
      },
      fSxLustreFileSystemConfig: {
        fileSystemId: 'fileSystemId',

        // the properties below are optional
        fileSystemPath: 'fileSystemPath',
      },
      s3FileSystemConfig: {
        mountPath: 'mountPath',
        s3Uri: 's3Uri',
      },
    }],
    customPosixUserConfig: {
      gid: 123,
      uid: 123,
    },
    jupyterLabAppSettings: {
      appLifecycleManagement: {
        idleSettings: {
          idleTimeoutInMinutes: 123,
          lifecycleManagement: 'lifecycleManagement',
          maxIdleTimeoutInMinutes: 123,
          minIdleTimeoutInMinutes: 123,
        },
      },
      builtInLifecycleConfigArn: 'builtInLifecycleConfigArn',
      codeRepositories: [{
        repositoryUrl: 'repositoryUrl',
      }],
      customImages: [{
        appImageConfigName: 'appImageConfigName',
        imageName: 'imageName',

        // the properties below are optional
        imageVersionNumber: 123,
      }],
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      lifecycleConfigArns: ['lifecycleConfigArns'],
    },
    jupyterServerAppSettings: {
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      lifecycleConfigArns: ['lifecycleConfigArns'],
    },
    kernelGatewayAppSettings: {
      customImages: [{
        appImageConfigName: 'appImageConfigName',
        imageName: 'imageName',

        // the properties below are optional
        imageVersionNumber: 123,
      }],
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      lifecycleConfigArns: ['lifecycleConfigArns'],
    },
    securityGroups: ['securityGroups'],
    spaceStorageSettings: {
      defaultEbsStorageSettings: {
        defaultEbsVolumeSizeInGb: 123,
        maximumEbsVolumeSizeInGb: 123,
      },
    },
  },
  domainSettings: {
    dockerSettings: {
      enableDockerAccess: 'enableDockerAccess',
      vpcOnlyTrustedAccounts: ['vpcOnlyTrustedAccounts'],
    },
    executionRoleIdentityConfig: 'executionRoleIdentityConfig',
    ipAddressType: 'ipAddressType',
    rStudioServerProDomainSettings: {
      domainExecutionRoleArn: 'domainExecutionRoleArn',

      // the properties below are optional
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
      rStudioConnectUrl: 'rStudioConnectUrl',
      rStudioPackageManagerUrl: 'rStudioPackageManagerUrl',
    },
    securityGroupIds: ['securityGroupIds'],
    unifiedStudioSettings: {
      domainAccountId: 'domainAccountId',
      domainId: 'domainId',
      domainRegion: 'domainRegion',
      environmentId: 'environmentId',
      projectId: 'projectId',
      projectS3Path: 'projectS3Path',
      studioWebPortalAccess: 'studioWebPortalAccess',
    },
  },
  homeEfsFileSystemCreation: 'homeEfsFileSystemCreation',
  kmsKeyId: 'kmsKeyId',
  subnetIds: ['subnetIds'],
  tagPropagation: 'tagPropagation',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vpcId: 'vpcId',
});
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

cfn_domain = sagemaker.CfnDomain(self, "MyCfnDomain",
    auth_mode="authMode",
    default_user_settings=sagemaker.CfnDomain.UserSettingsProperty(
        execution_role="executionRole",

        # the properties below are optional
        auto_mount_home_efs="autoMountHomeEfs",
        code_editor_app_settings=sagemaker.CfnDomain.CodeEditorAppSettingsProperty(
            app_lifecycle_management=sagemaker.CfnDomain.AppLifecycleManagementProperty(
                idle_settings=sagemaker.CfnDomain.IdleSettingsProperty(
                    idle_timeout_in_minutes=123,
                    lifecycle_management="lifecycleManagement",
                    max_idle_timeout_in_minutes=123,
                    min_idle_timeout_in_minutes=123
                )
            ),
            built_in_lifecycle_config_arn="builtInLifecycleConfigArn",
            custom_images=[sagemaker.CfnDomain.CustomImageProperty(
                app_image_config_name="appImageConfigName",
                image_name="imageName",

                # the properties below are optional
                image_version_number=123
            )],
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            lifecycle_config_arns=["lifecycleConfigArns"]
        ),
        custom_file_system_configs=[sagemaker.CfnDomain.CustomFileSystemConfigProperty(
            efs_file_system_config=sagemaker.CfnDomain.EFSFileSystemConfigProperty(
                file_system_id="fileSystemId",

                # the properties below are optional
                file_system_path="fileSystemPath"
            ),
            f_sx_lustre_file_system_config=sagemaker.CfnDomain.FSxLustreFileSystemConfigProperty(
                file_system_id="fileSystemId",

                # the properties below are optional
                file_system_path="fileSystemPath"
            ),
            s3_file_system_config=sagemaker.CfnDomain.S3FileSystemConfigProperty(
                mount_path="mountPath",
                s3_uri="s3Uri"
            )
        )],
        custom_posix_user_config=sagemaker.CfnDomain.CustomPosixUserConfigProperty(
            gid=123,
            uid=123
        ),
        default_landing_uri="defaultLandingUri",
        jupyter_lab_app_settings=sagemaker.CfnDomain.JupyterLabAppSettingsProperty(
            app_lifecycle_management=sagemaker.CfnDomain.AppLifecycleManagementProperty(
                idle_settings=sagemaker.CfnDomain.IdleSettingsProperty(
                    idle_timeout_in_minutes=123,
                    lifecycle_management="lifecycleManagement",
                    max_idle_timeout_in_minutes=123,
                    min_idle_timeout_in_minutes=123
                )
            ),
            built_in_lifecycle_config_arn="builtInLifecycleConfigArn",
            code_repositories=[sagemaker.CfnDomain.CodeRepositoryProperty(
                repository_url="repositoryUrl"
            )],
            custom_images=[sagemaker.CfnDomain.CustomImageProperty(
                app_image_config_name="appImageConfigName",
                image_name="imageName",

                # the properties below are optional
                image_version_number=123
            )],
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            lifecycle_config_arns=["lifecycleConfigArns"]
        ),
        jupyter_server_app_settings=sagemaker.CfnDomain.JupyterServerAppSettingsProperty(
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            lifecycle_config_arns=["lifecycleConfigArns"]
        ),
        kernel_gateway_app_settings=sagemaker.CfnDomain.KernelGatewayAppSettingsProperty(
            custom_images=[sagemaker.CfnDomain.CustomImageProperty(
                app_image_config_name="appImageConfigName",
                image_name="imageName",

                # the properties below are optional
                image_version_number=123
            )],
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            lifecycle_config_arns=["lifecycleConfigArns"]
        ),
        r_session_app_settings=sagemaker.CfnDomain.RSessionAppSettingsProperty(
            custom_images=[sagemaker.CfnDomain.CustomImageProperty(
                app_image_config_name="appImageConfigName",
                image_name="imageName",

                # the properties below are optional
                image_version_number=123
            )],
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            )
        ),
        r_studio_server_pro_app_settings=sagemaker.CfnDomain.RStudioServerProAppSettingsProperty(
            access_status="accessStatus",
            user_group="userGroup"
        ),
        security_groups=["securityGroups"],
        sharing_settings=sagemaker.CfnDomain.SharingSettingsProperty(
            notebook_output_option="notebookOutputOption",
            s3_kms_key_id="s3KmsKeyId",
            s3_output_path="s3OutputPath"
        ),
        space_storage_settings=sagemaker.CfnDomain.DefaultSpaceStorageSettingsProperty(
            default_ebs_storage_settings=sagemaker.CfnDomain.DefaultEbsStorageSettingsProperty(
                default_ebs_volume_size_in_gb=123,
                maximum_ebs_volume_size_in_gb=123
            )
        ),
        studio_web_portal="studioWebPortal",
        studio_web_portal_settings=sagemaker.CfnDomain.StudioWebPortalSettingsProperty(
            hidden_app_types=["hiddenAppTypes"],
            hidden_instance_types=["hiddenInstanceTypes"],
            hidden_ml_tools=["hiddenMlTools"],
            hidden_sage_maker_image_version_aliases=[sagemaker.CfnDomain.HiddenSageMakerImageProperty(
                sage_maker_image_name="sageMakerImageName",
                version_aliases=["versionAliases"]
            )]
        )
    ),
    domain_name="domainName",

    # the properties below are optional
    app_network_access_type="appNetworkAccessType",
    app_security_group_management="appSecurityGroupManagement",
    default_space_settings=sagemaker.CfnDomain.DefaultSpaceSettingsProperty(
        execution_role="executionRole",

        # the properties below are optional
        custom_file_system_configs=[sagemaker.CfnDomain.CustomFileSystemConfigProperty(
            efs_file_system_config=sagemaker.CfnDomain.EFSFileSystemConfigProperty(
                file_system_id="fileSystemId",

                # the properties below are optional
                file_system_path="fileSystemPath"
            ),
            f_sx_lustre_file_system_config=sagemaker.CfnDomain.FSxLustreFileSystemConfigProperty(
                file_system_id="fileSystemId",

                # the properties below are optional
                file_system_path="fileSystemPath"
            ),
            s3_file_system_config=sagemaker.CfnDomain.S3FileSystemConfigProperty(
                mount_path="mountPath",
                s3_uri="s3Uri"
            )
        )],
        custom_posix_user_config=sagemaker.CfnDomain.CustomPosixUserConfigProperty(
            gid=123,
            uid=123
        ),
        jupyter_lab_app_settings=sagemaker.CfnDomain.JupyterLabAppSettingsProperty(
            app_lifecycle_management=sagemaker.CfnDomain.AppLifecycleManagementProperty(
                idle_settings=sagemaker.CfnDomain.IdleSettingsProperty(
                    idle_timeout_in_minutes=123,
                    lifecycle_management="lifecycleManagement",
                    max_idle_timeout_in_minutes=123,
                    min_idle_timeout_in_minutes=123
                )
            ),
            built_in_lifecycle_config_arn="builtInLifecycleConfigArn",
            code_repositories=[sagemaker.CfnDomain.CodeRepositoryProperty(
                repository_url="repositoryUrl"
            )],
            custom_images=[sagemaker.CfnDomain.CustomImageProperty(
                app_image_config_name="appImageConfigName",
                image_name="imageName",

                # the properties below are optional
                image_version_number=123
            )],
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            lifecycle_config_arns=["lifecycleConfigArns"]
        ),
        jupyter_server_app_settings=sagemaker.CfnDomain.JupyterServerAppSettingsProperty(
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            lifecycle_config_arns=["lifecycleConfigArns"]
        ),
        kernel_gateway_app_settings=sagemaker.CfnDomain.KernelGatewayAppSettingsProperty(
            custom_images=[sagemaker.CfnDomain.CustomImageProperty(
                app_image_config_name="appImageConfigName",
                image_name="imageName",

                # the properties below are optional
                image_version_number=123
            )],
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            lifecycle_config_arns=["lifecycleConfigArns"]
        ),
        security_groups=["securityGroups"],
        space_storage_settings=sagemaker.CfnDomain.DefaultSpaceStorageSettingsProperty(
            default_ebs_storage_settings=sagemaker.CfnDomain.DefaultEbsStorageSettingsProperty(
                default_ebs_volume_size_in_gb=123,
                maximum_ebs_volume_size_in_gb=123
            )
        )
    ),
    domain_settings=sagemaker.CfnDomain.DomainSettingsProperty(
        docker_settings=sagemaker.CfnDomain.DockerSettingsProperty(
            enable_docker_access="enableDockerAccess",
            vpc_only_trusted_accounts=["vpcOnlyTrustedAccounts"]
        ),
        execution_role_identity_config="executionRoleIdentityConfig",
        ip_address_type="ipAddressType",
        r_studio_server_pro_domain_settings=sagemaker.CfnDomain.RStudioServerProDomainSettingsProperty(
            domain_execution_role_arn="domainExecutionRoleArn",

            # the properties below are optional
            default_resource_spec=sagemaker.CfnDomain.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            ),
            r_studio_connect_url="rStudioConnectUrl",
            r_studio_package_manager_url="rStudioPackageManagerUrl"
        ),
        security_group_ids=["securityGroupIds"],
        unified_studio_settings=sagemaker.CfnDomain.UnifiedStudioSettingsProperty(
            domain_account_id="domainAccountId",
            domain_id="domainId",
            domain_region="domainRegion",
            environment_id="environmentId",
            project_id="projectId",
            project_s3_path="projectS3Path",
            studio_web_portal_access="studioWebPortalAccess"
        )
    ),
    home_efs_file_system_creation="homeEfsFileSystemCreation",
    kms_key_id="kmsKeyId",
    subnet_ids=["subnetIds"],
    tag_propagation="tagPropagation",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_id="vpcId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

CfnDomain cfnDomain = CfnDomain.Builder.create(this, "MyCfnDomain")
        .authMode("authMode")
        .defaultUserSettings(UserSettingsProperty.builder()
                .executionRole("executionRole")

                // the properties below are optional
                .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")

                                // the properties below are optional
                                .imageVersionNumber(123)
                                .build()))
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                        .build())
                .customFileSystemConfigs(List.of(CustomFileSystemConfigProperty.builder()
                        .efsFileSystemConfig(EFSFileSystemConfigProperty.builder()
                                .fileSystemId("fileSystemId")

                                // the properties below are optional
                                .fileSystemPath("fileSystemPath")
                                .build())
                        .fSxLustreFileSystemConfig(FSxLustreFileSystemConfigProperty.builder()
                                .fileSystemId("fileSystemId")

                                // the properties below are optional
                                .fileSystemPath("fileSystemPath")
                                .build())
                        .s3FileSystemConfig(S3FileSystemConfigProperty.builder()
                                .mountPath("mountPath")
                                .s3Uri("s3Uri")
                                .build())
                        .build()))
                .customPosixUserConfig(CustomPosixUserConfigProperty.builder()
                        .gid(123)
                        .uid(123)
                        .build())
                .defaultLandingUri("defaultLandingUri")
                .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")

                                // the properties below are optional
                                .imageVersionNumber(123)
                                .build()))
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                        .build())
                .jupyterServerAppSettings(JupyterServerAppSettingsProperty.builder()
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                        .build())
                .kernelGatewayAppSettings(KernelGatewayAppSettingsProperty.builder()
                        .customImages(List.of(CustomImageProperty.builder()
                                .appImageConfigName("appImageConfigName")
                                .imageName("imageName")

                                // the properties below are optional
                                .imageVersionNumber(123)
                                .build()))
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                        .build())
                .rSessionAppSettings(RSessionAppSettingsProperty.builder()
                        .customImages(List.of(CustomImageProperty.builder()
                                .appImageConfigName("appImageConfigName")
                                .imageName("imageName")

                                // the properties below are optional
                                .imageVersionNumber(123)
                                .build()))
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .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")

        // the properties below are optional
        .appNetworkAccessType("appNetworkAccessType")
        .appSecurityGroupManagement("appSecurityGroupManagement")
        .defaultSpaceSettings(DefaultSpaceSettingsProperty.builder()
                .executionRole("executionRole")

                // the properties below are optional
                .customFileSystemConfigs(List.of(CustomFileSystemConfigProperty.builder()
                        .efsFileSystemConfig(EFSFileSystemConfigProperty.builder()
                                .fileSystemId("fileSystemId")

                                // the properties below are optional
                                .fileSystemPath("fileSystemPath")
                                .build())
                        .fSxLustreFileSystemConfig(FSxLustreFileSystemConfigProperty.builder()
                                .fileSystemId("fileSystemId")

                                // the properties below are optional
                                .fileSystemPath("fileSystemPath")
                                .build())
                        .s3FileSystemConfig(S3FileSystemConfigProperty.builder()
                                .mountPath("mountPath")
                                .s3Uri("s3Uri")
                                .build())
                        .build()))
                .customPosixUserConfig(CustomPosixUserConfigProperty.builder()
                        .gid(123)
                        .uid(123)
                        .build())
                .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")

                                // the properties below are optional
                                .imageVersionNumber(123)
                                .build()))
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                        .build())
                .jupyterServerAppSettings(JupyterServerAppSettingsProperty.builder()
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                        .build())
                .kernelGatewayAppSettings(KernelGatewayAppSettingsProperty.builder()
                        .customImages(List.of(CustomImageProperty.builder()
                                .appImageConfigName("appImageConfigName")
                                .imageName("imageName")

                                // the properties below are optional
                                .imageVersionNumber(123)
                                .build()))
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .lifecycleConfigArns(List.of("lifecycleConfigArns"))
                        .build())
                .securityGroups(List.of("securityGroups"))
                .spaceStorageSettings(DefaultSpaceStorageSettingsProperty.builder()
                        .defaultEbsStorageSettings(DefaultEbsStorageSettingsProperty.builder()
                                .defaultEbsVolumeSizeInGb(123)
                                .maximumEbsVolumeSizeInGb(123)
                                .build())
                        .build())
                .build())
        .domainSettings(DomainSettingsProperty.builder()
                .dockerSettings(DockerSettingsProperty.builder()
                        .enableDockerAccess("enableDockerAccess")
                        .vpcOnlyTrustedAccounts(List.of("vpcOnlyTrustedAccounts"))
                        .build())
                .executionRoleIdentityConfig("executionRoleIdentityConfig")
                .ipAddressType("ipAddressType")
                .rStudioServerProDomainSettings(RStudioServerProDomainSettingsProperty.builder()
                        .domainExecutionRoleArn("domainExecutionRoleArn")

                        // the properties below are optional
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .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())
        .homeEfsFileSystemCreation("homeEfsFileSystemCreation")
        .kmsKeyId("kmsKeyId")
        .subnetIds(List.of("subnetIds"))
        .tagPropagation("tagPropagation")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .vpcId("vpcId")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var cfnDomain = new CfnDomain(this, "MyCfnDomain", new CfnDomainProps {
    AuthMode = "authMode",
    DefaultUserSettings = new UserSettingsProperty {
        ExecutionRole = "executionRole",

        // the properties below are optional
        AutoMountHomeEfs = "autoMountHomeEfs",
        CodeEditorAppSettings = new CodeEditorAppSettingsProperty {
            AppLifecycleManagement = new AppLifecycleManagementProperty {
                IdleSettings = new IdleSettingsProperty {
                    IdleTimeoutInMinutes = 123,
                    LifecycleManagement = "lifecycleManagement",
                    MaxIdleTimeoutInMinutes = 123,
                    MinIdleTimeoutInMinutes = 123
                }
            },
            BuiltInLifecycleConfigArn = "builtInLifecycleConfigArn",
            CustomImages = new [] { new CustomImageProperty {
                AppImageConfigName = "appImageConfigName",
                ImageName = "imageName",

                // the properties below are optional
                ImageVersionNumber = 123
            } },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            LifecycleConfigArns = new [] { "lifecycleConfigArns" }
        },
        CustomFileSystemConfigs = new [] { new CustomFileSystemConfigProperty {
            EfsFileSystemConfig = new EFSFileSystemConfigProperty {
                FileSystemId = "fileSystemId",

                // the properties below are optional
                FileSystemPath = "fileSystemPath"
            },
            FSxLustreFileSystemConfig = new FSxLustreFileSystemConfigProperty {
                FileSystemId = "fileSystemId",

                // the properties below are optional
                FileSystemPath = "fileSystemPath"
            },
            S3FileSystemConfig = new S3FileSystemConfigProperty {
                MountPath = "mountPath",
                S3Uri = "s3Uri"
            }
        } },
        CustomPosixUserConfig = new CustomPosixUserConfigProperty {
            Gid = 123,
            Uid = 123
        },
        DefaultLandingUri = "defaultLandingUri",
        JupyterLabAppSettings = new JupyterLabAppSettingsProperty {
            AppLifecycleManagement = new AppLifecycleManagementProperty {
                IdleSettings = new IdleSettingsProperty {
                    IdleTimeoutInMinutes = 123,
                    LifecycleManagement = "lifecycleManagement",
                    MaxIdleTimeoutInMinutes = 123,
                    MinIdleTimeoutInMinutes = 123
                }
            },
            BuiltInLifecycleConfigArn = "builtInLifecycleConfigArn",
            CodeRepositories = new [] { new CodeRepositoryProperty {
                RepositoryUrl = "repositoryUrl"
            } },
            CustomImages = new [] { new CustomImageProperty {
                AppImageConfigName = "appImageConfigName",
                ImageName = "imageName",

                // the properties below are optional
                ImageVersionNumber = 123
            } },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            LifecycleConfigArns = new [] { "lifecycleConfigArns" }
        },
        JupyterServerAppSettings = new JupyterServerAppSettingsProperty {
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            LifecycleConfigArns = new [] { "lifecycleConfigArns" }
        },
        KernelGatewayAppSettings = new KernelGatewayAppSettingsProperty {
            CustomImages = new [] { new CustomImageProperty {
                AppImageConfigName = "appImageConfigName",
                ImageName = "imageName",

                // the properties below are optional
                ImageVersionNumber = 123
            } },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            LifecycleConfigArns = new [] { "lifecycleConfigArns" }
        },
        RSessionAppSettings = new RSessionAppSettingsProperty {
            CustomImages = new [] { new CustomImageProperty {
                AppImageConfigName = "appImageConfigName",
                ImageName = "imageName",

                // the properties below are optional
                ImageVersionNumber = 123
            } },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            }
        },
        RStudioServerProAppSettings = new RStudioServerProAppSettingsProperty {
            AccessStatus = "accessStatus",
            UserGroup = "userGroup"
        },
        SecurityGroups = new [] { "securityGroups" },
        SharingSettings = new SharingSettingsProperty {
            NotebookOutputOption = "notebookOutputOption",
            S3KmsKeyId = "s3KmsKeyId",
            S3OutputPath = "s3OutputPath"
        },
        SpaceStorageSettings = new DefaultSpaceStorageSettingsProperty {
            DefaultEbsStorageSettings = new DefaultEbsStorageSettingsProperty {
                DefaultEbsVolumeSizeInGb = 123,
                MaximumEbsVolumeSizeInGb = 123
            }
        },
        StudioWebPortal = "studioWebPortal",
        StudioWebPortalSettings = new StudioWebPortalSettingsProperty {
            HiddenAppTypes = new [] { "hiddenAppTypes" },
            HiddenInstanceTypes = new [] { "hiddenInstanceTypes" },
            HiddenMlTools = new [] { "hiddenMlTools" },
            HiddenSageMakerImageVersionAliases = new [] { new HiddenSageMakerImageProperty {
                SageMakerImageName = "sageMakerImageName",
                VersionAliases = new [] { "versionAliases" }
            } }
        }
    },
    DomainName = "domainName",

    // the properties below are optional
    AppNetworkAccessType = "appNetworkAccessType",
    AppSecurityGroupManagement = "appSecurityGroupManagement",
    DefaultSpaceSettings = new DefaultSpaceSettingsProperty {
        ExecutionRole = "executionRole",

        // the properties below are optional
        CustomFileSystemConfigs = new [] { new CustomFileSystemConfigProperty {
            EfsFileSystemConfig = new EFSFileSystemConfigProperty {
                FileSystemId = "fileSystemId",

                // the properties below are optional
                FileSystemPath = "fileSystemPath"
            },
            FSxLustreFileSystemConfig = new FSxLustreFileSystemConfigProperty {
                FileSystemId = "fileSystemId",

                // the properties below are optional
                FileSystemPath = "fileSystemPath"
            },
            S3FileSystemConfig = new S3FileSystemConfigProperty {
                MountPath = "mountPath",
                S3Uri = "s3Uri"
            }
        } },
        CustomPosixUserConfig = new CustomPosixUserConfigProperty {
            Gid = 123,
            Uid = 123
        },
        JupyterLabAppSettings = new JupyterLabAppSettingsProperty {
            AppLifecycleManagement = new AppLifecycleManagementProperty {
                IdleSettings = new IdleSettingsProperty {
                    IdleTimeoutInMinutes = 123,
                    LifecycleManagement = "lifecycleManagement",
                    MaxIdleTimeoutInMinutes = 123,
                    MinIdleTimeoutInMinutes = 123
                }
            },
            BuiltInLifecycleConfigArn = "builtInLifecycleConfigArn",
            CodeRepositories = new [] { new CodeRepositoryProperty {
                RepositoryUrl = "repositoryUrl"
            } },
            CustomImages = new [] { new CustomImageProperty {
                AppImageConfigName = "appImageConfigName",
                ImageName = "imageName",

                // the properties below are optional
                ImageVersionNumber = 123
            } },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            LifecycleConfigArns = new [] { "lifecycleConfigArns" }
        },
        JupyterServerAppSettings = new JupyterServerAppSettingsProperty {
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            LifecycleConfigArns = new [] { "lifecycleConfigArns" }
        },
        KernelGatewayAppSettings = new KernelGatewayAppSettingsProperty {
            CustomImages = new [] { new CustomImageProperty {
                AppImageConfigName = "appImageConfigName",
                ImageName = "imageName",

                // the properties below are optional
                ImageVersionNumber = 123
            } },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            LifecycleConfigArns = new [] { "lifecycleConfigArns" }
        },
        SecurityGroups = new [] { "securityGroups" },
        SpaceStorageSettings = new DefaultSpaceStorageSettingsProperty {
            DefaultEbsStorageSettings = new DefaultEbsStorageSettingsProperty {
                DefaultEbsVolumeSizeInGb = 123,
                MaximumEbsVolumeSizeInGb = 123
            }
        }
    },
    DomainSettings = new DomainSettingsProperty {
        DockerSettings = new DockerSettingsProperty {
            EnableDockerAccess = "enableDockerAccess",
            VpcOnlyTrustedAccounts = new [] { "vpcOnlyTrustedAccounts" }
        },
        ExecutionRoleIdentityConfig = "executionRoleIdentityConfig",
        IpAddressType = "ipAddressType",
        RStudioServerProDomainSettings = new RStudioServerProDomainSettingsProperty {
            DomainExecutionRoleArn = "domainExecutionRoleArn",

            // the properties below are optional
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            },
            RStudioConnectUrl = "rStudioConnectUrl",
            RStudioPackageManagerUrl = "rStudioPackageManagerUrl"
        },
        SecurityGroupIds = new [] { "securityGroupIds" },
        UnifiedStudioSettings = new UnifiedStudioSettingsProperty {
            DomainAccountId = "domainAccountId",
            DomainId = "domainId",
            DomainRegion = "domainRegion",
            EnvironmentId = "environmentId",
            ProjectId = "projectId",
            ProjectS3Path = "projectS3Path",
            StudioWebPortalAccess = "studioWebPortalAccess"
        }
    },
    HomeEfsFileSystemCreation = "homeEfsFileSystemCreation",
    KmsKeyId = "kmsKeyId",
    SubnetIds = new [] { "subnetIds" },
    TagPropagation = "tagPropagation",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    VpcId = "vpcId"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDomain := awscdk.Aws_sagemaker.NewCfnDomain(this, jsii.String("MyCfnDomain"), &CfnDomainProps{
	AuthMode: jsii.String("authMode"),
	DefaultUserSettings: &UserSettingsProperty{
		ExecutionRole: jsii.String("executionRole"),

		// the properties below are optional
		AutoMountHomeEfs: jsii.String("autoMountHomeEfs"),
		CodeEditorAppSettings: &CodeEditorAppSettingsProperty{
			AppLifecycleManagement: &AppLifecycleManagementProperty{
				IdleSettings: &IdleSettingsProperty{
					IdleTimeoutInMinutes: jsii.Number(123),
					LifecycleManagement: jsii.String("lifecycleManagement"),
					MaxIdleTimeoutInMinutes: jsii.Number(123),
					MinIdleTimeoutInMinutes: jsii.Number(123),
				},
			},
			BuiltInLifecycleConfigArn: jsii.String("builtInLifecycleConfigArn"),
			CustomImages: []interface{}{
				&CustomImageProperty{
					AppImageConfigName: jsii.String("appImageConfigName"),
					ImageName: jsii.String("imageName"),

					// the properties below are optional
					ImageVersionNumber: jsii.Number(123),
				},
			},
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			LifecycleConfigArns: []*string{
				jsii.String("lifecycleConfigArns"),
			},
		},
		CustomFileSystemConfigs: []interface{}{
			&CustomFileSystemConfigProperty{
				EfsFileSystemConfig: &EFSFileSystemConfigProperty{
					FileSystemId: jsii.String("fileSystemId"),

					// the properties below are optional
					FileSystemPath: jsii.String("fileSystemPath"),
				},
				FSxLustreFileSystemConfig: &FSxLustreFileSystemConfigProperty{
					FileSystemId: jsii.String("fileSystemId"),

					// the properties below are optional
					FileSystemPath: jsii.String("fileSystemPath"),
				},
				S3FileSystemConfig: &S3FileSystemConfigProperty{
					MountPath: jsii.String("mountPath"),
					S3Uri: jsii.String("s3Uri"),
				},
			},
		},
		CustomPosixUserConfig: &CustomPosixUserConfigProperty{
			Gid: jsii.Number(123),
			Uid: jsii.Number(123),
		},
		DefaultLandingUri: jsii.String("defaultLandingUri"),
		JupyterLabAppSettings: &JupyterLabAppSettingsProperty{
			AppLifecycleManagement: &AppLifecycleManagementProperty{
				IdleSettings: &IdleSettingsProperty{
					IdleTimeoutInMinutes: jsii.Number(123),
					LifecycleManagement: jsii.String("lifecycleManagement"),
					MaxIdleTimeoutInMinutes: jsii.Number(123),
					MinIdleTimeoutInMinutes: jsii.Number(123),
				},
			},
			BuiltInLifecycleConfigArn: jsii.String("builtInLifecycleConfigArn"),
			CodeRepositories: []interface{}{
				&CodeRepositoryProperty{
					RepositoryUrl: jsii.String("repositoryUrl"),
				},
			},
			CustomImages: []interface{}{
				&CustomImageProperty{
					AppImageConfigName: jsii.String("appImageConfigName"),
					ImageName: jsii.String("imageName"),

					// the properties below are optional
					ImageVersionNumber: jsii.Number(123),
				},
			},
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			LifecycleConfigArns: []*string{
				jsii.String("lifecycleConfigArns"),
			},
		},
		JupyterServerAppSettings: &JupyterServerAppSettingsProperty{
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			LifecycleConfigArns: []*string{
				jsii.String("lifecycleConfigArns"),
			},
		},
		KernelGatewayAppSettings: &KernelGatewayAppSettingsProperty{
			CustomImages: []interface{}{
				&CustomImageProperty{
					AppImageConfigName: jsii.String("appImageConfigName"),
					ImageName: jsii.String("imageName"),

					// the properties below are optional
					ImageVersionNumber: jsii.Number(123),
				},
			},
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			LifecycleConfigArns: []*string{
				jsii.String("lifecycleConfigArns"),
			},
		},
		RSessionAppSettings: &RSessionAppSettingsProperty{
			CustomImages: []interface{}{
				&CustomImageProperty{
					AppImageConfigName: jsii.String("appImageConfigName"),
					ImageName: jsii.String("imageName"),

					// the properties below are optional
					ImageVersionNumber: jsii.Number(123),
				},
			},
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
		},
		RStudioServerProAppSettings: &RStudioServerProAppSettingsProperty{
			AccessStatus: jsii.String("accessStatus"),
			UserGroup: jsii.String("userGroup"),
		},
		SecurityGroups: []*string{
			jsii.String("securityGroups"),
		},
		SharingSettings: &SharingSettingsProperty{
			NotebookOutputOption: jsii.String("notebookOutputOption"),
			S3KmsKeyId: jsii.String("s3KmsKeyId"),
			S3OutputPath: jsii.String("s3OutputPath"),
		},
		SpaceStorageSettings: &DefaultSpaceStorageSettingsProperty{
			DefaultEbsStorageSettings: &DefaultEbsStorageSettingsProperty{
				DefaultEbsVolumeSizeInGb: jsii.Number(123),
				MaximumEbsVolumeSizeInGb: jsii.Number(123),
			},
		},
		StudioWebPortal: jsii.String("studioWebPortal"),
		StudioWebPortalSettings: &StudioWebPortalSettingsProperty{
			HiddenAppTypes: []*string{
				jsii.String("hiddenAppTypes"),
			},
			HiddenInstanceTypes: []*string{
				jsii.String("hiddenInstanceTypes"),
			},
			HiddenMlTools: []*string{
				jsii.String("hiddenMlTools"),
			},
			HiddenSageMakerImageVersionAliases: []interface{}{
				&HiddenSageMakerImageProperty{
					SageMakerImageName: jsii.String("sageMakerImageName"),
					VersionAliases: []*string{
						jsii.String("versionAliases"),
					},
				},
			},
		},
	},
	DomainName: jsii.String("domainName"),

	// the properties below are optional
	AppNetworkAccessType: jsii.String("appNetworkAccessType"),
	AppSecurityGroupManagement: jsii.String("appSecurityGroupManagement"),
	DefaultSpaceSettings: &DefaultSpaceSettingsProperty{
		ExecutionRole: jsii.String("executionRole"),

		// the properties below are optional
		CustomFileSystemConfigs: []interface{}{
			&CustomFileSystemConfigProperty{
				EfsFileSystemConfig: &EFSFileSystemConfigProperty{
					FileSystemId: jsii.String("fileSystemId"),

					// the properties below are optional
					FileSystemPath: jsii.String("fileSystemPath"),
				},
				FSxLustreFileSystemConfig: &FSxLustreFileSystemConfigProperty{
					FileSystemId: jsii.String("fileSystemId"),

					// the properties below are optional
					FileSystemPath: jsii.String("fileSystemPath"),
				},
				S3FileSystemConfig: &S3FileSystemConfigProperty{
					MountPath: jsii.String("mountPath"),
					S3Uri: jsii.String("s3Uri"),
				},
			},
		},
		CustomPosixUserConfig: &CustomPosixUserConfigProperty{
			Gid: jsii.Number(123),
			Uid: jsii.Number(123),
		},
		JupyterLabAppSettings: &JupyterLabAppSettingsProperty{
			AppLifecycleManagement: &AppLifecycleManagementProperty{
				IdleSettings: &IdleSettingsProperty{
					IdleTimeoutInMinutes: jsii.Number(123),
					LifecycleManagement: jsii.String("lifecycleManagement"),
					MaxIdleTimeoutInMinutes: jsii.Number(123),
					MinIdleTimeoutInMinutes: jsii.Number(123),
				},
			},
			BuiltInLifecycleConfigArn: jsii.String("builtInLifecycleConfigArn"),
			CodeRepositories: []interface{}{
				&CodeRepositoryProperty{
					RepositoryUrl: jsii.String("repositoryUrl"),
				},
			},
			CustomImages: []interface{}{
				&CustomImageProperty{
					AppImageConfigName: jsii.String("appImageConfigName"),
					ImageName: jsii.String("imageName"),

					// the properties below are optional
					ImageVersionNumber: jsii.Number(123),
				},
			},
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			LifecycleConfigArns: []*string{
				jsii.String("lifecycleConfigArns"),
			},
		},
		JupyterServerAppSettings: &JupyterServerAppSettingsProperty{
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			LifecycleConfigArns: []*string{
				jsii.String("lifecycleConfigArns"),
			},
		},
		KernelGatewayAppSettings: &KernelGatewayAppSettingsProperty{
			CustomImages: []interface{}{
				&CustomImageProperty{
					AppImageConfigName: jsii.String("appImageConfigName"),
					ImageName: jsii.String("imageName"),

					// the properties below are optional
					ImageVersionNumber: jsii.Number(123),
				},
			},
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			LifecycleConfigArns: []*string{
				jsii.String("lifecycleConfigArns"),
			},
		},
		SecurityGroups: []*string{
			jsii.String("securityGroups"),
		},
		SpaceStorageSettings: &DefaultSpaceStorageSettingsProperty{
			DefaultEbsStorageSettings: &DefaultEbsStorageSettingsProperty{
				DefaultEbsVolumeSizeInGb: jsii.Number(123),
				MaximumEbsVolumeSizeInGb: jsii.Number(123),
			},
		},
	},
	DomainSettings: &DomainSettingsProperty{
		DockerSettings: &DockerSettingsProperty{
			EnableDockerAccess: jsii.String("enableDockerAccess"),
			VpcOnlyTrustedAccounts: []*string{
				jsii.String("vpcOnlyTrustedAccounts"),
			},
		},
		ExecutionRoleIdentityConfig: jsii.String("executionRoleIdentityConfig"),
		IpAddressType: jsii.String("ipAddressType"),
		RStudioServerProDomainSettings: &RStudioServerProDomainSettingsProperty{
			DomainExecutionRoleArn: jsii.String("domainExecutionRoleArn"),

			// the properties below are optional
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
			RStudioConnectUrl: jsii.String("rStudioConnectUrl"),
			RStudioPackageManagerUrl: jsii.String("rStudioPackageManagerUrl"),
		},
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		UnifiedStudioSettings: &UnifiedStudioSettingsProperty{
			DomainAccountId: jsii.String("domainAccountId"),
			DomainId: jsii.String("domainId"),
			DomainRegion: jsii.String("domainRegion"),
			EnvironmentId: jsii.String("environmentId"),
			ProjectId: jsii.String("projectId"),
			ProjectS3Path: jsii.String("projectS3Path"),
			StudioWebPortalAccess: jsii.String("studioWebPortalAccess"),
		},
	},
	HomeEfsFileSystemCreation: jsii.String("homeEfsFileSystemCreation"),
	KmsKeyId: jsii.String("kmsKeyId"),
	SubnetIds: []interface{}{
		jsii.String("subnetIds"),
	},
	TagPropagation: jsii.String("tagPropagation"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VpcId: jsii.String("vpcId"),
})

Initializer ​

ts
new CfnDomain(scope: Construct, id: string, props: CfnDomainProps)
python
CfnDomain(scope: Construct, id: str, props: CfnDomainProps)
java
new CfnDomain(Construct scope, String id, CfnDomainProps props)
csharp
new CfnDomain(Construct scope, string id, CfnDomainProps props)
go
NewCfnDomain(Scope Construct, Id *string, Props CfnDomainProps)

Construct Props ​

appNetworkAccessTypeoptionalstringapp_network_access_typeoptionalstrappNetworkAccessTypeoptionalStringAppNetworkAccessTypeoptionalstringAppNetworkAccessTypeoptional*string#
Specifies the VPC used for non-EFS traffic. The default value is `PublicInternetOnly` .
notes
  • 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

appSecurityGroupManagementoptionalstringapp_security_group_managementoptionalstrappSecurityGroupManagementoptionalStringAppSecurityGroupManagementoptionalstringAppSecurityGroupManagementoptional*string#
The entity that creates and manages the required security groups for inter-app communication in `VpcOnly` mode.
notes

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

authModestringauth_modestrauthModeStringAuthModestringAuthMode*stringrequired#
The mode of authentication that members use to access the Domain.

Valid Values : SSO | IAM

defaultSpaceSettingsoptionalIResolvable | CfnDomain.DefaultSpaceSettingsPropertydefault_space_settingsoptionaltyping.Union[IResolvable, DefaultSpaceSettingsProperty]defaultSpaceSettingsoptionalIResolvableDefaultSpaceSettingsoptionalIResolvableDefaultSpaceSettingsoptionalinterface{}#
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.

defaultUserSettingsIResolvable | CfnDomain.UserSettingsPropertydefault_user_settingstyping.Union[IResolvable, UserSettingsProperty]defaultUserSettingsIResolvableDefaultUserSettingsIResolvableDefaultUserSettingsinterface{}required#
The default user settings.
domainNamestringdomain_namestrdomainNameStringDomainNamestringDomainName*stringrequired#
The domain name.
domainSettingsoptionalIResolvable | CfnDomain.DomainSettingsPropertydomain_settingsoptionaltyping.Union[IResolvable, DomainSettingsProperty]domainSettingsoptionalIResolvableDomainSettingsoptionalIResolvableDomainSettingsoptionalinterface{}#
A collection of settings that apply to the `SageMaker Domain` .

These settings are specified through the CreateDomain API call.

homeEfsFileSystemCreationoptionalstringhome_efs_file_system_creationoptionalstrhomeEfsFileSystemCreationoptionalStringHomeEfsFileSystemCreationoptionalstringHomeEfsFileSystemCreationoptional*string#
Indicates whether a home EFS file system is created for the domain.

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

kmsKeyIdoptionalstringkms_key_idoptionalstrkmsKeyIdoptionalStringKmsKeyIdoptionalstringKmsKeyIdoptional*string#
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 : .*

subnetIdsoptionalstring | ISubnetRef[]subnet_idsoptionaltyping.List[typing.Union[str, ISubnetRef]]subnetIdsoptionalList<String>SubnetIdsoptionalstring[]SubnetIdsoptional*[]interface{}#
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]+

tagPropagationoptionalstringtag_propagationoptionalstrtagPropagationoptionalStringTagPropagationoptionalstringTagPropagationoptional*string#
Indicates whether the tags added to Domain, User Profile and Space entity is propagated to all SageMaker resources.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
Tags to associated with the Domain.
notes

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.

vpcIdoptionalstring | IVPCRefvpc_idoptionaltyping.Union[str, IVPCRef]vpcIdoptionalStringVpcIdoptionalstringVpcIdoptionalinterface{}#
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]+

Properties ​

appNetworkAccessTypemay be undefinedstringapp_network_access_typemay be undefinedstrappNetworkAccessTypemay be undefinedStringAppNetworkAccessTypemay be undefinedstringAppNetworkAccessTypemay be undefined*string#
Specifies the VPC used for non-EFS traffic.

The default value is PublicInternetOnly .

appSecurityGroupManagementmay be undefinedstringapp_security_group_managementmay be undefinedstrappSecurityGroupManagementmay be undefinedStringAppSecurityGroupManagementmay be undefinedstringAppSecurityGroupManagementmay be undefined*string#
The entity that creates and manages the required security groups for inter-app communication in `VpcOnly` mode.
attrDomainArnstringattr_domain_arnstrattrDomainArnStringAttrDomainArnstringAttrDomainArn*string#
The Amazon Resource Name (ARN) of the Domain, such as `arn:aws:sagemaker:us-west-2:account-id:domain/my-domain-name` .
attrDomainIdstringattr_domain_idstrattrDomainIdStringAttrDomainIdstringAttrDomainId*string#
The Domain ID.
attrHomeEfsFileSystemIdstringattr_home_efs_file_system_idstrattrHomeEfsFileSystemIdStringAttrHomeEfsFileSystemIdstringAttrHomeEfsFileSystemId*string#
The ID of the Amazon Elastic File System (EFS) managed by this Domain.
attrSecurityGroupIdForDomainBoundarystringattr_security_group_id_for_domain_boundarystrattrSecurityGroupIdForDomainBoundaryStringAttrSecurityGroupIdForDomainBoundarystringAttrSecurityGroupIdForDomainBoundary*string#
The ID of the security group that authorizes traffic between the `RSessionGateway` apps and the `RStudioServerPro` app.
attrSingleSignOnApplicationArnstringattr_single_sign_on_application_arnstrattrSingleSignOnApplicationArnStringAttrSingleSignOnApplicationArnstringAttrSingleSignOnApplicationArn*string#
The ARN of the application managed by SageMaker in IAM Identity Center.

This value is only returned for domains created after October 1, 2023.

attrSingleSignOnManagedApplicationInstanceIdstringattr_single_sign_on_managed_application_instance_idstrattrSingleSignOnManagedApplicationInstanceIdStringAttrSingleSignOnManagedApplicationInstanceIdstringAttrSingleSignOnManagedApplicationInstanceId*string#
The SSO managed application instance ID.
attrUrlstringattr_urlstrattrUrlStringAttrUrlstringAttrUrl*string#
The URL for the Domain.
authModestringauth_modestrauthModeStringAuthModestringAuthMode*string#
The mode of authentication that members use to access the Domain.
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#
AWS resource type.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#
defaultSpaceSettingsmay be undefinedIResolvable | CfnDomain.DefaultSpaceSettingsPropertydefault_space_settingsmay be undefinedtyping.Union[IResolvable, DefaultSpaceSettingsProperty]defaultSpaceSettingsmay be undefinedIResolvableDefaultSpaceSettingsmay be undefinedIResolvableDefaultSpaceSettingsmay be undefinedinterface{}#
The default settings for shared spaces that users create in the domain.
defaultUserSettingsIResolvable | CfnDomain.UserSettingsPropertydefault_user_settingstyping.Union[IResolvable, UserSettingsProperty]defaultUserSettingsIResolvableDefaultUserSettingsIResolvableDefaultUserSettingsinterface{}#
The default user settings.
domainNamestringdomain_namestrdomainNameStringDomainNamestringDomainName*string#
The domain name.
A reference to a Domain resource.
domainSettingsmay be undefinedIResolvable | CfnDomain.DomainSettingsPropertydomain_settingsmay be undefinedtyping.Union[IResolvable, DomainSettingsProperty]domainSettingsmay be undefinedIResolvableDomainSettingsmay be undefinedIResolvableDomainSettingsmay be undefinedinterface{}#
A collection of settings that apply to the `SageMaker Domain` .
homeEfsFileSystemCreationmay be undefinedstringhome_efs_file_system_creationmay be undefinedstrhomeEfsFileSystemCreationmay be undefinedStringHomeEfsFileSystemCreationmay be undefinedstringHomeEfsFileSystemCreationmay be undefined*string#
Indicates whether a home EFS file system is created for the domain.
kmsKeyIdmay be undefinedstringkms_key_idmay be undefinedstrkmsKeyIdmay be undefinedStringKmsKeyIdmay be undefinedstringKmsKeyIdmay be undefined*string#
SageMaker uses AWS KMS to encrypt the EFS volume attached to the Domain with an AWS managed customer master key (CMK) by default.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string#
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

nodeNodenodeNodenodeNodeNodeNodeNodeNode#
The tree node.
refstringrefstrrefStringRefstringRef*string#
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

stackStackstackStackstackStackStackStackStackStack#
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

subnetIdsmay be undefinedstring[]subnet_idsmay be undefinedtyping.List[str]subnetIdsmay be undefinedList<String>SubnetIdsmay be undefinedstring[]SubnetIdsmay be undefined*[]*string#
The VPC subnets that Studio uses for communication.
tagPropagationmay be undefinedstringtag_propagationmay be undefinedstrtagPropagationmay be undefinedStringTagPropagationmay be undefinedstringTagPropagationmay be undefined*string#
Indicates whether the tags added to Domain, User Profile and Space entity is propagated to all SageMaker resources.
Tag Manager which manages the tags for this resource.
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#
Tags to associated with the Domain.
vpcIdmay be undefinedstringvpc_idmay be undefinedstrvpcIdmay be undefinedStringVpcIdmay be undefinedstringVpcIdmay be undefined*string#
The ID of the Amazon Virtual Private Cloud (Amazon VPC) that Studio uses for communication.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

arnForDomain(resource: IDomainRef): string@staticmethod def arn_for_domain(resource: IDomainRef) -> strpublic static String arnForDomain(IDomainRef resource)public static string ArnForDomain(IDomainRef resource)func ArnForDomain(Resource IDomainRef) *stringstatic#
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
fromDomainArn(scope: Construct, id: string, arn: string): IDomainRef@staticmethod def from_domain_arn(scope: Construct, id: str, arn: str) -> IDomainRefpublic static IDomainRef fromDomainArn(Construct scope, String id, String arn)public static IDomainRef FromDomainArn(Construct scope, string id, string arn)func FromDomainArn(Scope Construct, Id *string, Arn *string) IDomainRefstatic#
Creates a new IDomainRef from an ARN.
fromDomainId(scope: Construct, id: string, domainId: string): IDomainRef@staticmethod def from_domain_id(scope: Construct, id: str, domain_id: str) -> IDomainRefpublic static IDomainRef fromDomainId(Construct scope, String id, String domainId)public static IDomainRef FromDomainId(Construct scope, string id, string domainId)func FromDomainId(Scope Construct, Id *string, DomainId *string) IDomainRefstatic#
Creates a new IDomainRef from a domainId.
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnDomain(x: any): boolean@staticmethod def is_cfn_domain(x: Any) -> boolpublic static Boolean isCfnDomain(Object x)public static bool IsCfnDomain(object x)func IsCfnDomain(X interface{}) *boolstatic#
Checks whether the given object is a CfnDomain.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.