---
title: "Creates a new NotebookEngineProfile."
method: POST
path: "/v1/{parent}/notebookEngineProfiles"
tags: ["NotebookEngineProfileService"]
---

# Creates a new NotebookEngineProfile.

`POST /v1/{parent}/notebookEngineProfiles`

## Request

- Base URL: `https://docs.h2o.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.h2o.ai/v1/{parent}/notebookEngineProfiles`
- Auth: none declared
- TypeScript: <https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/docs/v1/:parent/notebookEngineProfiles/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `parent` string, required

## Query parameters

- `notebookEngineProfileId` string, required

## Request body

- V1NotebookEngineProfile: NotebookEngineProfile represents a set of values that are used for NotebookEngine.
  - `name` string
  - `displayName` string: Optional. Human-readable name.
  - `priority` integer: Optional. Priority of the NotebookEngineProfile. Lower value means higher priority. Priority is NOT a unique value (any two NotebookEngineProfiles can have the same priority value).
  - `enabled` boolean: Optional. When set to true, the NotebookEngineProfile is enabled and can be used in NotebookEngine. When set to false, the NotebookEngineProfile is disabled and cannot be used in any NotebookEngine.
  - `assignedOidcRolesEnabled` boolean: Optional. When set to true, the assigned_oidc_roles field is verified when a user uses this profile.
  - `assignedOidcRoles` string[]: Optional. List of OIDC roles assigned to this NotebookEngineProfile. When profile has assigned some OIDC roles and verification of this list is enabled (assigned_oidc_roles_enabled=true), then this profile can be used only by users who have assigned at least one role from this list. Example 1: assigned_oidc_roles = ["role1", "role2"]. This profile can be used only by users who have assigned either role1 or role2. Example 2 (special case): assigned_oidc_roles = []. Empty list means that the profile has not assigned any OIDC role, therefore this profile cannot be used by any user.
  - `maxRunningEngines` integer, nullable: Optional. Maximum number of NotebookEngines per user that can be running when using this NotebookEngineProfile.
  - `cpuConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
    - `min` string, int64: Minimum (inclusive) allowed value.
    - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
    - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
    - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
  - `gpuConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
    - `min` string, int64: Minimum (inclusive) allowed value.
    - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
    - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
    - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
  - `memoryBytesConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
    - `min` string, int64: Minimum (inclusive) allowed value.
    - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
    - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
    - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
  - `storageBytesConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
    - `min` string, int64: Minimum (inclusive) allowed value.
    - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
    - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
    - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
  - `maxIdleDurationConstraint` V1ProfileConstraintDuration: Message representing a constraint on a user-specified duration value.
    - `min` string: Minimum (inclusive) allowed value.
    - `max` string, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
    - `default` string: Default value. It is used as an initial value or when the value is unset by the user.
  - `maxRunningDurationConstraint` V1ProfileConstraintDuration: Message representing a constraint on a user-specified duration value.
    - `min` string: Minimum (inclusive) allowed value.
    - `max` string, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
    - `default` string: Default value. It is used as an initial value or when the value is unset by the user.
  - `yamlPodTemplateSpec` string: When specified, then it is applied for each NotebookEngine that uses this profile. PodTemplateSpec describes what will be applied on top of a regular Notebook pod before it is created. This template is merged into Notebook default pod using StrategicMergePatch method (it overrides the default pod). More info about StrategicMergePatch: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ Example YAML value (custom annotation applied for each Notebook pod): metadata: annotations: custom-key: custom-value An empty string "" means unset (no PodTemplateSpec is applied).
  - `yamlGpuTolerations` string: When specified, then it is applied for each NotebookEngine that uses this profile. GPUTolerations sets Notebook's pod.spec.tolerations in case NotebookEngine has GPU > 0. This will override any tolerations defined in yaml_pod_template_spec.PodSpec.Tolerations field. Example YAML value (two GPU tolerations applied for each Notebook pod): - key: "dedicated" operator: "Equal" value: "gpu" effect: "NoSchedule" - key: "key2" operator: "Equal" value: "value2" effect: "NoSchedule" An empty string "" means unset: the pod's tolerations are left untouched. An empty list "[]" explicitly clears the pod's tolerations. The literal "null" is not allowed.
  - `createTime` string, date-time: Output only. Time when the NotebookEngineProfile was created.
  - `updateTime` string, date-time, nullable: Output only. Time when the NotebookEngineProfile was last updated.
  - `creator` string: Output only. Name of entity that created the NotebookEngineProfile.
  - `updater` string: Output only. Name of entity that last updated the NotebookEngineProfile.
  - `creatorDisplayName` string: Output only. Human-readable name of entity that created the NotebookEngineProfile.
  - `updaterDisplayName` string: Output only. Human-readable name of entity that last updated the NotebookEngineProfile.
  - `storageClassName` string: Optional. Name of the storage class used by NotebookEngine when using this profile. When unset, the default storage class of the k8s cluster will be used.
  - `gpuResourceName` string: Non-empty default. K8s GPU resource name. For example: `nvidia.com/gpu` or `amd.com/gpu`. When unset, server will choose a default value.
  - `syncGitRepositoryEnabled` boolean: Optional. Enables syncing of the git repository when NotebookEngine is created.
  - `gitRepository` string: Optional. The git repository to sync.
  - `gitRef` string: Optional. The git revision (branch, tag, or hash) to check out. If not specified, this defaults to "HEAD" (of the upstream repo's default branch).
  - `gitDirectoryName` string: Optional. The name of the directory in the user's home folder, where the Git repo is synced into. Defaults to "Example".

## Response `200`

A successful response.

- V1CreateNotebookEngineProfileResponse: Response message for Create method.
  - `notebookEngineProfile` V1NotebookEngineProfile: NotebookEngineProfile represents a set of values that are used for NotebookEngine.
    - `name` string
    - `displayName` string: Optional. Human-readable name.
    - `priority` integer: Optional. Priority of the NotebookEngineProfile. Lower value means higher priority. Priority is NOT a unique value (any two NotebookEngineProfiles can have the same priority value).
    - `enabled` boolean: Optional. When set to true, the NotebookEngineProfile is enabled and can be used in NotebookEngine. When set to false, the NotebookEngineProfile is disabled and cannot be used in any NotebookEngine.
    - `assignedOidcRolesEnabled` boolean: Optional. When set to true, the assigned_oidc_roles field is verified when a user uses this profile.
    - `assignedOidcRoles` string[]: Optional. List of OIDC roles assigned to this NotebookEngineProfile. When profile has assigned some OIDC roles and verification of this list is enabled (assigned_oidc_roles_enabled=true), then this profile can be used only by users who have assigned at least one role from this list. Example 1: assigned_oidc_roles = ["role1", "role2"]. This profile can be used only by users who have assigned either role1 or role2. Example 2 (special case): assigned_oidc_roles = []. Empty list means that the profile has not assigned any OIDC role, therefore this profile cannot be used by any user.
    - `maxRunningEngines` integer, nullable: Optional. Maximum number of NotebookEngines per user that can be running when using this NotebookEngineProfile.
    - `cpuConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
      - `min` string, int64: Minimum (inclusive) allowed value.
      - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
      - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
      - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
    - `gpuConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
      - `min` string, int64: Minimum (inclusive) allowed value.
      - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
      - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
      - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
    - `memoryBytesConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
      - `min` string, int64: Minimum (inclusive) allowed value.
      - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
      - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
      - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
    - `storageBytesConstraint` V1ProfileConstraintNumeric: Message representing a constraint on a user-specified numeric value.
      - `min` string, int64: Minimum (inclusive) allowed value.
      - `max` string, int64, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
      - `default` string, int64: Default value. It is used as an initial value or when the value is unset by the user.
      - `cumulativeMax` string, int64, nullable: Maximum cumulative value allowed. Unset is treated as unlimited.
    - `maxIdleDurationConstraint` V1ProfileConstraintDuration: Message representing a constraint on a user-specified duration value.
      - `min` string: Minimum (inclusive) allowed value.
      - `max` string, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
      - `default` string: Default value. It is used as an initial value or when the value is unset by the user.
    - `maxRunningDurationConstraint` V1ProfileConstraintDuration: Message representing a constraint on a user-specified duration value.
      - `min` string: Minimum (inclusive) allowed value.
      - `max` string, nullable: Maximum (inclusive) allowed value. Unset is treated as unlimited.
      - `default` string: Default value. It is used as an initial value or when the value is unset by the user.
    - `yamlPodTemplateSpec` string: When specified, then it is applied for each NotebookEngine that uses this profile. PodTemplateSpec describes what will be applied on top of a regular Notebook pod before it is created. This template is merged into Notebook default pod using StrategicMergePatch method (it overrides the default pod). More info about StrategicMergePatch: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ Example YAML value (custom annotation applied for each Notebook pod): metadata: annotations: custom-key: custom-value An empty string "" means unset (no PodTemplateSpec is applied).
    - `yamlGpuTolerations` string: When specified, then it is applied for each NotebookEngine that uses this profile. GPUTolerations sets Notebook's pod.spec.tolerations in case NotebookEngine has GPU > 0. This will override any tolerations defined in yaml_pod_template_spec.PodSpec.Tolerations field. Example YAML value (two GPU tolerations applied for each Notebook pod): - key: "dedicated" operator: "Equal" value: "gpu" effect: "NoSchedule" - key: "key2" operator: "Equal" value: "value2" effect: "NoSchedule" An empty string "" means unset: the pod's tolerations are left untouched. An empty list "[]" explicitly clears the pod's tolerations. The literal "null" is not allowed.
    - `createTime` string, date-time: Output only. Time when the NotebookEngineProfile was created.
    - `updateTime` string, date-time, nullable: Output only. Time when the NotebookEngineProfile was last updated.
    - `creator` string: Output only. Name of entity that created the NotebookEngineProfile.
    - `updater` string: Output only. Name of entity that last updated the NotebookEngineProfile.
    - `creatorDisplayName` string: Output only. Human-readable name of entity that created the NotebookEngineProfile.
    - `updaterDisplayName` string: Output only. Human-readable name of entity that last updated the NotebookEngineProfile.
    - `storageClassName` string: Optional. Name of the storage class used by NotebookEngine when using this profile. When unset, the default storage class of the k8s cluster will be used.
    - `gpuResourceName` string: Non-empty default. K8s GPU resource name. For example: `nvidia.com/gpu` or `amd.com/gpu`. When unset, server will choose a default value.
    - `syncGitRepositoryEnabled` boolean: Optional. Enables syncing of the git repository when NotebookEngine is created.
    - `gitRepository` string: Optional. The git repository to sync.
    - `gitRef` string: Optional. The git revision (branch, tag, or hash) to check out. If not specified, this defaults to "HEAD" (of the upstream repo's default branch).
    - `gitDirectoryName` string: Optional. The name of the directory in the user's home folder, where the Git repo is synced into. Defaults to "Example".

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto.md) - [All operations](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/revisions/297cfadc1d39?raw)
