Skip to main content

List

Retrieves the list of Elasticsearch clusters that belong to the specified folder.

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

const ListClustersRequest =
cloudApi.dataproc.cluster_service.ListClustersRequest;

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

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

ListClustersRequest

folderId : string

ID of the folder to list Elasticsearch 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 ListClustersResponse.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 ListClustersResponse.next_page_token returned by the previous list request.

filter : string

A filter expression that filters resources listed in the response.

The expression must specify:

  1. The field name to filter by. Currently you can only use filtering with the Cluster.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be 1-63 characters long and match the regular expression [a-zA-Z0-9_-]+.

Example of a filter: name NOT IN 'test,beta'.

ListClustersResponse

clusters : Cluster

List of Elasticsearch clusters.

nextPageToken : string

Token that allows you to get the next page of results for list requests.

If the number of results is larger than ListClustersRequest.page_size, use next_page_token as the value for the ListClustersRequest.page_token parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

Cluster

An Elasticsearch cluster resource. For more information, see the Concepts section of the documentation.

Environment
  • ENVIRONMENT_UNSPECIFIED

  • PRODUCTION

    Stable environment with a conservative update policy when only hotfixes are applied during regular maintenance.

  • PRESTABLE

    Environment with a more aggressive update policy when new versions are rolled out irrespective of backward compatibility.

Health
  • HEALTH_UNKNOWN

    State of the cluster is unknown ([Host.health][7] of all hosts in the cluster is UNKNOWN).

  • ALIVE

    Cluster is alive and well ([Host.health][8] of all hosts in the cluster is ALIVE).

  • DEAD

    Cluster is inoperable ([Host.health][9] of all hosts in the cluster is DEAD).

  • DEGRADED

    Cluster is in degraded state ([Host.health][10] of at least one of the hosts in the cluster is not ALIVE).

Status
  • STATUS_UNKNOWN

    Cluster state is unknown.

  • CREATING

    Cluster is being created.

  • RUNNING

    Cluster is running normally.

  • ERROR

    Cluster encountered a problem and cannot operate.

  • UPDATING

    Cluster is being updated.

  • STOPPING

    Cluster is stopping.

  • STOPPED

    Cluster stopped.

  • STARTING

    Cluster is starting.

id : string

ID of the Elasticsearch cluster. This ID is assigned at creation time.

folderId : string

ID of the folder that the Elasticsearch cluster belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp.

name : string

Name of the Elasticsearch cluster. The name must be unique within the folder. 1-63 characters long.

description : string

Description of the Elasticsearch cluster. 0-256 characters long.

labels : string

Custom labels for the Elasticsearch cluster as key:value pairs. A maximum of 64 labels per resource is allowed.

environment : Environment

Deployment environment of the Elasticsearch cluster.

monitoring : Monitoring

Description of monitoring systems relevant to the Elasticsearch cluster.

config : ClusterConfig

Configuration of the Elasticsearch cluster.

networkId : string

ID of the network that the cluster belongs to.

health : Health

Aggregated cluster health.

status : Status

Current state of the cluster.

securityGroupIds : string

User security groups

serviceAccountId : string

ID of the service account used for access to Object Storage.

deletionProtection : bool

Deletion Protection inhibits deletion of the cluster

maintenanceWindow : MaintenanceWindow

Window of maintenance operations.

plannedOperation : MaintenanceOperation

Maintenance operation planned at nearest maintenance_window.

Monitoring

Metadata of monitoring system.

name : string

Name of the monitoring system.

description : string

Description of the monitoring system.

Link to the monitoring system charts for the Elasticsearch cluster.

ClusterConfig

version : string

Elasticsearch version.

elasticsearch : Elasticsearch

Configuration and resource allocation for Elasticsearch nodes.

edition : string

ElasticSearch edition.

MaintenanceWindow

One of policy

  • anytime : AnytimeMaintenanceWindow
  • weeklyMaintenanceWindow : WeeklyMaintenanceWindow

MaintenanceOperation

info : string
delayedUntil : google.protobuf.Timestamp

Elasticsearch

DataNode

One of config

  • elasticsearchConfigSet_7 : config.ElasticsearchConfigSet7

    Elasticsearch 7.x data node configuration.

resources : Resources

Resources allocated to Elasticsearch data nodes.

MasterNode
resources : Resources

Resources allocated to Elasticsearch master nodes.

dataNode : DataNode

Configuration and resource allocation for Elasticsearch data nodes.

masterNode : MasterNode

Configuration and resource allocation for Elasticsearch master nodes.

plugins : string

Cluster wide plugins

AnytimeMaintenanceWindow

WeeklyMaintenanceWindow

WeekDay
  • WEEK_DAY_UNSPECIFIED

  • MON

  • TUE

  • WED

  • THU

  • FRI

  • SAT

  • SUN

day : WeekDay
hour : int64

Hour of the day in UTC.

ElasticsearchConfigSet7

Elasticsearch 7.x data node configuration.

effectiveConfig : ElasticsearchConfig7

Effective settings for an Elasticsearch cluster (a combination of settings defined in user_config and default_config).

userConfig : ElasticsearchConfig7

User-defined settings for an Elasticsearch cluster.

defaultConfig : ElasticsearchConfig7

Default settings for an Elasticsearch cluster.

Resources

Computational resources.

resourcePresetId : string

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

diskSize : int64

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

diskTypeId : string

Type of the storage environment for the host. All available types are listed in the documentation.

DataNode

  • elasticsearchConfigSet_7 : config.ElasticsearchConfigSet7

    Elasticsearch 7.x data node configuration.

resources : Resources

Resources allocated to Elasticsearch data nodes.

MasterNode

resources : Resources

Resources allocated to Elasticsearch master nodes.

ElasticsearchConfig7

Elasticsearch 7.x supported configuration options are listed here.

Detailed description for each set of options is available in Elasticsearch documentation.

Any options that are not listed here are not supported.

maxClauseCount : google.protobuf.Int64Value

The maximum number of clauses a boolean query can contain.

The limit is in place to prevent searches from becoming too large and taking up too much CPU and memory. It affects not only Elasticsearch's bool query, but many other queries that are implicitly converted to bool query by Elastcsearch.

Default value: 1024.

See in-depth description in Elasticsearch documentation.

fielddataCacheSize : string

The maximum percentage or absolute value (10%, 512mb) of heap space that is allocated to field data cache.

All the field values that are placed in this cache, get loaded to memory in order to provide fast document based access to those values. Building the field data cache for a field can be an expensive operations, so its recommended to have enough memory for this cache, and to keep it loaded.

Default value: unbounded.

See in-depth description in Elasticsearch documentation.

reindexRemoteWhitelist : string

Remote hosts for reindex have to be explicitly allowed in elasticsearch.yml using the reindex.remote.whitelist property. It can be set to a comma delimited list of allowed remote host and port combinations. Scheme is ignored, only the host and port are used.

reindexSslCaPath : string

List of paths to PEM encoded certificate files that should be trusted.

See in-depth description in Elasticsearch documentation