CfnAppImageConfigPropsMixin
- class aws_cdk.cfn_property_mixins.aws_sagemaker.CfnAppImageConfigPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker import aws_cdk as cdk # merge_strategy: cdk.IMergeStrategy cfn_app_image_config_props_mixin = sagemaker.CfnAppImageConfigPropsMixin(sagemaker.CfnAppImageConfigMixinProps( app_image_config_name="appImageConfigName", code_editor_app_image_config=sagemaker.CfnAppImageConfigPropsMixin.CodeEditorAppImageConfigProperty( container_config=sagemaker.CfnAppImageConfigPropsMixin.ContainerConfigProperty( container_arguments=["containerArguments"], container_entrypoint=["containerEntrypoint"], container_environment_variables=[sagemaker.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty( key="key", value="value" )] ) ), jupyter_lab_app_image_config=sagemaker.CfnAppImageConfigPropsMixin.JupyterLabAppImageConfigProperty( container_config=sagemaker.CfnAppImageConfigPropsMixin.ContainerConfigProperty( container_arguments=["containerArguments"], container_entrypoint=["containerEntrypoint"], container_environment_variables=[sagemaker.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty( key="key", value="value" )] ) ), kernel_gateway_image_config=sagemaker.CfnAppImageConfigPropsMixin.KernelGatewayImageConfigProperty( file_system_config=sagemaker.CfnAppImageConfigPropsMixin.FileSystemConfigProperty( default_gid=123, default_uid=123, mount_path="mountPath" ), kernel_specs=[sagemaker.CfnAppImageConfigPropsMixin.KernelSpecProperty( display_name="displayName", name="name" )] ), tags=[cdk.CfnTag( key="key", value="value" )] ), strategy=merge_strategy )
Create a mixin to apply properties to
AWS::SageMaker::AppImageConfig.- Parameters:
props (
Union[CfnAppImageConfigMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
None
- 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)
Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.
CodeEditorAppImageConfigProperty
- class CfnAppImageConfigPropsMixin.CodeEditorAppImageConfigProperty(*, container_config=None)
Bases:
objectThe configuration for the file system and kernels in a SageMaker image running as a Code Editor app.
The
FileSystemConfigobject is not supported.- Parameters:
container_config (
Union[IResolvable,ContainerConfigProperty,Dict[str,Any],None]) – The container configuration for a SageMaker image.- See:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker code_editor_app_image_config_property = sagemaker.CfnAppImageConfigPropsMixin.CodeEditorAppImageConfigProperty( container_config=sagemaker.CfnAppImageConfigPropsMixin.ContainerConfigProperty( container_arguments=["containerArguments"], container_entrypoint=["containerEntrypoint"], container_environment_variables=[sagemaker.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty( key="key", value="value" )] ) )
Attributes
- container_config
The container configuration for a SageMaker image.
ContainerConfigProperty
- class CfnAppImageConfigPropsMixin.ContainerConfigProperty(*, container_arguments=None, container_entrypoint=None, container_environment_variables=None)
Bases:
objectThe 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:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker container_config_property = sagemaker.CfnAppImageConfigPropsMixin.ContainerConfigProperty( container_arguments=["containerArguments"], container_entrypoint=["containerEntrypoint"], container_environment_variables=[sagemaker.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty( key="key", value="value" )] )
Attributes
- container_arguments
The arguments for the container when you’re running the application.
- container_entrypoint
The entrypoint used to run the application in the container.
- container_environment_variables
The environment variables to set in the container.
CustomImageContainerEnvironmentVariableProperty
- class CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty(*, key=None, value=None)
Bases:
objectThe 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:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker custom_image_container_environment_variable_property = sagemaker.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty( key="key", value="value" )
Attributes
- key
The key that identifies a container environment variable.
- value
The value of the container environment variable.
FileSystemConfigProperty
- class CfnAppImageConfigPropsMixin.FileSystemConfigProperty(*, default_gid=None, default_uid=None, mount_path=None)
Bases:
objectThe 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 to100.default_uid (
Union[int,float,None]) – The default POSIX user ID (UID). If not specified, defaults to1000.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:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker file_system_config_property = sagemaker.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.
- default_uid
The default POSIX user ID (UID).
If not specified, defaults to
1000.
- 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* .
JupyterLabAppImageConfigProperty
- class CfnAppImageConfigPropsMixin.JupyterLabAppImageConfigProperty(*, container_config=None)
Bases:
objectThe configuration for the file system and kernels in a SageMaker AI image running as a JupyterLab app.
The
FileSystemConfigobject is not supported.- Parameters:
container_config (
Union[IResolvable,ContainerConfigProperty,Dict[str,Any],None]) – The configuration used to run the application image container.- See:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker jupyter_lab_app_image_config_property = sagemaker.CfnAppImageConfigPropsMixin.JupyterLabAppImageConfigProperty( container_config=sagemaker.CfnAppImageConfigPropsMixin.ContainerConfigProperty( container_arguments=["containerArguments"], container_entrypoint=["containerEntrypoint"], container_environment_variables=[sagemaker.CfnAppImageConfigPropsMixin.CustomImageContainerEnvironmentVariableProperty( key="key", value="value" )] ) )
Attributes
- container_config
The configuration used to run the application image container.
KernelGatewayImageConfigProperty
- class CfnAppImageConfigPropsMixin.KernelGatewayImageConfigProperty(*, file_system_config=None, kernel_specs=None)
Bases:
objectThe configuration for the file system and kernels in a SageMaker AI image running as a KernelGateway app.
- Parameters:
file_system_config (
Union[IResolvable,FileSystemConfigProperty,Dict[str,Any],None]) – The Amazon Elastic File System storage configuration for a SageMaker AI image.kernel_specs (
Union[IResolvable,Sequence[Union[IResolvable,KernelSpecProperty,Dict[str,Any]]],None]) – The specification of the Jupyter kernels in the image.
- See:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker kernel_gateway_image_config_property = sagemaker.CfnAppImageConfigPropsMixin.KernelGatewayImageConfigProperty( file_system_config=sagemaker.CfnAppImageConfigPropsMixin.FileSystemConfigProperty( default_gid=123, default_uid=123, mount_path="mountPath" ), kernel_specs=[sagemaker.CfnAppImageConfigPropsMixin.KernelSpecProperty( display_name="displayName", name="name" )] )
Attributes
- file_system_config
The Amazon Elastic File System storage configuration for a SageMaker AI image.
- kernel_specs
The specification of the Jupyter kernels in the image.
KernelSpecProperty
- class CfnAppImageConfigPropsMixin.KernelSpecProperty(*, display_name=None, name=None)
Bases:
objectThe 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:
- 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.cfn_property_mixins import aws_sagemaker as sagemaker kernel_spec_property = sagemaker.CfnAppImageConfigPropsMixin.KernelSpecProperty( display_name="displayName", name="name" )
Attributes
- display_name
The display name of the kernel.
- name
The name of the Jupyter kernel in the image.
This value is case sensitive.