elasticsearch 8.12.1__py3-none-any.whl → 8.13.1__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.
- elasticsearch/__init__.py +7 -0
- elasticsearch/_async/client/__init__.py +477 -128
- elasticsearch/_async/client/_base.py +41 -1
- elasticsearch/_async/client/async_search.py +40 -12
- elasticsearch/_async/client/autoscaling.py +37 -11
- elasticsearch/_async/client/cat.py +260 -69
- elasticsearch/_async/client/ccr.py +123 -38
- elasticsearch/_async/client/cluster.py +153 -42
- elasticsearch/_async/client/dangling_indices.py +27 -8
- elasticsearch/_async/client/enrich.py +48 -14
- elasticsearch/_async/client/eql.py +38 -12
- elasticsearch/_async/client/esql.py +10 -2
- elasticsearch/_async/client/features.py +17 -4
- elasticsearch/_async/client/fleet.py +30 -7
- elasticsearch/_async/client/graph.py +11 -3
- elasticsearch/_async/client/ilm.py +101 -29
- elasticsearch/_async/client/indices.py +688 -181
- elasticsearch/_async/client/inference.py +111 -44
- elasticsearch/_async/client/ingest.py +59 -16
- elasticsearch/_async/client/license.py +58 -14
- elasticsearch/_async/client/logstash.py +31 -9
- elasticsearch/_async/client/migration.py +28 -7
- elasticsearch/_async/client/ml.py +781 -214
- elasticsearch/_async/client/monitoring.py +10 -2
- elasticsearch/_async/client/nodes.py +103 -29
- elasticsearch/_async/client/query_ruleset.py +37 -11
- elasticsearch/_async/client/rollup.py +79 -24
- elasticsearch/_async/client/search_application.py +76 -23
- elasticsearch/_async/client/searchable_snapshots.py +49 -12
- elasticsearch/_async/client/security.py +544 -143
- elasticsearch/_async/client/shutdown.py +28 -6
- elasticsearch/_async/client/slm.py +80 -22
- elasticsearch/_async/client/snapshot.py +140 -54
- elasticsearch/_async/client/sql.py +55 -15
- elasticsearch/_async/client/ssl.py +9 -2
- elasticsearch/_async/client/synonyms.py +75 -21
- elasticsearch/_async/client/tasks.py +29 -8
- elasticsearch/_async/client/text_structure.py +74 -2
- elasticsearch/_async/client/transform.py +106 -32
- elasticsearch/_async/client/watcher.py +110 -31
- elasticsearch/_async/client/xpack.py +16 -4
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_otel.py +92 -0
- elasticsearch/_sync/client/__init__.py +477 -128
- elasticsearch/_sync/client/_base.py +41 -1
- elasticsearch/_sync/client/async_search.py +40 -12
- elasticsearch/_sync/client/autoscaling.py +37 -11
- elasticsearch/_sync/client/cat.py +260 -69
- elasticsearch/_sync/client/ccr.py +123 -38
- elasticsearch/_sync/client/cluster.py +153 -42
- elasticsearch/_sync/client/dangling_indices.py +27 -8
- elasticsearch/_sync/client/enrich.py +48 -14
- elasticsearch/_sync/client/eql.py +38 -12
- elasticsearch/_sync/client/esql.py +10 -2
- elasticsearch/_sync/client/features.py +17 -4
- elasticsearch/_sync/client/fleet.py +30 -7
- elasticsearch/_sync/client/graph.py +11 -3
- elasticsearch/_sync/client/ilm.py +101 -29
- elasticsearch/_sync/client/indices.py +688 -181
- elasticsearch/_sync/client/inference.py +111 -44
- elasticsearch/_sync/client/ingest.py +59 -16
- elasticsearch/_sync/client/license.py +58 -14
- elasticsearch/_sync/client/logstash.py +31 -9
- elasticsearch/_sync/client/migration.py +28 -7
- elasticsearch/_sync/client/ml.py +781 -214
- elasticsearch/_sync/client/monitoring.py +10 -2
- elasticsearch/_sync/client/nodes.py +103 -29
- elasticsearch/_sync/client/query_ruleset.py +37 -11
- elasticsearch/_sync/client/rollup.py +79 -24
- elasticsearch/_sync/client/search_application.py +76 -23
- elasticsearch/_sync/client/searchable_snapshots.py +49 -12
- elasticsearch/_sync/client/security.py +544 -143
- elasticsearch/_sync/client/shutdown.py +28 -6
- elasticsearch/_sync/client/slm.py +80 -22
- elasticsearch/_sync/client/snapshot.py +140 -54
- elasticsearch/_sync/client/sql.py +55 -15
- elasticsearch/_sync/client/ssl.py +9 -2
- elasticsearch/_sync/client/synonyms.py +75 -21
- elasticsearch/_sync/client/tasks.py +29 -8
- elasticsearch/_sync/client/text_structure.py +74 -2
- elasticsearch/_sync/client/transform.py +106 -32
- elasticsearch/_sync/client/watcher.py +110 -31
- elasticsearch/_sync/client/xpack.py +16 -4
- elasticsearch/_version.py +1 -1
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/__init__.py +62 -0
- elasticsearch/helpers/vectorstore/_async/__init__.py +16 -0
- elasticsearch/helpers/vectorstore/_async/_utils.py +39 -0
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +89 -0
- elasticsearch/helpers/vectorstore/_async/strategies.py +466 -0
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +391 -0
- elasticsearch/helpers/vectorstore/_sync/__init__.py +16 -0
- elasticsearch/helpers/vectorstore/_sync/_utils.py +39 -0
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +89 -0
- elasticsearch/helpers/vectorstore/_sync/strategies.py +466 -0
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +388 -0
- elasticsearch/helpers/vectorstore/_utils.py +116 -0
- elasticsearch/serializer.py +14 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/METADATA +28 -8
- elasticsearch-8.13.1.dist-info/RECORD +116 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.12.1.dist-info/RECORD +0 -103
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/LICENSE +0 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/NOTICE +0 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/top_level.txt +0 -0
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class EnrichClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete_policy(
|
|
29
30
|
self,
|
|
@@ -37,13 +38,14 @@ class EnrichClient(NamespacedClient):
|
|
|
37
38
|
"""
|
|
38
39
|
Deletes an existing enrich policy and its enrich index.
|
|
39
40
|
|
|
40
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
41
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-enrich-policy-api.html>`_
|
|
41
42
|
|
|
42
43
|
:param name: Enrich policy to delete.
|
|
43
44
|
"""
|
|
44
45
|
if name in SKIP_IN_PATH:
|
|
45
46
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
46
|
-
|
|
47
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
48
|
+
__path = f'/_enrich/policy/{__path_parts["name"]}'
|
|
47
49
|
__query: t.Dict[str, t.Any] = {}
|
|
48
50
|
if error_trace is not None:
|
|
49
51
|
__query["error_trace"] = error_trace
|
|
@@ -55,7 +57,12 @@ class EnrichClient(NamespacedClient):
|
|
|
55
57
|
__query["pretty"] = pretty
|
|
56
58
|
__headers = {"accept": "application/json"}
|
|
57
59
|
return self.perform_request( # type: ignore[return-value]
|
|
58
|
-
"DELETE",
|
|
60
|
+
"DELETE",
|
|
61
|
+
__path,
|
|
62
|
+
params=__query,
|
|
63
|
+
headers=__headers,
|
|
64
|
+
endpoint_id="enrich.delete_policy",
|
|
65
|
+
path_parts=__path_parts,
|
|
59
66
|
)
|
|
60
67
|
|
|
61
68
|
@_rewrite_parameters()
|
|
@@ -72,7 +79,7 @@ class EnrichClient(NamespacedClient):
|
|
|
72
79
|
"""
|
|
73
80
|
Creates the enrich index for an existing enrich policy.
|
|
74
81
|
|
|
75
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
82
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/execute-enrich-policy-api.html>`_
|
|
76
83
|
|
|
77
84
|
:param name: Enrich policy to execute.
|
|
78
85
|
:param wait_for_completion: If `true`, the request blocks other enrich policy
|
|
@@ -80,7 +87,8 @@ class EnrichClient(NamespacedClient):
|
|
|
80
87
|
"""
|
|
81
88
|
if name in SKIP_IN_PATH:
|
|
82
89
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
83
|
-
|
|
90
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
91
|
+
__path = f'/_enrich/policy/{__path_parts["name"]}/_execute'
|
|
84
92
|
__query: t.Dict[str, t.Any] = {}
|
|
85
93
|
if error_trace is not None:
|
|
86
94
|
__query["error_trace"] = error_trace
|
|
@@ -94,7 +102,12 @@ class EnrichClient(NamespacedClient):
|
|
|
94
102
|
__query["wait_for_completion"] = wait_for_completion
|
|
95
103
|
__headers = {"accept": "application/json"}
|
|
96
104
|
return self.perform_request( # type: ignore[return-value]
|
|
97
|
-
"PUT",
|
|
105
|
+
"PUT",
|
|
106
|
+
__path,
|
|
107
|
+
params=__query,
|
|
108
|
+
headers=__headers,
|
|
109
|
+
endpoint_id="enrich.execute_policy",
|
|
110
|
+
path_parts=__path_parts,
|
|
98
111
|
)
|
|
99
112
|
|
|
100
113
|
@_rewrite_parameters()
|
|
@@ -110,14 +123,17 @@ class EnrichClient(NamespacedClient):
|
|
|
110
123
|
"""
|
|
111
124
|
Gets information about an enrich policy.
|
|
112
125
|
|
|
113
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
126
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-enrich-policy-api.html>`_
|
|
114
127
|
|
|
115
128
|
:param name: Comma-separated list of enrich policy names used to limit the request.
|
|
116
129
|
To return information for all enrich policies, omit this parameter.
|
|
117
130
|
"""
|
|
131
|
+
__path_parts: t.Dict[str, str]
|
|
118
132
|
if name not in SKIP_IN_PATH:
|
|
119
|
-
|
|
133
|
+
__path_parts = {"name": _quote(name)}
|
|
134
|
+
__path = f'/_enrich/policy/{__path_parts["name"]}'
|
|
120
135
|
else:
|
|
136
|
+
__path_parts = {}
|
|
121
137
|
__path = "/_enrich/policy"
|
|
122
138
|
__query: t.Dict[str, t.Any] = {}
|
|
123
139
|
if error_trace is not None:
|
|
@@ -130,7 +146,12 @@ class EnrichClient(NamespacedClient):
|
|
|
130
146
|
__query["pretty"] = pretty
|
|
131
147
|
__headers = {"accept": "application/json"}
|
|
132
148
|
return self.perform_request( # type: ignore[return-value]
|
|
133
|
-
"GET",
|
|
149
|
+
"GET",
|
|
150
|
+
__path,
|
|
151
|
+
params=__query,
|
|
152
|
+
headers=__headers,
|
|
153
|
+
endpoint_id="enrich.get_policy",
|
|
154
|
+
path_parts=__path_parts,
|
|
134
155
|
)
|
|
135
156
|
|
|
136
157
|
@_rewrite_parameters(
|
|
@@ -152,7 +173,7 @@ class EnrichClient(NamespacedClient):
|
|
|
152
173
|
"""
|
|
153
174
|
Creates a new enrich policy.
|
|
154
175
|
|
|
155
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
176
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-enrich-policy-api.html>`_
|
|
156
177
|
|
|
157
178
|
:param name: Name of the enrich policy to create or update.
|
|
158
179
|
:param geo_match: Matches enrich data to incoming documents based on a `geo_shape`
|
|
@@ -163,7 +184,8 @@ class EnrichClient(NamespacedClient):
|
|
|
163
184
|
"""
|
|
164
185
|
if name in SKIP_IN_PATH:
|
|
165
186
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
166
|
-
|
|
187
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
188
|
+
__path = f'/_enrich/policy/{__path_parts["name"]}'
|
|
167
189
|
__query: t.Dict[str, t.Any] = {}
|
|
168
190
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
169
191
|
if error_trace is not None:
|
|
@@ -183,7 +205,13 @@ class EnrichClient(NamespacedClient):
|
|
|
183
205
|
__body["range"] = range
|
|
184
206
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
185
207
|
return self.perform_request( # type: ignore[return-value]
|
|
186
|
-
"PUT",
|
|
208
|
+
"PUT",
|
|
209
|
+
__path,
|
|
210
|
+
params=__query,
|
|
211
|
+
headers=__headers,
|
|
212
|
+
body=__body,
|
|
213
|
+
endpoint_id="enrich.put_policy",
|
|
214
|
+
path_parts=__path_parts,
|
|
187
215
|
)
|
|
188
216
|
|
|
189
217
|
@_rewrite_parameters()
|
|
@@ -199,8 +227,9 @@ class EnrichClient(NamespacedClient):
|
|
|
199
227
|
Gets enrich coordinator statistics and information about enrich policies that
|
|
200
228
|
are currently executing.
|
|
201
229
|
|
|
202
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
230
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/enrich-stats-api.html>`_
|
|
203
231
|
"""
|
|
232
|
+
__path_parts: t.Dict[str, str] = {}
|
|
204
233
|
__path = "/_enrich/_stats"
|
|
205
234
|
__query: t.Dict[str, t.Any] = {}
|
|
206
235
|
if error_trace is not None:
|
|
@@ -213,5 +242,10 @@ class EnrichClient(NamespacedClient):
|
|
|
213
242
|
__query["pretty"] = pretty
|
|
214
243
|
__headers = {"accept": "application/json"}
|
|
215
244
|
return self.perform_request( # type: ignore[return-value]
|
|
216
|
-
"GET",
|
|
245
|
+
"GET",
|
|
246
|
+
__path,
|
|
247
|
+
params=__query,
|
|
248
|
+
headers=__headers,
|
|
249
|
+
endpoint_id="enrich.stats",
|
|
250
|
+
path_parts=__path_parts,
|
|
217
251
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class EqlClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete(
|
|
29
30
|
self,
|
|
@@ -38,7 +39,7 @@ class EqlClient(NamespacedClient):
|
|
|
38
39
|
Deletes an async EQL search by ID. If the search is still running, the search
|
|
39
40
|
request will be cancelled. Otherwise, the saved search results are deleted.
|
|
40
41
|
|
|
41
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
42
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/eql-search-api.html>`_
|
|
42
43
|
|
|
43
44
|
:param id: Identifier for the search to delete. A search ID is provided in the
|
|
44
45
|
EQL search API's response for an async search. A search ID is also provided
|
|
@@ -46,7 +47,8 @@ class EqlClient(NamespacedClient):
|
|
|
46
47
|
"""
|
|
47
48
|
if id in SKIP_IN_PATH:
|
|
48
49
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
49
|
-
|
|
50
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
51
|
+
__path = f'/_eql/search/{__path_parts["id"]}'
|
|
50
52
|
__query: t.Dict[str, t.Any] = {}
|
|
51
53
|
if error_trace is not None:
|
|
52
54
|
__query["error_trace"] = error_trace
|
|
@@ -58,7 +60,12 @@ class EqlClient(NamespacedClient):
|
|
|
58
60
|
__query["pretty"] = pretty
|
|
59
61
|
__headers = {"accept": "application/json"}
|
|
60
62
|
return self.perform_request( # type: ignore[return-value]
|
|
61
|
-
"DELETE",
|
|
63
|
+
"DELETE",
|
|
64
|
+
__path,
|
|
65
|
+
params=__query,
|
|
66
|
+
headers=__headers,
|
|
67
|
+
endpoint_id="eql.delete",
|
|
68
|
+
path_parts=__path_parts,
|
|
62
69
|
)
|
|
63
70
|
|
|
64
71
|
@_rewrite_parameters()
|
|
@@ -78,7 +85,7 @@ class EqlClient(NamespacedClient):
|
|
|
78
85
|
"""
|
|
79
86
|
Returns async results from previously executed Event Query Language (EQL) search
|
|
80
87
|
|
|
81
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
88
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-async-eql-search-api.html>`_
|
|
82
89
|
|
|
83
90
|
:param id: Identifier for the search.
|
|
84
91
|
:param keep_alive: Period for which the search and its results are stored on
|
|
@@ -90,7 +97,8 @@ class EqlClient(NamespacedClient):
|
|
|
90
97
|
"""
|
|
91
98
|
if id in SKIP_IN_PATH:
|
|
92
99
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
93
|
-
|
|
100
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
101
|
+
__path = f'/_eql/search/{__path_parts["id"]}'
|
|
94
102
|
__query: t.Dict[str, t.Any] = {}
|
|
95
103
|
if error_trace is not None:
|
|
96
104
|
__query["error_trace"] = error_trace
|
|
@@ -106,7 +114,12 @@ class EqlClient(NamespacedClient):
|
|
|
106
114
|
__query["wait_for_completion_timeout"] = wait_for_completion_timeout
|
|
107
115
|
__headers = {"accept": "application/json"}
|
|
108
116
|
return self.perform_request( # type: ignore[return-value]
|
|
109
|
-
"GET",
|
|
117
|
+
"GET",
|
|
118
|
+
__path,
|
|
119
|
+
params=__query,
|
|
120
|
+
headers=__headers,
|
|
121
|
+
endpoint_id="eql.get",
|
|
122
|
+
path_parts=__path_parts,
|
|
110
123
|
)
|
|
111
124
|
|
|
112
125
|
@_rewrite_parameters()
|
|
@@ -123,13 +136,14 @@ class EqlClient(NamespacedClient):
|
|
|
123
136
|
Returns the status of a previously submitted async or stored Event Query Language
|
|
124
137
|
(EQL) search
|
|
125
138
|
|
|
126
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
139
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-async-eql-status-api.html>`_
|
|
127
140
|
|
|
128
141
|
:param id: Identifier for the search.
|
|
129
142
|
"""
|
|
130
143
|
if id in SKIP_IN_PATH:
|
|
131
144
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
132
|
-
|
|
145
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
146
|
+
__path = f'/_eql/search/status/{__path_parts["id"]}'
|
|
133
147
|
__query: t.Dict[str, t.Any] = {}
|
|
134
148
|
if error_trace is not None:
|
|
135
149
|
__query["error_trace"] = error_trace
|
|
@@ -141,7 +155,12 @@ class EqlClient(NamespacedClient):
|
|
|
141
155
|
__query["pretty"] = pretty
|
|
142
156
|
__headers = {"accept": "application/json"}
|
|
143
157
|
return self.perform_request( # type: ignore[return-value]
|
|
144
|
-
"GET",
|
|
158
|
+
"GET",
|
|
159
|
+
__path,
|
|
160
|
+
params=__query,
|
|
161
|
+
headers=__headers,
|
|
162
|
+
endpoint_id="eql.get_status",
|
|
163
|
+
path_parts=__path_parts,
|
|
145
164
|
)
|
|
146
165
|
|
|
147
166
|
@_rewrite_parameters(
|
|
@@ -205,7 +224,7 @@ class EqlClient(NamespacedClient):
|
|
|
205
224
|
"""
|
|
206
225
|
Returns results matching a query expressed in Event Query Language (EQL)
|
|
207
226
|
|
|
208
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
227
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/eql-search-api.html>`_
|
|
209
228
|
|
|
210
229
|
:param index: The name of the index to scope the operation
|
|
211
230
|
:param query: EQL query you wish to run.
|
|
@@ -237,7 +256,8 @@ class EqlClient(NamespacedClient):
|
|
|
237
256
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
238
257
|
if query is None and body is None:
|
|
239
258
|
raise ValueError("Empty value passed for parameter 'query'")
|
|
240
|
-
|
|
259
|
+
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
|
|
260
|
+
__path = f'/{__path_parts["index"]}/_eql/search'
|
|
241
261
|
__query: t.Dict[str, t.Any] = {}
|
|
242
262
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
243
263
|
if allow_no_indices is not None:
|
|
@@ -285,5 +305,11 @@ class EqlClient(NamespacedClient):
|
|
|
285
305
|
__body["wait_for_completion_timeout"] = wait_for_completion_timeout
|
|
286
306
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
287
307
|
return self.perform_request( # type: ignore[return-value]
|
|
288
|
-
"POST",
|
|
308
|
+
"POST",
|
|
309
|
+
__path,
|
|
310
|
+
params=__query,
|
|
311
|
+
headers=__headers,
|
|
312
|
+
body=__body,
|
|
313
|
+
endpoint_id="eql.search",
|
|
314
|
+
path_parts=__path_parts,
|
|
289
315
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class EsqlClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters(
|
|
28
29
|
body_fields=("query", "columnar", "filter", "locale", "params"),
|
|
29
30
|
ignore_deprecated_options={"params"},
|
|
@@ -47,7 +48,7 @@ class EsqlClient(NamespacedClient):
|
|
|
47
48
|
"""
|
|
48
49
|
Executes an ESQL request
|
|
49
50
|
|
|
50
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
51
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/esql-rest.html>`_
|
|
51
52
|
|
|
52
53
|
:param query: The ES|QL query API accepts an ES|QL query string in the query
|
|
53
54
|
parameter, runs it, and returns the results.
|
|
@@ -67,6 +68,7 @@ class EsqlClient(NamespacedClient):
|
|
|
67
68
|
"""
|
|
68
69
|
if query is None and body is None:
|
|
69
70
|
raise ValueError("Empty value passed for parameter 'query'")
|
|
71
|
+
__path_parts: t.Dict[str, str] = {}
|
|
70
72
|
__path = "/_query"
|
|
71
73
|
__query: t.Dict[str, t.Any] = {}
|
|
72
74
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
@@ -95,5 +97,11 @@ class EsqlClient(NamespacedClient):
|
|
|
95
97
|
__body["params"] = params
|
|
96
98
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
97
99
|
return self.perform_request( # type: ignore[return-value]
|
|
98
|
-
"POST",
|
|
100
|
+
"POST",
|
|
101
|
+
__path,
|
|
102
|
+
params=__query,
|
|
103
|
+
headers=__headers,
|
|
104
|
+
body=__body,
|
|
105
|
+
endpoint_id="esql.query",
|
|
106
|
+
path_parts=__path_parts,
|
|
99
107
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class FeaturesClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def get_features(
|
|
29
30
|
self,
|
|
@@ -37,8 +38,9 @@ class FeaturesClient(NamespacedClient):
|
|
|
37
38
|
Gets a list of features which can be included in snapshots using the feature_states
|
|
38
39
|
field when creating a snapshot
|
|
39
40
|
|
|
40
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
41
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-features-api.html>`_
|
|
41
42
|
"""
|
|
43
|
+
__path_parts: t.Dict[str, str] = {}
|
|
42
44
|
__path = "/_features"
|
|
43
45
|
__query: t.Dict[str, t.Any] = {}
|
|
44
46
|
if error_trace is not None:
|
|
@@ -51,7 +53,12 @@ class FeaturesClient(NamespacedClient):
|
|
|
51
53
|
__query["pretty"] = pretty
|
|
52
54
|
__headers = {"accept": "application/json"}
|
|
53
55
|
return self.perform_request( # type: ignore[return-value]
|
|
54
|
-
"GET",
|
|
56
|
+
"GET",
|
|
57
|
+
__path,
|
|
58
|
+
params=__query,
|
|
59
|
+
headers=__headers,
|
|
60
|
+
endpoint_id="features.get_features",
|
|
61
|
+
path_parts=__path_parts,
|
|
55
62
|
)
|
|
56
63
|
|
|
57
64
|
@_rewrite_parameters()
|
|
@@ -66,8 +73,9 @@ class FeaturesClient(NamespacedClient):
|
|
|
66
73
|
"""
|
|
67
74
|
Resets the internal state of features, usually by deleting system indices
|
|
68
75
|
|
|
69
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
76
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-snapshots.html>`_
|
|
70
77
|
"""
|
|
78
|
+
__path_parts: t.Dict[str, str] = {}
|
|
71
79
|
__path = "/_features/_reset"
|
|
72
80
|
__query: t.Dict[str, t.Any] = {}
|
|
73
81
|
if error_trace is not None:
|
|
@@ -80,5 +88,10 @@ class FeaturesClient(NamespacedClient):
|
|
|
80
88
|
__query["pretty"] = pretty
|
|
81
89
|
__headers = {"accept": "application/json"}
|
|
82
90
|
return self.perform_request( # type: ignore[return-value]
|
|
83
|
-
"POST",
|
|
91
|
+
"POST",
|
|
92
|
+
__path,
|
|
93
|
+
params=__query,
|
|
94
|
+
headers=__headers,
|
|
95
|
+
endpoint_id="features.reset_features",
|
|
96
|
+
path_parts=__path_parts,
|
|
84
97
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class FleetClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def global_checkpoints(
|
|
29
30
|
self,
|
|
@@ -42,7 +43,7 @@ class FleetClient(NamespacedClient):
|
|
|
42
43
|
Returns the current global checkpoints for an index. This API is design for internal
|
|
43
44
|
use by the fleet server project.
|
|
44
45
|
|
|
45
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
46
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-global-checkpoints.html>`_
|
|
46
47
|
|
|
47
48
|
:param index: A single index or index alias that resolves to a single index.
|
|
48
49
|
:param checkpoints: A comma separated list of previous global checkpoints. When
|
|
@@ -58,7 +59,8 @@ class FleetClient(NamespacedClient):
|
|
|
58
59
|
"""
|
|
59
60
|
if index in SKIP_IN_PATH:
|
|
60
61
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
61
|
-
|
|
62
|
+
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
|
|
63
|
+
__path = f'/{__path_parts["index"]}/_fleet/global_checkpoints'
|
|
62
64
|
__query: t.Dict[str, t.Any] = {}
|
|
63
65
|
if checkpoints is not None:
|
|
64
66
|
__query["checkpoints"] = checkpoints
|
|
@@ -78,7 +80,12 @@ class FleetClient(NamespacedClient):
|
|
|
78
80
|
__query["wait_for_index"] = wait_for_index
|
|
79
81
|
__headers = {"accept": "application/json"}
|
|
80
82
|
return self.perform_request( # type: ignore[return-value]
|
|
81
|
-
"GET",
|
|
83
|
+
"GET",
|
|
84
|
+
__path,
|
|
85
|
+
params=__query,
|
|
86
|
+
headers=__headers,
|
|
87
|
+
endpoint_id="fleet.global_checkpoints",
|
|
88
|
+
path_parts=__path_parts,
|
|
82
89
|
)
|
|
83
90
|
|
|
84
91
|
@_rewrite_parameters(
|
|
@@ -170,9 +177,12 @@ class FleetClient(NamespacedClient):
|
|
|
170
177
|
)
|
|
171
178
|
elif searches is not None and body is not None:
|
|
172
179
|
raise ValueError("Cannot set both 'searches' and 'body'")
|
|
180
|
+
__path_parts: t.Dict[str, str]
|
|
173
181
|
if index not in SKIP_IN_PATH:
|
|
174
|
-
|
|
182
|
+
__path_parts = {"index": _quote(index)}
|
|
183
|
+
__path = f'/{__path_parts["index"]}/_fleet/_fleet_msearch'
|
|
175
184
|
else:
|
|
185
|
+
__path_parts = {}
|
|
176
186
|
__path = "/_fleet/_fleet_msearch"
|
|
177
187
|
__query: t.Dict[str, t.Any] = {}
|
|
178
188
|
if allow_no_indices is not None:
|
|
@@ -215,7 +225,13 @@ class FleetClient(NamespacedClient):
|
|
|
215
225
|
"content-type": "application/x-ndjson",
|
|
216
226
|
}
|
|
217
227
|
return self.perform_request( # type: ignore[return-value]
|
|
218
|
-
"POST",
|
|
228
|
+
"POST",
|
|
229
|
+
__path,
|
|
230
|
+
params=__query,
|
|
231
|
+
headers=__headers,
|
|
232
|
+
body=__body,
|
|
233
|
+
endpoint_id="fleet.msearch",
|
|
234
|
+
path_parts=__path_parts,
|
|
219
235
|
)
|
|
220
236
|
|
|
221
237
|
@_rewrite_parameters(
|
|
@@ -459,7 +475,8 @@ class FleetClient(NamespacedClient):
|
|
|
459
475
|
"""
|
|
460
476
|
if index in SKIP_IN_PATH:
|
|
461
477
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
462
|
-
|
|
478
|
+
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
|
|
479
|
+
__path = f'/{__path_parts["index"]}/_fleet/_fleet_search'
|
|
463
480
|
__query: t.Dict[str, t.Any] = {}
|
|
464
481
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
465
482
|
# The 'sort' parameter with a colon can't be encoded to the body.
|
|
@@ -612,5 +629,11 @@ class FleetClient(NamespacedClient):
|
|
|
612
629
|
if __body is not None:
|
|
613
630
|
__headers["content-type"] = "application/json"
|
|
614
631
|
return self.perform_request( # type: ignore[return-value]
|
|
615
|
-
"POST",
|
|
632
|
+
"POST",
|
|
633
|
+
__path,
|
|
634
|
+
params=__query,
|
|
635
|
+
headers=__headers,
|
|
636
|
+
body=__body,
|
|
637
|
+
endpoint_id="fleet.search",
|
|
638
|
+
path_parts=__path_parts,
|
|
616
639
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class GraphClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters(
|
|
28
29
|
body_fields=("connections", "controls", "query", "vertices"),
|
|
29
30
|
)
|
|
@@ -47,7 +48,7 @@ class GraphClient(NamespacedClient):
|
|
|
47
48
|
Explore extracted and summarized information about the documents and terms in
|
|
48
49
|
an index.
|
|
49
50
|
|
|
50
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
51
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/graph-explore-api.html>`_
|
|
51
52
|
|
|
52
53
|
:param index: Name of the index.
|
|
53
54
|
:param connections: Specifies or more fields from which you want to extract terms
|
|
@@ -64,7 +65,8 @@ class GraphClient(NamespacedClient):
|
|
|
64
65
|
"""
|
|
65
66
|
if index in SKIP_IN_PATH:
|
|
66
67
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
67
|
-
|
|
68
|
+
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
|
|
69
|
+
__path = f'/{__path_parts["index"]}/_graph/explore'
|
|
68
70
|
__query: t.Dict[str, t.Any] = {}
|
|
69
71
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
70
72
|
if error_trace is not None:
|
|
@@ -94,5 +96,11 @@ class GraphClient(NamespacedClient):
|
|
|
94
96
|
if __body is not None:
|
|
95
97
|
__headers["content-type"] = "application/json"
|
|
96
98
|
return self.perform_request( # type: ignore[return-value]
|
|
97
|
-
"POST",
|
|
99
|
+
"POST",
|
|
100
|
+
__path,
|
|
101
|
+
params=__query,
|
|
102
|
+
headers=__headers,
|
|
103
|
+
body=__body,
|
|
104
|
+
endpoint_id="graph.explore",
|
|
105
|
+
path_parts=__path_parts,
|
|
98
106
|
)
|