elasticsearch 8.17.0__py3-none-any.whl → 8.17.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +2034 -740
  3. elasticsearch/_async/client/async_search.py +33 -22
  4. elasticsearch/_async/client/autoscaling.py +27 -21
  5. elasticsearch/_async/client/cat.py +280 -336
  6. elasticsearch/_async/client/ccr.py +96 -70
  7. elasticsearch/_async/client/cluster.py +152 -144
  8. elasticsearch/_async/client/connector.py +488 -55
  9. elasticsearch/_async/client/dangling_indices.py +22 -16
  10. elasticsearch/_async/client/enrich.py +25 -6
  11. elasticsearch/_async/client/eql.py +22 -9
  12. elasticsearch/_async/client/esql.py +295 -3
  13. elasticsearch/_async/client/features.py +25 -25
  14. elasticsearch/_async/client/fleet.py +15 -9
  15. elasticsearch/_async/client/graph.py +9 -8
  16. elasticsearch/_async/client/ilm.py +91 -61
  17. elasticsearch/_async/client/indices.py +746 -324
  18. elasticsearch/_async/client/inference.py +101 -4
  19. elasticsearch/_async/client/ingest.py +231 -19
  20. elasticsearch/_async/client/license.py +48 -31
  21. elasticsearch/_async/client/logstash.py +20 -6
  22. elasticsearch/_async/client/migration.py +25 -7
  23. elasticsearch/_async/client/ml.py +532 -278
  24. elasticsearch/_async/client/monitoring.py +5 -1
  25. elasticsearch/_async/client/nodes.py +46 -30
  26. elasticsearch/_async/client/query_rules.py +65 -18
  27. elasticsearch/_async/client/rollup.py +126 -13
  28. elasticsearch/_async/client/search_application.py +170 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +45 -23
  30. elasticsearch/_async/client/security.py +1299 -340
  31. elasticsearch/_async/client/shutdown.py +43 -15
  32. elasticsearch/_async/client/simulate.py +145 -0
  33. elasticsearch/_async/client/slm.py +163 -19
  34. elasticsearch/_async/client/snapshot.py +288 -23
  35. elasticsearch/_async/client/sql.py +94 -53
  36. elasticsearch/_async/client/ssl.py +16 -17
  37. elasticsearch/_async/client/synonyms.py +67 -26
  38. elasticsearch/_async/client/tasks.py +103 -28
  39. elasticsearch/_async/client/text_structure.py +475 -46
  40. elasticsearch/_async/client/transform.py +108 -72
  41. elasticsearch/_async/client/watcher.py +245 -43
  42. elasticsearch/_async/client/xpack.py +20 -6
  43. elasticsearch/_async/helpers.py +1 -1
  44. elasticsearch/_sync/client/__init__.py +2034 -740
  45. elasticsearch/_sync/client/async_search.py +33 -22
  46. elasticsearch/_sync/client/autoscaling.py +27 -21
  47. elasticsearch/_sync/client/cat.py +280 -336
  48. elasticsearch/_sync/client/ccr.py +96 -70
  49. elasticsearch/_sync/client/cluster.py +152 -144
  50. elasticsearch/_sync/client/connector.py +488 -55
  51. elasticsearch/_sync/client/dangling_indices.py +22 -16
  52. elasticsearch/_sync/client/enrich.py +25 -6
  53. elasticsearch/_sync/client/eql.py +22 -9
  54. elasticsearch/_sync/client/esql.py +295 -3
  55. elasticsearch/_sync/client/features.py +25 -25
  56. elasticsearch/_sync/client/fleet.py +15 -9
  57. elasticsearch/_sync/client/graph.py +9 -8
  58. elasticsearch/_sync/client/ilm.py +91 -61
  59. elasticsearch/_sync/client/indices.py +746 -324
  60. elasticsearch/_sync/client/inference.py +101 -4
  61. elasticsearch/_sync/client/ingest.py +231 -19
  62. elasticsearch/_sync/client/license.py +48 -31
  63. elasticsearch/_sync/client/logstash.py +20 -6
  64. elasticsearch/_sync/client/migration.py +25 -7
  65. elasticsearch/_sync/client/ml.py +532 -278
  66. elasticsearch/_sync/client/monitoring.py +5 -1
  67. elasticsearch/_sync/client/nodes.py +46 -30
  68. elasticsearch/_sync/client/query_rules.py +65 -18
  69. elasticsearch/_sync/client/rollup.py +126 -13
  70. elasticsearch/_sync/client/search_application.py +170 -13
  71. elasticsearch/_sync/client/searchable_snapshots.py +45 -23
  72. elasticsearch/_sync/client/security.py +1299 -340
  73. elasticsearch/_sync/client/shutdown.py +43 -15
  74. elasticsearch/_sync/client/simulate.py +145 -0
  75. elasticsearch/_sync/client/slm.py +163 -19
  76. elasticsearch/_sync/client/snapshot.py +288 -23
  77. elasticsearch/_sync/client/sql.py +94 -53
  78. elasticsearch/_sync/client/ssl.py +16 -17
  79. elasticsearch/_sync/client/synonyms.py +67 -26
  80. elasticsearch/_sync/client/tasks.py +103 -28
  81. elasticsearch/_sync/client/text_structure.py +475 -46
  82. elasticsearch/_sync/client/transform.py +108 -72
  83. elasticsearch/_sync/client/utils.py +1 -1
  84. elasticsearch/_sync/client/watcher.py +245 -43
  85. elasticsearch/_sync/client/xpack.py +20 -6
  86. elasticsearch/_version.py +1 -1
  87. elasticsearch/client.py +4 -0
  88. elasticsearch/helpers/actions.py +1 -1
  89. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  90. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
  91. elasticsearch-8.17.2.dist-info/RECORD +119 -0
  92. elasticsearch-8.17.0.dist-info/RECORD +0 -117
  93. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
  94. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
@@ -39,12 +39,14 @@ class DanglingIndicesClient(NamespacedClient):
39
39
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
40
40
  ) -> ObjectApiResponse[t.Any]:
41
41
  """
42
- Delete a dangling index. If Elasticsearch encounters index data that is absent
43
- from the current cluster state, those indices are considered to be dangling.
44
- For example, this can happen if you delete more than `cluster.indices.tombstones.size`
45
- indices while an Elasticsearch node is offline.
42
+ .. raw:: html
46
43
 
47
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-gateway-dangling-indices.html>`_
44
+ <p>Delete a dangling index.
45
+ If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
46
+ For example, this can happen if you delete more than <code>cluster.indices.tombstones.size</code> indices while an Elasticsearch node is offline.</p>
47
+
48
+
49
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-index-delete.html>`_
48
50
 
49
51
  :param index_uuid: The UUID of the index to delete. Use the get dangling indices
50
52
  API to find the UUID.
@@ -98,12 +100,14 @@ class DanglingIndicesClient(NamespacedClient):
98
100
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
99
101
  ) -> ObjectApiResponse[t.Any]:
100
102
  """
101
- Import a dangling index. If Elasticsearch encounters index data that is absent
102
- from the current cluster state, those indices are considered to be dangling.
103
- For example, this can happen if you delete more than `cluster.indices.tombstones.size`
104
- indices while an Elasticsearch node is offline.
103
+ .. raw:: html
104
+
105
+ <p>Import a dangling index.</p>
106
+ <p>If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
107
+ For example, this can happen if you delete more than <code>cluster.indices.tombstones.size</code> indices while an Elasticsearch node is offline.</p>
105
108
 
106
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-gateway-dangling-indices.html>`_
109
+
110
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-index-import.html>`_
107
111
 
108
112
  :param index_uuid: The UUID of the index to import. Use the get dangling indices
109
113
  API to locate the UUID.
@@ -156,13 +160,15 @@ class DanglingIndicesClient(NamespacedClient):
156
160
  pretty: t.Optional[bool] = None,
157
161
  ) -> ObjectApiResponse[t.Any]:
158
162
  """
159
- Get the dangling indices. If Elasticsearch encounters index data that is absent
160
- from the current cluster state, those indices are considered to be dangling.
161
- For example, this can happen if you delete more than `cluster.indices.tombstones.size`
162
- indices while an Elasticsearch node is offline. Use this API to list dangling
163
- indices, which you can then import or delete.
163
+ .. raw:: html
164
+
165
+ <p>Get the dangling indices.</p>
166
+ <p>If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
167
+ For example, this can happen if you delete more than <code>cluster.indices.tombstones.size</code> indices while an Elasticsearch node is offline.</p>
168
+ <p>Use this API to list dangling indices, which you can then import or delete.</p>
169
+
164
170
 
165
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-gateway-dangling-indices.html>`_
171
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-indices-list.html>`_
166
172
  """
167
173
  __path_parts: t.Dict[str, str] = {}
168
174
  __path = "/_dangling"
@@ -36,7 +36,11 @@ class EnrichClient(NamespacedClient):
36
36
  pretty: t.Optional[bool] = None,
37
37
  ) -> ObjectApiResponse[t.Any]:
38
38
  """
39
- Delete an enrich policy. Deletes an existing enrich policy and its enrich index.
39
+ .. raw:: html
40
+
41
+ <p>Delete an enrich policy.
42
+ Deletes an existing enrich policy and its enrich index.</p>
43
+
40
44
 
41
45
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-enrich-policy-api.html>`_
42
46
 
@@ -77,7 +81,11 @@ class EnrichClient(NamespacedClient):
77
81
  wait_for_completion: t.Optional[bool] = None,
78
82
  ) -> ObjectApiResponse[t.Any]:
79
83
  """
80
- Run an enrich policy. Create the enrich index for an existing enrich policy.
84
+ .. raw:: html
85
+
86
+ <p>Run an enrich policy.
87
+ Create the enrich index for an existing enrich policy.</p>
88
+
81
89
 
82
90
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/execute-enrich-policy-api.html>`_
83
91
 
@@ -121,7 +129,11 @@ class EnrichClient(NamespacedClient):
121
129
  pretty: t.Optional[bool] = None,
122
130
  ) -> ObjectApiResponse[t.Any]:
123
131
  """
124
- Get an enrich policy. Returns information about an enrich policy.
132
+ .. raw:: html
133
+
134
+ <p>Get an enrich policy.
135
+ Returns information about an enrich policy.</p>
136
+
125
137
 
126
138
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-enrich-policy-api.html>`_
127
139
 
@@ -171,7 +183,11 @@ class EnrichClient(NamespacedClient):
171
183
  body: t.Optional[t.Dict[str, t.Any]] = None,
172
184
  ) -> ObjectApiResponse[t.Any]:
173
185
  """
174
- Create an enrich policy. Creates an enrich policy.
186
+ .. raw:: html
187
+
188
+ <p>Create an enrich policy.
189
+ Creates an enrich policy.</p>
190
+
175
191
 
176
192
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-enrich-policy-api.html>`_
177
193
 
@@ -224,8 +240,11 @@ class EnrichClient(NamespacedClient):
224
240
  pretty: t.Optional[bool] = None,
225
241
  ) -> ObjectApiResponse[t.Any]:
226
242
  """
227
- Get enrich stats. Returns enrich coordinator statistics and information about
228
- enrich policies that are currently executing.
243
+ .. raw:: html
244
+
245
+ <p>Get enrich stats.
246
+ Returns enrich coordinator statistics and information about enrich policies that are currently executing.</p>
247
+
229
248
 
230
249
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/enrich-stats-api.html>`_
231
250
  """
@@ -36,8 +36,12 @@ class EqlClient(NamespacedClient):
36
36
  pretty: t.Optional[bool] = None,
37
37
  ) -> ObjectApiResponse[t.Any]:
38
38
  """
39
- Delete an async EQL search. Delete an async EQL search or a stored synchronous
40
- EQL search. The API also deletes results for the search.
39
+ .. raw:: html
40
+
41
+ <p>Delete an async EQL search.
42
+ Delete an async EQL search or a stored synchronous EQL search.
43
+ The API also deletes results for the search.</p>
44
+
41
45
 
42
46
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/eql-search-api.html>`_
43
47
 
@@ -83,8 +87,11 @@ class EqlClient(NamespacedClient):
83
87
  ] = None,
84
88
  ) -> ObjectApiResponse[t.Any]:
85
89
  """
86
- Get async EQL search results. Get the current status and available results for
87
- an async EQL search or a stored synchronous EQL search.
90
+ .. raw:: html
91
+
92
+ <p>Get async EQL search results.
93
+ Get the current status and available results for an async EQL search or a stored synchronous EQL search.</p>
94
+
88
95
 
89
96
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-eql-search-api.html>`_
90
97
 
@@ -134,8 +141,11 @@ class EqlClient(NamespacedClient):
134
141
  pretty: t.Optional[bool] = None,
135
142
  ) -> ObjectApiResponse[t.Any]:
136
143
  """
137
- Get the async EQL status. Get the current status for an async EQL search or a
138
- stored synchronous EQL search without returning results.
144
+ .. raw:: html
145
+
146
+ <p>Get the async EQL status.
147
+ Get the current status for an async EQL search or a stored synchronous EQL search without returning results.</p>
148
+
139
149
 
140
150
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-eql-status-api.html>`_
141
151
 
@@ -223,9 +233,12 @@ class EqlClient(NamespacedClient):
223
233
  body: t.Optional[t.Dict[str, t.Any]] = None,
224
234
  ) -> ObjectApiResponse[t.Any]:
225
235
  """
226
- Get EQL search results. Returns search results for an Event Query Language (EQL)
227
- query. EQL assumes each document in a data stream or index corresponds to an
228
- event.
236
+ .. raw:: html
237
+
238
+ <p>Get EQL search results.
239
+ Returns search results for an Event Query Language (EQL) query.
240
+ EQL assumes each document in a data stream or index corresponds to an event.</p>
241
+
229
242
 
230
243
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/eql-search-api.html>`_
231
244
 
@@ -20,7 +20,7 @@ import typing as t
20
20
  from elastic_transport import ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import _rewrite_parameters
23
+ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24
24
 
25
25
 
26
26
  class EsqlClient(NamespacedClient):
@@ -30,6 +30,288 @@ class EsqlClient(NamespacedClient):
30
30
  "query",
31
31
  "columnar",
32
32
  "filter",
33
+ "include_ccs_metadata",
34
+ "locale",
35
+ "params",
36
+ "profile",
37
+ "tables",
38
+ ),
39
+ ignore_deprecated_options={"params"},
40
+ )
41
+ async def async_query(
42
+ self,
43
+ *,
44
+ query: t.Optional[str] = None,
45
+ columnar: t.Optional[bool] = None,
46
+ delimiter: t.Optional[str] = None,
47
+ drop_null_columns: t.Optional[bool] = None,
48
+ error_trace: t.Optional[bool] = None,
49
+ filter: t.Optional[t.Mapping[str, t.Any]] = None,
50
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
51
+ format: t.Optional[
52
+ t.Union[
53
+ str,
54
+ t.Literal[
55
+ "arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
56
+ ],
57
+ ]
58
+ ] = None,
59
+ human: t.Optional[bool] = None,
60
+ include_ccs_metadata: t.Optional[bool] = None,
61
+ keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
62
+ keep_on_completion: t.Optional[bool] = None,
63
+ locale: t.Optional[str] = None,
64
+ params: t.Optional[
65
+ t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
66
+ ] = None,
67
+ pretty: t.Optional[bool] = None,
68
+ profile: t.Optional[bool] = None,
69
+ tables: t.Optional[
70
+ t.Mapping[str, t.Mapping[str, t.Mapping[str, t.Any]]]
71
+ ] = None,
72
+ wait_for_completion_timeout: t.Optional[
73
+ t.Union[str, t.Literal[-1], t.Literal[0]]
74
+ ] = None,
75
+ body: t.Optional[t.Dict[str, t.Any]] = None,
76
+ ) -> ObjectApiResponse[t.Any]:
77
+ """
78
+ .. raw:: html
79
+
80
+ <p>Run an async ES|QL query.
81
+ Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.</p>
82
+ <p>The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.</p>
83
+
84
+
85
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-api.html>`_
86
+
87
+ :param query: The ES|QL query API accepts an ES|QL query string in the query
88
+ parameter, runs it, and returns the results.
89
+ :param columnar: By default, ES|QL returns results as rows. For example, FROM
90
+ returns each individual document as one row. For the JSON, YAML, CBOR and
91
+ smile formats, ES|QL can return the results in a columnar fashion where one
92
+ row represents all the values of a certain column in the results.
93
+ :param delimiter: The character to use between values within a CSV row. It is
94
+ valid only for the CSV format.
95
+ :param drop_null_columns: Indicates whether columns that are entirely `null`
96
+ will be removed from the `columns` and `values` portion of the results. If
97
+ `true`, the response will include an extra section under the name `all_columns`
98
+ which has the name of all the columns.
99
+ :param filter: Specify a Query DSL query in the filter parameter to filter the
100
+ set of documents that an ES|QL query runs on.
101
+ :param format: A short version of the Accept header, for example `json` or `yaml`.
102
+ :param include_ccs_metadata: When set to `true` and performing a cross-cluster
103
+ query, the response will include an extra `_clusters` object with information
104
+ about the clusters that participated in the search along with info such as
105
+ shards count.
106
+ :param keep_alive: The period for which the query and its results are stored
107
+ in the cluster. The default period is five days. When this period expires,
108
+ the query and its results are deleted, even if the query is still ongoing.
109
+ If the `keep_on_completion` parameter is false, Elasticsearch only stores
110
+ async queries that do not complete within the period set by the `wait_for_completion_timeout`
111
+ parameter, regardless of this value.
112
+ :param keep_on_completion: Indicates whether the query and its results are stored
113
+ in the cluster. If false, the query and its results are stored in the cluster
114
+ only if the request does not complete during the period set by the `wait_for_completion_timeout`
115
+ parameter.
116
+ :param locale:
117
+ :param params: To avoid any attempts of hacking or code injection, extract the
118
+ values in a separate list of parameters. Use question mark placeholders (?)
119
+ in the query string for each of the parameters.
120
+ :param profile: If provided and `true` the response will include an extra `profile`
121
+ object with information on how the query was executed. This information is
122
+ for human debugging and its format can change at any time but it can give
123
+ some insight into the performance of each part of the query.
124
+ :param tables: Tables to use with the LOOKUP operation. The top level key is
125
+ the table name and the next level key is the column name.
126
+ :param wait_for_completion_timeout: The period to wait for the request to finish.
127
+ By default, the request waits for 1 second for the query results. If the
128
+ query completes during this period, results are returned Otherwise, a query
129
+ ID is returned that can later be used to retrieve the results.
130
+ """
131
+ if query is None and body is None:
132
+ raise ValueError("Empty value passed for parameter 'query'")
133
+ __path_parts: t.Dict[str, str] = {}
134
+ __path = "/_query/async"
135
+ __query: t.Dict[str, t.Any] = {}
136
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
137
+ if delimiter is not None:
138
+ __query["delimiter"] = delimiter
139
+ if drop_null_columns is not None:
140
+ __query["drop_null_columns"] = drop_null_columns
141
+ if error_trace is not None:
142
+ __query["error_trace"] = error_trace
143
+ if filter_path is not None:
144
+ __query["filter_path"] = filter_path
145
+ if format is not None:
146
+ __query["format"] = format
147
+ if human is not None:
148
+ __query["human"] = human
149
+ if keep_alive is not None:
150
+ __query["keep_alive"] = keep_alive
151
+ if keep_on_completion is not None:
152
+ __query["keep_on_completion"] = keep_on_completion
153
+ if pretty is not None:
154
+ __query["pretty"] = pretty
155
+ if wait_for_completion_timeout is not None:
156
+ __query["wait_for_completion_timeout"] = wait_for_completion_timeout
157
+ if not __body:
158
+ if query is not None:
159
+ __body["query"] = query
160
+ if columnar is not None:
161
+ __body["columnar"] = columnar
162
+ if filter is not None:
163
+ __body["filter"] = filter
164
+ if include_ccs_metadata is not None:
165
+ __body["include_ccs_metadata"] = include_ccs_metadata
166
+ if locale is not None:
167
+ __body["locale"] = locale
168
+ if params is not None:
169
+ __body["params"] = params
170
+ if profile is not None:
171
+ __body["profile"] = profile
172
+ if tables is not None:
173
+ __body["tables"] = tables
174
+ __headers = {"accept": "application/json", "content-type": "application/json"}
175
+ return await self.perform_request( # type: ignore[return-value]
176
+ "POST",
177
+ __path,
178
+ params=__query,
179
+ headers=__headers,
180
+ body=__body,
181
+ endpoint_id="esql.async_query",
182
+ path_parts=__path_parts,
183
+ )
184
+
185
+ @_rewrite_parameters()
186
+ async def async_query_delete(
187
+ self,
188
+ *,
189
+ id: str,
190
+ error_trace: t.Optional[bool] = None,
191
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
192
+ human: t.Optional[bool] = None,
193
+ pretty: t.Optional[bool] = None,
194
+ ) -> ObjectApiResponse[t.Any]:
195
+ """
196
+ .. raw:: html
197
+
198
+ <p>Delete an async ES|QL query.
199
+ If the query is still running, it is cancelled.
200
+ Otherwise, the stored results are deleted.</p>
201
+ <p>If the Elasticsearch security features are enabled, only the following users can use this API to delete a query:</p>
202
+ <ul>
203
+ <li>The authenticated user that submitted the original query request</li>
204
+ <li>Users with the <code>cancel_task</code> cluster privilege</li>
205
+ </ul>
206
+
207
+
208
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-delete-api.html>`_
209
+
210
+ :param id: The unique identifier of the query. A query ID is provided in the
211
+ ES|QL async query API response for a query that does not complete in the
212
+ designated time. A query ID is also provided when the request was submitted
213
+ with the `keep_on_completion` parameter set to `true`.
214
+ """
215
+ if id in SKIP_IN_PATH:
216
+ raise ValueError("Empty value passed for parameter 'id'")
217
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
218
+ __path = f'/_query/async/{__path_parts["id"]}'
219
+ __query: t.Dict[str, t.Any] = {}
220
+ if error_trace is not None:
221
+ __query["error_trace"] = error_trace
222
+ if filter_path is not None:
223
+ __query["filter_path"] = filter_path
224
+ if human is not None:
225
+ __query["human"] = human
226
+ if pretty is not None:
227
+ __query["pretty"] = pretty
228
+ __headers = {"accept": "application/json"}
229
+ return await self.perform_request( # type: ignore[return-value]
230
+ "DELETE",
231
+ __path,
232
+ params=__query,
233
+ headers=__headers,
234
+ endpoint_id="esql.async_query_delete",
235
+ path_parts=__path_parts,
236
+ )
237
+
238
+ @_rewrite_parameters()
239
+ async def async_query_get(
240
+ self,
241
+ *,
242
+ id: str,
243
+ drop_null_columns: t.Optional[bool] = None,
244
+ error_trace: t.Optional[bool] = None,
245
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
246
+ human: t.Optional[bool] = None,
247
+ keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
248
+ pretty: t.Optional[bool] = None,
249
+ wait_for_completion_timeout: t.Optional[
250
+ t.Union[str, t.Literal[-1], t.Literal[0]]
251
+ ] = None,
252
+ ) -> ObjectApiResponse[t.Any]:
253
+ """
254
+ .. raw:: html
255
+
256
+ <p>Get async ES|QL query results.
257
+ Get the current status and available results or stored results for an ES|QL asynchronous query.
258
+ If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.</p>
259
+
260
+
261
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-get-api.html>`_
262
+
263
+ :param id: The unique identifier of the query. A query ID is provided in the
264
+ ES|QL async query API response for a query that does not complete in the
265
+ designated time. A query ID is also provided when the request was submitted
266
+ with the `keep_on_completion` parameter set to `true`.
267
+ :param drop_null_columns: Indicates whether columns that are entirely `null`
268
+ will be removed from the `columns` and `values` portion of the results. If
269
+ `true`, the response will include an extra section under the name `all_columns`
270
+ which has the name of all the columns.
271
+ :param keep_alive: The period for which the query and its results are stored
272
+ in the cluster. When this period expires, the query and its results are deleted,
273
+ even if the query is still ongoing.
274
+ :param wait_for_completion_timeout: The period to wait for the request to finish.
275
+ By default, the request waits for complete query results. If the request
276
+ completes during the period specified in this parameter, complete query results
277
+ are returned. Otherwise, the response returns an `is_running` value of `true`
278
+ and no results.
279
+ """
280
+ if id in SKIP_IN_PATH:
281
+ raise ValueError("Empty value passed for parameter 'id'")
282
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
283
+ __path = f'/_query/async/{__path_parts["id"]}'
284
+ __query: t.Dict[str, t.Any] = {}
285
+ if drop_null_columns is not None:
286
+ __query["drop_null_columns"] = drop_null_columns
287
+ if error_trace is not None:
288
+ __query["error_trace"] = error_trace
289
+ if filter_path is not None:
290
+ __query["filter_path"] = filter_path
291
+ if human is not None:
292
+ __query["human"] = human
293
+ if keep_alive is not None:
294
+ __query["keep_alive"] = keep_alive
295
+ if pretty is not None:
296
+ __query["pretty"] = pretty
297
+ if wait_for_completion_timeout is not None:
298
+ __query["wait_for_completion_timeout"] = wait_for_completion_timeout
299
+ __headers = {"accept": "application/json"}
300
+ return await self.perform_request( # type: ignore[return-value]
301
+ "GET",
302
+ __path,
303
+ params=__query,
304
+ headers=__headers,
305
+ endpoint_id="esql.async_query_get",
306
+ path_parts=__path_parts,
307
+ )
308
+
309
+ @_rewrite_parameters(
310
+ body_fields=(
311
+ "query",
312
+ "columnar",
313
+ "filter",
314
+ "include_ccs_metadata",
33
315
  "locale",
34
316
  "params",
35
317
  "profile",
@@ -56,6 +338,7 @@ class EsqlClient(NamespacedClient):
56
338
  ]
57
339
  ] = None,
58
340
  human: t.Optional[bool] = None,
341
+ include_ccs_metadata: t.Optional[bool] = None,
59
342
  locale: t.Optional[str] = None,
60
343
  params: t.Optional[
61
344
  t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
@@ -68,8 +351,11 @@ class EsqlClient(NamespacedClient):
68
351
  body: t.Optional[t.Dict[str, t.Any]] = None,
69
352
  ) -> ObjectApiResponse[t.Any]:
70
353
  """
71
- Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query language)
72
- query.
354
+ .. raw:: html
355
+
356
+ <p>Run an ES|QL query.
357
+ Get search results for an ES|QL (Elasticsearch query language) query.</p>
358
+
73
359
 
74
360
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-rest.html>`_
75
361
 
@@ -88,6 +374,10 @@ class EsqlClient(NamespacedClient):
88
374
  :param filter: Specify a Query DSL query in the filter parameter to filter the
89
375
  set of documents that an ES|QL query runs on.
90
376
  :param format: A short version of the Accept header, e.g. json, yaml.
377
+ :param include_ccs_metadata: When set to `true` and performing a cross-cluster
378
+ query, the response will include an extra `_clusters` object with information
379
+ about the clusters that participated in the search along with info such as
380
+ shards count.
91
381
  :param locale:
92
382
  :param params: To avoid any attempts of hacking or code injection, extract the
93
383
  values in a separate list of parameters. Use question mark placeholders (?)
@@ -126,6 +416,8 @@ class EsqlClient(NamespacedClient):
126
416
  __body["columnar"] = columnar
127
417
  if filter is not None:
128
418
  __body["filter"] = filter
419
+ if include_ccs_metadata is not None:
420
+ __body["include_ccs_metadata"] = include_ccs_metadata
129
421
  if locale is not None:
130
422
  __body["locale"] = locale
131
423
  if params is not None:
@@ -35,17 +35,17 @@ class FeaturesClient(NamespacedClient):
35
35
  pretty: t.Optional[bool] = None,
36
36
  ) -> ObjectApiResponse[t.Any]:
37
37
  """
38
- Get the features. Get a list of features that can be included in snapshots using
39
- the `feature_states` field when creating a snapshot. You can use this API to
40
- determine which feature states to include when taking a snapshot. By default,
41
- all feature states are included in a snapshot if that snapshot includes the global
42
- state, or none if it does not. A feature state includes one or more system indices
43
- necessary for a given feature to function. In order to ensure data integrity,
44
- all system indices that comprise a feature state are snapshotted and restored
45
- together. The features listed by this API are a combination of built-in features
46
- and features defined by plugins. In order for a feature state to be listed in
47
- this API and recognized as a valid feature state by the create snapshot API,
48
- the plugin that defines that feature must be installed on the master node.
38
+ .. raw:: html
39
+
40
+ <p>Get the features.
41
+ Get a list of features that can be included in snapshots using the <code>feature_states</code> field when creating a snapshot.
42
+ You can use this API to determine which feature states to include when taking a snapshot.
43
+ By default, all feature states are included in a snapshot if that snapshot includes the global state, or none if it does not.</p>
44
+ <p>A feature state includes one or more system indices necessary for a given feature to function.
45
+ In order to ensure data integrity, all system indices that comprise a feature state are snapshotted and restored together.</p>
46
+ <p>The features listed by this API are a combination of built-in features and features defined by plugins.
47
+ In order for a feature state to be listed in this API and recognized as a valid feature state by the create snapshot API, the plugin that defines that feature must be installed on the master node.</p>
48
+
49
49
 
50
50
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-features-api.html>`_
51
51
  """
@@ -81,20 +81,20 @@ class FeaturesClient(NamespacedClient):
81
81
  pretty: t.Optional[bool] = None,
82
82
  ) -> ObjectApiResponse[t.Any]:
83
83
  """
84
- Reset the features. Clear all of the state information stored in system indices
85
- by Elasticsearch features, including the security and machine learning indices.
86
- WARNING: Intended for development and testing use only. Do not reset features
87
- on a production cluster. Return a cluster to the same state as a new installation
88
- by resetting the feature state for all Elasticsearch features. This deletes all
89
- state information stored in system indices. The response code is HTTP 200 if
90
- the state is successfully reset for all features. It is HTTP 500 if the reset
91
- operation failed for any feature. Note that select features might provide a way
92
- to reset particular system indices. Using this API resets all features, both
93
- those that are built-in and implemented as plugins. To list the features that
94
- will be affected, use the get features API. IMPORTANT: The features installed
95
- on the node you submit this request to are the features that will be reset. Run
96
- on the master node if you have any doubts about which plugins are installed on
97
- individual nodes.
84
+ .. raw:: html
85
+
86
+ <p>Reset the features.
87
+ Clear all of the state information stored in system indices by Elasticsearch features, including the security and machine learning indices.</p>
88
+ <p>WARNING: Intended for development and testing use only. Do not reset features on a production cluster.</p>
89
+ <p>Return a cluster to the same state as a new installation by resetting the feature state for all Elasticsearch features.
90
+ This deletes all state information stored in system indices.</p>
91
+ <p>The response code is HTTP 200 if the state is successfully reset for all features.
92
+ It is HTTP 500 if the reset operation failed for any feature.</p>
93
+ <p>Note that select features might provide a way to reset particular system indices.
94
+ Using this API resets all features, both those that are built-in and implemented as plugins.</p>
95
+ <p>To list the features that will be affected, use the get features API.</p>
96
+ <p>IMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes.</p>
97
+
98
98
 
99
99
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
100
100
  """
@@ -46,8 +46,10 @@ class FleetClient(NamespacedClient):
46
46
  wait_for_index: t.Optional[bool] = None,
47
47
  ) -> ObjectApiResponse[t.Any]:
48
48
  """
49
- Returns the current global checkpoints for an index. This API is design for internal
50
- use by the fleet server project.
49
+ .. raw:: html
50
+
51
+ <p>Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.</p>
52
+
51
53
 
52
54
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-global-checkpoints.html>`_
53
55
 
@@ -132,10 +134,12 @@ class FleetClient(NamespacedClient):
132
134
  wait_for_checkpoints: t.Optional[t.Sequence[int]] = None,
133
135
  ) -> ObjectApiResponse[t.Any]:
134
136
  """
135
- Executes several [fleet searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html)
136
- with a single API request. The API follows the same structure as the [multi search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html)
137
- API. However, similar to the fleet search API, it supports the wait_for_checkpoints
138
- parameter.
137
+ .. raw:: html
138
+
139
+ <p>Executes several <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html">fleet searches</a> with a single API request.
140
+ The API follows the same structure as the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html">multi search</a> API. However, similar to the fleet search API, it
141
+ supports the wait_for_checkpoints parameter.</p>
142
+
139
143
 
140
144
  :param searches:
141
145
  :param index: A single target to search. If the target is an index alias, it
@@ -378,9 +382,11 @@ class FleetClient(NamespacedClient):
378
382
  body: t.Optional[t.Dict[str, t.Any]] = None,
379
383
  ) -> ObjectApiResponse[t.Any]:
380
384
  """
381
- The purpose of the fleet search api is to provide a search api where the search
382
- will only be executed after provided checkpoint has been processed and is visible
383
- for searches inside of Elasticsearch.
385
+ .. raw:: html
386
+
387
+ <p>The purpose of the fleet search api is to provide a search api where the search will only be executed
388
+ after provided checkpoint has been processed and is visible for searches inside of Elasticsearch.</p>
389
+
384
390
 
385
391
  :param index: A single target to search. If the target is an index alias, it
386
392
  must resolve to a single index.