Skip to main content

Module clients.notebook_engine_profile.client

Classes

NotebookEngineProfileClient

class NotebookEngineProfileClient(connection_config: h2o_engine_manager.clients.connection_config.ConnectionConfig, verify_ssl: bool = True, ssl_ca_cert: Optional[str] = None)

NotebookEngineProfileClient manages NotebookEngineProfiles.

Initializes NotebookEngineProfileClient.

Args
connection_config : ConnectionConfig
AIEM connection configuration object.
verify_ssl
Set to False to disable SSL certificate verification.
ssl_ca_cert
Path to a CA cert bundle with certificates of trusted CAs.

Methods

apply_notebook_engine_profile_configs

def apply_notebook_engine_profile_configs(self, configs: List[h2o_engine_manager.clients.notebook_engine_profile.config.NotebookEngineProfileConfig], parent: str = 'workspaces/global') ‑> List[h2o_engine_manager.clients.notebook_engine_profile.profile.NotebookEngineProfile]

Set all NotebookEngineProfiles to a state defined in the configs in the specified parent workspace. NotebookEngineProfiles that are not specified in the configs will be deleted in the specified parent workspace. NotebookEngineProfiles that are specified in the configs will be recreated with the new values in the specified parent workspace.

Args
configs
NotebookEngineProfile configurations that should be applied.
parent
Workspace name in which to apply configs. Format is workspaces/*.

Returns: applied NotebookEngineProfiles

create_notebook_engine_profile

def create_notebook_engine_profile(self, parent: str, notebook_engine_profile: h2o_engine_manager.clients.notebook_engine_profile.profile.NotebookEngineProfile, notebook_engine_profile_id: str) ‑> h2o_engine_manager.clients.notebook_engine_profile.profile.NotebookEngineProfile

Standard Create method.

Args
parent : str
Name of the profile's parent workspace. Format: workspaces/*.
notebook_engine_profile : NotebookEngineProfile
NotebookEngineProfile to create.
notebook_engine_profile_id : str
The ID to use for the NotebookEngineProfile, which will form the profile's resource name. This value must: - contain 1-63 characters - contain only lowercase alphanumeric characters or hyphen ('-') - start with an alphabetic character - end with an alphanumeric character
Returns
NotebookEngineProfile
created NotebookEngineProfile.

delete_all_notebook_engine_profiles

def delete_all_notebook_engine_profiles(self, parent: str) ‑> None

Help method for deleting all NotebookEngineProfiles in a specified parent workspace.

Args
parent : str
Parent workspace name. Format is workspaces/*.

delete_notebook_engine_profile

def delete_notebook_engine_profile(self, name: str) ‑> None

Standard Delete method.

Args
name : str
Name of the NotebookEngineProfile to delete. Format is workspaces/*/notebookEngineProfiles/*

get_notebook_engine_profile

def get_notebook_engine_profile(self, name: str) ‑> h2o_engine_manager.clients.notebook_engine_profile.profile.NotebookEngineProfile

Standard Get method.

Args
name
Name of the NotebookEngineProfile to retrieve. Format: workspaces/*/notebookEngineProfiles/*

list_all_notebook_engine_profiles

def list_all_notebook_engine_profiles(self, parent: str) ‑> List[h2o_engine_manager.clients.notebook_engine_profile.profile.NotebookEngineProfile]

Help method for listing all NotebookEngineProfiles.

Args
parent : str
Name of the workspace from which to list profiles. Format: workspaces/*.

list_notebook_engine_profiles

def list_notebook_engine_profiles(self, parent: str, page_size: int = 0, page_token: str = '') ‑> h2o_engine_manager.clients.notebook_engine_profile.page.NotebookEngineProfilesPage

Standard list method.

Args
parent : str
Name of the workspace from which to list profiles. Format: workspaces/*.
page_size : int
Maximum number of NotebookEngineProfiles to return in a response. If unspecified (or set to 0), at most 50 NotebookEngineProfiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token : str
Page token. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the NotebookEngineProfilesPage.
Returns
NotebookEngineProfilesPage
NotebookEngineProfilesPage object.

update_notebook_engine_profile

def update_notebook_engine_profile(self, notebook_engine_profile: h2o_engine_manager.clients.notebook_engine_profile.profile.NotebookEngineProfile, update_mask: str = '*') ‑> h2o_engine_manager.clients.notebook_engine_profile.profile.NotebookEngineProfile

Standard Update method.

Args
notebook_engine_profile : NotebookEngineProfile
profile to update.
update_mask : str

The field mask to use for the update. Allowed field paths are: - display_name - priority - enabled - assigned_oidc_roles_enabled - assigned_oidc_roles - max_running_engines - cpu_constraint - gpu_constraint - memory_bytes_constraint - storage_bytes_constraint - max_idle_duration_constraint - max_running_duration_constraint - max_non_interaction_duration - max_unused_duration - configuration_override - base_configuration - config_editability - yaml_pod_template_spec - yaml_gpu_tolerations - triton_enabled

Default value "*" will update all updatable fields.

Returns
NotebookEngineProfile
Updated NotebookEngineProfile.

Feedback