Methods
(static) ClusterApi#allocationExplain(params, options, callback) → {Object|Promise.<never>|*}
The most basic cluster allocation explain request finds an unassigned shard and explains why it can’t be allocated to a node. If you add some options, you can instead get information on a specific shard, including why OpenSearch assigned it to its current node.
See Also:
OpenSearch - Cluster allocation explain
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
include_yes_decisions |
boolean
|
<optional>
|
false
|
OpenSearch makes a series of yes or no decisions when trying to allocate a shard to a node. If this parameter is true, OpenSearch includes the (generally more numerous) “yes” decisions in its response. |
include_disk_info |
boolean
|
<optional>
|
false
|
Whether to include information about disk usage in the response. |
body |
Object
|
<optional>
|
|
Properties
Name |
Type |
Attributes |
Description |
current_node |
string
|
<optional>
|
If you only want an explanation if the shard happens to be on a particular node, specify that node name here. |
index |
string
|
<optional>
|
The name of the shard’s index. |
primary |
boolean
|
<optional>
|
Whether to provide an explanation for the primary shard (true) or its first replica (false), which share the same shard ID. |
shard |
number
|
<optional>
|
The shard ID that you want an explanation for. |
|
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#deleteComponentTemplate(params, options, callback) → {Object|Promise.<never>|*}
Delete Component Template(s)
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Description |
name |
string
|
<optional>
|
The name of the component template to be deleted. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#deleteVotingConfigExclusions(params, options, callback) → {Object|Promise.<never>|*}
Clears cluster voting config exclusions.
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Description |
wait_for_removal |
boolean
|
<optional>
|
Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#existsComponentTemplate(params, options, callback) → {Object|Promise.<never>|*}
Information about whether a particular component template exist
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Description |
name |
boolean
|
<optional>
|
Name of the template |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#getComponentTemplate(params, options, callback) → {Object|Promise.<never>|*}
Returns one or more component templates
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Description |
name |
string
|
Array.<string>
|
<optional>
|
Name(s) of the template(s) |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#getSettings(params, options, callback) → {Object|Promise.<never>|*}
Parameters:
Name |
Type |
Description |
params |
Object
|
ç
Properties
Name |
Type |
Attributes |
Default |
Description |
include_defaults |
boolean
|
<optional>
|
|
Whether to include default settings as part of the response. This parameter is useful for identifying the names and current values of settings you want to update. |
cluster_manager_timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a connection to the cluster manager node. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#health(params, options, callback) → {Object|Promise.<never>|*}
The most basic cluster health request returns a simple status of the health of your cluster. OpenSearch expresses cluster health in three colors: green, yellow, and red. A green status means all primary shards and their replicas are allocated to nodes. A yellow status means all primary shards are allocated to nodes, but some replicas aren’t. A red status means at least one primary shard is not allocated to any node.
See Also:
OpenSearch - Cluster Health
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
index |
|
<optional>
|
|
To get the status of a specific index, provide the index name. |
expand_wildcards |
string
|
<optional>
|
open
|
Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. |
level |
string
|
<optional>
|
cluster
|
The level of detail for returned health information. Supported values are 'cluster', 'indices', and 'shards'. |
local |
boolean
|
<optional>
|
false
|
Whether to return information from the local node only instead of from the cluster manager node. |
cluster_manager_timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a connection to the cluster manager node. |
timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a response from the cluster. |
wait_for_active_shards |
string
|
<optional>
|
0
|
Wait until the specified number of shards is active before returning a response. 'all' for all shards |
wait_for_nodes |
string
|
<optional>
|
|
Wait for N number of nodes. Use 12 for exact match, >12 and <12 for range. |
wait_for_events |
string
|
<optional>
|
|
Wait until all currently queued events with the given priority are processed. Supported values are 'immediate', 'urgent', 'high', 'normal', 'low', and 'languid'. |
wait_for_no_relocating_shards |
boolean
|
<optional>
|
false
|
Whether to wait until there are no relocating shards in the cluster. |
wait_for_no_initializing_shards |
boolean
|
<optional>
|
false
|
Whether to wait until there are no initializing shards in the cluster. |
wait_for_status |
string
|
<optional>
|
|
Wait until the cluster health reaches the specified status or better. Supported values are 'green', 'yellow', and 'red'. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#pendingTasks(params, options, callback) → {Object|Promise.<never>|*}
Get a list of any cluster-level changes
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
local |
boolean
|
<optional>
|
false
|
Whether to return information from the local node only instead of from the cluster manager node. |
cluster_manager_timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a connection to the cluster manager node. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#postVotingConfigExclusions(params, options, callback) → {Object|Promise.<never>|*}
Updates the cluster voting config exclusions by node ids or node names.
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Description |
node_names |
string
|
<optional>
|
A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify node_names. |
node_ids |
string
|
<optional>
|
A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify node_ids. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#putComponentTemplate(params, options, callback) → {Object|Promise.<never>|*}
Creates or updates a component template
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
name |
string
|
|
|
The name of the component template. |
body |
object
|
|
|
The template definition. |
cluster_manager_timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a connection to the cluster manager node. |
create |
boolean
|
<optional>
|
false
|
Whether the index template should only be added if new or can also replace an existing one. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#putSettings(params, options, callback) → {Object|Promise.<never>|*}
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
flat_settings |
boolean
|
<optional>
|
|
Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. |
cluster_manager_timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a connection to the cluster manager node. |
timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a response from the cluster. |
body |
object
|
|
|
The settings to be updated. Can be either 'transient' or 'persistent' (survives cluster restart). |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#remoteInfo(params, options, callback) → {Object|Promise.<never>|*}
This operation provides connection information for any remote OpenSearch clusters that you’ve configured for the local cluster, such as the remote cluster alias, connection mode (sniff or proxy), IP addresses for seed nodes, and timeout settings.
See Also:
OpenSearch - Remote cluster information
Parameters:
Name |
Type |
Description |
params |
Object
|
(Unused) |
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#reroute(params, options, callback) → {Object|Promise.<never>|*}
Allows to manually change the allocation of individual shards in the cluster.
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Description |
body |
object
|
<optional>
|
The definition of 'commands' to perform ('move', 'cancel', 'allocate') |
dry_run |
boolean
|
<optional>
|
Simulate the operation only and return the resulting state |
explain |
boolean
|
<optional>
|
Return an explanation of why the commands can or cannot be executed |
retry_failed |
boolean
|
<optional>
|
Retries allocation of shards that are blocked due to too many subsequent allocation failures |
metric |
string
|
Array.<string>
|
<optional>
|
Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table, cluster_manager_node, version) |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#state(params, options, callback) → {Object|Promise.<never>|*}
Get comprehensive information about the state of the cluster.
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
metric |
string
|
Array.<string>
|
<optional>
|
|
Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table, cluster_manager_node, version). |
index |
string
|
Array.<string>
|
<optional>
|
|
List of index names; use '_all' or empty string to perform the operation on all indices. |
local |
boolean
|
<optional>
|
false
|
Whether to return information from the local node only instead of from the cluster manager node. |
cluster_manager_timeout |
string
|
<optional>
|
30s
|
The amount of time to wait for a connection to the cluster manager node. |
flat_settings |
boolean
|
<optional>
|
false
|
Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. |
wait_for_metadata_version |
number
|
<optional>
|
|
Wait for the metadata version to be equal or greater than the specified metadata version. |
wait_for_timeout |
string
|
<optional>
|
30s
|
The maximum time to wait for wait_for_metadata_version before timing out |
ignore_unavailable |
boolean
|
<optional>
|
|
Whether specified concrete indices should be ignored when unavailable (missing or closed) |
allow_no_indices |
boolean
|
<optional>
|
|
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) |
expand_wildcards |
string
|
<optional>
|
open
|
Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. Default is 'open'. |
|
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) ClusterApi#stats(params, optionsopt, callbackopt) → {Object|Promise.<never>|*}
The CAT aliases operation lists the mapping of aliases to indices, plus routing and filtering information.
See Also:
OpenSearch - Cluster stats
Parameters:
Name |
Type |
Attributes |
Description |
params |
Object
|
|
Properties
Name |
Type |
Attributes |
Description |
node_id |
string
|
Array.<string>
|
<optional>
|
A comma-separated list of node IDs or names to limit the returned information; use '_local' to return information from the node you're connecting to, leave empty to get information from all nodes. |
|
options |
Object
|
<optional>
|
Options for Transport#request |
callback |
function
|
<optional>
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) infoApi(params, options, callback) → {Object|Promise.<never>|*}
Returns basic information about the cluster.
Parameters:
Name |
Type |
Description |
params |
Object
|
(Unused) |
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*
(static) pingApi(params, options, callback) → {Object|Promise.<never>|*}
Returns whether the cluster is running.
Parameters:
Name |
Type |
Description |
params |
Object
|
(Unused) |
options |
Object
|
Options for Transport#request |
callback |
function
|
Callback that handles errors and response |
- Source:
Returns:
-
Type
-
Object
|
Promise.<never>
|
*