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

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

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

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

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

## Path parameters

- `name` string, required

## Request body

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

## Response `200`

A successful response.

- V1AssignDAIEngineVersionAliasesResponse: Response message.
  - `daiEngineVersions` V1DAIEngineVersion[]: All DAIEngineVersions with updated resourceID aliases.
    - `name` string
    - `deprecated` boolean: Indicates whether DAIEngineVersion is deprecated.
    - `aliases` string[]: Optional. ResourceID aliases for this DAIEngineVersion. 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 DAIEngineVersion with name "workspaces/global/daiEngineVersions/1.11.1" has aliases={"latest", "prerelease"}, then "workspaces/global/daiEngineVersions/latest" will refer to this DAIEngineVersion.
    - `image` string, required: Name of the Docker image used when using this DAIEngineVersion.
    - `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 DAIEngineVersion from a private container image registry or repository.
    - `createTime` string, date-time: Output only. Time when the DAIEngineVersion was created.
    - `updateTime` string, date-time, nullable: Output only. Time when the DAIEngineVersion was last updated.
    - `creator` string: Output only. Name of entity that created the DAIEngineVersion.
    - `updater` string: Output only. Name of entity that last updated the DAIEngineVersion.
    - `creatorDisplayName` string: Output only. Human-readable name of entity that created the DAIEngineVersion.
    - `updaterDisplayName` string: Output only. Human-readable name of entity that last updated the DAIEngineVersion.

## 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)
