NAME
OpenSearch::Client::Core::3_0::Direct::Cluster
VERSION
version 3.007002
SYNOPSIS
use OpenSearch::Client;
my $client = OpenSearch::Client->new( ... );
my $response = $client->cluster-><methodname>(
valone => $value1,
valtwo => $value2
);
DESCRIPTION
Cluster APIs
The cluster APIs allow you to manage your cluster. You can use them to check cluster health, modify settings, retrieve statistics, and more.
See OpenSearch documentation for cluster.
METHODS
cluster->allocation_explain
Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.
Paths served by this method:
$resp = $client->cluster->allocation_explain(
'body' => $body, # optional
# Endpoint specific query string parameters
'include_disk_info' => $qval1, # boolean
'include_yes_decisions' => $qval2, # boolean
# Common API query string parameters
'error_trace' => $qval3, # boolean
'filter_path' => $qval4, # list
'human' => $qval5, # boolean
'pretty' => $qval6, # boolean
'source' => $qval7, # string
);
OpenSearch documentation for cluster.allocation_explain
cluster->delete_component_template
Deletes a component template.
Paths served by this method:
$resp = $client->cluster->delete_component_template(
# path parameters
'name' => $name, # required
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'master_timeout' => $qval2, # string
'timeout' => $qval3, # string
# Common API query string parameters
'error_trace' => $qval4, # boolean
'filter_path' => $qval5, # list
'human' => $qval6, # boolean
'pretty' => $qval7, # boolean
'source' => $qval8, # string
);
OpenSearch documentation for cluster.delete_component_template
cluster->delete_decommission_awareness
Recommissions a decommissioned zone.
Paths served by this method:
$resp = $client->cluster->delete_decommission_awareness(
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for cluster.delete_decommission_awareness
cluster->delete_voting_config_exclusions
Clears any cluster voting configuration exclusions.
Paths served by this method:
$resp = $client->cluster->delete_voting_config_exclusions(
# Endpoint specific query string parameters
'wait_for_removal' => $qval1, # boolean
# Common API query string parameters
'error_trace' => $qval2, # boolean
'filter_path' => $qval3, # list
'human' => $qval4, # boolean
'pretty' => $qval5, # boolean
'source' => $qval6, # string
);
OpenSearch documentation for cluster.delete_voting_config_exclusions
cluster->delete_weighted_routing
Delete weighted shard routing weights.
Paths served by this method:
$resp = $client->cluster->delete_weighted_routing(
'body' => $body, # optional
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for cluster.delete_weighted_routing
cluster->exists_component_template
Returns information about whether a particular component template exist.
Paths served by this method:
$resp = $client->cluster->exists_component_template(
# path parameters
'name' => $name, # required
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'local' => $qval2, # boolean
'master_timeout' => $qval3, # string
# Common API query string parameters
'error_trace' => $qval4, # boolean
'filter_path' => $qval5, # list
'human' => $qval6, # boolean
'pretty' => $qval7, # boolean
'source' => $qval8, # string
);
OpenSearch documentation for cluster.exists_component_template
cluster->get_component_template
Returns one or more component templates.
Paths served by this method:
$resp = $client->cluster->get_component_template(
# path parameters
'name' => $name, # optional
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'flat_settings' => $qval2, # boolean
'local' => $qval3, # boolean
'master_timeout' => $qval4, # string
# Common API query string parameters
'error_trace' => $qval5, # boolean
'filter_path' => $qval6, # list
'human' => $qval7, # boolean
'pretty' => $qval8, # boolean
'source' => $qval9, # string
);
OpenSearch documentation for cluster.get_component_template
cluster->get_decommission_awareness
Retrieves the decommission status for all zones.
Paths served by this method:
$resp = $client->cluster->get_decommission_awareness(
# path parameters
'awareness_attribute_name' => $awareness_attribute_name, # required
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for cluster.get_decommission_awareness
cluster->get_settings
Returns cluster settings.
Paths served by this method:
$resp = $client->cluster->get_settings(
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'flat_settings' => $qval2, # boolean
'include_defaults' => $qval3, # boolean
'master_timeout' => $qval4, # string
'timeout' => $qval5, # string
# Common API query string parameters
'error_trace' => $qval6, # boolean
'filter_path' => $qval7, # list
'human' => $qval8, # boolean
'pretty' => $qval9, # boolean
'source' => $qval10, # string
);
OpenSearch documentation for cluster.get_settings
cluster->get_weighted_routing
Fetches weighted shard routing weights.
Paths served by this method:
$resp = $client->cluster->get_weighted_routing(
# path parameters
'attribute' => $attribute, # required
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for cluster.get_weighted_routing
cluster->health
Returns basic information about the health of the cluster.
Paths served by this method:
$resp = $client->cluster->health(
# path parameters
'index' => $index, # optional
# Endpoint specific query string parameters
'awareness_attribute' => $qval1, # string
'cluster_manager_timeout' => $qval2, # string
'expand_wildcards' => $qval3, # list
'level' => $qval4, # string
'local' => $qval5, # boolean
'master_timeout' => $qval6, # string
'timeout' => $qval7, # string
'wait_for_active_shards' => $qval8, # string
'wait_for_events' => $qval9, # string
'wait_for_no_initializing_shards' => $qval10, # boolean
'wait_for_no_relocating_shards' => $qval11, # boolean
'wait_for_nodes' => $qval12, # number|string
'wait_for_status' => $qval13, # string
# Common API query string parameters
'error_trace' => $qval14, # boolean
'filter_path' => $qval15, # list
'human' => $qval16, # boolean
'pretty' => $qval17, # boolean
'source' => $qval18, # string
);
OpenSearch documentation for cluster.health
cluster->pending_tasks
Returns a list of pending cluster-level tasks, such as index creation, mapping updates, or new allocations.
Paths served by this method:
$resp = $client->cluster->pending_tasks(
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'local' => $qval2, # boolean
'master_timeout' => $qval3, # string
# Common API query string parameters
'error_trace' => $qval4, # boolean
'filter_path' => $qval5, # list
'human' => $qval6, # boolean
'pretty' => $qval7, # boolean
'source' => $qval8, # string
);
OpenSearch documentation for cluster.pending_tasks
cluster->post_voting_config_exclusions
Updates the cluster voting configuration by excluding certain node IDs or names.
Paths served by this method:
$resp = $client->cluster->post_voting_config_exclusions(
# Endpoint specific query string parameters
'node_ids' => $qval1, # list
'node_names' => $qval2, # list
'timeout' => $qval3, # string
# Common API query string parameters
'error_trace' => $qval4, # boolean
'filter_path' => $qval5, # list
'human' => $qval6, # boolean
'pretty' => $qval7, # boolean
'source' => $qval8, # string
);
OpenSearch documentation for cluster.post_voting_config_exclusions
cluster->put_component_template
Creates or updates a component template.
Paths served by this method:
$resp = $client->cluster->put_component_template(
'body' => $body, # required
# path parameters
'name' => $name, # required
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'create' => $qval2, # boolean
'master_timeout' => $qval3, # string
'timeout' => $qval4, # string
# Common API query string parameters
'error_trace' => $qval5, # boolean
'filter_path' => $qval6, # list
'human' => $qval7, # boolean
'pretty' => $qval8, # boolean
'source' => $qval9, # string
);
OpenSearch documentation for cluster.put_component_template
cluster->put_decommission_awareness
Decommissions a cluster zone based on awareness. This can greatly benefit multi-zone deployments, where awareness attributes can aid in applying new upgrades to a cluster in a controlled fashion.
Paths served by this method:
$resp = $client->cluster->put_decommission_awareness(
# path parameters
'awareness_attribute_name' => $awareness_attribute_name, # required
'awareness_attribute_value' => $awareness_attribute_value, # required
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for cluster.put_decommission_awareness
cluster->put_settings
Updates the cluster settings.
Paths served by this method:
$resp = $client->cluster->put_settings(
'body' => $body, # optional
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'flat_settings' => $qval2, # boolean
'master_timeout' => $qval3, # string
'timeout' => $qval4, # string
# Common API query string parameters
'error_trace' => $qval5, # boolean
'filter_path' => $qval6, # list
'human' => $qval7, # boolean
'pretty' => $qval8, # boolean
'source' => $qval9, # string
);
OpenSearch documentation for cluster.put_settings
cluster->put_weighted_routing
Updates weighted shard routing weights.
Paths served by this method:
$resp = $client->cluster->put_weighted_routing(
'body' => $body, # optional
# path parameters
'attribute' => $attribute, # required
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for cluster.put_weighted_routing
cluster->remote_info
Returns the information about configured remote clusters.
Paths served by this method:
$resp = $client->cluster->remote_info(
# Common API query string parameters
'error_trace' => $qval1, # boolean
'filter_path' => $qval2, # list
'human' => $qval3, # boolean
'pretty' => $qval4, # boolean
'source' => $qval5, # string
);
OpenSearch documentation for cluster.remote_info
cluster->reroute
Allows to manually change the allocation of individual shards in the cluster.
Paths served by this method:
$resp = $client->cluster->reroute(
'body' => $body, # optional
# Endpoint specific query string parameters
'cluster_manager_timeout' => $qval1, # string
'dry_run' => $qval2, # boolean
'explain' => $qval3, # boolean
'master_timeout' => $qval4, # string
'metric' => $qval5, # list
'retry_failed' => $qval6, # boolean
'timeout' => $qval7, # string
# Common API query string parameters
'error_trace' => $qval8, # boolean
'filter_path' => $qval9, # list
'human' => $qval10, # boolean
'pretty' => $qval11, # boolean
'source' => $qval12, # string
);
OpenSearch documentation for cluster.reroute
cluster->state
Returns comprehensive information about the state of the cluster.
Paths served by this method:
$resp = $client->cluster->state(
# path parameters
'index' => $index, # optional
'metric' => $metric, # optional
# Endpoint specific query string parameters
'allow_no_indices' => $qval1, # boolean
'cluster_manager_timeout' => $qval2, # string
'expand_wildcards' => $qval3, # list
'flat_settings' => $qval4, # boolean
'ignore_unavailable' => $qval5, # boolean
'local' => $qval6, # boolean
'master_timeout' => $qval7, # string
'wait_for_metadata_version' => $qval8, # number
'wait_for_timeout' => $qval9, # string
# Common API query string parameters
'error_trace' => $qval10, # boolean
'filter_path' => $qval11, # list
'human' => $qval12, # boolean
'pretty' => $qval13, # boolean
'source' => $qval14, # string
);
OpenSearch documentation for cluster.state
cluster->stats
Returns a high-level overview of cluster statistics.
Paths served by this method:
GET /_cluster/statsGET /_cluster/stats/nodes/{node_id}GET /_cluster/stats/{metric}/nodes/{node_id}GET /_cluster/stats/{metric}/{index_metric}/nodes/{node_id}
$resp = $client->cluster->stats(
# path parameters
'index_metric' => $index_metric, # optional
'metric' => $metric, # optional
'node_id' => $node_id, # optional
# Endpoint specific query string parameters
'flat_settings' => $qval1, # boolean
'timeout' => $qval2, # string
# Common API query string parameters
'error_trace' => $qval3, # boolean
'filter_path' => $qval4, # list
'human' => $qval5, # boolean
'pretty' => $qval6, # boolean
'source' => $qval7, # string
);
OpenSearch documentation for cluster.stats
MANUAL
Documentation index OpenSearch::Client::Manual
HISTORY
This distribution is derived from Search::Elasticsearch version 7.714. All subsequent changes are unique to this distribution.
AUTHOR
Mark Dootson <mdootson@cpan.org> ( current maintainer )
CREDITS
OpenSearch::Client is based on Search::Elasticsearch version 7.714 by Enrico Zimuel <enrico.zimuel@elastic.co>.
COPYRIGHT AND LICENSE
Copyright (C) 2026 by Mark Dootson ( this distribution )
Copyright (C) 2021 by Elasticsearch BV ( original distribution )
This is free software, licensed under:
The Apache License, Version 2.0, January 2004