NotebookInstance
Provides a Sagemaker Notebook Instance resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var ni = new Aws.Sagemaker.NotebookInstance("ni", new Aws.Sagemaker.NotebookInstanceArgs
{
InstanceType = "ml.t2.medium",
RoleArn = aws_iam_role.Role.Arn,
Tags =
{
{ "Name", "foo" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/sagemaker"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sagemaker.NewNotebookInstance(ctx, "ni", &sagemaker.NotebookInstanceArgs{
InstanceType: pulumi.String("ml.t2.medium"),
RoleArn: pulumi.String(aws_iam_role.Role.Arn),
Tags: pulumi.StringMap{
"Name": pulumi.String("foo"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
ni = aws.sagemaker.NotebookInstance("ni",
instance_type="ml.t2.medium",
role_arn=aws_iam_role["role"]["arn"],
tags={
"Name": "foo",
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ni = new aws.sagemaker.NotebookInstance("ni", {
instanceType: "ml.t2.medium",
roleArn: aws_iam_role_role.arn,
tags: {
Name: "foo",
},
});Create a NotebookInstance Resource
new NotebookInstance(name: string, args: NotebookInstanceArgs, opts?: CustomResourceOptions);def NotebookInstance(resource_name, opts=None, direct_internet_access=None, instance_type=None, kms_key_id=None, lifecycle_config_name=None, name=None, role_arn=None, security_groups=None, subnet_id=None, tags=None, __props__=None);func NewNotebookInstance(ctx *Context, name string, args NotebookInstanceArgs, opts ...ResourceOption) (*NotebookInstance, error)public NotebookInstance(string name, NotebookInstanceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotebookInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
NotebookInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The NotebookInstance resource accepts the following input properties:
- Instance
Type string The name of ML compute instance type.
- Role
Arn string The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- Direct
Internet stringAccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- Kms
Key stringId The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- Lifecycle
Config stringName The name of a lifecycle configuration to associate with the notebook instance.
- Name string
The name of the notebook instance (must be unique).
- Security
Groups List<string> The associated security groups.
- Subnet
Id string The VPC subnet ID.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Instance
Type string The name of ML compute instance type.
- Role
Arn string The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- Direct
Internet stringAccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- Kms
Key stringId The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- Lifecycle
Config stringName The name of a lifecycle configuration to associate with the notebook instance.
- Name string
The name of the notebook instance (must be unique).
- Security
Groups []string The associated security groups.
- Subnet
Id string The VPC subnet ID.
- map[string]string
A map of tags to assign to the resource.
- instance
Type string The name of ML compute instance type.
- role
Arn string The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- direct
Internet stringAccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- kms
Key stringId The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- lifecycle
Config stringName The name of a lifecycle configuration to associate with the notebook instance.
- name string
The name of the notebook instance (must be unique).
- security
Groups string[] The associated security groups.
- subnet
Id string The VPC subnet ID.
- {[key: string]: string}
A map of tags to assign to the resource.
- instance_
type str The name of ML compute instance type.
- role_
arn str The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- direct_
internet_ straccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- kms_
key_ strid The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- lifecycle_
config_ strname The name of a lifecycle configuration to associate with the notebook instance.
- name str
The name of the notebook instance (must be unique).
- security_
groups List[str] The associated security groups.
- subnet_
id str The VPC subnet ID.
- Dict[str, str]
A map of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotebookInstance resource produces the following output properties:
Look up an Existing NotebookInstance Resource
Get an existing NotebookInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NotebookInstanceState, opts?: CustomResourceOptions): NotebookInstancestatic get(resource_name, id, opts=None, arn=None, direct_internet_access=None, instance_type=None, kms_key_id=None, lifecycle_config_name=None, name=None, role_arn=None, security_groups=None, subnet_id=None, tags=None, __props__=None);func GetNotebookInstance(ctx *Context, name string, id IDInput, state *NotebookInstanceState, opts ...ResourceOption) (*NotebookInstance, error)public static NotebookInstance Get(string name, Input<string> id, NotebookInstanceState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.
- Direct
Internet stringAccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- Instance
Type string The name of ML compute instance type.
- Kms
Key stringId The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- Lifecycle
Config stringName The name of a lifecycle configuration to associate with the notebook instance.
- Name string
The name of the notebook instance (must be unique).
- Role
Arn string The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- Security
Groups List<string> The associated security groups.
- Subnet
Id string The VPC subnet ID.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Arn string
The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.
- Direct
Internet stringAccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- Instance
Type string The name of ML compute instance type.
- Kms
Key stringId The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- Lifecycle
Config stringName The name of a lifecycle configuration to associate with the notebook instance.
- Name string
The name of the notebook instance (must be unique).
- Role
Arn string The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- Security
Groups []string The associated security groups.
- Subnet
Id string The VPC subnet ID.
- map[string]string
A map of tags to assign to the resource.
- arn string
The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.
- direct
Internet stringAccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- instance
Type string The name of ML compute instance type.
- kms
Key stringId The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- lifecycle
Config stringName The name of a lifecycle configuration to associate with the notebook instance.
- name string
The name of the notebook instance (must be unique).
- role
Arn string The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- security
Groups string[] The associated security groups.
- subnet
Id string The VPC subnet ID.
- {[key: string]: string}
A map of tags to assign to the resource.
- arn str
The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.
- direct_
internet_ straccess Set to
Disabledto disable internet access to notebook. Requiressecurity_groupsandsubnet_idto be set. Supported values:Enabled(Default) orDisabled. If set toDisabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.- instance_
type str The name of ML compute instance type.
- kms_
key_ strid The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.
- lifecycle_
config_ strname The name of a lifecycle configuration to associate with the notebook instance.
- name str
The name of the notebook instance (must be unique).
- role_
arn str The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.
- security_
groups List[str] The associated security groups.
- subnet_
id str The VPC subnet ID.
- Dict[str, str]
A map of tags to assign to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.