Skip to content
v2.278.0

CfnSpaceProps Struct ​

Properties for defining a CfnSpace.

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 cfnSpaceProps: sagemaker.CfnSpaceProps = {
  domainId: 'domainId',
  spaceName: 'spaceName',

  // the properties below are optional
  ownershipSettings: {
    ownerUserProfileName: 'ownerUserProfileName',
  },
  spaceDisplayName: 'spaceDisplayName',
  spaceSettings: {
    appType: 'appType',
    codeEditorAppSettings: {
      appLifecycleManagement: {
        idleSettings: {
          idleTimeoutInMinutes: 123,
        },
      },
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
    },
    customFileSystems: [{
      efsFileSystem: {
        fileSystemId: 'fileSystemId',
      },
      fSxLustreFileSystem: {
        fileSystemId: 'fileSystemId',
      },
      s3FileSystem: {
        s3Uri: 's3Uri',
      },
    }],
    jupyterLabAppSettings: {
      appLifecycleManagement: {
        idleSettings: {
          idleTimeoutInMinutes: 123,
        },
      },
      codeRepositories: [{
        repositoryUrl: 'repositoryUrl',
      }],
      defaultResourceSpec: {
        instanceType: 'instanceType',
        lifecycleConfigArn: 'lifecycleConfigArn',
        sageMakerImageArn: 'sageMakerImageArn',
        sageMakerImageVersionArn: 'sageMakerImageVersionArn',
        trainingPlanArn: 'trainingPlanArn',
      },
    },
    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'],
    },
    remoteAccess: 'remoteAccess',
    spaceManagedResources: 'spaceManagedResources',
    spaceStorageSettings: {
      ebsStorageSettings: {
        ebsVolumeSizeInGb: 123,
      },
    },
  },
  spaceSharingSettings: {
    sharingType: 'sharingType',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
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_space_props = sagemaker.CfnSpaceProps(
    domain_id="domainId",
    space_name="spaceName",

    # the properties below are optional
    ownership_settings=sagemaker.CfnSpace.OwnershipSettingsProperty(
        owner_user_profile_name="ownerUserProfileName"
    ),
    space_display_name="spaceDisplayName",
    space_settings=sagemaker.CfnSpace.SpaceSettingsProperty(
        app_type="appType",
        code_editor_app_settings=sagemaker.CfnSpace.SpaceCodeEditorAppSettingsProperty(
            app_lifecycle_management=sagemaker.CfnSpace.SpaceAppLifecycleManagementProperty(
                idle_settings=sagemaker.CfnSpace.SpaceIdleSettingsProperty(
                    idle_timeout_in_minutes=123
                )
            ),
            default_resource_spec=sagemaker.CfnSpace.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            )
        ),
        custom_file_systems=[sagemaker.CfnSpace.CustomFileSystemProperty(
            efs_file_system=sagemaker.CfnSpace.EFSFileSystemProperty(
                file_system_id="fileSystemId"
            ),
            f_sx_lustre_file_system=sagemaker.CfnSpace.FSxLustreFileSystemProperty(
                file_system_id="fileSystemId"
            ),
            s3_file_system=sagemaker.CfnSpace.S3FileSystemProperty(
                s3_uri="s3Uri"
            )
        )],
        jupyter_lab_app_settings=sagemaker.CfnSpace.SpaceJupyterLabAppSettingsProperty(
            app_lifecycle_management=sagemaker.CfnSpace.SpaceAppLifecycleManagementProperty(
                idle_settings=sagemaker.CfnSpace.SpaceIdleSettingsProperty(
                    idle_timeout_in_minutes=123
                )
            ),
            code_repositories=[sagemaker.CfnSpace.CodeRepositoryProperty(
                repository_url="repositoryUrl"
            )],
            default_resource_spec=sagemaker.CfnSpace.ResourceSpecProperty(
                instance_type="instanceType",
                lifecycle_config_arn="lifecycleConfigArn",
                sage_maker_image_arn="sageMakerImageArn",
                sage_maker_image_version_arn="sageMakerImageVersionArn",
                training_plan_arn="trainingPlanArn"
            )
        ),
        jupyter_server_app_settings=sagemaker.CfnSpace.JupyterServerAppSettingsProperty(
            default_resource_spec=sagemaker.CfnSpace.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.CfnSpace.KernelGatewayAppSettingsProperty(
            custom_images=[sagemaker.CfnSpace.CustomImageProperty(
                app_image_config_name="appImageConfigName",
                image_name="imageName",

                # the properties below are optional
                image_version_number=123
            )],
            default_resource_spec=sagemaker.CfnSpace.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"]
        ),
        remote_access="remoteAccess",
        space_managed_resources="spaceManagedResources",
        space_storage_settings=sagemaker.CfnSpace.SpaceStorageSettingsProperty(
            ebs_storage_settings=sagemaker.CfnSpace.EbsStorageSettingsProperty(
                ebs_volume_size_in_gb=123
            )
        )
    ),
    space_sharing_settings=sagemaker.CfnSpace.SpaceSharingSettingsProperty(
        sharing_type="sharingType"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.*;

CfnSpaceProps cfnSpaceProps = CfnSpaceProps.builder()
        .domainId("domainId")
        .spaceName("spaceName")

        // the properties below are optional
        .ownershipSettings(OwnershipSettingsProperty.builder()
                .ownerUserProfileName("ownerUserProfileName")
                .build())
        .spaceDisplayName("spaceDisplayName")
        .spaceSettings(SpaceSettingsProperty.builder()
                .appType("appType")
                .codeEditorAppSettings(SpaceCodeEditorAppSettingsProperty.builder()
                        .appLifecycleManagement(SpaceAppLifecycleManagementProperty.builder()
                                .idleSettings(SpaceIdleSettingsProperty.builder()
                                        .idleTimeoutInMinutes(123)
                                        .build())
                                .build())
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .build())
                .customFileSystems(List.of(CustomFileSystemProperty.builder()
                        .efsFileSystem(EFSFileSystemProperty.builder()
                                .fileSystemId("fileSystemId")
                                .build())
                        .fSxLustreFileSystem(FSxLustreFileSystemProperty.builder()
                                .fileSystemId("fileSystemId")
                                .build())
                        .s3FileSystem(S3FileSystemProperty.builder()
                                .s3Uri("s3Uri")
                                .build())
                        .build()))
                .jupyterLabAppSettings(SpaceJupyterLabAppSettingsProperty.builder()
                        .appLifecycleManagement(SpaceAppLifecycleManagementProperty.builder()
                                .idleSettings(SpaceIdleSettingsProperty.builder()
                                        .idleTimeoutInMinutes(123)
                                        .build())
                                .build())
                        .codeRepositories(List.of(CodeRepositoryProperty.builder()
                                .repositoryUrl("repositoryUrl")
                                .build()))
                        .defaultResourceSpec(ResourceSpecProperty.builder()
                                .instanceType("instanceType")
                                .lifecycleConfigArn("lifecycleConfigArn")
                                .sageMakerImageArn("sageMakerImageArn")
                                .sageMakerImageVersionArn("sageMakerImageVersionArn")
                                .trainingPlanArn("trainingPlanArn")
                                .build())
                        .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())
                .remoteAccess("remoteAccess")
                .spaceManagedResources("spaceManagedResources")
                .spaceStorageSettings(SpaceStorageSettingsProperty.builder()
                        .ebsStorageSettings(EbsStorageSettingsProperty.builder()
                                .ebsVolumeSizeInGb(123)
                                .build())
                        .build())
                .build())
        .spaceSharingSettings(SpaceSharingSettingsProperty.builder()
                .sharingType("sharingType")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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 cfnSpaceProps = new CfnSpaceProps {
    DomainId = "domainId",
    SpaceName = "spaceName",

    // the properties below are optional
    OwnershipSettings = new OwnershipSettingsProperty {
        OwnerUserProfileName = "ownerUserProfileName"
    },
    SpaceDisplayName = "spaceDisplayName",
    SpaceSettings = new SpaceSettingsProperty {
        AppType = "appType",
        CodeEditorAppSettings = new SpaceCodeEditorAppSettingsProperty {
            AppLifecycleManagement = new SpaceAppLifecycleManagementProperty {
                IdleSettings = new SpaceIdleSettingsProperty {
                    IdleTimeoutInMinutes = 123
                }
            },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            }
        },
        CustomFileSystems = new [] { new CustomFileSystemProperty {
            EfsFileSystem = new EFSFileSystemProperty {
                FileSystemId = "fileSystemId"
            },
            FSxLustreFileSystem = new FSxLustreFileSystemProperty {
                FileSystemId = "fileSystemId"
            },
            S3FileSystem = new S3FileSystemProperty {
                S3Uri = "s3Uri"
            }
        } },
        JupyterLabAppSettings = new SpaceJupyterLabAppSettingsProperty {
            AppLifecycleManagement = new SpaceAppLifecycleManagementProperty {
                IdleSettings = new SpaceIdleSettingsProperty {
                    IdleTimeoutInMinutes = 123
                }
            },
            CodeRepositories = new [] { new CodeRepositoryProperty {
                RepositoryUrl = "repositoryUrl"
            } },
            DefaultResourceSpec = new ResourceSpecProperty {
                InstanceType = "instanceType",
                LifecycleConfigArn = "lifecycleConfigArn",
                SageMakerImageArn = "sageMakerImageArn",
                SageMakerImageVersionArn = "sageMakerImageVersionArn",
                TrainingPlanArn = "trainingPlanArn"
            }
        },
        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" }
        },
        RemoteAccess = "remoteAccess",
        SpaceManagedResources = "spaceManagedResources",
        SpaceStorageSettings = new SpaceStorageSettingsProperty {
            EbsStorageSettings = new EbsStorageSettingsProperty {
                EbsVolumeSizeInGb = 123
            }
        }
    },
    SpaceSharingSettings = new SpaceSharingSettingsProperty {
        SharingType = "sharingType"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

cfnSpaceProps := &CfnSpaceProps{
	DomainId: jsii.String("domainId"),
	SpaceName: jsii.String("spaceName"),

	// the properties below are optional
	OwnershipSettings: &OwnershipSettingsProperty{
		OwnerUserProfileName: jsii.String("ownerUserProfileName"),
	},
	SpaceDisplayName: jsii.String("spaceDisplayName"),
	SpaceSettings: &SpaceSettingsProperty{
		AppType: jsii.String("appType"),
		CodeEditorAppSettings: &SpaceCodeEditorAppSettingsProperty{
			AppLifecycleManagement: &SpaceAppLifecycleManagementProperty{
				IdleSettings: &SpaceIdleSettingsProperty{
					IdleTimeoutInMinutes: 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"),
			},
		},
		CustomFileSystems: []interface{}{
			&CustomFileSystemProperty{
				EfsFileSystem: &EFSFileSystemProperty{
					FileSystemId: jsii.String("fileSystemId"),
				},
				FSxLustreFileSystem: &FSxLustreFileSystemProperty{
					FileSystemId: jsii.String("fileSystemId"),
				},
				S3FileSystem: &S3FileSystemProperty{
					S3Uri: jsii.String("s3Uri"),
				},
			},
		},
		JupyterLabAppSettings: &SpaceJupyterLabAppSettingsProperty{
			AppLifecycleManagement: &SpaceAppLifecycleManagementProperty{
				IdleSettings: &SpaceIdleSettingsProperty{
					IdleTimeoutInMinutes: jsii.Number(123),
				},
			},
			CodeRepositories: []interface{}{
				&CodeRepositoryProperty{
					RepositoryUrl: jsii.String("repositoryUrl"),
				},
			},
			DefaultResourceSpec: &ResourceSpecProperty{
				InstanceType: jsii.String("instanceType"),
				LifecycleConfigArn: jsii.String("lifecycleConfigArn"),
				SageMakerImageArn: jsii.String("sageMakerImageArn"),
				SageMakerImageVersionArn: jsii.String("sageMakerImageVersionArn"),
				TrainingPlanArn: jsii.String("trainingPlanArn"),
			},
		},
		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"),
			},
		},
		RemoteAccess: jsii.String("remoteAccess"),
		SpaceManagedResources: jsii.String("spaceManagedResources"),
		SpaceStorageSettings: &SpaceStorageSettingsProperty{
			EbsStorageSettings: &EbsStorageSettingsProperty{
				EbsVolumeSizeInGb: jsii.Number(123),
			},
		},
	},
	SpaceSharingSettings: &SpaceSharingSettingsProperty{
		SharingType: jsii.String("sharingType"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

domainIdstringdomain_idstrdomainIdStringDomainIdstringDomainId*string required #
The ID of the associated domain.
ownershipSettingsoptionalIResolvable | CfnSpace.OwnershipSettingsPropertyownership_settingsoptionaltyping.Union[IResolvable, OwnershipSettingsProperty]ownershipSettingsoptionalIResolvableOwnershipSettingsoptionalIResolvableOwnershipSettingsoptionalinterface{} #
The collection of ownership settings for a space.
spaceDisplayNameoptionalstringspace_display_nameoptionalstrspaceDisplayNameoptionalStringSpaceDisplayNameoptionalstringSpaceDisplayNameoptional*string #
The name of the space that appears in the Studio UI.
spaceNamestringspace_namestrspaceNameStringSpaceNamestringSpaceName*string required #
The name of the space.
spaceSettingsoptionalIResolvable | CfnSpace.SpaceSettingsPropertyspace_settingsoptionaltyping.Union[IResolvable, SpaceSettingsProperty]spaceSettingsoptionalIResolvableSpaceSettingsoptionalIResolvableSpaceSettingsoptionalinterface{} #
A collection of space settings.
spaceSharingSettingsoptionalIResolvable | CfnSpace.SpaceSharingSettingsPropertyspace_sharing_settingsoptionaltyping.Union[IResolvable, SpaceSharingSettingsProperty]spaceSharingSettingsoptionalIResolvableSpaceSharingSettingsoptionalIResolvableSpaceSharingSettingsoptionalinterface{} #
A collection of space sharing settings.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.

For more information, see Tag .