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
31481 31482 31483 31484 31485 31486 31487 31488 31489 31490 31491 31492 31493 31494 31495 31496 31497 31498 31499 31500 31501 31502 31503 31504 31505 31506 31507 31508 31509 31510 31511 31512 31513 31514 31515 31516 31517 31518 31519 31520 31521 31522 31523 31524 31525 31526 31527 31528 31529 31530 31531 31532 31533 31534 31535 31536 31537 31538 31539 31540 31541 31542 31543 31544 31545 31546 31547 31548 31549 31550 31551 31552 31553 31554 31555 31556 31557 31558 31559 31560 31561 31562 31563 31564 31565 31566 31567 31568 31569 31570 31571 31572 31573 31574 31575 31576 31577 31578 31579 31580 31581 31582 31583 31584 31585 31586 31587 31588 31589 31590 31591 31592 31593 31594 31595 31596 31597 31598 31599 31600 31601 31602 31603 31604 31605 31606 31607 31608 31609 31610 31611 31612 31613 31614 31615 31616 31617 31618 31619 | |