From 3f8d4a0767d1255efea76fe7a6d525b9748b543c Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 6 Jan 2025 03:39:31 +0000 Subject: [PATCH] Updated opensearch-php to reflect the latest OpenSearch API spec (2025-01-06) Signed-off-by: GitHub --- CHANGELOG.md | 1 + src/OpenSearch/Client.php | 3 +- .../Cluster/GetComponentTemplate.php | 1 + src/OpenSearch/Endpoints/Indices/Upgrade.php | 10 - src/OpenSearch/Endpoints/Ml/GetConnector.php | 47 ++- src/OpenSearch/Endpoints/Ml/Predict.php | 67 +++- .../Endpoints/Ml/SearchConnectors.php | 55 +++ .../Endpoints/Ml/SearchModelGroup.php | 55 +++ src/OpenSearch/Endpoints/Ml/Train.php | 72 ++++ src/OpenSearch/Endpoints/Ml/TrainPredict.php | 72 ++++ .../Endpoints/Ml/UpdateConnector.php | 72 ++++ .../Endpoints/Ml/UpdateModelGroup.php | 56 ++- src/OpenSearch/Namespaces/CatNamespace.php | 342 +++++++++--------- .../Namespaces/ClusterNamespace.php | 1 + .../Namespaces/IndicesNamespace.php | 4 +- src/OpenSearch/Namespaces/MlNamespace.php | 124 +++++++ 16 files changed, 741 insertions(+), 241 deletions(-) create mode 100644 src/OpenSearch/Endpoints/Ml/SearchConnectors.php create mode 100644 src/OpenSearch/Endpoints/Ml/SearchModelGroup.php create mode 100644 src/OpenSearch/Endpoints/Ml/Train.php create mode 100644 src/OpenSearch/Endpoints/Ml/TrainPredict.php create mode 100644 src/OpenSearch/Endpoints/Ml/UpdateConnector.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d9587c..986ed646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fixed PHP 8.4 deprecations ### Updated APIs +- Updated opensearch-php APIs to reflect [opensearch-api-specification@97ab829](https://github.com/opensearch-project/opensearch-api-specification/commit/97ab82950a46e493aea935198826077e9f873315) - Updated opensearch-php APIs to reflect [opensearch-api-specification@ebe0f8a](https://github.com/opensearch-project/opensearch-api-specification/commit/ebe0f8a885f7db7e882d160c101055a5aa70a707) - Updated opensearch-php APIs to reflect [opensearch-api-specification@398481e](https://github.com/opensearch-project/opensearch-api-specification/commit/398481e5bd1cc590d947c35379c47096f2114f00) - Updated opensearch-php APIs to reflect [opensearch-api-specification@6bb1fed](https://github.com/opensearch-project/opensearch-api-specification/commit/6bb1fed0a2c7cf094a5ecfdb01f0306a4b9f8eba) diff --git a/src/OpenSearch/Client.php b/src/OpenSearch/Client.php index 580fe032..8f3b465b 100644 --- a/src/OpenSearch/Client.php +++ b/src/OpenSearch/Client.php @@ -1314,7 +1314,7 @@ public function reindex(array $params = []) } /** - * Changes the number of requests per second for a particular Reindex operation. + * Changes the number of requests per second for a particular reindex operation. * * $params['task_id'] = (string) Identifier for the task. (Required) * $params['requests_per_second'] = (number) The throttle for this request in sub-requests per second. @@ -1400,7 +1400,6 @@ public function scriptsPainlessExecute(array $params = []) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * $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 "-". - * $params['body'] = (array) The scroll ID if not passed by URL or query parameter. * * @param array $params Associative array of parameters * @return array diff --git a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php index 0d490517..2c2f79b7 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php @@ -43,6 +43,7 @@ public function getParamWhitelist(): array { return [ 'cluster_manager_timeout', + 'flat_settings', 'local', 'master_timeout', 'pretty', diff --git a/src/OpenSearch/Endpoints/Indices/Upgrade.php b/src/OpenSearch/Endpoints/Indices/Upgrade.php index 239c1e4b..3d6ae289 100644 --- a/src/OpenSearch/Endpoints/Indices/Upgrade.php +++ b/src/OpenSearch/Endpoints/Indices/Upgrade.php @@ -57,14 +57,4 @@ public function getMethod(): string { return 'POST'; } - - public function setBody($body): static - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } } diff --git a/src/OpenSearch/Endpoints/Ml/GetConnector.php b/src/OpenSearch/Endpoints/Ml/GetConnector.php index 9a612a63..47f75e0f 100644 --- a/src/OpenSearch/Endpoints/Ml/GetConnector.php +++ b/src/OpenSearch/Endpoints/Ml/GetConnector.php @@ -16,36 +16,45 @@ use OpenSearch\Common\Exceptions\RuntimeException; use OpenSearch\Endpoints\AbstractEndpoint; +/** + * NOTE: This file is autogenerated using util/GenerateEndpoints.php + */ class GetConnector extends AbstractEndpoint { - /** - * @return string[] - */ - public function getParamWhitelist(): array - { - return []; - } + protected $connector_id; - /** - * @return string - */ public function getURI(): string { - if ($this->id) { - return "/_plugins/_ml/connectors/$this->id"; + $connector_id = $this->connector_id ?? null; + if (isset($connector_id)) { + return "/_plugins/_ml/connectors/$connector_id"; } + throw new RuntimeException('Missing parameter for the endpoint ml.get_connector'); + } - throw new RuntimeException( - 'id is required for get' - ); - + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; } - /** - * @return string - */ public function getMethod(): string { return 'GET'; } + + public function setConnectorId($connector_id): static + { + if (isset($connector_id) !== true) { + return $this; + } + $this->connector_id = $connector_id; + + return $this; + } } diff --git a/src/OpenSearch/Endpoints/Ml/Predict.php b/src/OpenSearch/Endpoints/Ml/Predict.php index 034905f5..a003a407 100644 --- a/src/OpenSearch/Endpoints/Ml/Predict.php +++ b/src/OpenSearch/Endpoints/Ml/Predict.php @@ -16,36 +16,67 @@ use OpenSearch\Common\Exceptions\RuntimeException; use OpenSearch\Endpoints\AbstractEndpoint; +/** + * NOTE: This file is autogenerated using util/GenerateEndpoints.php + */ class Predict extends AbstractEndpoint { - /** - * @return string[] - */ + protected $algorithm_name; + protected $model_id; + + public function getURI(): string + { + $algorithm_name = $this->algorithm_name ?? null; + $model_id = $this->model_id ?? null; + if (isset($algorithm_name) && isset($model_id)) { + return "/_plugins/_ml/_predict/$algorithm_name/$model_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.predict'); + } + public function getParamWhitelist(): array { - return []; + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; } - /** - * @return string - */ - public function getURI(): string + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): static { - if ($this->id) { - return "/_plugins/_ml/models/$this->id/_predict"; + if (isset($body) !== true) { + return $this; } + $this->body = $body; - throw new RuntimeException( - 'id is required for predict' - ); + return $this; + } + public function setAlgorithmName($algorithm_name): static + { + if (isset($algorithm_name) !== true) { + return $this; + } + $this->algorithm_name = $algorithm_name; + + return $this; } - /** - * @return string - */ - public function getMethod(): string + public function setModelId($model_id): static { - return 'POST'; + if (isset($model_id) !== true) { + return $this; + } + $this->model_id = $model_id; + + return $this; } } diff --git a/src/OpenSearch/Endpoints/Ml/SearchConnectors.php b/src/OpenSearch/Endpoints/Ml/SearchConnectors.php new file mode 100644 index 00000000..32e13c9f --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/SearchConnectors.php @@ -0,0 +1,55 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): static + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/SearchModelGroup.php b/src/OpenSearch/Endpoints/Ml/SearchModelGroup.php new file mode 100644 index 00000000..c9806cf7 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/SearchModelGroup.php @@ -0,0 +1,55 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): static + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/Train.php b/src/OpenSearch/Endpoints/Ml/Train.php new file mode 100644 index 00000000..59c1d5b8 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/Train.php @@ -0,0 +1,72 @@ +algorithm_name ?? null; + if (isset($algorithm_name)) { + return "/_plugins/_ml/_train/$algorithm_name"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.train'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): static + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setAlgorithmName($algorithm_name): static + { + if (isset($algorithm_name) !== true) { + return $this; + } + $this->algorithm_name = $algorithm_name; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/TrainPredict.php b/src/OpenSearch/Endpoints/Ml/TrainPredict.php new file mode 100644 index 00000000..338db2b2 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/TrainPredict.php @@ -0,0 +1,72 @@ +algorithm_name ?? null; + if (isset($algorithm_name)) { + return "/_plugins/_ml/_train_predict/$algorithm_name"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.train_predict'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): static + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setAlgorithmName($algorithm_name): static + { + if (isset($algorithm_name) !== true) { + return $this; + } + $this->algorithm_name = $algorithm_name; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/UpdateConnector.php b/src/OpenSearch/Endpoints/Ml/UpdateConnector.php new file mode 100644 index 00000000..2042bd53 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/UpdateConnector.php @@ -0,0 +1,72 @@ +connector_id ?? null; + if (isset($connector_id)) { + return "/_plugins/_ml/connectors/$connector_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.update_connector'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): static + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setConnectorId($connector_id): static + { + if (isset($connector_id) !== true) { + return $this; + } + $this->connector_id = $connector_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php b/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php index 48d3809c..2b8ac29c 100644 --- a/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php @@ -16,35 +16,55 @@ use OpenSearch\Common\Exceptions\RuntimeException; use OpenSearch\Endpoints\AbstractEndpoint; +/** + * NOTE: This file is autogenerated using util/GenerateEndpoints.php + */ class UpdateModelGroup extends AbstractEndpoint { - /** - * @return string[] - */ - public function getParamWhitelist(): array - { - return []; - } + protected $model_group_id; - /** - * @return string - */ public function getURI(): string { - if ($this->id) { - return "/_plugins/_ml/model_groups/$this->id"; + $model_group_id = $this->model_group_id ?? null; + if (isset($model_group_id)) { + return "/_plugins/_ml/model_groups/$model_group_id"; } + throw new RuntimeException('Missing parameter for the endpoint ml.update_model_group'); + } - throw new RuntimeException( - 'id is required for update' - ); + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; } - /** - * @return string - */ public function getMethod(): string { return 'PUT'; } + + public function setBody($body): static + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setModelGroupId($model_group_id): static + { + if (isset($model_group_id) !== true) { + return $this; + } + $this->model_group_id = $model_group_id; + + return $this; + } } diff --git a/src/OpenSearch/Namespaces/CatNamespace.php b/src/OpenSearch/Namespaces/CatNamespace.php index 1911ce8d..d8c43097 100644 --- a/src/OpenSearch/Namespaces/CatNamespace.php +++ b/src/OpenSearch/Namespaces/CatNamespace.php @@ -31,7 +31,7 @@ class CatNamespace extends AbstractNamespace { /** - * Shows information about currently configured aliases to indexes including filter and routing info. + * Shows information about aliases currently configured to indexes, including filter and routing information. * * $params['name'] = (array) A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. * $params['expand_wildcards'] = (any) Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. @@ -62,14 +62,14 @@ public function aliases(array $params = []) } /** - * Lists all active point-in-time segments. + * Lists all active CAT point-in-time segments. * - * $params['bytes'] = (enum) The unit in which to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -127,7 +127,7 @@ public function allocation(array $params = []) * $params['format'] = (string) A short version of the HTTP `Accept` header, such as `json` or `yaml`. * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) * $params['master_timeout'] = (string) A timeout for connection to the cluster manager node. * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) @@ -149,14 +149,14 @@ public function clusterManager(array $params = []) } /** - * Provides quick access to the document count of the entire cluster, or individual indexes. + * Provides quick access to the document count of the entire cluster or of an individual index. * * $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`. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -180,13 +180,13 @@ public function count(array $params = []) /** * Shows how much heap memory is currently being used by field data on every data node in the cluster. * - * $params['fields'] = (array) Comma-separated list of fields used to limit returned information. To retrieve all fields, omit this parameter. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['fields'] = (array) A comma-separated list of fields used to limit the amount of returned information. To retrieve all fields, omit this parameter. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -210,13 +210,13 @@ public function fielddata(array $params = []) /** * Returns a concise representation of the cluster health. * - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. * $params['time'] = (enum) The unit used to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['ts'] = (boolean) If `true`, returns `HH:MM:SS` and Unix epoch timestamps. (Default = true) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['ts'] = (boolean) When `true`, returns `HH:MM:SS` and Unix epoch timestamps. (Default = true) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -255,23 +255,23 @@ public function help(array $params = []) } /** - * Returns information about indexes: number of primaries and replicas, document counts, disk size, ... + * 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. * - * $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`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. + * $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`. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. * $params['expand_wildcards'] = (any) The type of index that wildcard patterns can match. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. - * $params['health'] = (any) The health status used to limit returned indexes. By default, the response includes indexes of any health status. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. + * $params['health'] = (any) Limits indexes based on their health status. Supported values are `green`, `yellow`, and `red`. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['include_unloaded_segments'] = (boolean) If `true`, the response includes information from segments that are not loaded into memory. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['pri'] = (boolean) If `true`, the response only includes information from primary shards. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit used to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['include_unloaded_segments'] = (boolean) Whether to include information from segments not loaded into memory. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['pri'] = (boolean) When `true`, returns information only from the primary shards. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (enum) Specifies the time units. (Options = d,h,m,micros,ms,nanos,s) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -295,14 +295,14 @@ public function indices(array $params = []) /** * Returns information about the cluster-manager node. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -323,14 +323,14 @@ public function master(array $params = []) /** * Returns information about custom node attributes. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -349,19 +349,19 @@ public function nodeattrs(array $params = []) } /** - * Returns basic statistics about performance of cluster nodes. + * Returns basic statistics about the performance of cluster nodes. * - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['full_id'] = (any) If `true`, return the full node ID. If `false`, return the shortened node ID. (Default = ) - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['full_id'] = (any) When `true`, returns the full node ID. When `false`, returns the shortened node ID. (Default = ) + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (enum) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). (Options = d,h,m,micros,ms,nanos,s) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -380,17 +380,17 @@ public function nodes(array $params = []) } /** - * Returns a concise representation of the cluster pending tasks. + * Returns a concise representation of the cluster's pending tasks. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (enum) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). (Options = d,h,m,micros,ms,nanos,s) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -409,14 +409,14 @@ public function pendingTasks(array $params = []) } /** - * List segments for one or several PITs. + * Lists one or several CAT point-in-time segments. * - * $params['bytes'] = (enum) The unit in which to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -438,16 +438,16 @@ public function pitSegments(array $params = []) } /** - * Returns information about installed plugins across nodes node. + * Returns information about the names, components, and versions of the installed plugins. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -466,18 +466,18 @@ public function plugins(array $params = []) } /** - * Returns information about index shard recoveries, both on-going completed. + * Returns all completed and ongoing index and shard recoveries. * * $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`. * $params['active_only'] = (boolean) If `true`, the response only includes ongoing shard recoveries. (Default = false) - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries. (Default = false) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['detailed'] = (boolean) When `true`, includes detailed information about shard recoveries. (Default = false) + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (enum) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). (Options = d,h,m,micros,ms,nanos,s) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -499,16 +499,16 @@ public function recovery(array $params = []) } /** - * Returns information about snapshot repositories registered in the cluster. + * Returns information about all snapshot repositories for a cluster. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -527,25 +527,25 @@ public function repositories(array $params = []) } /** - * Returns information about both on-going and latest completed Segment Replication events. - * - * $params['index'] = (array) Comma-separated list or wildcard expression of index names to limit the returned information. - * $params['active_only'] = (boolean) If `true`, the response only includes ongoing segment replication events. (Default = false) - * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). - * $params['bytes'] = (enum) The unit in which to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['completed_only'] = (boolean) If `true`, the response only includes latest completed segment replication events. (Default = false) - * $params['detailed'] = (boolean) If `true`, the response includes detailed information about segment replications. (Default = false) - * $params['expand_wildcards'] = (any) Whether to expand wildcard expression to concrete indexes that are open, closed or both. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * 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. + * + * $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`. + * $params['active_only'] = (boolean) When `true`, the response only includes ongoing segment replication events. (Default = false) + * $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. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['completed_only'] = (boolean) When `true`, the response only includes the last-completed segment replication events. (Default = false) + * $params['detailed'] = (boolean) When `true`, the response includes additional metrics for each stage of a segment replication event. (Default = false) + * $params['expand_wildcards'] = (any) Whether to expand the wildcard expression to include concrete indexes that are open, closed, or both. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indexes should be ignored when throttled. - * $params['ignore_unavailable'] = (boolean) Whether specified concrete indexes should be ignored when unavailable (missing or closed). - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['shards'] = (array) Comma-separated list of shards to display. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['timeout'] = (string) Operation timeout. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded, or aliased indexes should be ignored when throttled. + * $params['ignore_unavailable'] = (boolean) Whether the specified concrete indexes should be ignored when missing or closed. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['shards'] = (array) A comma-separated list of shards to display. + * $params['time'] = (enum) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). (Options = d,h,m,micros,ms,nanos,s) + * $params['timeout'] = (string) The operation timeout. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -570,14 +570,14 @@ public function segmentReplication(array $params = []) * Provides low-level information about the segments in the shards of an index. * * $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`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. - * $params['help'] = (boolean) Return help information. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. + * $params['help'] = (boolean) Returns help information. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -599,19 +599,19 @@ public function segments(array $params = []) } /** - * Provides a detailed view of shard allocation on nodes. + * Lists the states of all primary and replica shards and how they are distributed. * * $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`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (enum) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). (Options = d,h,m,micros,ms,nanos,s) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -633,18 +633,18 @@ public function shards(array $params = []) } /** - * Returns all snapshots in a specific repository. + * Lists all of the snapshots stored in a specific repository. * * $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. - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['ignore_unavailable'] = (boolean) If `true`, the response does not include information from unavailable snapshots. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['ignore_unavailable'] = (boolean) When `true`, the response does not include information from unavailable snapshots. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (enum) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). (Options = d,h,m,micros,ms,nanos,s) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -666,22 +666,22 @@ public function snapshots(array $params = []) } /** - * Returns information about the tasks currently executing on one or more nodes in the cluster. + * Lists the progress of all tasks currently running on the cluster. * - * $params['actions'] = (array) The task action names, which are used to limit the response. + * $params['actions'] = (array) The task action names used to limit the response. * $params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries. (Default = false) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (enum) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). (Options = d,h,m,micros,ms,nanos,s) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * $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 "-". - * $params['node_id'] = (array) 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. + * $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. * $params['parent_task'] = (string) The parent task identifier, which is used to limit the response. * * @param array $params Associative array of parameters @@ -696,17 +696,17 @@ public function tasks(array $params = []) } /** - * Returns information about existing templates. + * Lists the names, patterns, order numbers, and version numbers of index templates. * * $params['name'] = (string) The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned. - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -728,18 +728,18 @@ public function templates(array $params = []) } /** - * Returns cluster-wide thread pool statistics per node.By default the active, queue and rejected statistics are returned for all thread pools. + * Returns cluster-wide thread pool statistics per node.By default the active, queued, and rejected statistics are returned for all thread pools. * * $params['thread_pool_patterns'] = (array) A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) A timeout for connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. * $params['size'] = (integer) The multiplier in which to display values. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) diff --git a/src/OpenSearch/Namespaces/ClusterNamespace.php b/src/OpenSearch/Namespaces/ClusterNamespace.php index 7d763a50..2f0eb1af 100644 --- a/src/OpenSearch/Namespaces/ClusterNamespace.php +++ b/src/OpenSearch/Namespaces/ClusterNamespace.php @@ -182,6 +182,7 @@ public function existsComponentTemplate(array $params = []): bool * * $params['name'] = (array) Name of the component template to retrieve. Wildcard (`*`) expressions are supported. * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. + * $params['flat_settings'] = (boolean) If `true`, returns settings in flat format. (Default = false) * $params['local'] = (boolean) If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the cluster-manager node. (Default = false) * $params['master_timeout'] = (string) Period to wait for a connection to the cluster-manager node.If no response is received before the timeout expires, the request fails and returns an error. * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) diff --git a/src/OpenSearch/Namespaces/IndicesNamespace.php b/src/OpenSearch/Namespaces/IndicesNamespace.php index cd7b64b0..9045a313 100644 --- a/src/OpenSearch/Namespaces/IndicesNamespace.php +++ b/src/OpenSearch/Namespaces/IndicesNamespace.php @@ -576,7 +576,7 @@ public function flush(array $params = []) * $params['expand_wildcards'] = (any) Whether to expand wildcard expression to concrete indexes that are open, closed or both. * $params['flush'] = (boolean) Specify whether the index should be flushed after performing the operation. (Default = true) * $params['ignore_unavailable'] = (boolean) Whether specified concrete indexes should be ignored when unavailable (missing or closed) - * $params['max_num_segments'] = (number) The number of larger segments into which smaller segments are merged.Set this parameter to 1 to merge all segments into one segment.The default behavior is to perform the merge as necessary. + * $params['max_num_segments'] = (integer) The number of larger segments into which smaller segments are merged.Set this parameter to 1 to merge all segments into one segment.The default behavior is to perform the merge as necessary. * $params['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents * $params['primary_only'] = (boolean) Specify whether the operation should only perform on primary shards. Defaults to false. (Default = false) * $params['wait_for_completion'] = (boolean) Should the request wait until the force merge is completed. (Default = true) @@ -1449,12 +1449,10 @@ public function updateAliases(array $params = []) public function upgrade(array $params = []) { $index = $this->extractArgument($params, 'index'); - $body = $this->extractArgument($params, 'body'); $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Indices\Upgrade::class); $endpoint->setParams($params); $endpoint->setIndex($index); - $endpoint->setBody($body); return $this->performRequest($endpoint); } diff --git a/src/OpenSearch/Namespaces/MlNamespace.php b/src/OpenSearch/Namespaces/MlNamespace.php index 473a754f..f8282ab1 100644 --- a/src/OpenSearch/Namespaces/MlNamespace.php +++ b/src/OpenSearch/Namespaces/MlNamespace.php @@ -237,6 +237,52 @@ public function registerModelGroup(array $params = []) return $this->performRequest($endpoint); } + /** + * Searches for standalone connectors. + * + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function searchConnectors(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\SearchConnectors::class); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Searches for model groups. + * + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function searchModelGroup(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\SearchModelGroup::class); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** * Searches for models. * @@ -260,6 +306,84 @@ public function searchModels(array $params = []) return $this->performRequest($endpoint); } + /** + * Trains a model synchronously. + * + * $params['algorithm_name'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function train(array $params = []) + { + $algorithm_name = $this->extractArgument($params, 'algorithm_name'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\Train::class); + $endpoint->setParams($params); + $endpoint->setAlgorithmName($algorithm_name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Trains a model and predicts against the same training dataset. + * + * $params['algorithm_name'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function trainPredict(array $params = []) + { + $algorithm_name = $this->extractArgument($params, 'algorithm_name'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\TrainPredict::class); + $endpoint->setParams($params); + $endpoint->setAlgorithmName($algorithm_name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Updates a standalone connector. + * + * $params['connector_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function updateConnector(array $params = []) + { + $connector_id = $this->extractArgument($params, 'connector_id'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\UpdateConnector::class); + $endpoint->setParams($params); + $endpoint->setConnectorId($connector_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** * $params['body'] = (string) The body of the request (Required) *