Skip to main content

List

Retrieves a list of subclusters in the specified cluster.

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

const ListSubclustersRequest =
cloudApi.dataproc.subcluster_service.ListSubclustersRequest;

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

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

ListSubclustersRequest

clusterId : string

ID of the Data Proc cluster to list subclusters in.

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 ListSubclustersResponse.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 ListSubclustersResponse.next_page_token returned by a previous list request.

filter : string

A filter expression that filters subclusters listed in the response.

The expression must specify:

  1. The field name. Currently you can use filtering only on Subcluster.name field.
  2. An = operator.
  3. The value in double quotes ("). 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=dataproc123_subcluster456.

ListSubclustersResponse

subclusters : Subcluster

List of subclusters 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 ListSubclustersRequest.page_size, use next_page_token as the value for the ListSubclustersRequest.page_token parameter in the next list request.

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

Subcluster

A Data Proc subcluster. For details about the concept, see documentation.

id : string

ID of the subcluster. Generated at creation time.

clusterId : string

ID of the Data Proc cluster that the subcluster belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp.

name : string

Name of the subcluster. The name is unique within the cluster.

role : Role

Role that is fulfilled by hosts of the subcluster.

resources : Resources

Resources allocated for each host in the subcluster.

subnetId : string

ID of the VPC subnet used for hosts in the subcluster.

hostsCount : int64

Number of hosts in the subcluster.

assignPublicIp : bool

Assign public ip addresses for all hosts in subcluter.

autoscalingConfig : AutoscalingConfig

Configuration for instance group based subclusters

instanceGroupId : string

ID of Compute Instance Group for autoscaling subclusters

Resources

resourcePresetId : string

ID of the resource preset for computational resources available to a host (CPU, memory etc.). All available presets are listed in the documentation.

diskTypeId : string

Type of the storage environment for the host. Possible values:

  • network-hdd - network HDD drive,
  • network-ssd - network SSD drive.
diskSize : int64

Volume of the storage available to a host, in bytes.

AutoscalingConfig

maxHostsCount : int64

Upper limit for total instance subcluster count.

preemptible : bool

Preemptible instances are stopped at least once every 24 hours, and can be stopped at any time if their resources are needed by Compute. For more information, see Preemptible Virtual Machines.

measurementDuration : google.protobuf.Duration

Time in seconds allotted for averaging metrics.

warmupDuration : google.protobuf.Duration

The warmup time of the instance in seconds. During this time, traffic is sent to the instance, but instance metrics are not collected.

stabilizationDuration : google.protobuf.Duration

Minimum amount of time in seconds allotted for monitoring before Instance Groups can reduce the number of instances in the group. During this time, the group size doesn't decrease, even if the new metric values indicate that it should.

cpuUtilizationTarget : double

Defines an autoscaling rule based on the average CPU utilization of the instance group.

decommissionTimeout : int64

Timeout to gracefully decommission nodes during downscaling. In seconds. Default value: 120