1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * Copyright OpenSearch Contributors
7: * SPDX-License-Identifier: Apache-2.0
8: *
9: * OpenSearch PHP client
10: *
11: * @link https://github.com/opensearch-project/opensearch-php/
12: * @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co)
13: * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
14: * @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1
15: *
16: * Licensed to Elasticsearch B.V under one or more agreements.
17: * Elasticsearch B.V licenses this file to you under the Apache 2.0 License or
18: * the GNU Lesser General Public License, Version 2.1, at your option.
19: * See the LICENSE file in the project root for more information.
20: */
21:
22: namespace OpenSearch\Namespaces;
23:
24: use OpenSearch\Endpoints\Cat\Aliases;
25: use OpenSearch\Endpoints\Cat\AllPitSegments;
26: use OpenSearch\Endpoints\Cat\Allocation;
27: use OpenSearch\Endpoints\Cat\ClusterManager;
28: use OpenSearch\Endpoints\Cat\Count;
29: use OpenSearch\Endpoints\Cat\Fielddata;
30: use OpenSearch\Endpoints\Cat\Health;
31: use OpenSearch\Endpoints\Cat\Help;
32: use OpenSearch\Endpoints\Cat\Indices;
33: use OpenSearch\Endpoints\Cat\Master;
34: use OpenSearch\Endpoints\Cat\NodeAttrs;
35: use OpenSearch\Endpoints\Cat\Nodes;
36: use OpenSearch\Endpoints\Cat\PendingTasks;
37: use OpenSearch\Endpoints\Cat\PitSegments;
38: use OpenSearch\Endpoints\Cat\Plugins;
39: use OpenSearch\Endpoints\Cat\Recovery;
40: use OpenSearch\Endpoints\Cat\Repositories;
41: use OpenSearch\Endpoints\Cat\SegmentReplication;
42: use OpenSearch\Endpoints\Cat\Segments;
43: use OpenSearch\Endpoints\Cat\Shards;
44: use OpenSearch\Endpoints\Cat\Snapshots;
45: use OpenSearch\Endpoints\Cat\Tasks;
46: use OpenSearch\Endpoints\Cat\Templates;
47: use OpenSearch\Endpoints\Cat\ThreadPool;
48:
49: /**
50: * Class CatNamespace
51: *
52: * NOTE: This file is autogenerated using util/GenerateEndpoints.php
53: */
54: class CatNamespace extends AbstractNamespace
55: {
56: /**
57: * Shows information about aliases currently configured to indexes, including filter and routing information.
58: *
59: * $params['name'] = (array)
60: * $params['expand_wildcards'] = (any)
61: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
62: * $params['h'] = (array) A comma-separated list of column names to display.
63: * $params['help'] = (boolean) Returns help information. (Default = false)
64: * $params['local'] = (boolean) Whether to return information from the local node only instead of from the cluster manager node. (Default = false)
65: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
66: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
67: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
68: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
69: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
70: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
71: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
72: *
73: * @param array $params Associative array of parameters
74: * @return array
75: */
76: public function aliases(array $params = [])
77: {
78: $name = $this->extractArgument($params, 'name');
79:
80: $endpoint = $this->endpointFactory->getEndpoint(Aliases::class);
81: $endpoint->setParams($params);
82: $endpoint->setName($name);
83:
84: return $this->performRequest($endpoint);
85: }
86:
87: /**
88: * Lists all active CAT point-in-time segments.
89: *
90: * $params['bytes'] = (any) The units used to display byte values.
91: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
92: * $params['h'] = (array) A comma-separated list of column names to display.
93: * $params['help'] = (boolean) Returns help information. (Default = false)
94: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
95: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
96: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
97: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
98: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
99: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
100: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
101: *
102: * @param array $params Associative array of parameters
103: * @return array
104: */
105: public function allPitSegments(array $params = [])
106: {
107: $endpoint = $this->endpointFactory->getEndpoint(AllPitSegments::class);
108: $endpoint->setParams($params);
109:
110: return $this->performRequest($endpoint);
111: }
112:
113: /**
114: * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
115: *
116: * $params['node_id'] = (array) A comma-separated list of node IDs or names used to limit the returned information.
117: * $params['bytes'] = (any) The units used to display byte values.
118: * $params['cluster_manager_timeout'] = (string) A timeout for connection to the cluster manager node.
119: * $params['format'] = (string) A short version of the HTTP `Accept` header, such as `json` or `yaml`.
120: * $params['h'] = (array) A comma-separated list of column names to display.
121: * $params['help'] = (boolean) Returns help information. (Default = false)
122: * $params['local'] = (boolean) Returns local information but does not retrieve the state from cluster-manager node. (Default = false)
123: * $params['master_timeout'] = (string) A timeout for connection to the cluster manager node.
124: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
125: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
126: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
127: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
128: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
129: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
130: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
131: *
132: * @param array $params Associative array of parameters
133: * @return array
134: */
135: public function allocation(array $params = [])
136: {
137: $node_id = $this->extractArgument($params, 'node_id');
138:
139: $endpoint = $this->endpointFactory->getEndpoint(Allocation::class);
140: $endpoint->setParams($params);
141: $endpoint->setNodeId($node_id);
142:
143: return $this->performRequest($endpoint);
144: }
145:
146: /**
147: * Returns information about the cluster-manager node.
148: *
149: * $params['cluster_manager_timeout'] = (string) A timeout for connection to the cluster manager node.
150: * $params['format'] = (string) A short version of the HTTP `Accept` header, such as `json` or `yaml`.
151: * $params['h'] = (array) A comma-separated list of column names to display.
152: * $params['help'] = (boolean) Returns help information. (Default = false)
153: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
154: * $params['master_timeout'] = (string) A timeout for connection to the cluster manager node.
155: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
156: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
157: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
158: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
159: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
160: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
161: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
162: *
163: * @param array $params Associative array of parameters
164: * @return array
165: */
166: public function clusterManager(array $params = [])
167: {
168: $endpoint = $this->endpointFactory->getEndpoint(ClusterManager::class);
169: $endpoint->setParams($params);
170:
171: return $this->performRequest($endpoint);
172: }
173:
174: /**
175: * Provides quick access to the document count of the entire cluster or of an individual index.
176: *
177: * $params['index'] = (array) Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
178: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
179: * $params['h'] = (array) A comma-separated list of column names to display.
180: * $params['help'] = (boolean) Returns help information. (Default = false)
181: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
182: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
183: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
184: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
185: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
186: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
187: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
188: *
189: * @param array $params Associative array of parameters
190: * @return array
191: */
192: public function count(array $params = [])
193: {
194: $index = $this->extractArgument($params, 'index');
195:
196: $endpoint = $this->endpointFactory->getEndpoint(Count::class);
197: $endpoint->setParams($params);
198: $endpoint->setIndex($index);
199:
200: return $this->performRequest($endpoint);
201: }
202:
203: /**
204: * Shows how much heap memory is currently being used by field data on every data node in the cluster.
205: *
206: * $params['fields'] = (array) A comma-separated list of fields used to limit the amount of returned information. To retrieve all fields, omit this parameter.
207: * $params['bytes'] = (any) The units used to display byte values.
208: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
209: * $params['h'] = (array) A comma-separated list of column names to display.
210: * $params['help'] = (boolean) Returns help information. (Default = false)
211: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
212: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
213: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
214: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
215: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
216: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
217: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
218: *
219: * @param array $params Associative array of parameters
220: * @return array
221: */
222: public function fielddata(array $params = [])
223: {
224: $fields = $this->extractArgument($params, 'fields');
225:
226: $endpoint = $this->endpointFactory->getEndpoint(Fielddata::class);
227: $endpoint->setParams($params);
228: $endpoint->setFields($fields);
229:
230: return $this->performRequest($endpoint);
231: }
232:
233: /**
234: * Returns a concise representation of the cluster health.
235: *
236: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
237: * $params['h'] = (array) A comma-separated list of column names to display.
238: * $params['help'] = (boolean) Returns help information. (Default = false)
239: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
240: * $params['time'] = (any) The unit used to display time values.
241: * $params['ts'] = (boolean) When `true`, returns `HH:MM:SS` and Unix epoch timestamps. (Default = true)
242: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
243: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
244: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
245: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
246: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
247: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
248: *
249: * @param array $params Associative array of parameters
250: * @return array
251: */
252: public function health(array $params = [])
253: {
254: $endpoint = $this->endpointFactory->getEndpoint(Health::class);
255: $endpoint->setParams($params);
256:
257: return $this->performRequest($endpoint);
258: }
259:
260: /**
261: * Returns help for the Cat APIs.
262: *
263: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
264: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
265: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
266: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
267: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
268: *
269: * @param array $params Associative array of parameters
270: * @return array
271: */
272: public function help(array $params = [])
273: {
274: $endpoint = $this->endpointFactory->getEndpoint(Help::class);
275: $endpoint->setParams($params);
276:
277: return $this->performRequest($endpoint);
278: }
279:
280: /**
281: * Lists information related to indexes, that is, how much disk space they are using, how many shards they have, their health status, and so on.
282: *
283: * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
284: * $params['bytes'] = (any) The units used to display byte values.
285: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
286: * $params['expand_wildcards'] = (any)
287: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
288: * $params['h'] = (array) A comma-separated list of column names to display.
289: * $params['health'] = (any) Limits indexes based on their health status. Supported values are `green`, `yellow`, and `red`.
290: * $params['help'] = (boolean) Returns help information. (Default = false)
291: * $params['include_unloaded_segments'] = (boolean) Whether to include information from segments not loaded into memory. (Default = false)
292: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
293: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
294: * $params['pri'] = (boolean) When `true`, returns information only from the primary shards. (Default = false)
295: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
296: * $params['time'] = (any) Specifies the time units.
297: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
298: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
299: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
300: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
301: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
302: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
303: *
304: * @param array $params Associative array of parameters
305: * @return array
306: */
307: public function indices(array $params = [])
308: {
309: $index = $this->extractArgument($params, 'index');
310:
311: $endpoint = $this->endpointFactory->getEndpoint(Indices::class);
312: $endpoint->setParams($params);
313: $endpoint->setIndex($index);
314:
315: return $this->performRequest($endpoint);
316: }
317:
318: /**
319: * Returns information about the cluster-manager node.
320: *
321: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
322: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
323: * $params['h'] = (array) A comma-separated list of column names to display.
324: * $params['help'] = (boolean) Returns help information. (Default = false)
325: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
326: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
327: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
328: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
329: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
330: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
331: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
332: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
333: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
334: *
335: * @param array $params Associative array of parameters
336: * @return array
337: */
338: public function master(array $params = [])
339: {
340: $endpoint = $this->endpointFactory->getEndpoint(Master::class);
341: $endpoint->setParams($params);
342:
343: return $this->performRequest($endpoint);
344: }
345:
346: /**
347: * Returns information about custom node attributes.
348: *
349: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
350: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
351: * $params['h'] = (array) A comma-separated list of column names to display.
352: * $params['help'] = (boolean) Returns help information. (Default = false)
353: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
354: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
355: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
356: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
357: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
358: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
359: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
360: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
361: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
362: *
363: * @param array $params Associative array of parameters
364: * @return array
365: */
366: public function nodeattrs(array $params = [])
367: {
368: $endpoint = $this->endpointFactory->getEndpoint(NodeAttrs::class);
369: $endpoint->setParams($params);
370:
371: return $this->performRequest($endpoint);
372: }
373:
374: /**
375: * Returns basic statistics about the performance of cluster nodes.
376: *
377: * $params['bytes'] = (any) The units used to display byte values.
378: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
379: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
380: * $params['full_id'] = (any) When `true`, returns the full node ID. When `false`, returns the shortened node ID.
381: * $params['h'] = (array) A comma-separated list of column names to display.
382: * $params['help'] = (boolean) Returns help information. (Default = false)
383: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
384: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
385: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
386: * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/).
387: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
388: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
389: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
390: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
391: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
392: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
393: *
394: * @param array $params Associative array of parameters
395: * @return array
396: */
397: public function nodes(array $params = [])
398: {
399: $endpoint = $this->endpointFactory->getEndpoint(Nodes::class);
400: $endpoint->setParams($params);
401:
402: return $this->performRequest($endpoint);
403: }
404:
405: /**
406: * Returns a concise representation of the cluster's pending tasks.
407: *
408: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
409: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
410: * $params['h'] = (array) A comma-separated list of column names to display.
411: * $params['help'] = (boolean) Returns help information. (Default = false)
412: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
413: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
414: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
415: * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/).
416: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
417: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
418: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
419: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
420: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
421: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
422: *
423: * @param array $params Associative array of parameters
424: * @return array
425: */
426: public function pendingTasks(array $params = [])
427: {
428: $endpoint = $this->endpointFactory->getEndpoint(PendingTasks::class);
429: $endpoint->setParams($params);
430:
431: return $this->performRequest($endpoint);
432: }
433:
434: /**
435: * Lists one or several CAT point-in-time segments.
436: *
437: * $params['bytes'] = (any) The units used to display byte values.
438: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
439: * $params['h'] = (array) A comma-separated list of column names to display.
440: * $params['help'] = (boolean) Returns help information. (Default = false)
441: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
442: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
443: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
444: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
445: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
446: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
447: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
448: *
449: * @param array $params Associative array of parameters
450: * @return array
451: */
452: public function pitSegments(array $params = [])
453: {
454: $body = $this->extractArgument($params, 'body');
455:
456: $endpoint = $this->endpointFactory->getEndpoint(PitSegments::class);
457: $endpoint->setParams($params);
458: $endpoint->setBody($body);
459:
460: return $this->performRequest($endpoint);
461: }
462:
463: /**
464: * Returns information about the names, components, and versions of the installed plugins.
465: *
466: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
467: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
468: * $params['h'] = (array) A comma-separated list of column names to display.
469: * $params['help'] = (boolean) Returns help information. (Default = false)
470: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
471: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
472: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
473: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
474: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
475: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
476: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
477: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
478: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
479: *
480: * @param array $params Associative array of parameters
481: * @return array
482: */
483: public function plugins(array $params = [])
484: {
485: $endpoint = $this->endpointFactory->getEndpoint(Plugins::class);
486: $endpoint->setParams($params);
487:
488: return $this->performRequest($endpoint);
489: }
490:
491: /**
492: * Returns all completed and ongoing index and shard recoveries.
493: *
494: * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
495: * $params['active_only'] = (boolean) If `true`, the response only includes ongoing shard recoveries. (Default = false)
496: * $params['bytes'] = (any) The units used to display byte values.
497: * $params['detailed'] = (boolean) When `true`, includes detailed information about shard recoveries. (Default = false)
498: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
499: * $params['h'] = (array) A comma-separated list of column names to display.
500: * $params['help'] = (boolean) Returns help information. (Default = false)
501: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
502: * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/).
503: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
504: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
505: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
506: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
507: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
508: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
509: *
510: * @param array $params Associative array of parameters
511: * @return array
512: */
513: public function recovery(array $params = [])
514: {
515: $index = $this->extractArgument($params, 'index');
516:
517: $endpoint = $this->endpointFactory->getEndpoint(Recovery::class);
518: $endpoint->setParams($params);
519: $endpoint->setIndex($index);
520:
521: return $this->performRequest($endpoint);
522: }
523:
524: /**
525: * Returns information about all snapshot repositories for a cluster.
526: *
527: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
528: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
529: * $params['h'] = (array) A comma-separated list of column names to display.
530: * $params['help'] = (boolean) Returns help information. (Default = false)
531: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
532: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
533: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
534: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
535: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
536: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
537: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
538: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
539: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
540: *
541: * @param array $params Associative array of parameters
542: * @return array
543: */
544: public function repositories(array $params = [])
545: {
546: $endpoint = $this->endpointFactory->getEndpoint(Repositories::class);
547: $endpoint->setParams($params);
548:
549: return $this->performRequest($endpoint);
550: }
551:
552: /**
553: * Returns information about active and last-completed segment replication events on each replica shard, including related shard-level metrics. These metrics provide information about how far behind the primary shard the replicas are lagging.
554: *
555: * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
556: * $params['active_only'] = (boolean) When `true`, the response only includes ongoing segment replication events. (Default = false)
557: * $params['allow_no_indices'] = (boolean) Whether to ignore the index if a wildcard index expression resolves to no concrete indexes. This includes the `_all` string or when no indexes have been specified.
558: * $params['bytes'] = (any) The units used to display byte values.
559: * $params['completed_only'] = (boolean) When `true`, the response only includes the last-completed segment replication events. (Default = false)
560: * $params['detailed'] = (boolean) When `true`, the response includes additional metrics for each stage of a segment replication event. (Default = false)
561: * $params['expand_wildcards'] = (any)
562: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
563: * $params['h'] = (array) A comma-separated list of column names to display.
564: * $params['help'] = (boolean) Returns help information. (Default = false)
565: * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded, or aliased indexes should be ignored when throttled.
566: * $params['ignore_unavailable'] = (boolean) Whether the specified concrete indexes should be ignored when missing or closed.
567: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
568: * $params['shards'] = (array) A comma-separated list of shards to display.
569: * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/).
570: * $params['timeout'] = (string) The operation timeout.
571: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
572: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
573: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
574: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
575: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
576: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
577: *
578: * @param array $params Associative array of parameters
579: * @return array
580: */
581: public function segmentReplication(array $params = [])
582: {
583: $index = $this->extractArgument($params, 'index');
584:
585: $endpoint = $this->endpointFactory->getEndpoint(SegmentReplication::class);
586: $endpoint->setParams($params);
587: $endpoint->setIndex($index);
588:
589: return $this->performRequest($endpoint);
590: }
591:
592: /**
593: * Provides low-level information about the segments in the shards of an index.
594: *
595: * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
596: * $params['bytes'] = (any) The units used to display byte values.
597: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
598: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
599: * $params['h'] = (array) A comma-separated list of column names to display.
600: * $params['help'] = (boolean) Returns help information. (Default = false)
601: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
602: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
603: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
604: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
605: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
606: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
607: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
608: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
609: *
610: * @param array $params Associative array of parameters
611: * @return array
612: */
613: public function segments(array $params = [])
614: {
615: $index = $this->extractArgument($params, 'index');
616:
617: $endpoint = $this->endpointFactory->getEndpoint(Segments::class);
618: $endpoint->setParams($params);
619: $endpoint->setIndex($index);
620:
621: return $this->performRequest($endpoint);
622: }
623:
624: /**
625: * Lists the states of all primary and replica shards and how they are distributed.
626: *
627: * $params['index'] = (array)
628: * $params['bytes'] = (any) The units used to display byte values.
629: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
630: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
631: * $params['h'] = (array) A comma-separated list of column names to display.
632: * $params['help'] = (boolean) Returns help information. (Default = false)
633: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
634: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
635: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
636: * $params['time'] = (any)
637: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
638: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
639: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
640: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
641: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
642: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
643: *
644: * @param array $params Associative array of parameters
645: * @return array
646: */
647: public function shards(array $params = [])
648: {
649: $index = $this->extractArgument($params, 'index');
650:
651: $endpoint = $this->endpointFactory->getEndpoint(Shards::class);
652: $endpoint->setParams($params);
653: $endpoint->setIndex($index);
654:
655: return $this->performRequest($endpoint);
656: }
657:
658: /**
659: * Lists all of the snapshots stored in a specific repository.
660: *
661: * $params['repository'] = (array) A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, OpenSearch returns an error.
662: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
663: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
664: * $params['h'] = (array) A comma-separated list of column names to display.
665: * $params['help'] = (boolean) Returns help information. (Default = false)
666: * $params['ignore_unavailable'] = (boolean) When `true`, the response does not include information from unavailable snapshots. (Default = false)
667: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
668: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
669: * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/).
670: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
671: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
672: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
673: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
674: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
675: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
676: *
677: * @param array $params Associative array of parameters
678: * @return array
679: */
680: public function snapshots(array $params = [])
681: {
682: $repository = $this->extractArgument($params, 'repository');
683:
684: $endpoint = $this->endpointFactory->getEndpoint(Snapshots::class);
685: $endpoint->setParams($params);
686: $endpoint->setRepository($repository);
687:
688: return $this->performRequest($endpoint);
689: }
690:
691: /**
692: * Lists the progress of all tasks currently running on the cluster.
693: *
694: * $params['actions'] = (array) The task action names used to limit the response.
695: * $params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries. (Default = false)
696: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
697: * $params['h'] = (array) A comma-separated list of column names to display.
698: * $params['help'] = (boolean) Returns help information. (Default = false)
699: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
700: * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/).
701: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
702: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
703: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
704: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
705: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
706: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
707: * $params['node_id'] = (array) A comma-separated list of node IDs or names used to limit the returned information. Use `_local` to return information from the node to which you're connecting, specify a specific node from which to get information, or keep the parameter empty to get information from all nodes.
708: * $params['parent_task'] = (string) The parent task identifier, which is used to limit the response.
709: *
710: * @param array $params Associative array of parameters
711: * @return array
712: */
713: public function tasks(array $params = [])
714: {
715: $endpoint = $this->endpointFactory->getEndpoint(Tasks::class);
716: $endpoint->setParams($params);
717:
718: return $this->performRequest($endpoint);
719: }
720:
721: /**
722: * Lists the names, patterns, order numbers, and version numbers of index templates.
723: *
724: * $params['name'] = (string) The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned.
725: * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
726: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
727: * $params['h'] = (array) A comma-separated list of column names to display.
728: * $params['help'] = (boolean) Returns help information. (Default = false)
729: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
730: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
731: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
732: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
733: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
734: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
735: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
736: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
737: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
738: *
739: * @param array $params Associative array of parameters
740: * @return array
741: */
742: public function templates(array $params = [])
743: {
744: $name = $this->extractArgument($params, 'name');
745:
746: $endpoint = $this->endpointFactory->getEndpoint(Templates::class);
747: $endpoint->setParams($params);
748: $endpoint->setName($name);
749:
750: return $this->performRequest($endpoint);
751: }
752:
753: /**
754: * Returns cluster-wide thread pool statistics per node.By default the active, queued, and rejected statistics are returned for all thread pools.
755: *
756: * $params['thread_pool_patterns'] = (array) A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions.
757: * $params['cluster_manager_timeout'] = (string) A timeout for connection to the cluster manager node.
758: * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`.
759: * $params['h'] = (array) A comma-separated list of column names to display.
760: * $params['help'] = (boolean) Returns help information. (Default = false)
761: * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false)
762: * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node.
763: * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by.
764: * $params['size'] = (integer) The multiplier in which to display values.
765: * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false)
766: * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false)
767: * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true)
768: * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false)
769: * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
770: * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
771: *
772: * @param array $params Associative array of parameters
773: * @return array
774: */
775: public function threadPool(array $params = [])
776: {
777: $thread_pool_patterns = $this->extractArgument($params, 'thread_pool_patterns');
778:
779: $endpoint = $this->endpointFactory->getEndpoint(ThreadPool::class);
780: $endpoint->setParams($params);
781: $endpoint->setThreadPoolPatterns($thread_pool_patterns);
782:
783: return $this->performRequest($endpoint);
784: }
785:
786: }
787: