1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | /** |
6: | * SPDX-License-Identifier: Apache-2.0 |
7: | * |
8: | * The OpenSearch Contributors require contributions made to |
9: | * this file be licensed under the Apache-2.0 license or a |
10: | * compatible open source license. |
11: | * |
12: | * Modifications Copyright OpenSearch Contributors. See |
13: | * GitHub history for details. |
14: | */ |
15: | |
16: | namespace OpenSearch\Namespaces; |
17: | |
18: | use OpenSearch\Namespaces\AbstractNamespace; |
19: | |
20: | /** |
21: | * Class ListNamespace |
22: | * |
23: | * NOTE: This file is autogenerated using util/GenerateEndpoints.php |
24: | */ |
25: | class ListNamespace extends AbstractNamespace |
26: | { |
27: | /** |
28: | * Returns help for the List APIs. |
29: | * |
30: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
31: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
32: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
33: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
34: | * $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 "-". |
35: | * |
36: | * @param array $params Associative array of parameters |
37: | * @return array |
38: | */ |
39: | public function help(array $params = []) |
40: | { |
41: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\List\Help::class); |
42: | $endpoint->setParams($params); |
43: | |
44: | return $this->performRequest($endpoint); |
45: | } |
46: | |
47: | /** |
48: | * Returns paginated information about indexes including number of primaries and replicas, document counts, disk size. |
49: | * |
50: | * $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`. |
51: | * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) |
52: | * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. |
53: | * $params['expand_wildcards'] = (any) The type of index that wildcard patterns can match. |
54: | * $params['format'] = (string) A short version of the Accept header, such as `JSON`, `YAML`. |
55: | * $params['h'] = (array) Comma-separated list of column names to display. |
56: | * $params['health'] = (enum) The health status used to limit returned indexes. By default, the response includes indexes of any health status. (Options = green,red,yellow) |
57: | * $params['help'] = (boolean) Return help information. (Default = false) |
58: | * $params['include_unloaded_segments'] = (boolean) If true, the response includes information from segments that are not loaded into memory. (Default = false) |
59: | * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) |
60: | * $params['master_timeout'] = (string) Operation timeout for connection to cluster manager node. |
61: | * $params['next_token'] = (Array) Token to retrieve next page of indexes. |
62: | * $params['pri'] = (boolean) If true, the response only includes information from primary shards. (Default = false) |
63: | * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. |
64: | * $params['size'] = (integer) Maximum number of indexes to be displayed in a page. |
65: | * $params['sort'] = (enum) Defines order in which indexes will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created indexes would be displayed first. (Options = asc,desc) |
66: | * $params['time'] = (enum) The unit used to display time values. (Options = d,h,m,micros,ms,nanos,s) |
67: | * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) |
68: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
69: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
70: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
71: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
72: | * $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 "-". |
73: | * |
74: | * @param array $params Associative array of parameters |
75: | * @return array |
76: | */ |
77: | public function indices(array $params = []) |
78: | { |
79: | $index = $this->extractArgument($params, 'index'); |
80: | |
81: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\List\Indices::class); |
82: | $endpoint->setParams($params); |
83: | $endpoint->setIndex($index); |
84: | |
85: | return $this->performRequest($endpoint); |
86: | } |
87: | |
88: | /** |
89: | * Returns paginated details of shard allocation on nodes. |
90: | * |
91: | * $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`. |
92: | * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) |
93: | * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. |
94: | * $params['format'] = (string) A short version of the Accept header, such as `JSON`, `YAML`. |
95: | * $params['h'] = (array) Comma-separated list of column names to display. |
96: | * $params['help'] = (boolean) Return help information. (Default = false) |
97: | * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) |
98: | * $params['master_timeout'] = (string) Operation timeout for connection to cluster manager node. |
99: | * $params['next_token'] = (Array) Token to retrieve next page of shards. |
100: | * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. |
101: | * $params['size'] = (integer) Maximum number of shards to be displayed in a page. |
102: | * $params['sort'] = (enum) Defines order in which shards will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created shards would be displayed first. (Options = asc,desc) |
103: | * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) |
104: | * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) |
105: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
106: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
107: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
108: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
109: | * $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 "-". |
110: | * |
111: | * @param array $params Associative array of parameters |
112: | * @return array |
113: | */ |
114: | public function shards(array $params = []) |
115: | { |
116: | $index = $this->extractArgument($params, 'index'); |
117: | |
118: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\List\Shards::class); |
119: | $endpoint->setParams($params); |
120: | $endpoint->setIndex($index); |
121: | |
122: | return $this->performRequest($endpoint); |
123: | } |
124: | |
125: | } |
126: |