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,12 +24,15 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class InferenceClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete_model(
|
|
29
30
|
self,
|
|
30
31
|
*,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
inference_id: str,
|
|
33
|
+
task_type: t.Optional[
|
|
34
|
+
t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
|
|
35
|
+
] = None,
|
|
33
36
|
error_trace: t.Optional[bool] = None,
|
|
34
37
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
35
38
|
human: t.Optional[bool] = None,
|
|
@@ -38,16 +41,25 @@ class InferenceClient(NamespacedClient):
|
|
|
38
41
|
"""
|
|
39
42
|
Delete model in the Inference API
|
|
40
43
|
|
|
41
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
44
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-inference-api.html>`_
|
|
42
45
|
|
|
43
|
-
:param
|
|
44
|
-
:param
|
|
46
|
+
:param inference_id: The inference Id
|
|
47
|
+
:param task_type: The task type
|
|
45
48
|
"""
|
|
46
|
-
if
|
|
47
|
-
raise ValueError("Empty value passed for parameter '
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if inference_id in SKIP_IN_PATH:
|
|
50
|
+
raise ValueError("Empty value passed for parameter 'inference_id'")
|
|
51
|
+
__path_parts: t.Dict[str, str]
|
|
52
|
+
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
|
|
53
|
+
__path_parts = {
|
|
54
|
+
"task_type": _quote(task_type),
|
|
55
|
+
"inference_id": _quote(inference_id),
|
|
56
|
+
}
|
|
57
|
+
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}'
|
|
58
|
+
elif inference_id not in SKIP_IN_PATH:
|
|
59
|
+
__path_parts = {"inference_id": _quote(inference_id)}
|
|
60
|
+
__path = f'/_inference/{__path_parts["inference_id"]}'
|
|
61
|
+
else:
|
|
62
|
+
raise ValueError("Couldn't find a path for the given parameters")
|
|
51
63
|
__query: t.Dict[str, t.Any] = {}
|
|
52
64
|
if error_trace is not None:
|
|
53
65
|
__query["error_trace"] = error_trace
|
|
@@ -59,15 +71,22 @@ class InferenceClient(NamespacedClient):
|
|
|
59
71
|
__query["pretty"] = pretty
|
|
60
72
|
__headers = {"accept": "application/json"}
|
|
61
73
|
return self.perform_request( # type: ignore[return-value]
|
|
62
|
-
"DELETE",
|
|
74
|
+
"DELETE",
|
|
75
|
+
__path,
|
|
76
|
+
params=__query,
|
|
77
|
+
headers=__headers,
|
|
78
|
+
endpoint_id="inference.delete_model",
|
|
79
|
+
path_parts=__path_parts,
|
|
63
80
|
)
|
|
64
81
|
|
|
65
82
|
@_rewrite_parameters()
|
|
66
83
|
def get_model(
|
|
67
84
|
self,
|
|
68
85
|
*,
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
inference_id: str,
|
|
87
|
+
task_type: t.Optional[
|
|
88
|
+
t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
|
|
89
|
+
] = None,
|
|
71
90
|
error_trace: t.Optional[bool] = None,
|
|
72
91
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
73
92
|
human: t.Optional[bool] = None,
|
|
@@ -76,16 +95,25 @@ class InferenceClient(NamespacedClient):
|
|
|
76
95
|
"""
|
|
77
96
|
Get a model in the Inference API
|
|
78
97
|
|
|
79
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
98
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-inference-api.html>`_
|
|
80
99
|
|
|
81
|
-
:param
|
|
82
|
-
:param
|
|
100
|
+
:param inference_id: The inference Id
|
|
101
|
+
:param task_type: The task type
|
|
83
102
|
"""
|
|
84
|
-
if
|
|
85
|
-
raise ValueError("Empty value passed for parameter '
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
if inference_id in SKIP_IN_PATH:
|
|
104
|
+
raise ValueError("Empty value passed for parameter 'inference_id'")
|
|
105
|
+
__path_parts: t.Dict[str, str]
|
|
106
|
+
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
|
|
107
|
+
__path_parts = {
|
|
108
|
+
"task_type": _quote(task_type),
|
|
109
|
+
"inference_id": _quote(inference_id),
|
|
110
|
+
}
|
|
111
|
+
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}'
|
|
112
|
+
elif inference_id not in SKIP_IN_PATH:
|
|
113
|
+
__path_parts = {"inference_id": _quote(inference_id)}
|
|
114
|
+
__path = f'/_inference/{__path_parts["inference_id"]}'
|
|
115
|
+
else:
|
|
116
|
+
raise ValueError("Couldn't find a path for the given parameters")
|
|
89
117
|
__query: t.Dict[str, t.Any] = {}
|
|
90
118
|
if error_trace is not None:
|
|
91
119
|
__query["error_trace"] = error_trace
|
|
@@ -97,7 +125,12 @@ class InferenceClient(NamespacedClient):
|
|
|
97
125
|
__query["pretty"] = pretty
|
|
98
126
|
__headers = {"accept": "application/json"}
|
|
99
127
|
return self.perform_request( # type: ignore[return-value]
|
|
100
|
-
"GET",
|
|
128
|
+
"GET",
|
|
129
|
+
__path,
|
|
130
|
+
params=__query,
|
|
131
|
+
headers=__headers,
|
|
132
|
+
endpoint_id="inference.get_model",
|
|
133
|
+
path_parts=__path_parts,
|
|
101
134
|
)
|
|
102
135
|
|
|
103
136
|
@_rewrite_parameters(
|
|
@@ -106,9 +139,11 @@ class InferenceClient(NamespacedClient):
|
|
|
106
139
|
def inference(
|
|
107
140
|
self,
|
|
108
141
|
*,
|
|
109
|
-
|
|
110
|
-
model_id: str,
|
|
142
|
+
inference_id: str,
|
|
111
143
|
input: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
144
|
+
task_type: t.Optional[
|
|
145
|
+
t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
|
|
146
|
+
] = None,
|
|
112
147
|
error_trace: t.Optional[bool] = None,
|
|
113
148
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
114
149
|
human: t.Optional[bool] = None,
|
|
@@ -119,20 +154,29 @@ class InferenceClient(NamespacedClient):
|
|
|
119
154
|
"""
|
|
120
155
|
Perform inference on a model
|
|
121
156
|
|
|
122
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
157
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/post-inference-api.html>`_
|
|
123
158
|
|
|
124
|
-
:param
|
|
125
|
-
:param model_id: The unique identifier of the inference model.
|
|
159
|
+
:param inference_id: The inference Id
|
|
126
160
|
:param input: Text input to the model. Either a string or an array of strings.
|
|
161
|
+
:param task_type: The task type
|
|
127
162
|
:param task_settings: Optional task settings
|
|
128
163
|
"""
|
|
129
|
-
if
|
|
130
|
-
raise ValueError("Empty value passed for parameter '
|
|
131
|
-
if model_id in SKIP_IN_PATH:
|
|
132
|
-
raise ValueError("Empty value passed for parameter 'model_id'")
|
|
164
|
+
if inference_id in SKIP_IN_PATH:
|
|
165
|
+
raise ValueError("Empty value passed for parameter 'inference_id'")
|
|
133
166
|
if input is None and body is None:
|
|
134
167
|
raise ValueError("Empty value passed for parameter 'input'")
|
|
135
|
-
|
|
168
|
+
__path_parts: t.Dict[str, str]
|
|
169
|
+
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
|
|
170
|
+
__path_parts = {
|
|
171
|
+
"task_type": _quote(task_type),
|
|
172
|
+
"inference_id": _quote(inference_id),
|
|
173
|
+
}
|
|
174
|
+
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}'
|
|
175
|
+
elif inference_id not in SKIP_IN_PATH:
|
|
176
|
+
__path_parts = {"inference_id": _quote(inference_id)}
|
|
177
|
+
__path = f'/_inference/{__path_parts["inference_id"]}'
|
|
178
|
+
else:
|
|
179
|
+
raise ValueError("Couldn't find a path for the given parameters")
|
|
136
180
|
__query: t.Dict[str, t.Any] = {}
|
|
137
181
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
138
182
|
if error_trace is not None:
|
|
@@ -154,7 +198,13 @@ class InferenceClient(NamespacedClient):
|
|
|
154
198
|
if __body is not None:
|
|
155
199
|
__headers["content-type"] = "application/json"
|
|
156
200
|
return self.perform_request( # type: ignore[return-value]
|
|
157
|
-
"POST",
|
|
201
|
+
"POST",
|
|
202
|
+
__path,
|
|
203
|
+
params=__query,
|
|
204
|
+
headers=__headers,
|
|
205
|
+
body=__body,
|
|
206
|
+
endpoint_id="inference.inference",
|
|
207
|
+
path_parts=__path_parts,
|
|
158
208
|
)
|
|
159
209
|
|
|
160
210
|
@_rewrite_parameters(
|
|
@@ -163,8 +213,10 @@ class InferenceClient(NamespacedClient):
|
|
|
163
213
|
def put_model(
|
|
164
214
|
self,
|
|
165
215
|
*,
|
|
166
|
-
|
|
167
|
-
|
|
216
|
+
inference_id: str,
|
|
217
|
+
task_type: t.Optional[
|
|
218
|
+
t.Union["t.Literal['sparse_embedding', 'text_embedding']", str]
|
|
219
|
+
] = None,
|
|
168
220
|
error_trace: t.Optional[bool] = None,
|
|
169
221
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
170
222
|
human: t.Optional[bool] = None,
|
|
@@ -175,23 +227,32 @@ class InferenceClient(NamespacedClient):
|
|
|
175
227
|
"""
|
|
176
228
|
Configure a model for use in the Inference API
|
|
177
229
|
|
|
178
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
230
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-inference-api.html>`_
|
|
179
231
|
|
|
180
|
-
:param
|
|
181
|
-
:param
|
|
232
|
+
:param inference_id: The inference Id
|
|
233
|
+
:param task_type: The task type
|
|
182
234
|
:param model_config:
|
|
183
235
|
"""
|
|
184
|
-
if
|
|
185
|
-
raise ValueError("Empty value passed for parameter '
|
|
186
|
-
if model_id in SKIP_IN_PATH:
|
|
187
|
-
raise ValueError("Empty value passed for parameter 'model_id'")
|
|
236
|
+
if inference_id in SKIP_IN_PATH:
|
|
237
|
+
raise ValueError("Empty value passed for parameter 'inference_id'")
|
|
188
238
|
if model_config is None and body is None:
|
|
189
239
|
raise ValueError(
|
|
190
240
|
"Empty value passed for parameters 'model_config' and 'body', one of them should be set."
|
|
191
241
|
)
|
|
192
242
|
elif model_config is not None and body is not None:
|
|
193
243
|
raise ValueError("Cannot set both 'model_config' and 'body'")
|
|
194
|
-
|
|
244
|
+
__path_parts: t.Dict[str, str]
|
|
245
|
+
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
|
|
246
|
+
__path_parts = {
|
|
247
|
+
"task_type": _quote(task_type),
|
|
248
|
+
"inference_id": _quote(inference_id),
|
|
249
|
+
}
|
|
250
|
+
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}'
|
|
251
|
+
elif inference_id not in SKIP_IN_PATH:
|
|
252
|
+
__path_parts = {"inference_id": _quote(inference_id)}
|
|
253
|
+
__path = f'/_inference/{__path_parts["inference_id"]}'
|
|
254
|
+
else:
|
|
255
|
+
raise ValueError("Couldn't find a path for the given parameters")
|
|
195
256
|
__query: t.Dict[str, t.Any] = {}
|
|
196
257
|
if error_trace is not None:
|
|
197
258
|
__query["error_trace"] = error_trace
|
|
@@ -208,5 +269,11 @@ class InferenceClient(NamespacedClient):
|
|
|
208
269
|
if __body is not None:
|
|
209
270
|
__headers["content-type"] = "application/json"
|
|
210
271
|
return self.perform_request( # type: ignore[return-value]
|
|
211
|
-
"PUT",
|
|
272
|
+
"PUT",
|
|
273
|
+
__path,
|
|
274
|
+
params=__query,
|
|
275
|
+
headers=__headers,
|
|
276
|
+
body=__body,
|
|
277
|
+
endpoint_id="inference.put_model",
|
|
278
|
+
path_parts=__path_parts,
|
|
212
279
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class IngestClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete_pipeline(
|
|
29
30
|
self,
|
|
@@ -41,7 +42,7 @@ class IngestClient(NamespacedClient):
|
|
|
41
42
|
"""
|
|
42
43
|
Deletes a pipeline.
|
|
43
44
|
|
|
44
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
45
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-pipeline-api.html>`_
|
|
45
46
|
|
|
46
47
|
:param id: Pipeline ID or wildcard expression of pipeline IDs used to limit the
|
|
47
48
|
request. To delete all ingest pipelines in a cluster, use a value of `*`.
|
|
@@ -53,7 +54,8 @@ class IngestClient(NamespacedClient):
|
|
|
53
54
|
"""
|
|
54
55
|
if id in SKIP_IN_PATH:
|
|
55
56
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
56
|
-
|
|
57
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
58
|
+
__path = f'/_ingest/pipeline/{__path_parts["id"]}'
|
|
57
59
|
__query: t.Dict[str, t.Any] = {}
|
|
58
60
|
if error_trace is not None:
|
|
59
61
|
__query["error_trace"] = error_trace
|
|
@@ -69,7 +71,12 @@ class IngestClient(NamespacedClient):
|
|
|
69
71
|
__query["timeout"] = timeout
|
|
70
72
|
__headers = {"accept": "application/json"}
|
|
71
73
|
return self.perform_request( # type: ignore[return-value]
|
|
72
|
-
"DELETE",
|
|
74
|
+
"DELETE",
|
|
75
|
+
__path,
|
|
76
|
+
params=__query,
|
|
77
|
+
headers=__headers,
|
|
78
|
+
endpoint_id="ingest.delete_pipeline",
|
|
79
|
+
path_parts=__path_parts,
|
|
73
80
|
)
|
|
74
81
|
|
|
75
82
|
@_rewrite_parameters()
|
|
@@ -84,8 +91,9 @@ class IngestClient(NamespacedClient):
|
|
|
84
91
|
"""
|
|
85
92
|
Returns statistical information about geoip databases
|
|
86
93
|
|
|
87
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
94
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/geoip-processor.html>`_
|
|
88
95
|
"""
|
|
96
|
+
__path_parts: t.Dict[str, str] = {}
|
|
89
97
|
__path = "/_ingest/geoip/stats"
|
|
90
98
|
__query: t.Dict[str, t.Any] = {}
|
|
91
99
|
if error_trace is not None:
|
|
@@ -98,7 +106,12 @@ class IngestClient(NamespacedClient):
|
|
|
98
106
|
__query["pretty"] = pretty
|
|
99
107
|
__headers = {"accept": "application/json"}
|
|
100
108
|
return self.perform_request( # type: ignore[return-value]
|
|
101
|
-
"GET",
|
|
109
|
+
"GET",
|
|
110
|
+
__path,
|
|
111
|
+
params=__query,
|
|
112
|
+
headers=__headers,
|
|
113
|
+
endpoint_id="ingest.geo_ip_stats",
|
|
114
|
+
path_parts=__path_parts,
|
|
102
115
|
)
|
|
103
116
|
|
|
104
117
|
@_rewrite_parameters()
|
|
@@ -118,7 +131,7 @@ class IngestClient(NamespacedClient):
|
|
|
118
131
|
"""
|
|
119
132
|
Returns a pipeline.
|
|
120
133
|
|
|
121
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
134
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-pipeline-api.html>`_
|
|
122
135
|
|
|
123
136
|
:param id: Comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions
|
|
124
137
|
are supported. To get all ingest pipelines, omit this parameter or use `*`.
|
|
@@ -127,9 +140,12 @@ class IngestClient(NamespacedClient):
|
|
|
127
140
|
returns an error.
|
|
128
141
|
:param summary: Return pipelines without their definitions (default: false)
|
|
129
142
|
"""
|
|
143
|
+
__path_parts: t.Dict[str, str]
|
|
130
144
|
if id not in SKIP_IN_PATH:
|
|
131
|
-
|
|
145
|
+
__path_parts = {"id": _quote(id)}
|
|
146
|
+
__path = f'/_ingest/pipeline/{__path_parts["id"]}'
|
|
132
147
|
else:
|
|
148
|
+
__path_parts = {}
|
|
133
149
|
__path = "/_ingest/pipeline"
|
|
134
150
|
__query: t.Dict[str, t.Any] = {}
|
|
135
151
|
if error_trace is not None:
|
|
@@ -146,7 +162,12 @@ class IngestClient(NamespacedClient):
|
|
|
146
162
|
__query["summary"] = summary
|
|
147
163
|
__headers = {"accept": "application/json"}
|
|
148
164
|
return self.perform_request( # type: ignore[return-value]
|
|
149
|
-
"GET",
|
|
165
|
+
"GET",
|
|
166
|
+
__path,
|
|
167
|
+
params=__query,
|
|
168
|
+
headers=__headers,
|
|
169
|
+
endpoint_id="ingest.get_pipeline",
|
|
170
|
+
path_parts=__path_parts,
|
|
150
171
|
)
|
|
151
172
|
|
|
152
173
|
@_rewrite_parameters()
|
|
@@ -161,8 +182,9 @@ class IngestClient(NamespacedClient):
|
|
|
161
182
|
"""
|
|
162
183
|
Returns a list of the built-in patterns.
|
|
163
184
|
|
|
164
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
185
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/grok-processor.html>`_
|
|
165
186
|
"""
|
|
187
|
+
__path_parts: t.Dict[str, str] = {}
|
|
166
188
|
__path = "/_ingest/processor/grok"
|
|
167
189
|
__query: t.Dict[str, t.Any] = {}
|
|
168
190
|
if error_trace is not None:
|
|
@@ -175,7 +197,12 @@ class IngestClient(NamespacedClient):
|
|
|
175
197
|
__query["pretty"] = pretty
|
|
176
198
|
__headers = {"accept": "application/json"}
|
|
177
199
|
return self.perform_request( # type: ignore[return-value]
|
|
178
|
-
"GET",
|
|
200
|
+
"GET",
|
|
201
|
+
__path,
|
|
202
|
+
params=__query,
|
|
203
|
+
headers=__headers,
|
|
204
|
+
endpoint_id="ingest.processor_grok",
|
|
205
|
+
path_parts=__path_parts,
|
|
179
206
|
)
|
|
180
207
|
|
|
181
208
|
@_rewrite_parameters(
|
|
@@ -205,7 +232,7 @@ class IngestClient(NamespacedClient):
|
|
|
205
232
|
"""
|
|
206
233
|
Creates or updates a pipeline.
|
|
207
234
|
|
|
208
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
235
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/ingest.html>`_
|
|
209
236
|
|
|
210
237
|
:param id: ID of the ingest pipeline to create or update.
|
|
211
238
|
:param description: Description of the ingest pipeline.
|
|
@@ -232,7 +259,8 @@ class IngestClient(NamespacedClient):
|
|
|
232
259
|
"""
|
|
233
260
|
if id in SKIP_IN_PATH:
|
|
234
261
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
235
|
-
|
|
262
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
263
|
+
__path = f'/_ingest/pipeline/{__path_parts["id"]}'
|
|
236
264
|
__query: t.Dict[str, t.Any] = {}
|
|
237
265
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
238
266
|
if error_trace is not None:
|
|
@@ -262,7 +290,13 @@ class IngestClient(NamespacedClient):
|
|
|
262
290
|
__body["version"] = version
|
|
263
291
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
264
292
|
return self.perform_request( # type: ignore[return-value]
|
|
265
|
-
"PUT",
|
|
293
|
+
"PUT",
|
|
294
|
+
__path,
|
|
295
|
+
params=__query,
|
|
296
|
+
headers=__headers,
|
|
297
|
+
body=__body,
|
|
298
|
+
endpoint_id="ingest.put_pipeline",
|
|
299
|
+
path_parts=__path_parts,
|
|
266
300
|
)
|
|
267
301
|
|
|
268
302
|
@_rewrite_parameters(
|
|
@@ -284,7 +318,7 @@ class IngestClient(NamespacedClient):
|
|
|
284
318
|
"""
|
|
285
319
|
Allows to simulate a pipeline with example documents.
|
|
286
320
|
|
|
287
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
321
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/simulate-pipeline-api.html>`_
|
|
288
322
|
|
|
289
323
|
:param id: Pipeline to test. If you don’t specify a `pipeline` in the request
|
|
290
324
|
body, this parameter is required.
|
|
@@ -295,9 +329,12 @@ class IngestClient(NamespacedClient):
|
|
|
295
329
|
:param verbose: If `true`, the response includes output data for each processor
|
|
296
330
|
in the executed pipeline.
|
|
297
331
|
"""
|
|
332
|
+
__path_parts: t.Dict[str, str]
|
|
298
333
|
if id not in SKIP_IN_PATH:
|
|
299
|
-
|
|
334
|
+
__path_parts = {"id": _quote(id)}
|
|
335
|
+
__path = f'/_ingest/pipeline/{__path_parts["id"]}/_simulate'
|
|
300
336
|
else:
|
|
337
|
+
__path_parts = {}
|
|
301
338
|
__path = "/_ingest/pipeline/_simulate"
|
|
302
339
|
__query: t.Dict[str, t.Any] = {}
|
|
303
340
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
@@ -318,5 +355,11 @@ class IngestClient(NamespacedClient):
|
|
|
318
355
|
__body["pipeline"] = pipeline
|
|
319
356
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
320
357
|
return self.perform_request( # type: ignore[return-value]
|
|
321
|
-
"POST",
|
|
358
|
+
"POST",
|
|
359
|
+
__path,
|
|
360
|
+
params=__query,
|
|
361
|
+
headers=__headers,
|
|
362
|
+
body=__body,
|
|
363
|
+
endpoint_id="ingest.simulate",
|
|
364
|
+
path_parts=__path_parts,
|
|
322
365
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class LicenseClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete(
|
|
29
30
|
self,
|
|
@@ -36,8 +37,9 @@ class LicenseClient(NamespacedClient):
|
|
|
36
37
|
"""
|
|
37
38
|
Deletes licensing information for the cluster
|
|
38
39
|
|
|
39
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
40
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-license.html>`_
|
|
40
41
|
"""
|
|
42
|
+
__path_parts: t.Dict[str, str] = {}
|
|
41
43
|
__path = "/_license"
|
|
42
44
|
__query: t.Dict[str, t.Any] = {}
|
|
43
45
|
if error_trace is not None:
|
|
@@ -50,7 +52,12 @@ class LicenseClient(NamespacedClient):
|
|
|
50
52
|
__query["pretty"] = pretty
|
|
51
53
|
__headers = {"accept": "application/json"}
|
|
52
54
|
return self.perform_request( # type: ignore[return-value]
|
|
53
|
-
"DELETE",
|
|
55
|
+
"DELETE",
|
|
56
|
+
__path,
|
|
57
|
+
params=__query,
|
|
58
|
+
headers=__headers,
|
|
59
|
+
endpoint_id="license.delete",
|
|
60
|
+
path_parts=__path_parts,
|
|
54
61
|
)
|
|
55
62
|
|
|
56
63
|
@_rewrite_parameters()
|
|
@@ -67,7 +74,7 @@ class LicenseClient(NamespacedClient):
|
|
|
67
74
|
"""
|
|
68
75
|
Retrieves licensing information for the cluster
|
|
69
76
|
|
|
70
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
77
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-license.html>`_
|
|
71
78
|
|
|
72
79
|
:param accept_enterprise: If `true`, this parameter returns enterprise for Enterprise
|
|
73
80
|
license types. If `false`, this parameter returns platinum for both platinum
|
|
@@ -76,6 +83,7 @@ class LicenseClient(NamespacedClient):
|
|
|
76
83
|
:param local: Specifies whether to retrieve local information. The default value
|
|
77
84
|
is `false`, which means the information is retrieved from the master node.
|
|
78
85
|
"""
|
|
86
|
+
__path_parts: t.Dict[str, str] = {}
|
|
79
87
|
__path = "/_license"
|
|
80
88
|
__query: t.Dict[str, t.Any] = {}
|
|
81
89
|
if accept_enterprise is not None:
|
|
@@ -92,7 +100,12 @@ class LicenseClient(NamespacedClient):
|
|
|
92
100
|
__query["pretty"] = pretty
|
|
93
101
|
__headers = {"accept": "application/json"}
|
|
94
102
|
return self.perform_request( # type: ignore[return-value]
|
|
95
|
-
"GET",
|
|
103
|
+
"GET",
|
|
104
|
+
__path,
|
|
105
|
+
params=__query,
|
|
106
|
+
headers=__headers,
|
|
107
|
+
endpoint_id="license.get",
|
|
108
|
+
path_parts=__path_parts,
|
|
96
109
|
)
|
|
97
110
|
|
|
98
111
|
@_rewrite_parameters()
|
|
@@ -107,8 +120,9 @@ class LicenseClient(NamespacedClient):
|
|
|
107
120
|
"""
|
|
108
121
|
Retrieves information about the status of the basic license.
|
|
109
122
|
|
|
110
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
123
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-basic-status.html>`_
|
|
111
124
|
"""
|
|
125
|
+
__path_parts: t.Dict[str, str] = {}
|
|
112
126
|
__path = "/_license/basic_status"
|
|
113
127
|
__query: t.Dict[str, t.Any] = {}
|
|
114
128
|
if error_trace is not None:
|
|
@@ -121,7 +135,12 @@ class LicenseClient(NamespacedClient):
|
|
|
121
135
|
__query["pretty"] = pretty
|
|
122
136
|
__headers = {"accept": "application/json"}
|
|
123
137
|
return self.perform_request( # type: ignore[return-value]
|
|
124
|
-
"GET",
|
|
138
|
+
"GET",
|
|
139
|
+
__path,
|
|
140
|
+
params=__query,
|
|
141
|
+
headers=__headers,
|
|
142
|
+
endpoint_id="license.get_basic_status",
|
|
143
|
+
path_parts=__path_parts,
|
|
125
144
|
)
|
|
126
145
|
|
|
127
146
|
@_rewrite_parameters()
|
|
@@ -136,8 +155,9 @@ class LicenseClient(NamespacedClient):
|
|
|
136
155
|
"""
|
|
137
156
|
Retrieves information about the status of the trial license.
|
|
138
157
|
|
|
139
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
158
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-trial-status.html>`_
|
|
140
159
|
"""
|
|
160
|
+
__path_parts: t.Dict[str, str] = {}
|
|
141
161
|
__path = "/_license/trial_status"
|
|
142
162
|
__query: t.Dict[str, t.Any] = {}
|
|
143
163
|
if error_trace is not None:
|
|
@@ -150,7 +170,12 @@ class LicenseClient(NamespacedClient):
|
|
|
150
170
|
__query["pretty"] = pretty
|
|
151
171
|
__headers = {"accept": "application/json"}
|
|
152
172
|
return self.perform_request( # type: ignore[return-value]
|
|
153
|
-
"GET",
|
|
173
|
+
"GET",
|
|
174
|
+
__path,
|
|
175
|
+
params=__query,
|
|
176
|
+
headers=__headers,
|
|
177
|
+
endpoint_id="license.get_trial_status",
|
|
178
|
+
path_parts=__path_parts,
|
|
154
179
|
)
|
|
155
180
|
|
|
156
181
|
@_rewrite_parameters(
|
|
@@ -171,13 +196,14 @@ class LicenseClient(NamespacedClient):
|
|
|
171
196
|
"""
|
|
172
197
|
Updates the license for the cluster.
|
|
173
198
|
|
|
174
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
199
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/update-license.html>`_
|
|
175
200
|
|
|
176
201
|
:param acknowledge: Specifies whether you acknowledge the license changes.
|
|
177
202
|
:param license:
|
|
178
203
|
:param licenses: A sequence of one or more JSON documents containing the license
|
|
179
204
|
information.
|
|
180
205
|
"""
|
|
206
|
+
__path_parts: t.Dict[str, str] = {}
|
|
181
207
|
__path = "/_license"
|
|
182
208
|
__query: t.Dict[str, t.Any] = {}
|
|
183
209
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
@@ -202,7 +228,13 @@ class LicenseClient(NamespacedClient):
|
|
|
202
228
|
if __body is not None:
|
|
203
229
|
__headers["content-type"] = "application/json"
|
|
204
230
|
return self.perform_request( # type: ignore[return-value]
|
|
205
|
-
"PUT",
|
|
231
|
+
"PUT",
|
|
232
|
+
__path,
|
|
233
|
+
params=__query,
|
|
234
|
+
headers=__headers,
|
|
235
|
+
body=__body,
|
|
236
|
+
endpoint_id="license.post",
|
|
237
|
+
path_parts=__path_parts,
|
|
206
238
|
)
|
|
207
239
|
|
|
208
240
|
@_rewrite_parameters()
|
|
@@ -218,11 +250,12 @@ class LicenseClient(NamespacedClient):
|
|
|
218
250
|
"""
|
|
219
251
|
Starts an indefinite basic license.
|
|
220
252
|
|
|
221
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
253
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/start-basic.html>`_
|
|
222
254
|
|
|
223
255
|
:param acknowledge: whether the user has acknowledged acknowledge messages (default:
|
|
224
256
|
false)
|
|
225
257
|
"""
|
|
258
|
+
__path_parts: t.Dict[str, str] = {}
|
|
226
259
|
__path = "/_license/start_basic"
|
|
227
260
|
__query: t.Dict[str, t.Any] = {}
|
|
228
261
|
if acknowledge is not None:
|
|
@@ -237,7 +270,12 @@ class LicenseClient(NamespacedClient):
|
|
|
237
270
|
__query["pretty"] = pretty
|
|
238
271
|
__headers = {"accept": "application/json"}
|
|
239
272
|
return self.perform_request( # type: ignore[return-value]
|
|
240
|
-
"POST",
|
|
273
|
+
"POST",
|
|
274
|
+
__path,
|
|
275
|
+
params=__query,
|
|
276
|
+
headers=__headers,
|
|
277
|
+
endpoint_id="license.post_start_basic",
|
|
278
|
+
path_parts=__path_parts,
|
|
241
279
|
)
|
|
242
280
|
|
|
243
281
|
@_rewrite_parameters()
|
|
@@ -254,12 +292,13 @@ class LicenseClient(NamespacedClient):
|
|
|
254
292
|
"""
|
|
255
293
|
starts a limited time trial license.
|
|
256
294
|
|
|
257
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
295
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/start-trial.html>`_
|
|
258
296
|
|
|
259
297
|
:param acknowledge: whether the user has acknowledged acknowledge messages (default:
|
|
260
298
|
false)
|
|
261
299
|
:param type_query_string:
|
|
262
300
|
"""
|
|
301
|
+
__path_parts: t.Dict[str, str] = {}
|
|
263
302
|
__path = "/_license/start_trial"
|
|
264
303
|
__query: t.Dict[str, t.Any] = {}
|
|
265
304
|
if acknowledge is not None:
|
|
@@ -276,5 +315,10 @@ class LicenseClient(NamespacedClient):
|
|
|
276
315
|
__query["type_query_string"] = type_query_string
|
|
277
316
|
__headers = {"accept": "application/json"}
|
|
278
317
|
return self.perform_request( # type: ignore[return-value]
|
|
279
|
-
"POST",
|
|
318
|
+
"POST",
|
|
319
|
+
__path,
|
|
320
|
+
params=__query,
|
|
321
|
+
headers=__headers,
|
|
322
|
+
endpoint_id="license.post_start_trial",
|
|
323
|
+
path_parts=__path_parts,
|
|
280
324
|
)
|