Class CfnNotebookInstanceMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnNotebookInstanceMixinProps>
- Enclosing interface:
CfnNotebookInstanceMixinProps
CfnNotebookInstanceMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceleratorTypes(List<String> acceleratorTypes) Sets the value ofCfnNotebookInstanceMixinProps.getAcceleratorTypes()additionalCodeRepositories(List<String> additionalCodeRepositories) Sets the value ofCfnNotebookInstanceMixinProps.getAdditionalCodeRepositories()build()Builds the configured instance.defaultCodeRepository(String defaultCodeRepository) Sets the value ofCfnNotebookInstanceMixinProps.getDefaultCodeRepository()directInternetAccess(String directInternetAccess) Sets the value ofCfnNotebookInstanceMixinProps.getDirectInternetAccess()instanceMetadataServiceConfiguration(CfnNotebookInstancePropsMixin.InstanceMetadataServiceConfigurationProperty instanceMetadataServiceConfiguration) Sets the value ofCfnNotebookInstanceMixinProps.getInstanceMetadataServiceConfiguration()instanceMetadataServiceConfiguration(IResolvable instanceMetadataServiceConfiguration) Sets the value ofCfnNotebookInstanceMixinProps.getInstanceMetadataServiceConfiguration()instanceType(String instanceType) Sets the value ofCfnNotebookInstanceMixinProps.getInstanceType()Sets the value ofCfnNotebookInstanceMixinProps.getKmsKeyId()lifecycleConfigName(String lifecycleConfigName) Sets the value ofCfnNotebookInstanceMixinProps.getLifecycleConfigName()notebookInstanceName(String notebookInstanceName) Sets the value ofCfnNotebookInstanceMixinProps.getNotebookInstanceName()platformIdentifier(String platformIdentifier) Sets the value ofCfnNotebookInstanceMixinProps.getPlatformIdentifier()Sets the value ofCfnNotebookInstanceMixinProps.getRoleArn()rootAccess(String rootAccess) Sets the value ofCfnNotebookInstanceMixinProps.getRootAccess()securityGroupIds(List<String> securityGroupIds) Sets the value ofCfnNotebookInstanceMixinProps.getSecurityGroupIds()Sets the value ofCfnNotebookInstanceMixinProps.getSubnetId()Sets the value ofCfnNotebookInstanceMixinProps.getTags()volumeSizeInGb(Number volumeSizeInGb) Sets the value ofCfnNotebookInstanceMixinProps.getVolumeSizeInGb()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
acceleratorTypes
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder acceleratorTypes(List<String> acceleratorTypes) Sets the value ofCfnNotebookInstanceMixinProps.getAcceleratorTypes()- Parameters:
acceleratorTypes- A list of Amazon Elastic Inference (EI) instance types to associate with the notebook instance. Currently, only one instance type can be associated with a notebook instance. For more information, see Using Elastic Inference in Amazon SageMaker .Valid Values:
ml.eia1.medium | ml.eia1.large | ml.eia1.xlarge | ml.eia2.medium | ml.eia2.large | ml.eia2.xlarge.- Returns:
this
-
additionalCodeRepositories
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder additionalCodeRepositories(List<String> additionalCodeRepositories) Sets the value ofCfnNotebookInstanceMixinProps.getAdditionalCodeRepositories()- Parameters:
additionalCodeRepositories- An array of up to three Git repositories associated 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. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances .- Returns:
this
-
defaultCodeRepository
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder defaultCodeRepository(String defaultCodeRepository) Sets the value ofCfnNotebookInstanceMixinProps.getDefaultCodeRepository()- Parameters:
defaultCodeRepository- 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. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances .- Returns:
this
-
directInternetAccess
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder directInternetAccess(String directInternetAccess) Sets the value ofCfnNotebookInstanceMixinProps.getDirectInternetAccess()- Parameters:
directInternetAccess- Sets whether SageMaker AI provides internet access to the notebook instance. If you set this toDisabledthis notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC.For more information, see Notebook Instances Are Internet-Enabled by Default . You can set the value of this parameter to
Disabledonly if you set a value for theSubnetIdparameter.- Returns:
this
-
instanceMetadataServiceConfiguration
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder instanceMetadataServiceConfiguration(IResolvable instanceMetadataServiceConfiguration) Sets the value ofCfnNotebookInstanceMixinProps.getInstanceMetadataServiceConfiguration()- Parameters:
instanceMetadataServiceConfiguration- Information on the IMDS configuration of the notebook instance.- Returns:
this
-
instanceMetadataServiceConfiguration
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder instanceMetadataServiceConfiguration(CfnNotebookInstancePropsMixin.InstanceMetadataServiceConfigurationProperty instanceMetadataServiceConfiguration) Sets the value ofCfnNotebookInstanceMixinProps.getInstanceMetadataServiceConfiguration()- Parameters:
instanceMetadataServiceConfiguration- Information on the IMDS configuration of the notebook instance.- Returns:
this
-
instanceType
Sets the value ofCfnNotebookInstanceMixinProps.getInstanceType()- Parameters:
instanceType- The type of ML compute instance to launch for the notebook instance.Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- Returns:
this
-
kmsKeyId
Sets the value ofCfnNotebookInstanceMixinProps.getKmsKeyId()- Parameters:
kmsKeyId- The Amazon Resource Name (ARN) of a AWS Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys in the AWS Key Management Service Developer Guide .- Returns:
this
-
lifecycleConfigName
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder lifecycleConfigName(String lifecycleConfigName) Sets the value ofCfnNotebookInstanceMixinProps.getLifecycleConfigName()- Parameters:
lifecycleConfigName- The name of a lifecycle configuration to associate with the notebook instance. For information about lifecycle configurations, see Customize a Notebook Instance in the Amazon SageMaker Developer Guide .- Returns:
this
-
notebookInstanceName
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder notebookInstanceName(String notebookInstanceName) Sets the value ofCfnNotebookInstanceMixinProps.getNotebookInstanceName()- Parameters:
notebookInstanceName- The name of the new notebook instance.- Returns:
this
-
platformIdentifier
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder platformIdentifier(String platformIdentifier) Sets the value ofCfnNotebookInstanceMixinProps.getPlatformIdentifier()- Parameters:
platformIdentifier- The platform identifier of the notebook instance runtime environment. The default value isnotebook-al2-v2.- Returns:
this
-
roleArn
Sets the value ofCfnNotebookInstanceMixinProps.getRoleArn()- Parameters:
roleArn- When you send any requests to AWS resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see SageMaker AI Roles .To be able to pass this role to SageMaker AI, the caller of this API must have the
iam:PassRolepermission.- Returns:
this
-
rootAccess
Sets the value ofCfnNotebookInstanceMixinProps.getRootAccess()- Parameters:
rootAccess- Whether root access is enabled or disabled for users of the notebook instance. The default value isEnabled.Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
- Returns:
this
-
securityGroupIds
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder securityGroupIds(List<String> securityGroupIds) Sets the value ofCfnNotebookInstanceMixinProps.getSecurityGroupIds()- Parameters:
securityGroupIds- The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.- Returns:
this
-
subnetId
Sets the value ofCfnNotebookInstanceMixinProps.getSubnetId()- Parameters:
subnetId- The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.- Returns:
this
-
tags
Sets the value ofCfnNotebookInstanceMixinProps.getTags()- Parameters:
tags- A list of key-value pairs to apply to this resource. For more information, see Resource Tag and Using Cost Allocation Tags .You can add tags later by using the
CreateTagsAPI.- Returns:
this
-
volumeSizeInGb
@Stability(Stable) public CfnNotebookInstanceMixinProps.Builder volumeSizeInGb(Number volumeSizeInGb) Sets the value ofCfnNotebookInstanceMixinProps.getVolumeSizeInGb()- Parameters:
volumeSizeInGb- The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB.Expect some interruption of service if this parameter is changed as CloudFormation stops a notebook instance and starts it up again to update it.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnNotebookInstanceMixinProps>- Returns:
- a new instance of
CfnNotebookInstanceMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-