update_notebook_instance
async
¶
update_notebook_instance(
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = 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/async_sage_maker.py
34815 34816 34817 34818 34819 34820 34821 34822 34823 34824 34825 34826 34827 34828 34829 34830 34831 34832 34833 34834 34835 34836 34837 34838 34839 34840 34841 34842 34843 34844 34845 34846 34847 34848 34849 34850 34851 34852 34853 34854 34855 34856 34857 34858 34859 34860 34861 34862 34863 34864 34865 34866 34867 34868 34869 34870 34871 34872 34873 34874 34875 34876 34877 34878 34879 34880 34881 34882 34883 34884 34885 34886 34887 34888 34889 34890 34891 34892 34893 34894 34895 34896 34897 34898 34899 34900 34901 34902 34903 34904 34905 34906 34907 34908 34909 34910 34911 34912 34913 34914 34915 34916 34917 34918 34919 34920 34921 34922 34923 34924 34925 34926 34927 34928 34929 34930 34931 34932 34933 34934 34935 34936 34937 34938 34939 34940 34941 34942 34943 34944 34945 34946 34947 34948 34949 34950 34951 34952 34953 | |