@Generated public class ModelVersionsAPI extends Object
This API reference documents the REST endpoints for managing model versions in Unity Catalog. For more details, see the [registered models API docs](/api/workspace/registeredmodels).
| Constructor and Description |
|---|
ModelVersionsAPI(ApiClient apiClient)
Regular-use constructor
|
ModelVersionsAPI(ModelVersionsService mock)
Constructor for mocks
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(DeleteModelVersionRequest request)
Delete a Model Version.
|
void |
delete(String fullName,
long version) |
RegisteredModelInfo |
get(GetModelVersionRequest request)
Get a Model Version.
|
RegisteredModelInfo |
get(String fullName,
long version) |
ModelVersionInfo |
getByAlias(GetByAliasRequest request)
Get Model Version By Alias.
|
ModelVersionInfo |
getByAlias(String fullName,
String alias) |
ModelVersionsService |
impl() |
Iterable<ModelVersionInfo> |
list(ListModelVersionsRequest request)
List Model Versions.
|
Iterable<ModelVersionInfo> |
list(String fullName) |
ModelVersionInfo |
update(String fullName,
long version) |
ModelVersionInfo |
update(UpdateModelVersionRequest request)
Update a Model Version.
|
public ModelVersionsAPI(ApiClient apiClient)
public ModelVersionsAPI(ModelVersionsService mock)
public void delete(String fullName, long version)
public void delete(DeleteModelVersionRequest request)
Deletes a model version from the specified registered model. Any aliases assigned to the model version will also be deleted.
The caller must be a metastore admin or an owner of the parent registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
public RegisteredModelInfo get(String fullName, long version)
public RegisteredModelInfo get(GetModelVersionRequest request)
Get a model version.
The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the parent registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
public ModelVersionInfo getByAlias(String fullName, String alias)
public ModelVersionInfo getByAlias(GetByAliasRequest request)
Get a model version by alias.
The caller must be a metastore admin or an owner of (or have the **EXECUTE** privilege on) the registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
public Iterable<ModelVersionInfo> list(String fullName)
public Iterable<ModelVersionInfo> list(ListModelVersionsRequest request)
List model versions. You can list model versions under a particular schema, or list all model versions in the current metastore.
The returned models are filtered based on the privileges of the calling user. For example, the metastore admin is able to list all the model versions. A regular user needs to be the owner or have the **EXECUTE** privilege on the parent registered model to recieve the model versions in the response. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
There is no guarantee of a specific ordering of the elements in the response. The elements in the response will not contain any aliases or tags.
public ModelVersionInfo update(String fullName, long version)
public ModelVersionInfo update(UpdateModelVersionRequest request)
Updates the specified model version.
The caller must be a metastore admin or an owner of the parent registered model. For the latter case, the caller must also be the owner or have the **USE_CATALOG** privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema.
Currently only the comment of the model version can be updated.
public ModelVersionsService impl()
Copyright © 2024. All rights reserved.