Skip to main content

Module clients.notebook_engine.client

Classes​

NotebookEngineClient​

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

NotebookEngineClient manages NotebookEngines.

Args​
connection_config
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​

access_notebook_engine ​

def access_notebook_engine(self, name: str) ‑> str

Returns the notebook engine access URI.

Args​
name
NotebookEngine resource name. Format: "workspaces//notebookEngines/"

Returns: The notebook engine access URI

create_notebook_engine ​

def create_notebook_engine(self, parent: str, notebook_engine: h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine, notebook_engine_id: str) ‑> h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine

Create notebook engine.

Args​
parent : str
Name of the engine's parent workspace. Format: "workspaces/*".
notebook_engine : NotebookEngine
NotebookEngine to create.
notebook_engine_id : str
The ID to use for the NotebookEngine, which will form the engine'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​
NotebookEngine
created NotebookEngine.

delete_notebook_engine ​

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

Start notebook engine deletion. Method returns instantly, but it may take some time until the engine is deleted.

Args​
name
NotebookEngine resource name. Format: "workspaces//notebookEngines/"

get_notebook_engine ​

def get_notebook_engine(self, name: str) ‑> h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine

Get notebook engine.

Args​
name
NotebookEngine resource name. Format: "workspaces//notebookEngines/"
Returns​
NotebookEngine
notebook engine

list_all_notebook_engines ​

def list_all_notebook_engines(self, parent: str) ‑> List[h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine]

Help method for listing all NotebookEngines.

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

list_notebook_engines ​

def list_notebook_engines(self, parent: str, page_size: int = 0, page_token: str = '') ‑> h2o_engine_manager.clients.notebook_engine.page.NotebookEnginesPage

Standard list method.

Args​
parent : str
Name of the workspace from which to list notebookEngines. Format: workspaces/*.
page_size : int
Maximum number of NotebookEngines to return in a response. If unspecified (or set to 0), at most 50 NotebookEngines 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 NotebookEnginesPage.
Returns​
NotebookEnginesPage
NotebookEnginesPage object.

pause_notebook_engine ​

def pause_notebook_engine(self, name: str) ‑> h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine

Pause notebook engine. Method returns instantly, but it may take some time until the engine is paused.

Args​
name
NotebookEngine resource name. Format: "workspaces//notebookEngines/"

Returns: paused notebookEngine

resize_notebook_engine_storage ​

def resize_notebook_engine_storage(self, name: str, new_storage: str) ‑> h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine

Resize the storage of the DAIEngine.

Args​
name : str
NotebookEngine resource name. Format: "workspaces//notebookEngines/"
new_storage : str
new storage size in bytes.

Returns: The resized engine.

resume_notebook_engine ​

def resume_notebook_engine(self, name: str) ‑> h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine

Resume notebook engine. Method returns instantly, but it may take some time until the engine is running.

Args​
name
NotebookEngine resource name. Format: "workspaces//notebookEngines/"

Returns: resumed notebookEngine

update_notebook_engine ​

def update_notebook_engine(self, notebook_engine: h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine, update_mask: str = '*') ‑> h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine

Standard Update method.

Args​
notebook_engine : NotebookEngine
notebookEngine to update.
update_mask : str
The field mask to use for the update. Allowed field paths are: • profile • notebook_image • cpu • gpu • memory_bytes • display_name • max_idle_duration • max_running_duration Default value "*" will update all updatable fields.
Returns​
NotebookEngine
Updated NotebookEngine.

wait ​

def wait(self, name: str, timeout_seconds: Optional[float] = None) ‑> Optional[h2o_engine_manager.clients.notebook_engine.engine.NotebookEngine]

Blocks execution until the notebookEngine with the given name is in the process of reconciling or until it is no longer found.

Args​
name
NotebookEngine resource name for which to wait. Format: "workspaces//notebookEngines/"
timeout_seconds
Time limit in seconds for how long to wait.

Returns: engine that has finished waiting or nothing, if engine is no longer found.


Feedback