NotebookInstanceArgs

data class NotebookInstanceArgs(val acceleratorTypes: Output<List<String>>? = null, val additionalCodeRepositories: Output<List<String>>? = null, val defaultCodeRepository: Output<String>? = null, val directInternetAccess: Output<String>? = null, val instanceMetadataServiceConfiguration: Output<NotebookInstanceInstanceMetadataServiceConfigurationArgs>? = null, val instanceType: Output<String>? = null, val kmsKeyId: Output<String>? = null, val lifecycleConfigName: Output<String>? = null, val name: Output<String>? = null, val platformIdentifier: Output<String>? = null, val roleArn: Output<String>? = null, val rootAccess: Output<String>? = null, val securityGroups: Output<List<String>>? = null, val subnetId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val volumeSize: Output<Int>? = null) : ConvertibleToJava<NotebookInstanceArgs>

Provides a SageMaker AI Notebook Instance resource.

Example Usage

Basic usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ni = new aws.sagemaker.NotebookInstance("ni", {
name: "my-notebook-instance",
roleArn: role.arn,
instanceType: "ml.t2.medium",
tags: {
Name: "foo",
},
});
import pulumi
import pulumi_aws as aws
ni = aws.sagemaker.NotebookInstance("ni",
name="my-notebook-instance",
role_arn=role["arn"],
instance_type="ml.t2.medium",
tags={
"Name": "foo",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var ni = new Aws.Sagemaker.NotebookInstance("ni", new()
{
Name = "my-notebook-instance",
RoleArn = role.Arn,
InstanceType = "ml.t2.medium",
Tags =
{
{ "Name", "foo" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sagemaker.NewNotebookInstance(ctx, "ni", &sagemaker.NotebookInstanceArgs{
Name: pulumi.String("my-notebook-instance"),
RoleArn: pulumi.Any(role.Arn),
InstanceType: pulumi.String("ml.t2.medium"),
Tags: pulumi.StringMap{
"Name": pulumi.String("foo"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.NotebookInstance;
import com.pulumi.aws.sagemaker.NotebookInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ni = new NotebookInstance("ni", NotebookInstanceArgs.builder()
.name("my-notebook-instance")
.roleArn(role.arn())
.instanceType("ml.t2.medium")
.tags(Map.of("Name", "foo"))
.build());
}
}
resources:
ni:
type: aws:sagemaker:NotebookInstance
properties:
name: my-notebook-instance
roleArn: ${role.arn}
instanceType: ml.t2.medium
tags:
Name: foo

Code repository usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sagemaker.CodeRepository("example", {
codeRepositoryName: "my-notebook-instance-code-repo",
gitConfig: {
repositoryUrl: "https://github.com/github/docs.git",
},
});
const ni = new aws.sagemaker.NotebookInstance("ni", {
name: "my-notebook-instance",
roleArn: role.arn,
instanceType: "ml.t2.medium",
defaultCodeRepository: example.codeRepositoryName,
tags: {
Name: "foo",
},
});
import pulumi
import pulumi_aws as aws
example = aws.sagemaker.CodeRepository("example",
code_repository_name="my-notebook-instance-code-repo",
git_config={
"repository_url": "https://github.com/github/docs.git",
})
ni = aws.sagemaker.NotebookInstance("ni",
name="my-notebook-instance",
role_arn=role["arn"],
instance_type="ml.t2.medium",
default_code_repository=example.code_repository_name,
tags={
"Name": "foo",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Sagemaker.CodeRepository("example", new()
{
CodeRepositoryName = "my-notebook-instance-code-repo",
GitConfig = new Aws.Sagemaker.Inputs.CodeRepositoryGitConfigArgs
{
RepositoryUrl = "https://github.com/github/docs.git",
},
});
var ni = new Aws.Sagemaker.NotebookInstance("ni", new()
{
Name = "my-notebook-instance",
RoleArn = role.Arn,
InstanceType = "ml.t2.medium",
DefaultCodeRepository = example.CodeRepositoryName,
Tags =
{
{ "Name", "foo" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := sagemaker.NewCodeRepository(ctx, "example", &sagemaker.CodeRepositoryArgs{
CodeRepositoryName: pulumi.String("my-notebook-instance-code-repo"),
GitConfig: &sagemaker.CodeRepositoryGitConfigArgs{
RepositoryUrl: pulumi.String("https://github.com/github/docs.git"),
},
})
if err != nil {
return err
}
_, err = sagemaker.NewNotebookInstance(ctx, "ni", &sagemaker.NotebookInstanceArgs{
Name: pulumi.String("my-notebook-instance"),
RoleArn: pulumi.Any(role.Arn),
InstanceType: pulumi.String("ml.t2.medium"),
DefaultCodeRepository: example.CodeRepositoryName,
Tags: pulumi.StringMap{
"Name": pulumi.String("foo"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.CodeRepository;
import com.pulumi.aws.sagemaker.CodeRepositoryArgs;
import com.pulumi.aws.sagemaker.inputs.CodeRepositoryGitConfigArgs;
import com.pulumi.aws.sagemaker.NotebookInstance;
import com.pulumi.aws.sagemaker.NotebookInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new CodeRepository("example", CodeRepositoryArgs.builder()
.codeRepositoryName("my-notebook-instance-code-repo")
.gitConfig(CodeRepositoryGitConfigArgs.builder()
.repositoryUrl("https://github.com/github/docs.git")
.build())
.build());
var ni = new NotebookInstance("ni", NotebookInstanceArgs.builder()
.name("my-notebook-instance")
.roleArn(role.arn())
.instanceType("ml.t2.medium")
.defaultCodeRepository(example.codeRepositoryName())
.tags(Map.of("Name", "foo"))
.build());
}
}
resources:
example:
type: aws:sagemaker:CodeRepository
properties:
codeRepositoryName: my-notebook-instance-code-repo
gitConfig:
repositoryUrl: https://github.com/github/docs.git
ni:
type: aws:sagemaker:NotebookInstance
properties:
name: my-notebook-instance
roleArn: ${role.arn}
instanceType: ml.t2.medium
defaultCodeRepository: ${example.codeRepositoryName}
tags:
Name: foo

Import

Using pulumi import, import SageMaker AI Notebook Instances using the name. For example:

$ pulumi import aws:sagemaker/notebookInstance:NotebookInstance test_notebook_instance my-notebook-instance

Constructors

Link copied to clipboard
constructor(acceleratorTypes: Output<List<String>>? = null, additionalCodeRepositories: Output<List<String>>? = null, defaultCodeRepository: Output<String>? = null, directInternetAccess: Output<String>? = null, instanceMetadataServiceConfiguration: Output<NotebookInstanceInstanceMetadataServiceConfigurationArgs>? = null, instanceType: Output<String>? = null, kmsKeyId: Output<String>? = null, lifecycleConfigName: Output<String>? = null, name: Output<String>? = null, platformIdentifier: Output<String>? = null, roleArn: Output<String>? = null, rootAccess: Output<String>? = null, securityGroups: Output<List<String>>? = null, subnetId: Output<String>? = null, tags: Output<Map<String, String>>? = null, volumeSize: Output<Int>? = null)

Properties

Link copied to clipboard
val acceleratorTypes: Output<List<String>>? = null

A list of Elastic Inference (EI) instance types to associate with this notebook instance. See Elastic Inference Accelerator for more details. Valid values: ml.eia1.medium, ml.eia1.large, ml.eia1.xlarge, ml.eia2.medium, ml.eia2.large, ml.eia2.xlarge.

Link copied to clipboard
val additionalCodeRepositories: Output<List<String>>? = null

An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance.

Link copied to clipboard
val defaultCodeRepository: Output<String>? = null

The Git repository associated with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in AWS CodeCommit or in any other Git repository.

Link copied to clipboard
val directInternetAccess: Output<String>? = null

Set to Disabled to disable internet access to notebook. Requires security_groups and subnet_id to be set. Supported values: Enabled (Default) or Disabled. If set to Disabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker AI training and endpoint services unless your configure a NAT Gateway in your VPC.

Link copied to clipboard

Information on the IMDS configuration of the notebook instance. Conflicts with instance_metadata_service_configuration. see details below.

Link copied to clipboard
val instanceType: Output<String>? = null

The name of ML compute instance type.

Link copied to clipboard
val kmsKeyId: Output<String>? = null

The AWS Key Management Service (AWS KMS) key that Amazon SageMaker AI uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

Link copied to clipboard
val lifecycleConfigName: Output<String>? = null

The name of a lifecycle configuration to associate with the notebook instance.

Link copied to clipboard
val name: Output<String>? = null

The name of the notebook instance (must be unique).

Link copied to clipboard
val platformIdentifier: Output<String>? = null

The platform identifier of the notebook instance runtime environment. This value can be either notebook-al1-v1, notebook-al2-v1, notebook-al2-v2, or notebook-al2-v3, depending on which version of Amazon Linux you require.

Link copied to clipboard
val roleArn: Output<String>? = null

The ARN of the IAM role to be used by the notebook instance which allows SageMaker AI to call other services on your behalf.

Link copied to clipboard
val rootAccess: Output<String>? = null

Whether root access is Enabled or Disabled for users of the notebook instance. The default value is Enabled.

Link copied to clipboard
val securityGroups: Output<List<String>>? = null

The associated security groups.

Link copied to clipboard
val subnetId: Output<String>? = null

The VPC subnet ID.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val volumeSize: Output<Int>? = null

The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.

Functions

Link copied to clipboard
open override fun toJava(): NotebookInstanceArgs