Skip to main content

ai/h2o/notebook/v1/kernel.proto (version not set)

Download OpenAPI specification:Download

KernelImageService

Returns a collection of KernelImages.

query Parameters
pageSize
integer <int32>

Optional. Maximum number of KernelImages to return in a response. If unspecified (or set to 0), at most 50 KernelImages will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken
string

Optional. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the ListKernelImagesResponse.

Responses

Response samples

Content type
application/json
{
  • "kernelImages": [
    ],
  • "nextPageToken": "string"
}

Creates a new KernelImage.

query Parameters
kernelImageId
string

Optional. Specify the KernelImage ID, which will become a part of the KernelImage resource name. If not specified, the server will generate one.

It must:

  • contain 1-63 characters
  • contain only lowercase alphanumeric characters or hyphen ('-')
  • start with an alphabetic character
  • end with an alphanumeric character

This matches a regular expression: ^a-z?$

Request Body schema: application/json

Required. The KernelImage resource to create.

displayName
string

Optional. Human-readable name.

type
string (v1KernelImageType)
Default: "TYPE_UNSPECIFIED"
Enum: "TYPE_UNSPECIFIED" "TYPE_PYTHON" "TYPE_R" "TYPE_SPARK_PYTHON" "TYPE_SPARK_R"

KernelImage type.

  • TYPE_UNSPECIFIED: KernelImage type is unspecified or unknown.
  • TYPE_PYTHON: Python KernelImage.
  • TYPE_R: R KernelImage.
  • TYPE_SPARK_PYTHON: Python with Spark KernelImage.
  • TYPE_SPARK_R: R with Spark KernelImage.
image
required
string (Required. Docker image name. For example: "gcr.io/vorvan/h2oai/h2o-kernel-py:0.3.2")
disabled
boolean

Optional. Whether the KernelImage is disabled. Disabled KernelImage cannot be used for creating new Kernel.

Responses

Request samples

Content type
application/json
{
  • "displayName": "string",
  • "type": "TYPE_UNSPECIFIED",
  • "image": "string",
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "kernelImage": {
    }
}

Updates a KernelImage.

path Parameters
kernelImage.name
required
stringkernelImages/[^/]+

Output only. Resource name.

query Parameters
updateMask
required
string

Required. The list of paths referencing which fields to update. Update mask must be non-empty.

Allowed field paths are: {"display_name", "type", "image", "disabled"}. Paths are case sensitive (must match exactly).

To update all allowed fields, specify exactly one path with value "*".

Request Body schema: application/json

Required. KernelImage resource.

displayName
string

Optional. Human-readable name.

type
string (v1KernelImageType)
Default: "TYPE_UNSPECIFIED"
Enum: "TYPE_UNSPECIFIED" "TYPE_PYTHON" "TYPE_R" "TYPE_SPARK_PYTHON" "TYPE_SPARK_R"

KernelImage type.

  • TYPE_UNSPECIFIED: KernelImage type is unspecified or unknown.
  • TYPE_PYTHON: Python KernelImage.
  • TYPE_R: R KernelImage.
  • TYPE_SPARK_PYTHON: Python with Spark KernelImage.
  • TYPE_SPARK_R: R with Spark KernelImage.
image
required
string (Required. Docker image name. For example: "gcr.io/vorvan/h2oai/h2o-kernel-py:0.3.2")
disabled
boolean

Optional. Whether the KernelImage is disabled. Disabled KernelImage cannot be used for creating new Kernel.

Responses

Request samples

Content type
application/json
{
  • "displayName": "string",
  • "type": "TYPE_UNSPECIFIED",
  • "image": "string",
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "kernelImage": {
    }
}

Returns a specific KernelImage.

path Parameters
name
required
stringkernelImages/[^/]+

Required. The name of the KernelImage to retrieve. Format: kernelImages/{kernel_image}

Responses

Response samples

Content type
application/json
{
  • "kernelImage": {
    }
}

Deletes a KernelImage.

path Parameters
name
required
stringkernelImages/[^/]+

Required. KernelImage resource name. Format: kernelImages/{kernel_image}

Responses

Response samples

Content type
application/json
{ }

KernelService

Returns a collection of Kernels.

query Parameters
pageSize
integer <int32>

Optional. Maximum number of Kernels to return in a response. If unspecified (or set to 0), at most 50 Kernels will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken
string

Optional. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the ListKernelsResponse.

Responses

Response samples

Content type
application/json
{
  • "kernels": [
    ],
  • "nextPageToken": "string"
}

Creates a new Kernel.

query Parameters
kernelId
string

Optional. Specify the Kernel ID, which will become a part of the Kernel resource name. If not specified, the server will generate one.

It must:

  • contain 1-63 characters
  • contain only lowercase alphanumeric characters or hyphen ('-')
  • start with an alphabetic character
  • end with an alphanumeric character

This matches a regular expression: ^a-z?$

Request Body schema: application/json

Required. The Kernel resource to create.

displayName
string

Optional. Human-readable name.

kernelImage
required
string

Required. Immutable. The resource name of the KernelImage that is used to create the Kernel. Format is kernelImages/{kernel_image}.

kernelTemplate
required
string

Required. Immutable. The resource name of the KernelTemplate that is used to create the Kernel. Format is kernelTemplates/{kernel_template}.

object

Optional. Immutable. Map of additional environmental variables that will be set in the Kernel. This set of environmental variables take precedence over the ones defined in the KernelTemplate.

state
string (v1KernelState)
Default: "STATE_UNSPECIFIED"
Enum: "STATE_UNSPECIFIED" "STATE_STARTING" "STATE_RUNNING_IDLE" "STATE_RUNNING_BUSY" "STATE_FAILED" "STATE_TERMINATED" "STATE_DELETING"

Kernel states.

  • STATE_UNSPECIFIED: Kernel state is unspecified or unknown.
  • STATE_STARTING: Kernel is starting.
  • STATE_RUNNING_IDLE: Kernel is running and is not executing any KernelTask.
  • STATE_RUNNING_BUSY: Kernel is running and is busy executing a KernelTask.
  • STATE_FAILED: Kernel has failed.
  • STATE_TERMINATED: Kernel is terminated.
  • STATE_DELETING: Kernel is being deleted.
type
string (v1KernelType)
Default: "TYPE_UNSPECIFIED"
Enum: "TYPE_UNSPECIFIED" "TYPE_NOTEBOOK" "TYPE_ON_DEMAND"

Kernel types.

  • TYPE_UNSPECIFIED: Kernel type is unspecified or unknown.
  • TYPE_NOTEBOOK: Kernel was created by H2O Notebook Lab. No methods are allowed on this type of Kernel.
  • TYPE_ON_DEMAND: Kernel was created using this API.

Responses

Request samples

Content type
application/json
{
  • "displayName": "string",
  • "kernelImage": "string",
  • "kernelTemplate": "string",
  • "environmentalVariables": {
    },
  • "state": "STATE_UNSPECIFIED",
  • "type": "TYPE_UNSPECIFIED"
}

Response samples

Content type
application/json
{
  • "kernel": {
    }
}

Returns a specific Kernel.

path Parameters
name_1
required
stringkernels/[^/]+

Required. The name of the Kernel to retrieve. Format: kernels/{kernel}

Responses

Response samples

Content type
application/json
{
  • "kernel": {
    }
}

Deletes a Kernel.

path Parameters
name_1
required
stringkernels/[^/]+

Required. Kernel resource name. Format: kernels/{kernel}

Responses

Response samples

Content type
application/json
{
  • "kernel": {
    }
}

Terminates a Kernel.

path Parameters
name
required
stringkernels/[^/]+

Required. Kernel resource name. Format: kernels/{kernel}

Request Body schema: application/json
object

Request message for terminating an existing Kernel.

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "kernel": {
    }
}

KernelTaskMessageService

Returns a collection of KernelTaskMessages produced by a KernelTask.

path Parameters
parent
required
stringkernels/[^/]+/tasks/[^/]+

Required. The resource name of the KernelTask to list KernelTaskMessages from. Format: kernels/{kernel}/tasks/{task}

query Parameters
pageSize
integer <int32>

Optional. Maximum number of KernelTaskMessages to return in a response. If unspecified (or set to 0), at most 50 KernelTaskMessages will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken
string

Optional. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the ListKernelTaskMessagesResponse.

Responses

Response samples

Content type
application/json
{
  • "kernelTaskMessages": [
    ],
  • "nextPageToken": "string"
}

KernelTaskOutputService

Returns a KernelTaskOutput produced by a KernelTask.

path Parameters
name_2
required
stringkernels/[^/]+/tasks/[^/]+/output

KernelTaskOutput resource name. Format: kernels/{kernel}/tasks/{task}/output

Responses

Response samples

Content type
application/json
{
  • "kernelTaskOutput": {
    }
}

KernelTaskService

Returns a specific KernelTask.

path Parameters
name_3
required
stringkernels/[^/]+/tasks/[^/]+

Required. The name of the KernelTask to retrieve. Format: kernels/{kernel}/tasks/{kernel_task}

Responses

Response samples

Content type
application/json
{
  • "kernelTask": {
    }
}

Cancels a KernelTask. Enqueued task will be skipped. Running task will be cancelled.

path Parameters
name
required
stringkernels/[^/]+/tasks/[^/]+

Required. The name of the KernelTask to cancel. Format: kernels/{kernel}/tasks/{kernel_task}

Request Body schema: application/json
object

Request message for CancelKernelTask.

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Returns a collection of KernelTasks assigned to a Kernel.

path Parameters
parent
required
stringkernels/[^/]+

Required. The resource name of the Kernel to list KernelTasks from. Format: kernels/{kernel}

query Parameters
pageSize
integer <int32>

Optional. Maximum number of KernelTasks to return in a response. If unspecified (or set to 0), at most 50 KernelTasks will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken
string

Optional. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the ListKernelTasksResponse.

Responses

Response samples

Content type
application/json
{
  • "kernelTasks": [
    ],
  • "nextPageToken": "string"
}

Creates a new KernelTask and assign it to a Kernel.

path Parameters
parent
required
stringkernels/[^/]+

Required. The resource name of the Kernel to create the KernelTask in. Format: `kernels/{kernel}.

query Parameters
kernelTaskId
string

Optional. Specify the KernelTask ID, which will become a part of the KernelTask resource name. If not specified, the server will generate one.

It must:

  • contain 1-63 characters
  • contain only lowercase alphanumeric characters or hyphen ('-')
  • start with an alphabetic character
  • end with an alphanumeric character

This matches a regular expression: ^a-z?$

Request Body schema: application/json

Required. The KernelTask resource to create.

code
required
string

Required. Immutable. The code to be executed by the Kernel.

state
string (v1KernelTaskState)
Default: "STATE_UNSPECIFIED"
Enum: "STATE_UNSPECIFIED" "STATE_QUEUED" "STATE_EXECUTING" "STATE_COMPLETE_ERROR" "STATE_COMPLETE_SUCCESS" "STATE_CANCELLED"

KernelTask states.

  • STATE_UNSPECIFIED: KernelTask state is unspecified or unknown.
  • STATE_QUEUED: KernelTask is waiting on execution.
  • STATE_EXECUTING: KernelTask is being executed by the Kernel.
  • STATE_COMPLETE_ERROR: KernelTask has completed with an error.
  • STATE_COMPLETE_SUCCESS: KernelTask has completed successfully.
  • STATE_CANCELLED: KernelTask has been cancelled.

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "state": "STATE_UNSPECIFIED"
}

Response samples

Content type
application/json
{
  • "kernelTask": {
    }
}

KernelTemplateService

Returns a collection of KernelTemplates.

query Parameters
pageSize
integer <int32>

Optional. Maximum number of KernelTemplates to return in a response. If unspecified (or set to 0), at most 50 KernelTemplates will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken
string

Optional. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the ListKernelTemplatesResponse.

Responses

Response samples

Content type
application/json
{
  • "kernelTemplates": [
    ],
  • "nextPageToken": "string"
}

Creates a new KernelTemplate.

query Parameters
kernelTemplateId
string

Optional. Specify the KernelTemplate ID, which will become a part of the KernelTemplate resource name. If not specified, the server will generate one.

It must:

  • contain 1-63 characters
  • contain only lowercase alphanumeric characters or hyphen ('-')
  • start with an alphabetic character
  • end with an alphanumeric character

This matches a regular expression: ^a-z?$

Request Body schema: application/json

Required. The KernelTemplate resource to create.

milliCpuRequest
integer <int32>

Optional. MilliCPU units that will be reserved for the Kernel. Kernel may use more CPU resources up to the millicpu_limit. It is recommended to set CPU requests to avoid resource contention. 1000 milliCPU = 1 CPU core.

When unset, milli_cpu_request will be set to milli_cpu_limit.

milliCpuLimit
integer <int32>

Optional. Maximum MilliCPU units a kernel is allowed to use. The Kernel will be throttled to not exceed this limit. It is discouraged to set CPU limits when possible. 1000 milliCPU = 1 CPU core.

gpuResource
string

Optional. Kubernetes GPU resource name. For example: nvidia.com/gpu or amd.com/gpu. When unset, server will choose a default value.

gpu
required
integer <int32>

Required. The amount of GPU units requested by this DAIEngine.

memoryBytesRequest
string <int64>

Optional. Memory in bytes that will be reserved for the Kernel.

When unset, memory_bytes_request will be set to memory_bytes_limit.

memoryBytesLimit
required
string <int64>

Required. Max memory in bytes a kernel is allowed to use. Kernel may fail or be terminated if it exceeds this limit.

object

Optional. Map of environmental variables that will be set in the Kernel.

yamlPodTemplateSpec
string (Optional. YAML representation of custom PodTemplateSpec serialized into bytes. Definition of PodTemplateSpec: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)

When specified, then it is applied for Kernel pod. PodTemplateSpec describes what will be applied on top of a regular Kernel pod before it is created. This template is merged using StrategicMergePatch method (it overrides the default Kernel pod). More info about StrategicMergePatch: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/

Example YAML value (custom annotation applied on Kernel pod): metadata: annotations: custom-key: custom-value

disabled
boolean

Optional. Whether the KernelTemplate is disabled. Disabled KernelTemplates cannot not be used for creating new Kernels.

maxIdleDuration
required
string

Required. Maximum time a Kernel can be idle before it is automatically shutdown.

Responses

Request samples

Content type
application/json
{
  • "milliCpuRequest": 0,
  • "milliCpuLimit": 0,
  • "gpuResource": "string",
  • "gpu": 0,
  • "memoryBytesRequest": "string",
  • "memoryBytesLimit": "string",
  • "environmentalVariables": {
    },
  • "yamlPodTemplateSpec": "string",
  • "disabled": true,
  • "maxIdleDuration": "string"
}

Response samples

Content type
application/json
{
  • "kernelTemplate": {
    }
}

Deletes a KernelTemplate.

path Parameters
name_2
required
stringkernelTemplates/[^/]+

Required. KernelTemplate resource name. Format: kernelTemplates/{kernel_template}

Responses

Response samples

Content type
application/json
{ }

Returns a specific KernelTemplate.

path Parameters
name_4
required
stringkernelTemplates/[^/]+

Required. The name of the KernelTemplate to retrieve. Format: kernelTemplates/{kernel_template}

Responses

Response samples

Content type
application/json
{
  • "kernelTemplate": {
    }
}

NotebookKernelSpecService

Returns a collection of NotebookKernelSpecs.

query Parameters
pageSize
integer <int32>

Optional. 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.

pageToken
string

Optional. Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the ListNotebookKernelSpecsResponse.

Responses

Response samples

Content type
application/json
{
  • "notebookKernelSpecs": [
    ],
  • "nextPageToken": "string"
}

Creates a new NotebookKernelSpec.

query Parameters
notebookKernelSpecId
string

Optional. Specify the NotebookKernelSpec ID, which will become a part of the NotebookKernelSpec resource name. If not specified, the server will generate one.

It must:

  • contain 1-63 characters
  • contain only lowercase alphanumeric characters or hyphen ('-')
  • start with an alphabetic character
  • end with an alphanumeric character

This matches a regular expression: ^a-z?$

Request Body schema: application/json

Required. The NotebookKernelSpec resource to create.

displayName
string

Optional. Human-readable name.

kernelImage
required
string

Required. The resource name of the KernelImage which will be used to create Notebook Lab Kernels. Format is kernelImages/{kernel_image}.

kernelTemplate
required
string

Required. The resource name of the KernelTemplate which will be used to create Notebook Lab Kernels. Format is kernelTemplates/{kernel_template}.

disabled
boolean

Optional. Whether the NotebookKernelSpec is disabled. Disabled NotebookKernelSpecs are not available in H2O Notebook Lab.

Responses

Request samples

Content type
application/json
{
  • "displayName": "string",
  • "kernelImage": "string",
  • "kernelTemplate": "string",
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "notebookKernelSpec": {
    }
}

Deletes a NotebookKernelSpec.

path Parameters
name_3
required
stringnotebookKernelSpecs/[^/]+

Required. NotebookKernelSpec resource name. Format: notebookKernelSpecs/{notebook_kernel_spec}

Responses

Response samples

Content type
application/json
{ }

Returns a specific NotebookKernelSpec.

path Parameters
name_5
required
stringnotebookKernelSpecs/[^/]+

Required. The name of the NotebookKernelSpec to retrieve. Format: notebookKernelSpecs/{notebook_kernel_spec}

Responses

Response samples

Content type
application/json
{
  • "notebookKernelSpec": {
    }
}

Updates a NotebookKernelSpec.

path Parameters
notebookKernelSpec.name
required
stringnotebookKernelSpecs/[^/]+

Output only. Resource name.

query Parameters
updateMask
required
string

Required. The list of paths referencing which fields to update. Update mask must be non-empty.

Allowed field paths are:

  • TODO: display_name
  • TODO: image
  • TODO: template
  • TODO: disabled Paths are case sensitive (must match exactly).

To update all allowed fields, specify exactly one path with value "*".

Request Body schema: application/json

Required. NotebookKernelSpec resource.

displayName
string

Optional. Human-readable name.

kernelImage
required
string

Required. The resource name of the KernelImage which will be used to create Notebook Lab Kernels. Format is kernelImages/{kernel_image}.

kernelTemplate
required
string

Required. The resource name of the KernelTemplate which will be used to create Notebook Lab Kernels. Format is kernelTemplates/{kernel_template}.

disabled
boolean

Optional. Whether the NotebookKernelSpec is disabled. Disabled NotebookKernelSpecs are not available in H2O Notebook Lab.

Responses

Request samples

Content type
application/json
{
  • "displayName": "string",
  • "kernelImage": "string",
  • "kernelTemplate": "string",
  • "disabled": true
}

Response samples

Content type
application/json
{
  • "notebookKernelSpec": {
    }
}