Skip to content
v2.277.0

CfnNotebookInstanceLifecycleConfigProps Struct ​

Properties for defining a CfnNotebookInstanceLifecycleConfig.

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 cfnNotebookInstanceLifecycleConfigProps: sagemaker.CfnNotebookInstanceLifecycleConfigProps = {
  notebookInstanceLifecycleConfigName: 'notebookInstanceLifecycleConfigName',
  onCreate: [{
    content: 'content',
  }],
  onStart: [{
    content: 'content',
  }],
  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_notebook_instance_lifecycle_config_props = sagemaker.CfnNotebookInstanceLifecycleConfigProps(
    notebook_instance_lifecycle_config_name="notebookInstanceLifecycleConfigName",
    on_create=[sagemaker.CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty(
        content="content"
    )],
    on_start=[sagemaker.CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty(
        content="content"
    )],
    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.*;

CfnNotebookInstanceLifecycleConfigProps cfnNotebookInstanceLifecycleConfigProps = CfnNotebookInstanceLifecycleConfigProps.builder()
        .notebookInstanceLifecycleConfigName("notebookInstanceLifecycleConfigName")
        .onCreate(List.of(NotebookInstanceLifecycleHookProperty.builder()
                .content("content")
                .build()))
        .onStart(List.of(NotebookInstanceLifecycleHookProperty.builder()
                .content("content")
                .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 cfnNotebookInstanceLifecycleConfigProps = new CfnNotebookInstanceLifecycleConfigProps {
    NotebookInstanceLifecycleConfigName = "notebookInstanceLifecycleConfigName",
    OnCreate = new [] { new NotebookInstanceLifecycleHookProperty {
        Content = "content"
    } },
    OnStart = new [] { new NotebookInstanceLifecycleHookProperty {
        Content = "content"
    } },
    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"

cfnNotebookInstanceLifecycleConfigProps := &CfnNotebookInstanceLifecycleConfigProps{
	NotebookInstanceLifecycleConfigName: jsii.String("notebookInstanceLifecycleConfigName"),
	OnCreate: []interface{}{
		&NotebookInstanceLifecycleHookProperty{
			Content: jsii.String("content"),
		},
	},
	OnStart: []interface{}{
		&NotebookInstanceLifecycleHookProperty{
			Content: jsii.String("content"),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

notebookInstanceLifecycleConfigNameoptionalstringnotebook_instance_lifecycle_config_nameoptionalstrnotebookInstanceLifecycleConfigNameoptionalStringNotebookInstanceLifecycleConfigNameoptionalstringNotebookInstanceLifecycleConfigNameoptional*string #
The name of the lifecycle configuration.
onCreateoptionalIResolvable | IResolvable | CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty[]on_createoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, NotebookInstanceLifecycleHookProperty]]]onCreateoptionalIResolvableOnCreateoptionalIResolvableOnCreateoptionalinterface{} #
A shell script that runs only once, when you create a notebook instance.

The shell script must be a base64-encoded string.

onStartoptionalIResolvable | IResolvable | CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty[]on_startoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, NotebookInstanceLifecycleHookProperty]]]onStartoptionalIResolvableOnStartoptionalIResolvableOnStartoptionalinterface{} #
A shell script that runs every time you start a notebook instance, including when you create the notebook instance.

The shell script must be a base64-encoded string.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.