Module clients.login
Functions
login
Initializes AI Engine Manager clients for H2O AI Cloud.
All arguments are optional. Configuration-less login is dependent on having the H2O CLI configured. See: https://docs.h2o.ai/h2o-ai-cloud/developerguide/cli#platform-tokenThe Discovery Service is used to discover the Engine Manager service endpoint. See: https://pypi.org/project/h2o-cloud-discovery/
Args
environment:str, optional- The H2O Cloud environment URL to use (e.g. https://cloud.h2o.ai). If left empty, the environment will be read from the H2O CLI configuration or environmental variables. Then, h2o-cloud-discovery will be used to discover the Engine Manager service endpoint.
- token_provider (TokenProvider, optional) = Token provider. Takes priority over platform_token argument.
platform_token:str, optional- H2O Platform Token. If neither 'token_provider' nor 'platform_token' is provided the platform token will be read from the H2O CLI configuration.
default_workspace_id:str, optional- The default workspace ID which will client use to manipulate with resources. Defaults to
default. config_path- (str, optional): Path to the H2O AI Cloud configuration file. Defaults to '~/.h2oai/h2o-cli-config.toml'.
verify_ssl- Set to False to disable SSL certificate verification.
ssl_ca_cert- Path to a CA cert bundle with certificates of trusted CAs.
Raises
FileNotFoundError- When the H2O CLI configuration file is needed but cannot be found.
TomlDecodeError- When the H2O CLI configuration file is needed but cannot be processed.
LookupError- When the service endpoint cannot be discovered.
ConnectionError- When a communication with server failed.
login_custom
Initializes AI Engine Manager clients.
Args
endpoint:str- The Engine Manager service endpoint URL (e.g. https://enginemanager.cloud.h2o.ai).
refresh_token:str- The OIDC refresh token.
issuer_url:str- The OIDC issuer URL.
client_id:str- The OIDC Client ID that issued the 'refresh_token'.
client_secret:str, optional- Optional OIDC Client Secret that issued the 'refresh_token'. Defaults to None.
default_workspace_id:str, optional- The default workspace ID which will client use to manipulate with resources. Defaults to
default. verify_ssl- Set to False to disable SSL certificate verification.
ssl_ca_cert- Path to a CA cert bundle with certificates of trusted CAs.
Classes
Clients
SandboxClients
SandboxClients(filesystem_client: h2o_engine_manager.clients.sandbox.filesystem.client.FilesystemClient, h2o_drive_client: h2o_engine_manager.clients.sandbox.h2o_drive.client.H2ODriveClient, h2o_secure_store_client: h2o_engine_manager.clients.sandbox.h2o_secure_store.client.H2OSecureStoreClient, metrics_client: h2o_engine_manager.clients.sandbox.metrics.client.MetricsClient, port_client: h2o_engine_manager.clients.sandbox.port.client.PortClient, process_client: h2o_engine_manager.clients.sandbox.process.client.ProcessClient)
Class variables
- Submit and view feedback for this page
- Send feedback about AI Engine Manager to cloud-feedback@h2o.ai