CfnAppImageConfigPropsMixin

class aws_cdk.mixins_preview.aws_sagemaker.mixins.CfnAppImageConfigPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a configuration for running a SageMaker AI image as a KernelGateway app.

The configuration specifies the Amazon Elastic File System storage volume on the image, and a list of the kernels in the image.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-appimageconfig.html

CloudformationResource:

AWS::SageMaker::AppImageConfig

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

cfn_app_image_config_props_mixin = sagemaker_mixins.CfnAppImageConfigPropsMixin(sagemaker_mixins.CfnAppImageConfigMixinProps(
    app_image_config_name="appImageConfigName",
    code_editor_app_image_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.CodeEditorAppImageConfigProperty(
        container_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.ContainerConfigProperty(
            container_arguments=["containerArguments"],
            container_entrypoint=["containerEntrypoint"],
            container_environment_variables=[sagemaker_mixins.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(
                key="key",
                value="value"
            )]
        )
    ),
    jupyter_lab_app_image_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.JupyterLabAppImageConfigProperty(
        container_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.ContainerConfigProperty(
            container_arguments=["containerArguments"],
            container_entrypoint=["containerEntrypoint"],
            container_environment_variables=[sagemaker_mixins.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(
                key="key",
                value="value"
            )]
        )
    ),
    kernel_gateway_image_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.KernelGatewayImageConfigProperty(
        file_system_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.FileSystemConfigProperty(
            default_gid=123,
            default_uid=123,
            mount_path="mountPath"
        ),
        kernel_specs=[sagemaker_mixins.CfnAppImageConfigPropsMixin.KernelSpecProperty(
            display_name="displayName",
            name="name"
        )]
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::SageMaker::AppImageConfig.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['appImageConfigName', 'codeEditorAppImageConfig', 'jupyterLabAppImageConfig', 'kernelGatewayImageConfig', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

CodeEditorAppImageConfigProperty

class CfnAppImageConfigPropsMixin.CodeEditorAppImageConfigProperty(*, container_config=None)

Bases: object

The configuration for the file system and kernels in a SageMaker image running as a Code Editor app.

The FileSystemConfig object is not supported.

Parameters:

container_config (Union[IResolvable, ContainerConfigProperty, Dict[str, Any], None]) – The container configuration for a SageMaker image.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-codeeditorappimageconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

code_editor_app_image_config_property = sagemaker_mixins.CfnAppImageConfigPropsMixin.CodeEditorAppImageConfigProperty(
    container_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.ContainerConfigProperty(
        container_arguments=["containerArguments"],
        container_entrypoint=["containerEntrypoint"],
        container_environment_variables=[sagemaker_mixins.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(
            key="key",
            value="value"
        )]
    )
)

Attributes

container_config

The container configuration for a SageMaker image.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-codeeditorappimageconfig.html#cfn-sagemaker-appimageconfig-codeeditorappimageconfig-containerconfig

ContainerConfigProperty

class CfnAppImageConfigPropsMixin.ContainerConfigProperty(*, container_arguments=None, container_entrypoint=None, container_environment_variables=None)

Bases: object

The configuration used to run the application image container.

Parameters:
  • container_arguments (Optional[Sequence[str]]) – The arguments for the container when you’re running the application.

  • container_entrypoint (Optional[Sequence[str]]) – The entrypoint used to run the application in the container.

  • container_environment_variables (Union[IResolvable, Sequence[Union[IResolvable, CustomImageContainerEnvironmentVariableProperty, Dict[str, Any]]], None]) – The environment variables to set in the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

container_config_property = sagemaker_mixins.CfnAppImageConfigPropsMixin.ContainerConfigProperty(
    container_arguments=["containerArguments"],
    container_entrypoint=["containerEntrypoint"],
    container_environment_variables=[sagemaker_mixins.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(
        key="key",
        value="value"
    )]
)

Attributes

container_arguments

The arguments for the container when you’re running the application.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html#cfn-sagemaker-appimageconfig-containerconfig-containerarguments

container_entrypoint

The entrypoint used to run the application in the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html#cfn-sagemaker-appimageconfig-containerconfig-containerentrypoint

container_environment_variables

The environment variables to set in the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-containerconfig.html#cfn-sagemaker-appimageconfig-containerconfig-containerenvironmentvariables

CustomImageContainerEnvironmentVariableProperty

class CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(*, key=None, value=None)

Bases: object

The environment variables to set in the container.

Parameters:
  • key (Optional[str]) – The key that identifies a container environment variable.

  • value (Optional[str]) – The value of the container environment variable.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-customimagecontainerenvironmentvariable.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

custom_image_container_environment_variable_property = sagemaker_mixins.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(
    key="key",
    value="value"
)

Attributes

key

The key that identifies a container environment variable.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-customimagecontainerenvironmentvariable.html#cfn-sagemaker-appimageconfig-customimagecontainerenvironmentvariable-key

value

The value of the container environment variable.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-customimagecontainerenvironmentvariable.html#cfn-sagemaker-appimageconfig-customimagecontainerenvironmentvariable-value

FileSystemConfigProperty

class CfnAppImageConfigPropsMixin.FileSystemConfigProperty(*, default_gid=None, default_uid=None, mount_path=None)

Bases: object

The Amazon Elastic File System storage configuration for a SageMaker AI image.

Parameters:
  • default_gid (Union[int, float, None]) – The default POSIX group ID (GID). If not specified, defaults to 100 .

  • default_uid (Union[int, float, None]) – The default POSIX user ID (UID). If not specified, defaults to 1000 .

  • mount_path (Optional[str]) – The path within the image to mount the user’s EFS home directory. The directory should be empty. If not specified, defaults to * /home/sagemaker-user* .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-filesystemconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

file_system_config_property = sagemaker_mixins.CfnAppImageConfigPropsMixin.FileSystemConfigProperty(
    default_gid=123,
    default_uid=123,
    mount_path="mountPath"
)

Attributes

default_gid

The default POSIX group ID (GID).

If not specified, defaults to 100 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-filesystemconfig.html#cfn-sagemaker-appimageconfig-filesystemconfig-defaultgid

default_uid

The default POSIX user ID (UID).

If not specified, defaults to 1000 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-filesystemconfig.html#cfn-sagemaker-appimageconfig-filesystemconfig-defaultuid

mount_path

The path within the image to mount the user’s EFS home directory.

The directory should be empty. If not specified, defaults to * /home/sagemaker-user* .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-filesystemconfig.html#cfn-sagemaker-appimageconfig-filesystemconfig-mountpath

JupyterLabAppImageConfigProperty

class CfnAppImageConfigPropsMixin.JupyterLabAppImageConfigProperty(*, container_config=None)

Bases: object

The configuration for the file system and kernels in a SageMaker AI image running as a JupyterLab app.

The FileSystemConfig object is not supported.

Parameters:

container_config (Union[IResolvable, ContainerConfigProperty, Dict[str, Any], None]) – The configuration used to run the application image container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-jupyterlabappimageconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

jupyter_lab_app_image_config_property = sagemaker_mixins.CfnAppImageConfigPropsMixin.JupyterLabAppImageConfigProperty(
    container_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.ContainerConfigProperty(
        container_arguments=["containerArguments"],
        container_entrypoint=["containerEntrypoint"],
        container_environment_variables=[sagemaker_mixins.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(
            key="key",
            value="value"
        )]
    )
)

Attributes

container_config

The configuration used to run the application image container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-jupyterlabappimageconfig.html#cfn-sagemaker-appimageconfig-jupyterlabappimageconfig-containerconfig

KernelGatewayImageConfigProperty

class CfnAppImageConfigPropsMixin.KernelGatewayImageConfigProperty(*, file_system_config=None, kernel_specs=None)

Bases: object

The configuration for the file system and kernels in a SageMaker AI image running as a KernelGateway app.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-kernelgatewayimageconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

kernel_gateway_image_config_property = sagemaker_mixins.CfnAppImageConfigPropsMixin.KernelGatewayImageConfigProperty(
    file_system_config=sagemaker_mixins.CfnAppImageConfigPropsMixin.FileSystemConfigProperty(
        default_gid=123,
        default_uid=123,
        mount_path="mountPath"
    ),
    kernel_specs=[sagemaker_mixins.CfnAppImageConfigPropsMixin.KernelSpecProperty(
        display_name="displayName",
        name="name"
    )]
)

Attributes

file_system_config

The Amazon Elastic File System storage configuration for a SageMaker AI image.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-kernelgatewayimageconfig.html#cfn-sagemaker-appimageconfig-kernelgatewayimageconfig-filesystemconfig

kernel_specs

The specification of the Jupyter kernels in the image.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-kernelgatewayimageconfig.html#cfn-sagemaker-appimageconfig-kernelgatewayimageconfig-kernelspecs

KernelSpecProperty

class CfnAppImageConfigPropsMixin.KernelSpecProperty(*, display_name=None, name=None)

Bases: object

The specification of a Jupyter kernel.

Parameters:
  • display_name (Optional[str]) – The display name of the kernel.

  • name (Optional[str]) – The name of the Jupyter kernel in the image. This value is case sensitive.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-kernelspec.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins

kernel_spec_property = sagemaker_mixins.CfnAppImageConfigPropsMixin.KernelSpecProperty(
    display_name="displayName",
    name="name"
)

Attributes

display_name

The display name of the kernel.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-kernelspec.html#cfn-sagemaker-appimageconfig-kernelspec-displayname

name

The name of the Jupyter kernel in the image.

This value is case sensitive.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-appimageconfig-kernelspec.html#cfn-sagemaker-appimageconfig-kernelspec-name