AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateNotebookInstanceInput

import "github.com/aws/aws-sdk-go/service/sagemaker"

type CreateNotebookInstanceInput struct { AcceleratorTypes []*string `type:"list"` AdditionalCodeRepositories []*string `type:"list"` DefaultCodeRepository *string `min:"1" type:"string"` DirectInternetAccess *string `type:"string" enum:"DirectInternetAccess"` InstanceType *string `type:"string" required:"true" enum:"InstanceType"` KmsKeyId *string `type:"string"` LifecycleConfigName *string `type:"string"` NotebookInstanceName *string `type:"string" required:"true"` RoleArn *string `min:"20" type:"string" required:"true"` SecurityGroupIds []*string `type:"list"` SubnetId *string `type:"string"` Tags []*Tag `type:"list"` VolumeSizeInGB *int64 `min:"5" type:"integer"` }

AcceleratorTypes

Type: []*string

A list of Elastic Inference (EI) instance types to associate with this notebook instance. Currently, only one instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker (https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html).

AdditionalCodeRepositories

Type: []*string

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 (https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with Amazon SageMaker Notebook Instances (https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html).

DefaultCodeRepository

Type: *string

A Git repository to associate 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 (https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with Amazon SageMaker Notebook Instances (https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html).

DirectInternetAccess

Type: *string

Sets whether Amazon SageMaker provides internet access to the notebook instance. If you set this to Disabled this 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.

For more information, see Notebook Instances Are Internet-Enabled by Default (https://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access). You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter.

InstanceType

Type: *string

The type of ML compute instance to launch for the notebook instance.

InstanceType is a required field

KmsKeyId

Type: *string

If you provide a AWS KMS key ID, Amazon SageMaker uses it to encrypt data at rest on the ML storage volume that is attached to your notebook instance. The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys (https://docs.aws.amazon.com/kms/latest/developerguide/enabling-keys.html) in the AWS Key Management Service Developer Guide.

LifecycleConfigName

Type: *string

The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance (https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html).

NotebookInstanceName

Type: *string

The name of the new notebook instance.

NotebookInstanceName is a required field

RoleArn

Type: *string

When you send any requests to AWS resources from the notebook instance, Amazon SageMaker assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so Amazon SageMaker can perform these tasks. The policy must allow the Amazon SageMaker service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see Amazon SageMaker Roles (https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html).

To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

RoleArn is a required field

SecurityGroupIds

Type: []*string

The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.

SubnetId

Type: *string

The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.

Tags

Describes a tag.

VolumeSizeInGB

Type: *int64

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

Method

GoString

func (s CreateNotebookInstanceInput) GoString() string

GoString returns the string representation

SetAcceleratorTypes

func (s *CreateNotebookInstanceInput) SetAcceleratorTypes(v []*string) *CreateNotebookInstanceInput

SetAcceleratorTypes sets the AcceleratorTypes field's value.

SetAdditionalCodeRepositories

func (s *CreateNotebookInstanceInput) SetAdditionalCodeRepositories(v []*string) *CreateNotebookInstanceInput

SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value.

SetDefaultCodeRepository

func (s *CreateNotebookInstanceInput) SetDefaultCodeRepository(v string) *CreateNotebookInstanceInput

SetDefaultCodeRepository sets the DefaultCodeRepository field's value.

SetDirectInternetAccess

func (s *CreateNotebookInstanceInput) SetDirectInternetAccess(v string) *CreateNotebookInstanceInput

SetDirectInternetAccess sets the DirectInternetAccess field's value.

SetInstanceType

func (s *CreateNotebookInstanceInput) SetInstanceType(v string) *CreateNotebookInstanceInput

SetInstanceType sets the InstanceType field's value.

SetKmsKeyId

func (s *CreateNotebookInstanceInput) SetKmsKeyId(v string) *CreateNotebookInstanceInput

SetKmsKeyId sets the KmsKeyId field's value.

SetLifecycleConfigName

func (s *CreateNotebookInstanceInput) SetLifecycleConfigName(v string) *CreateNotebookInstanceInput

SetLifecycleConfigName sets the LifecycleConfigName field's value.

SetNotebookInstanceName

func (s *CreateNotebookInstanceInput) SetNotebookInstanceName(v string) *CreateNotebookInstanceInput

SetNotebookInstanceName sets the NotebookInstanceName field's value.

SetRoleArn

func (s *CreateNotebookInstanceInput) SetRoleArn(v string) *CreateNotebookInstanceInput

SetRoleArn sets the RoleArn field's value.

SetSecurityGroupIds

func (s *CreateNotebookInstanceInput) SetSecurityGroupIds(v []*string) *CreateNotebookInstanceInput

SetSecurityGroupIds sets the SecurityGroupIds field's value.

SetSubnetId

func (s *CreateNotebookInstanceInput) SetSubnetId(v string) *CreateNotebookInstanceInput

SetSubnetId sets the SubnetId field's value.

SetTags

func (s *CreateNotebookInstanceInput) SetTags(v []*Tag) *CreateNotebookInstanceInput

SetTags sets the Tags field's value.

SetVolumeSizeInGB

func (s *CreateNotebookInstanceInput) SetVolumeSizeInGB(v int64) *CreateNotebookInstanceInput

SetVolumeSizeInGB sets the VolumeSizeInGB field's value.

String

func (s CreateNotebookInstanceInput) String() string

String returns the string representation

Validate

func (s *CreateNotebookInstanceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: