---
title: "Assign new set of resourceID aliases to H2OEngineVersion. This will replace existing H2OEngineVersion resourceID aliases with the new aliases. If there are other H2OEngineVersions with the same alias that we try to assign to this H2OEngineVersion, they will be deleted from the other H2OEngineVersions."
method: POST
path: "/v1/{name_1}:assignAliases"
tags: ["H2OEngineVersionService"]
---

# Assign new set of resourceID aliases to H2OEngineVersion. This will replace existing H2OEngineVersion resourceID aliases with the new aliases. If there are other H2OEngineVersions with the same alias that we try to assign to this H2OEngineVersion, they will be deleted from the other H2OEngineVersions.

`POST /v1/{name_1}:assignAliases`

## 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/{name_1}:assignAliases`
- Auth: none declared
- TypeScript: <https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/docs/v1/:name_1:assignAliases/post.ts> (a function with typed inputs; its response is checked against the schema)

Example 1 - two versions in the same workspace:
- h2ow1v1(name="workspaces/w1/h2oEngineVersions/v1", aliases=["latest", "bar"])
- h2ow1v2(name="workspaces/w1/h2oEngineVersions/v2", aliases=["baz", "foo"])
- AssignAliases(h2ow1v1, aliases=["latest", "baz"])
=> h2ow1v1.aliases=["latest", "baz"] (changed)
=> h2ow1v2.aliases=["foo"] (changed)

Example 2 - two versions in different workspaces:
- h2ow1v1(name="workspaces/w1/h2oEngineVersions/v1", aliases=["latest", "bar"])
- h2ow2v1(name="workspaces/w2/h2oEngineVersions/v1", aliases=["latest", "baz"])
- AssignAliases(h2ow1v1, aliases=["latest", "baz"])
=> h2ow1v1.aliases=["latest", "baz"] (changed)
=> h2ow2v1.aliases=["latest", "baz"] (unchanged)

## Path parameters

- `name_1` string, required

## Request body

- object: Request message.
  - `aliases` string[], required: New resourceID aliases of the H2OEngineVersion.

## Response `200`

A successful response.

- V1AssignH2OEngineVersionAliasesResponse: Response message.
  - `h2oEngineVersions` V1H2OEngineVersion[]: All H2OEngineVersions with updated resourceID aliases.
    - `name` string
    - `deprecated` boolean: Indicates whether H2OEngineVersion is deprecated.
    - `aliases` string[]: Optional. ResourceID aliases for this H2OEngineVersion. Aliases are unique within the workspace (two versions in the same workspace cannot have the same alias). Any alias must be in format: - 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]([a-z0-9-]{0,61}[a-z0-9])?$ For example: when H2OEngineVersion with name "workspaces/global/h2oEngineVersions/3.38.0.1" has aliases={"latest", "prerelease"}, then "workspaces/global/h2oEngineVersions/latest" will refer to this H2OEngineVersion.
    - `image` string, required: Required. Name of the Docker image used when using this H2OEngineVersion.
    - `imagePullPolicy` 'IMAGE_PULL_POLICY_UNSPECIFIED' | 'IMAGE_PULL_POLICY_ALWAYS' | 'IMAGE_PULL_POLICY_NEVER' | 'IMAGE_PULL_POLICY_IF_NOT_PRESENT': Policy for downloading an image in K8s. - IMAGE_PULL_POLICY_UNSPECIFIED: Unspecified image pull policy. - IMAGE_PULL_POLICY_ALWAYS: Every time the container is launched, the container image registry is queried to resolve the name to an image digest. - IMAGE_PULL_POLICY_NEVER: Do not try to fetch the image. If the image is already present locally, the container will start. If the image is not present, container startup will fail. - IMAGE_PULL_POLICY_IF_NOT_PRESENT: The image is pulled only if it is not already present locally.
    - `imagePullSecrets` string[]: List of references to k8s secrets that can be used for pulling an image of this H2OEngineVersion from a private container image registry or repository.
    - `createTime` string, date-time: Output only. Time when the H2OEngineVersion was created.
    - `updateTime` string, date-time, nullable: Output only. Time when the H2OEngineVersion was last updated.
    - `creator` string: Output only. Name of entity that created the H2OEngineVersion.
    - `updater` string: Output only. Name of entity that last updated the H2OEngineVersion.
    - `creatorDisplayName` string: Output only. Human-readable name of entity that created the H2OEngineVersion.
    - `updaterDisplayName` string: Output only. Human-readable name of entity that last updated the H2OEngineVersion.

## 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/57d1a2e93fcf?raw)
