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
34368 34369 34370 34371 34372 34373 34374 34375 34376 34377 34378 34379 34380 34381 34382 34383 34384 34385 34386 34387 34388 34389 34390 34391 34392 34393 34394 34395 34396 34397 34398 34399 34400 34401 34402 34403 34404 34405 34406 34407 34408 34409 34410 34411 34412 34413 34414 34415 34416 34417 34418 34419 34420 34421 34422 34423 34424 34425 34426 34427 34428 34429 34430 34431 34432 34433 34434 34435 34436 34437 34438 34439 34440 34441 34442 34443 34444 34445 34446 34447 34448 34449 34450 34451 34452 34453 34454 34455 34456 34457 34458 34459 34460 34461 34462 34463 34464 34465 34466 34467 34468 34469 34470 34471 34472 34473 34474 34475 34476 34477 34478 34479 34480 34481 34482 34483 34484 34485 34486 34487 34488 34489 34490 34491 34492 34493 34494 34495 34496 34497 34498 34499 34500 34501 34502 34503 34504 34505 | |