Skip to main content

Module clients.ide_engine.client

Classes​

IDEEngineClient​

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

IDEEngineClient manages IDEEngines.

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_ide_engine ​

def access_ide_engine(self, name: str) ‑> h2o_engine_manager.clients.ide_engine.access.IDEEngineAccess

Returns the IDE engine URI and the password for its login form. Only the engine's creator may access it.

Args​
name
IDEEngine resource name. Format: "workspaces//ideEngines/"

Returns: The IDE engine URI and the password for its login form.

create_ide_engine ​

def create_ide_engine(self, parent: str, ide_engine: h2o_engine_manager.clients.ide_engine.engine.IDEEngine, ide_engine_id: str) ‑> h2o_engine_manager.clients.ide_engine.engine.IDEEngine

Create IDE engine.

Args​
parent : str
Name of the engine's parent workspace. Format: "workspaces/*".
ide_engine : IDEEngine
IDEEngine to create.
ide_engine_id : str
The ID to use for the IDEEngine, 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​
IDEEngine
created IDEEngine.

delete_ide_engine ​

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

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

Args​
name
IDEEngine resource name. Format: "workspaces//ideEngines/"

get_ide_engine ​

def get_ide_engine(self, name: str) ‑> h2o_engine_manager.clients.ide_engine.engine.IDEEngine

Get IDE engine.

Args​
name
IDEEngine resource name. Format: "workspaces//ideEngines/"
Returns​
IDEEngine
IDE engine

list_all_ide_engines ​

def list_all_ide_engines(self, parent: str) ‑> List[h2o_engine_manager.clients.ide_engine.engine.IDEEngine]

Help method for listing all IDEEngines.

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

list_ide_engines ​

def list_ide_engines(self, parent: str, page_size: int = 0, page_token: str = '') ‑> h2o_engine_manager.clients.ide_engine.page.IDEEnginesPage

Standard list method.

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

pause_ide_engine ​

def pause_ide_engine(self, name: str) ‑> h2o_engine_manager.clients.ide_engine.engine.IDEEngine

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

Args​
name
IDEEngine resource name. Format: "workspaces//ideEngines/"

Returns: paused ideEngine

resize_ide_engine_storage ​

def resize_ide_engine_storage(self, name: str, new_storage: str) ‑> h2o_engine_manager.clients.ide_engine.engine.IDEEngine

Resize the storage of the IDEEngine. The engine must be paused or running, and the new size must be greater than the current one.

Args​
name : str
IDEEngine resource name. Format: "workspaces//ideEngines/"
new_storage : str
New storage size. For example "1024", "8G", "16Gi".

Returns: The resized engine.

resume_ide_engine ​

def resume_ide_engine(self, name: str) ‑> h2o_engine_manager.clients.ide_engine.engine.IDEEngine

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

Args​
name
IDEEngine resource name. Format: "workspaces//ideEngines/"

Returns: resumed ideEngine

update_ide_engine ​

def update_ide_engine(self, ide_engine: h2o_engine_manager.clients.ide_engine.engine.IDEEngine, update_mask: str = '*') ‑> h2o_engine_manager.clients.ide_engine.engine.IDEEngine

Standard Update method.

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

wait ​

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

Blocks execution until the ideEngine with the given name is no longer reconciling or until it is no longer found.

Args​
name
IDEEngine resource name for which to wait. Format: "workspaces//ideEngines/"
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