Skip to main content

List

Retrieves the list of machine learning models in the specified cluster.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const ListMlModelsRequest =
cloudApi.mdb.clickhouse_ml_model_service.ListMlModelsRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.MlModelServiceClient);

const result = await client.list(
ListMlModelsRequest.fromPartial({
clusterId: "clusterId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();

ListMlModelsRequest

clusterId : string

ID of the cluster that models belongs to.

pageSize : int64

The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListMlModelsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100.

pageToken : string

Page token. To get the next page of results, set page_token to the ListMlModelsResponse.next_page_token returned by the previous list request.

ListMlModelsResponse

mlModels : MlModel

List of models in the specified cluster.

nextPageToken : string

Token for getting the next page of the list. If the number of results is greater than the specified ListMlModelsRequest.page_size, use next_page_token as the value for the ListMlModelsRequest.page_token parameter in the next list request.

Each subsequent page will have its own next_page_token to continue paging through the results.

MlModel

name : string

Name of the the model.

clusterId : string

ID of the ClickHouse cluster that the model belongs to.

type : MlModelType

Type of the model.

uri : string

Model file URL. You can only use models stored in Object Storage.