Module clients.notebook_kernel_spec.client
Classes
NotebookKernelSpecClient
class NotebookKernelSpecClient(connection_config: h2o_notebook.clients.connection_config.ConnectionConfig, verify_ssl: bool = True, ssl_ca_cert: Optional[str] = None, kernel_image_client: h2o_notebook.clients.kernel_image.client.KernelImageClient = None, kernel_template_client: h2o_notebook.clients.kernel_template.client.KernelTemplateClient = None)
NotebookKernelSpecClient manages notebook kernel specs.
Methods
apply_kernel_images_templates_notebook_specs
def apply_kernel_images_templates_notebook_specs(self, kernel_image_configs: List[h2o_notebook.clients.kernel_image.kernel_image_config.KernelImageConfig], kernel_template_configs: List[h2o_notebook.clients.kernel_template.kernel_template_config.KernelTemplateConfig], notebook_kernel_spec_configs: List[h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec_config.NotebookKernelSpecConfig]) ‑> List[h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec]
Set all KernelImages, KernelTemplates and NotebookKernelSpecs to a state defined in the arguments. Objects not specified in the arguments will be deleted. Objects specified in the arguments will be recreated with the new values.
Args
kernel_image_configs
- configuration of KernelImages that should be applied.
kernel_template_configs
- configuration of KernelTemplates that should be applied.
notebook_kernel_spec_configs
- configuration of NotebookKernelSpecs that should be applied.
Returns: applied NotebookKernelSpecs
apply_notebook_kernel_specs
def apply_notebook_kernel_specs(self, notebook_kernel_spec_configs: List[h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec_config.NotebookKernelSpecConfig]) ‑> List[h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec]
create_notebook_kernel_spec
def create_notebook_kernel_spec(self, parent: str, notebook_kernel_spec: h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec, notebook_kernel_spec_id: str) ‑> h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec
Creates a NotebookKernelSpec.
Args
parent
:str
- The resource name of the workspace to associate with the NotebookKernelSpec. Format is
workspaces/*
. notebook_kernel_spec
:NotebookKernelSpec
- NotebookKernelSpec to create.
notebook_kernel_spec_id
:str
- The ID to use for the NotebookKernelSpec, which will become the final component of the spec'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
NotebookKernelSpec
- NotebookKernelSpec object.
delete_all_notebook_kernel_specs
def delete_all_notebook_kernel_specs(self, parent: str) ‑> None
Helper function for deleting all NotebookKernelSpecs.
Args
parent
:str
- The resource name of the workspace from which to list NotebookKernelSpec. Format is
workspaces/*
.
delete_notebook_kernel_spec
def delete_notebook_kernel_spec(self, name: str) ‑> None
Deletes a NotebookKernelSpec.
Args
name
:str
- Resource name of NotebookKernelSpec. Format is
workspaces/*/notebookKernelSpecs/*
.
get_notebook_kernel_spec
def get_notebook_kernel_spec(self, name: str) ‑> h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec
list_all_notebook_kernel_specs
def list_all_notebook_kernel_specs(self, parent: str) ‑> List[h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec]
list_notebook_kernel_specs
def list_notebook_kernel_specs(self, parent: str, page_size: int = 0, page_token: str = '') ‑> h2o_notebook.clients.notebook_kernel_spec.page.NotebookKernelSpecsPage
Lists NotebookKernelSpecs.
Args
parent
:str
- The resource name of the workspace from which to list NotebookKernelSpec. Format is
workspaces/*
. page_size
:int
- Maximum number of NotebookKernelSpecs to return in a response. If unspecified (or set to 0), at most 50 NotebookKernelSpecs 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 NotebookKernelSpecsPage.
Returns
NotebookKernelSpecsPage
- NotebookKernelSpecsPage object.
update_notebook_kernel_spec
def update_notebook_kernel_spec(self, notebook_kernel_spec: h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec, update_mask: str = '*') ‑> h2o_notebook.clients.notebook_kernel_spec.notebook_kernel_spec.NotebookKernelSpec
Updates a NotebookKernelSpec.
Args
notebook_kernel_spec
:NotebookKernelSpec
- NotebookKernelSpec object.
update_mask
:str
The field mask to use for the update. Allowed field paths are: disabled.
If not set, all fields will be updated. Defaults to "*".
Returns
NotebookKernelSpec
- Updated NotebookKernelSpec object.
Feedback
- Submit and view feedback for this page
- Send feedback about H2O Notebook Labs to cloud-feedback@h2o.ai