Skip to main content

List

Retrieves the list of GPU clusters in the specified folder.

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

const ListGpuClustersRequest =
cloudApi.compute.gpu_cluster_service.ListGpuClustersRequest;

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

const result = await client.list(
ListGpuClustersRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter",
// orderBy: "orderBy"
})
);
console.log(result);
})();

ListGpuClustersRequest

folderId : string

ID of the folder to list GPU clusters in.

To get the folder ID, make a yandex.cloud.resourcemanager.v1.FolderService.List request.

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 ListGpuClustersResponse.next_page_token that can be used to get the next page of results in subsequent list requests.

pageToken : string

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

filter : string

A filter expression that filters GPU clusters listed in the response.

The expression must specify:

  1. The field name. Currently you can use filtering only on GpuCluster.name field.
  2. An operator. Can be either = or != for single values, IN or NOT IN for lists of values.
  3. The value. Must be 3-63 characters long and match the regular expression ^[a-z][-a-z0-9]{1,61}[a-z0-9]. Example of a filter: name=my-schedule.
orderBy : string

A sorting expression that sorts GPU clusters listed in the response.

The expression must specify the field name from GpuCluster and ascending or descending order, e.g. createdAt desc.

Default value: id asc.

ListGpuClustersResponse

gpuClusters : GpuCluster

List of GPU clusters in the specified folder.

nextPageToken : string

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

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

GpuCluster

A GPU cluster. For details about the concept, see documentation.

Status
  • STATUS_UNSPECIFIED

  • CREATING

    GPU cluster is being created.

  • READY

    GPU cluster is ready to use.

  • ERROR

    GPU cluster encountered a problem and cannot operate.

  • DELETING

    GPU cluster is being deleted.

id : string

ID of GPU cluster.

folderId : string

ID of the folder that the GPU cluster belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp.

name : string

Name of the GPU cluster.

The name is unique within the folder.

description : string

Description of the GPU cluster.

labels : string

GPU cluster labels as key:value pairs.

status : Status

Status of the GPU cluster.

zoneId : string

ID of the availability zone where the GPU cluster resides.

interconnectType : GpuInterconnectType

Type of interconnect used for this GPU cluster.