update_notebook_instance
¶
update_notebook_instance(
*,
config_overrides: Optional[SageMakerClientConfig] = None,
notebook_instance_name: Optional[NotebookInstanceName] = None,
instance_type: Optional[InstanceType] = None,
ip_address_type: Optional[IPAddressType] = None,
platform_identifier: Optional[PlatformIdentifier] = None,
role_arn: Optional[RoleArn] = None,
lifecycle_config_name: Optional[NotebookInstanceLifecycleConfigName] = None,
disassociate_lifecycle_config: Optional[
DisassociateNotebookInstanceLifecycleConfig
] = None,
volume_size_in_gb: Optional[NotebookInstanceVolumeSizeInGB] = None,
default_code_repository: Optional[CodeRepositoryNameOrUrl] = None,
additional_code_repositories: Optional[AdditionalCodeRepositoryNamesOrUrls] = None,
accelerator_types: Optional[NotebookInstanceAcceleratorTypes] = None,
disassociate_accelerator_types: Optional[
DisassociateNotebookInstanceAcceleratorTypes
] = None,
disassociate_default_code_repository: Optional[
DisassociateDefaultCodeRepository
] = None,
disassociate_additional_code_repositories: Optional[
DisassociateAdditionalCodeRepositories
] = None,
root_access: Optional[RootAccess] = None,
instance_metadata_service_configuration: Optional[
InstanceMetadataServiceConfiguration
] = None,
) -> UpdateNotebookInstanceOutput
Updates a notebook instance. NotebookInstance updates include upgrading or downgrading the ML compute instance used for your notebook instance to accommodate changes in your workload requirements.
This API can attach lifecycle configurations to notebook instances. Lifecycle configuration scripts execute with root access and the notebook instance's IAM execution role privileges. Principals with this permission and access to lifecycle configurations can execute code with the execution role's credentials. See Customize a Notebook Instance Using a Lifecycle Configuration Script for security best practices.
Parameters:
-
notebook_instance_name(Optional[NotebookInstanceName], default:None) –The name of the notebook instance to update.
-
instance_type(Optional[InstanceType], default:None) –The Amazon ML compute instance type.
-
ip_address_type(Optional[IPAddressType], default:None) –The IP address type for the notebook instance. Specify
ipv4for IPv4-only connectivity ordualstackfor both IPv4 and IPv6 connectivity. The notebook instance must be stopped before updating this setting. When you specifydualstack, the subnet must support IPv6 addressing. -
platform_identifier(Optional[PlatformIdentifier], default:None) –The platform identifier of the notebook instance runtime environment.
-
role_arn(Optional[RoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM role that SageMaker AI can assume to access the notebook instance. 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. -
lifecycle_config_name(Optional[NotebookInstanceLifecycleConfigName], default:None) –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.
-
disassociate_lifecycle_config(Optional[DisassociateNotebookInstanceLifecycleConfig], default:None) –Set to
trueto remove the notebook instance lifecycle configuration currently associated with the notebook instance. This operation is idempotent. If you specify a lifecycle configuration that is not associated with the notebook instance when you call this method, it does not throw an error. -
volume_size_in_gb(Optional[NotebookInstanceVolumeSizeInGB], default:None) –The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. ML storage volumes are encrypted, so SageMaker AI can't determine the amount of available free space on the volume. Because of this, you can increase the volume size when you update a notebook instance, but you can't decrease the volume size. If you want to decrease the size of the ML storage volume in use, create a new notebook instance with the desired size.
-
default_code_repository(Optional[CodeRepositoryNameOrUrl], default:None) –The 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 Amazon Web Services 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.
-
additional_code_repositories(Optional[AdditionalCodeRepositoryNamesOrUrls], default:None) –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 Amazon Web Services 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.
-
accelerator_types(Optional[NotebookInstanceAcceleratorTypes], default:None) –This parameter is no longer supported. Elastic Inference (EI) is no longer available.
This parameter was used to specify a list of the EI instance types to associate with this notebook instance.
-
disassociate_accelerator_types(Optional[DisassociateNotebookInstanceAcceleratorTypes], default:None) –This parameter is no longer supported. Elastic Inference (EI) is no longer available.
This parameter was used to specify a list of the EI instance types to remove from this notebook instance.
-
disassociate_default_code_repository(Optional[DisassociateDefaultCodeRepository], default:None) –The name or URL of the default Git repository to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
-
disassociate_additional_code_repositories(Optional[DisassociateAdditionalCodeRepositories], default:None) –A list of names or URLs of the default Git repositories to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
-
root_access(Optional[RootAccess], default:None) –Whether root access is enabled or disabled for users of the notebook instance. The default value is
Enabled.If you set this to
Disabled, users don't have root access on the notebook instance, but lifecycle configuration scripts still run with root permissions. -
instance_metadata_service_configuration(Optional[InstanceMetadataServiceConfiguration], default:None) –Information on the IMDS configuration of the notebook instance
Raises:
-
ResourceLimitExceeded–You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
31076 31077 31078 31079 31080 31081 31082 31083 31084 31085 31086 31087 31088 31089 31090 31091 31092 31093 31094 31095 31096 31097 31098 31099 31100 31101 31102 31103 31104 31105 31106 31107 31108 31109 31110 31111 31112 31113 31114 31115 31116 31117 31118 31119 31120 31121 31122 31123 31124 31125 31126 31127 31128 31129 31130 31131 31132 31133 31134 31135 31136 31137 31138 31139 31140 31141 31142 31143 31144 31145 31146 31147 31148 31149 31150 31151 31152 31153 31154 31155 31156 31157 31158 31159 31160 31161 31162 31163 31164 31165 31166 31167 31168 31169 31170 31171 31172 31173 31174 31175 31176 31177 31178 31179 31180 31181 31182 31183 31184 31185 31186 31187 31188 31189 31190 31191 31192 31193 31194 31195 31196 31197 31198 31199 31200 31201 31202 31203 31204 31205 31206 31207 31208 31209 31210 31211 31212 31213 | |