# CfnNotebookInstanceLifecycleConfigProps

Properties for defining a `CfnNotebookInstanceLifecycleConfig`.

Used as props by: [CfnNotebookInstanceLifecycleConfig](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnNotebookInstanceLifecycleConfig.html)

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
    } }
};
```

Golang:

```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

- `notebookInstanceLifecycleConfigName`: string — The name of the lifecycle configuration.

- `onCreate`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty.html)[] — A shell script that runs only once, when you create a notebook instance.

  The shell script must be a base64-encoded string.

- `onStart`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnNotebookInstanceLifecycleConfig.NotebookInstanceLifecycleHookProperty.html)[] — 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.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.
