From a59e50c875e5b6b2b508e2589d3ec89b19f15439 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 9 Dec 2024 06:04:13 +0000 Subject: [PATCH] Auto-generated API code --- .../53d9d2ec9cb8d211772d764e76fe6890.asciidoc | 18 ++ .../931817b168e055ecf738785c721125dd.asciidoc | 32 ++++ .../d29031409016b2b798148ef173a196ae.asciidoc | 24 +++ docs/reference.asciidoc | 173 ++++++++++++++---- src/api/api/cluster.ts | 22 +-- src/api/api/health_report.ts | 2 +- src/api/api/nodes.ts | 14 +- src/api/api/ping.ts | 2 +- 8 files changed, 236 insertions(+), 51 deletions(-) create mode 100644 docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc create mode 100644 docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc create mode 100644 docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc diff --git a/docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc b/docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc new file mode 100644 index 000000000..58eee5923 --- /dev/null +++ b/docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc @@ -0,0 +1,18 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.ingest.simulate({ + id: "query_helper_pipeline", + docs: [ + { + _source: { + content: + "artificial intelligence in medicine articles published in the last 12 months", + }, + }, + ], +}); +console.log(response); +---- diff --git a/docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc b/docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc new file mode 100644 index 000000000..3d34dce97 --- /dev/null +++ b/docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc @@ -0,0 +1,32 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.ingest.putPipeline({ + id: "query_helper_pipeline", + processors: [ + { + script: { + source: + "ctx.prompt = 'Please generate an elasticsearch search query on index `articles_index` for the following natural language query. Dates are in the field `@timestamp`, document types are in the field `type` (options are `news`, `publication`), categories in the field `category` and can be multiple (options are `medicine`, `pharmaceuticals`, `technology`), and document names are in the field `title` which should use a fuzzy match. Ignore fields which cannot be determined from the natural language query context: ' + ctx.content", + }, + }, + { + inference: { + model_id: "openai_chat_completions", + input_output: { + input_field: "prompt", + output_field: "query", + }, + }, + }, + { + remove: { + field: "prompt", + }, + }, + ], +}); +console.log(response); +---- diff --git a/docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc b/docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc new file mode 100644 index 000000000..fac02d172 --- /dev/null +++ b/docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc @@ -0,0 +1,24 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.indices.create({ + index: "test-index", + query: { + semantic: { + field: "my_semantic_field", + }, + }, + highlight: { + fields: { + my_semantic_field: { + type: "semantic", + number_of_fragments: 2, + order: "score", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index ddbff0a0b..4b7dae886 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -531,7 +531,24 @@ client.getSource({ id, index }) [discrete] === health_report -Returns the health of the cluster. +Get the cluster health. +Get a report with the health status of an Elasticsearch cluster. +The report contains a list of indicators that compose Elasticsearch functionality. + +Each indicator has a health status of: green, unknown, yellow or red. +The indicator will provide an explanation and metadata describing the reason for its current health status. + +The cluster’s status is controlled by the worst indicator status. + +In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. +Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. + +Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. +The root cause and remediation steps are encapsulated in a diagnosis. +A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. + +NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. +When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. {ref}/health-api.html[Endpoint documentation] [source,ts] @@ -825,7 +842,7 @@ If `true`, the point in time will contain all the shards that are available at t [discrete] === ping Ping the cluster. -Returns whether the cluster is running. +Get information about whether the cluster is running. {ref}/index.html[Endpoint documentation] [source,ts] @@ -2658,7 +2675,11 @@ client.ccr.unfollow({ index }) === cluster [discrete] ==== allocation_explain -Provides explanations for shard allocations in the cluster. +Explain the shard allocations. +Get explanations for shard allocations in the cluster. +For unassigned shards, it provides an explanation for why the shard is unassigned. +For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. +This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. {ref}/cluster-allocation-explain.html[Endpoint documentation] [source,ts] @@ -2701,7 +2722,8 @@ If no response is received before the timeout expires, the request fails and ret [discrete] ==== delete_voting_config_exclusions -Clears cluster voting config exclusions. +Clear cluster voting config exclusions. +Remove master-eligible nodes from the voting configuration exclusion list. {ref}/voting-config-exclusions.html[Endpoint documentation] [source,ts] @@ -2769,7 +2791,7 @@ If no response is received before the timeout expires, the request fails and ret [discrete] ==== get_settings -Returns cluster-wide settings. +Get cluster-wide settings. By default, it returns only settings that have been explicitly defined. {ref}/cluster-get-settings.html[Endpoint documentation] @@ -2791,8 +2813,16 @@ If no response is received before the timeout expires, the request fails and ret [discrete] ==== health -The cluster health API returns a simple status on the health of the cluster. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices. -The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status. +Get the cluster health status. +You can also use the API to get the health status of only specified data streams and indices. +For data streams, the API retrieves the health status of the stream’s backing indices. + +The cluster health status is: green, yellow or red. +On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. +The index level status is controlled by the worst shard status. + +One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. +The cluster status is controlled by the worst index status. {ref}/cluster-health.html[Endpoint documentation] [source,ts] @@ -2836,9 +2866,11 @@ client.cluster.info({ target }) [discrete] ==== pending_tasks -Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed. +Get the pending cluster tasks. +Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. + NOTE: This API returns a list of any pending updates to the cluster state. -These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. +These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. {ref}/cluster-pending.html[Endpoint documentation] @@ -2858,7 +2890,24 @@ If no response is received before the timeout expires, the request fails and ret [discrete] ==== post_voting_config_exclusions -Updates the cluster voting config exclusions by node ids or node names. +Update voting configuration exclusions. +Update the cluster voting config exclusions by node IDs or node names. +By default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks. +If you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually. +The API adds an entry for each specified node to the cluster’s voting configuration exclusions list. +It then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes. + +Clusters should have no voting configuration exclusions in normal operation. +Once the excluded nodes have stopped, clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`. +This API waits for the nodes to be fully removed from the cluster before it returns. +If your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the voting configuration exclusions without waiting for the nodes to leave the cluster. + +A response to `POST /_cluster/voting_config_exclusions` with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`. +If the call to `POST /_cluster/voting_config_exclusions` fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration. +In that case, you may safely retry the call. + +NOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period. +They are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes. {ref}/voting-config-exclusions.html[Endpoint documentation] [source,ts] @@ -2929,7 +2978,24 @@ If no response is received before the timeout expires, the request fails and ret [discrete] ==== put_settings -Updates the cluster settings. +Update the cluster settings. +Configure and update dynamic settings on a running cluster. +You can also configure dynamic settings locally on an unstarted or shut down node in `elasticsearch.yml`. + +Updates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart. +You can also reset transient or persistent settings by assigning them a null value. + +If you configure the same setting using multiple methods, Elasticsearch applies the settings in following order of precedence: 1) Transient setting; 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting value. +For example, you can apply a transient setting to override a persistent setting or `elasticsearch.yml` setting. +However, a change to an `elasticsearch.yml` setting will not override a defined transient or persistent setting. + +TIP: In Elastic Cloud, use the user settings feature to configure all cluster settings. This method automatically rejects unsafe settings that could break your cluster. +If you run Elasticsearch on your own hardware, use this API to configure dynamic cluster settings. +Only use `elasticsearch.yml` for static cluster settings and node settings. +The API doesn’t require a restart and ensures a setting’s value is the same on all nodes. + +WARNING: Transient cluster settings are no longer recommended. Use persistent cluster settings instead. +If a cluster becomes unstable, transient settings can clear unexpectedly, resulting in a potentially undesired cluster configuration. {ref}/cluster-update-settings.html[Endpoint documentation] [source,ts] @@ -2949,9 +3015,9 @@ client.cluster.putSettings({ ... }) [discrete] ==== remote_info -The cluster remote info API allows you to retrieve all of the configured -remote cluster information. It returns connection and endpoint information -keyed by the configured remote cluster alias. +Get remote cluster information. +Get all of the configured remote cluster information. +This API returns connection and endpoint information keyed by the configured remote cluster alias. {ref}/cluster-remote-info.html[Endpoint documentation] [source,ts] @@ -2962,7 +3028,20 @@ client.cluster.remoteInfo() [discrete] ==== reroute -Allows to manually change the allocation of individual shards in the cluster. +Reroute the cluster. +Manually change the allocation of individual shards in the cluster. +For example, a shard can be moved from one node to another explicitly, an allocation can be canceled, and an unassigned shard can be explicitly allocated to a specific node. + +It is important to note that after processing any reroute commands Elasticsearch will perform rebalancing as normal (respecting the values of settings such as `cluster.routing.rebalance.enable`) in order to remain in a balanced state. +For example, if the requested allocation includes moving a shard from node1 to node2 then this may cause a shard to be moved from node2 back to node1 to even things out. + +The cluster can be set to disable allocations using the `cluster.routing.allocation.enable` setting. +If allocations are disabled then the only allocations that will be performed are explicit ones given using the reroute command, and consequent allocations due to rebalancing. + +The cluster will attempt to allocate a shard a maximum of `index.allocation.max_retries` times in a row (defaults to `5`), before giving up and leaving the shard unallocated. +This scenario can be caused by structural problems such as having an analyzer which refers to a stopwords file which doesn’t exist on all nodes. + +Once the problem has been corrected, allocation can be manually retried by calling the reroute API with the `?retry_failed` URI query parameter, which will attempt a single retry round for these shards. {ref}/cluster-reroute.html[Endpoint documentation] [source,ts] @@ -2975,8 +3054,9 @@ client.cluster.reroute({ ... }) * *Request (object):* ** *`commands` (Optional, { cancel, move, allocate_replica, allocate_stale_primary, allocate_empty_primary }[])*: Defines the commands to perform. -** *`dry_run` (Optional, boolean)*: If true, then the request simulates the operation only and returns the resulting state. -** *`explain` (Optional, boolean)*: If true, then the response contains an explanation of why the commands can or cannot be executed. +** *`dry_run` (Optional, boolean)*: If true, then the request simulates the operation. +It will calculate the result of applying the commands to the current cluster state and return the resulting cluster state after the commands (and rebalancing) have been applied; it will not actually perform the requested changes. +** *`explain` (Optional, boolean)*: If true, then the response contains an explanation of why the commands can or cannot run. ** *`metric` (Optional, string | string[])*: Limits the information returned to the specified metrics. ** *`retry_failed` (Optional, boolean)*: If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures. ** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. @@ -2984,7 +3064,25 @@ client.cluster.reroute({ ... }) [discrete] ==== state -Returns a comprehensive information about the state of the cluster. +Get the cluster state. +Get comprehensive information about the state of the cluster. + +The cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster. + +The elected master node ensures that every node in the cluster has a copy of the same cluster state. +This API lets you retrieve a representation of this internal state for debugging or diagnostic purposes. +You may need to consult the Elasticsearch source code to determine the precise meaning of the response. + +By default the API will route requests to the elected master node since this node is the authoritative source of cluster states. +You can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter. + +Elasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data. +If you use this API repeatedly, your cluster may become unstable. + +WARNING: The response is a representation of an internal data structure. +Its format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version. +Do not query this API using external monitoring tools. +Instead, obtain the information you require using other more stable cluster APIs. {ref}/cluster-state.html[Endpoint documentation] [source,ts] @@ -3009,8 +3107,8 @@ client.cluster.state({ ... }) [discrete] ==== stats -Returns cluster statistics. -It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). +Get cluster statistics. +Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). {ref}/cluster-stats.html[Endpoint documentation] [source,ts] @@ -8487,7 +8585,8 @@ client.monitoring.bulk({ system_id, system_api_version, interval }) === nodes [discrete] ==== clear_repositories_metering_archive -You can use this API to clear the archived repositories metering information in the cluster. +Clear the archived repositories metering. +Clear the archived repositories metering information in the cluster. {ref}/clear-repositories-metering-archive-api.html[Endpoint documentation] [source,ts] @@ -8505,10 +8604,10 @@ All the nodes selective options are explained [here](https://www.elastic.co/guid [discrete] ==== get_repositories_metering_info -You can use the cluster repositories metering API to retrieve repositories metering information in a cluster. -This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the -information needed to compute aggregations over a period of time. Additionally, the information exposed by this -API is volatile, meaning that it won’t be present after node restarts. +Get cluster repositories metering. +Get repositories metering information for a cluster. +This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. +Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. {ref}/get-repositories-metering-api.html[Endpoint documentation] [source,ts] @@ -8525,8 +8624,9 @@ All the nodes selective options are explained [here](https://www.elastic.co/guid [discrete] ==== hot_threads -This API yields a breakdown of the hot threads on each selected node in the cluster. -The output is plain text with a breakdown of each node’s top hot threads. +Get the hot threads for nodes. +Get a breakdown of the hot threads on each selected node in the cluster. +The output is plain text with a breakdown of the top hot threads for each node. {ref}/cluster-nodes-hot-threads.html[Endpoint documentation] [source,ts] @@ -8554,7 +8654,8 @@ before the timeout expires, the request fails and returns an error. [discrete] ==== info -Returns cluster nodes information. +Get node information. +By default, the API returns all attributes and core settings for cluster nodes. {ref}/cluster-nodes-info.html[Endpoint documentation] [source,ts] @@ -8574,7 +8675,15 @@ client.nodes.info({ ... }) [discrete] ==== reload_secure_settings -Reloads the keystore on nodes in the cluster. +Reload the keystore on nodes in the cluster. + +Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable. +That is, you can change them on disk and reload them without restarting any nodes in the cluster. +When you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node. + +When the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings. +Reloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted. +Alternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password. {ref}/secure-settings.html[Endpoint documentation] [source,ts] @@ -8593,7 +8702,9 @@ If no response is received before the timeout expires, the request fails and ret [discrete] ==== stats -Returns cluster nodes statistics. +Get node statistics. +Get statistics for nodes in a cluster. +By default, all stats are returned. You can limit the returned information by using metrics. {ref}/cluster-nodes-stats.html[Endpoint documentation] [source,ts] @@ -8621,7 +8732,7 @@ client.nodes.stats({ ... }) [discrete] ==== usage -Returns information on the usage of features. +Get feature usage information. {ref}/cluster-nodes-usage.html[Endpoint documentation] [source,ts] diff --git a/src/api/api/cluster.ts b/src/api/api/cluster.ts index da9f656c7..75bdb4107 100644 --- a/src/api/api/cluster.ts +++ b/src/api/api/cluster.ts @@ -44,7 +44,7 @@ export default class Cluster { } /** - * Provides explanations for shard allocations in the cluster. + * Explain the shard allocations. Get explanations for shard allocations in the cluster. For unassigned shards, it provides an explanation for why the shard is unassigned. For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html | Elasticsearch API documentation} */ async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -110,7 +110,7 @@ export default class Cluster { } /** - * Clears cluster voting config exclusions. + * Clear cluster voting config exclusions. Remove master-eligible nodes from the voting configuration exclusion list. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html | Elasticsearch API documentation} */ async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -212,7 +212,7 @@ export default class Cluster { } /** - * Returns cluster-wide settings. By default, it returns only settings that have been explicitly defined. + * Get cluster-wide settings. By default, it returns only settings that have been explicitly defined. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html | Elasticsearch API documentation} */ async getSettings (this: That, params?: T.ClusterGetSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -242,7 +242,7 @@ export default class Cluster { } /** - * The cluster health API returns a simple status on the health of the cluster. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices. The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status. + * Get the cluster health status. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices. The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. The index level status is controlled by the worst shard status. One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. The cluster status is controlled by the worst index status. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html | Elasticsearch API documentation} */ async health (this: That, params?: T.ClusterHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -314,7 +314,7 @@ export default class Cluster { } /** - * Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed. NOTE: This API returns a list of any pending updates to the cluster state. These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. + * Get the pending cluster tasks. Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. NOTE: This API returns a list of any pending updates to the cluster state. These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html | Elasticsearch API documentation} */ async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -344,7 +344,7 @@ export default class Cluster { } /** - * Updates the cluster voting config exclusions by node ids or node names. + * Update voting configuration exclusions. Update the cluster voting config exclusions by node IDs or node names. By default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks. If you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually. The API adds an entry for each specified node to the cluster’s voting configuration exclusions list. It then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes. Clusters should have no voting configuration exclusions in normal operation. Once the excluded nodes have stopped, clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`. This API waits for the nodes to be fully removed from the cluster before it returns. If your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the voting configuration exclusions without waiting for the nodes to leave the cluster. A response to `POST /_cluster/voting_config_exclusions` with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`. If the call to `POST /_cluster/voting_config_exclusions` fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration. In that case, you may safely retry the call. NOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period. They are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html | Elasticsearch API documentation} */ async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -410,7 +410,7 @@ export default class Cluster { } /** - * Updates the cluster settings. + * Update the cluster settings. Configure and update dynamic settings on a running cluster. You can also configure dynamic settings locally on an unstarted or shut down node in `elasticsearch.yml`. Updates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart. You can also reset transient or persistent settings by assigning them a null value. If you configure the same setting using multiple methods, Elasticsearch applies the settings in following order of precedence: 1) Transient setting; 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting value. For example, you can apply a transient setting to override a persistent setting or `elasticsearch.yml` setting. However, a change to an `elasticsearch.yml` setting will not override a defined transient or persistent setting. TIP: In Elastic Cloud, use the user settings feature to configure all cluster settings. This method automatically rejects unsafe settings that could break your cluster. If you run Elasticsearch on your own hardware, use this API to configure dynamic cluster settings. Only use `elasticsearch.yml` for static cluster settings and node settings. The API doesn’t require a restart and ensures a setting’s value is the same on all nodes. WARNING: Transient cluster settings are no longer recommended. Use persistent cluster settings instead. If a cluster becomes unstable, transient settings can clear unexpectedly, resulting in a potentially undesired cluster configuration. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html | Elasticsearch API documentation} */ async putSettings (this: That, params?: T.ClusterPutSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -444,7 +444,7 @@ export default class Cluster { } /** - * The cluster remote info API allows you to retrieve all of the configured remote cluster information. It returns connection and endpoint information keyed by the configured remote cluster alias. + * Get remote cluster information. Get all of the configured remote cluster information. This API returns connection and endpoint information keyed by the configured remote cluster alias. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html | Elasticsearch API documentation} */ async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -474,7 +474,7 @@ export default class Cluster { } /** - * Allows to manually change the allocation of individual shards in the cluster. + * Reroute the cluster. Manually change the allocation of individual shards in the cluster. For example, a shard can be moved from one node to another explicitly, an allocation can be canceled, and an unassigned shard can be explicitly allocated to a specific node. It is important to note that after processing any reroute commands Elasticsearch will perform rebalancing as normal (respecting the values of settings such as `cluster.routing.rebalance.enable`) in order to remain in a balanced state. For example, if the requested allocation includes moving a shard from node1 to node2 then this may cause a shard to be moved from node2 back to node1 to even things out. The cluster can be set to disable allocations using the `cluster.routing.allocation.enable` setting. If allocations are disabled then the only allocations that will be performed are explicit ones given using the reroute command, and consequent allocations due to rebalancing. The cluster will attempt to allocate a shard a maximum of `index.allocation.max_retries` times in a row (defaults to `5`), before giving up and leaving the shard unallocated. This scenario can be caused by structural problems such as having an analyzer which refers to a stopwords file which doesn’t exist on all nodes. Once the problem has been corrected, allocation can be manually retried by calling the reroute API with the `?retry_failed` URI query parameter, which will attempt a single retry round for these shards. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html | Elasticsearch API documentation} */ async reroute (this: That, params?: T.ClusterRerouteRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -508,7 +508,7 @@ export default class Cluster { } /** - * Returns a comprehensive information about the state of the cluster. + * Get the cluster state. Get comprehensive information about the state of the cluster. The cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster. The elected master node ensures that every node in the cluster has a copy of the same cluster state. This API lets you retrieve a representation of this internal state for debugging or diagnostic purposes. You may need to consult the Elasticsearch source code to determine the precise meaning of the response. By default the API will route requests to the elected master node since this node is the authoritative source of cluster states. You can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter. Elasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data. If you use this API repeatedly, your cluster may become unstable. WARNING: The response is a representation of an internal data structure. Its format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version. Do not query this API using external monitoring tools. Instead, obtain the information you require using other more stable cluster APIs. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html | Elasticsearch API documentation} */ async state (this: That, params?: T.ClusterStateRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -552,7 +552,7 @@ export default class Cluster { } /** - * Returns cluster statistics. It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). + * Get cluster statistics. Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins). * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html | Elasticsearch API documentation} */ async stats (this: That, params?: T.ClusterStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise diff --git a/src/api/api/health_report.ts b/src/api/api/health_report.ts index 0539d0727..f3b76edd0 100644 --- a/src/api/api/health_report.ts +++ b/src/api/api/health_report.ts @@ -38,7 +38,7 @@ import * as T from '../types' interface That { transport: Transport } /** - * Returns the health of the cluster. + * Get the cluster health. Get a report with the health status of an Elasticsearch cluster. The report contains a list of indicators that compose Elasticsearch functionality. Each indicator has a health status of: green, unknown, yellow or red. The indicator will provide an explanation and metadata describing the reason for its current health status. The cluster’s status is controlled by the worst indicator status. In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. The root cause and remediation steps are encapsulated in a diagnosis. A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/health-api.html | Elasticsearch API documentation} */ export default async function HealthReportApi (this: That, params?: T.HealthReportRequest, options?: TransportRequestOptionsWithOutMeta): Promise diff --git a/src/api/api/nodes.ts b/src/api/api/nodes.ts index 3f6a51e20..3cb956ad5 100644 --- a/src/api/api/nodes.ts +++ b/src/api/api/nodes.ts @@ -44,7 +44,7 @@ export default class Nodes { } /** - * You can use this API to clear the archived repositories metering information in the cluster. + * Clear the archived repositories metering. Clear the archived repositories metering information in the cluster. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-repositories-metering-archive-api.html | Elasticsearch API documentation} */ async clearRepositoriesMeteringArchive (this: That, params: T.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -77,7 +77,7 @@ export default class Nodes { } /** - * You can use the cluster repositories metering API to retrieve repositories metering information in a cluster. This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the information needed to compute aggregations over a period of time. Additionally, the information exposed by this API is volatile, meaning that it won’t be present after node restarts. + * Get cluster repositories metering. Get repositories metering information for a cluster. This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time. Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-repositories-metering-api.html | Elasticsearch API documentation} */ async getRepositoriesMeteringInfo (this: That, params: T.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -109,7 +109,7 @@ export default class Nodes { } /** - * This API yields a breakdown of the hot threads on each selected node in the cluster. The output is plain text with a breakdown of each node’s top hot threads. + * Get the hot threads for nodes. Get a breakdown of the hot threads on each selected node in the cluster. The output is plain text with a breakdown of the top hot threads for each node. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html | Elasticsearch API documentation} */ async hotThreads (this: That, params?: T.NodesHotThreadsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -149,7 +149,7 @@ export default class Nodes { } /** - * Returns cluster nodes information. + * Get node information. By default, the API returns all attributes and core settings for cluster nodes. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html | Elasticsearch API documentation} */ async info (this: That, params?: T.NodesInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -196,7 +196,7 @@ export default class Nodes { } /** - * Reloads the keystore on nodes in the cluster. + * Reload the keystore on nodes in the cluster. Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable. That is, you can change them on disk and reload them without restarting any nodes in the cluster. When you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node. When the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings. Reloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted. Alternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings | Elasticsearch API documentation} */ async reloadSecureSettings (this: That, params?: T.NodesReloadSecureSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -240,7 +240,7 @@ export default class Nodes { } /** - * Returns cluster nodes statistics. + * Get node statistics. Get statistics for nodes in a cluster. By default, all stats are returned. You can limit the returned information by using metrics. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html | Elasticsearch API documentation} */ async stats (this: That, params?: T.NodesStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise @@ -294,7 +294,7 @@ export default class Nodes { } /** - * Returns information on the usage of features. + * Get feature usage information. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html | Elasticsearch API documentation} */ async usage (this: That, params?: T.NodesUsageRequest, options?: TransportRequestOptionsWithOutMeta): Promise diff --git a/src/api/api/ping.ts b/src/api/api/ping.ts index 8552b1b58..c9a086011 100644 --- a/src/api/api/ping.ts +++ b/src/api/api/ping.ts @@ -38,7 +38,7 @@ import * as T from '../types' interface That { transport: Transport } /** - * Ping the cluster. Returns whether the cluster is running. + * Ping the cluster. Get information about whether the cluster is running. * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html | Elasticsearch API documentation} */ export default async function PingApi (this: That, params?: T.PingRequest, options?: TransportRequestOptionsWithOutMeta): Promise