Module clients.sandbox.port.client
Classes
PortClient
class PortClient(connection_config: h2o_engine_manager.clients.connection_config.ConnectionConfig, verify_ssl: bool = True, ssl_ca_cert: Optional[str] = None)
PortClient manages port operations within a SandboxEngine.
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
create_port
def create_port(self, parent: str, port: h2o_engine_manager.clients.sandbox.port.port.Port, port_id: str) ‑> h2o_engine_manager.clients.sandbox.port.port.Port
delete_port
def delete_port(self, name: str) ‑> None
get_port
list_ports
def list_ports(self, parent: str, page_size: int = 0, page_token: str = '') ‑> tuple[typing.List[h2o_engine_manager.clients.sandbox.port.port.Port], str]
List ports in a sandbox engine.
Args
parent:str- The parent SandboxEngine resource name. Format: "workspaces//sandboxEngines/"
page_size:int- Maximum number of ports to return. If unspecified (or set to 0), at most 50 ports will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token:str- Token for pagination. Leave unset to receive the initial page.
Returns
tuple[List[Port], str]- A tuple of (ports, next_page_token).
update_port
def update_port(self, port: h2o_engine_manager.clients.sandbox.port.port.Port, update_mask: List[str]) ‑> h2o_engine_manager.clients.sandbox.port.port.Port
wait
def wait(self, name: str, timeout_seconds: Optional[float] = None) ‑> Optional[h2o_engine_manager.clients.sandbox.port.port.Port]
Blocks execution until the port reaches a stable state or is no longer found.
A port is considered stable when it reaches STATE_READY or STATE_FAILED.
Args
name:str- Port resource name. Format: "workspaces//sandboxEngines//ports/*"
timeout_seconds:float, optional- Time limit in seconds for how long to wait. If not specified, waits indefinitely.
Returns
Port- The port that has reached a stable state, or None if port was deleted.
Raises
TimeoutException- If timeout_seconds is specified and the port doesn't reach a stable state within the timeout.
Feedback
- Submit and view feedback for this page
- Send feedback about AI Engine Manager to cloud-feedback@h2o.ai