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.
- elasticsearch/__init__.py +2 -2
- elasticsearch/_async/client/__init__.py +2034 -740
- elasticsearch/_async/client/async_search.py +33 -22
- elasticsearch/_async/client/autoscaling.py +27 -21
- elasticsearch/_async/client/cat.py +280 -336
- elasticsearch/_async/client/ccr.py +96 -70
- elasticsearch/_async/client/cluster.py +152 -144
- elasticsearch/_async/client/connector.py +488 -55
- elasticsearch/_async/client/dangling_indices.py +22 -16
- elasticsearch/_async/client/enrich.py +25 -6
- elasticsearch/_async/client/eql.py +22 -9
- elasticsearch/_async/client/esql.py +295 -3
- elasticsearch/_async/client/features.py +25 -25
- elasticsearch/_async/client/fleet.py +15 -9
- elasticsearch/_async/client/graph.py +9 -8
- elasticsearch/_async/client/ilm.py +91 -61
- elasticsearch/_async/client/indices.py +746 -324
- elasticsearch/_async/client/inference.py +101 -4
- elasticsearch/_async/client/ingest.py +231 -19
- elasticsearch/_async/client/license.py +48 -31
- elasticsearch/_async/client/logstash.py +20 -6
- elasticsearch/_async/client/migration.py +25 -7
- elasticsearch/_async/client/ml.py +532 -278
- elasticsearch/_async/client/monitoring.py +5 -1
- elasticsearch/_async/client/nodes.py +46 -30
- elasticsearch/_async/client/query_rules.py +65 -18
- elasticsearch/_async/client/rollup.py +126 -13
- elasticsearch/_async/client/search_application.py +170 -13
- elasticsearch/_async/client/searchable_snapshots.py +45 -23
- elasticsearch/_async/client/security.py +1299 -340
- elasticsearch/_async/client/shutdown.py +43 -15
- elasticsearch/_async/client/simulate.py +145 -0
- elasticsearch/_async/client/slm.py +163 -19
- elasticsearch/_async/client/snapshot.py +288 -23
- elasticsearch/_async/client/sql.py +94 -53
- elasticsearch/_async/client/ssl.py +16 -17
- elasticsearch/_async/client/synonyms.py +67 -26
- elasticsearch/_async/client/tasks.py +103 -28
- elasticsearch/_async/client/text_structure.py +475 -46
- elasticsearch/_async/client/transform.py +108 -72
- elasticsearch/_async/client/watcher.py +245 -43
- elasticsearch/_async/client/xpack.py +20 -6
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_sync/client/__init__.py +2034 -740
- elasticsearch/_sync/client/async_search.py +33 -22
- elasticsearch/_sync/client/autoscaling.py +27 -21
- elasticsearch/_sync/client/cat.py +280 -336
- elasticsearch/_sync/client/ccr.py +96 -70
- elasticsearch/_sync/client/cluster.py +152 -144
- elasticsearch/_sync/client/connector.py +488 -55
- elasticsearch/_sync/client/dangling_indices.py +22 -16
- elasticsearch/_sync/client/enrich.py +25 -6
- elasticsearch/_sync/client/eql.py +22 -9
- elasticsearch/_sync/client/esql.py +295 -3
- elasticsearch/_sync/client/features.py +25 -25
- elasticsearch/_sync/client/fleet.py +15 -9
- elasticsearch/_sync/client/graph.py +9 -8
- elasticsearch/_sync/client/ilm.py +91 -61
- elasticsearch/_sync/client/indices.py +746 -324
- elasticsearch/_sync/client/inference.py +101 -4
- elasticsearch/_sync/client/ingest.py +231 -19
- elasticsearch/_sync/client/license.py +48 -31
- elasticsearch/_sync/client/logstash.py +20 -6
- elasticsearch/_sync/client/migration.py +25 -7
- elasticsearch/_sync/client/ml.py +532 -278
- elasticsearch/_sync/client/monitoring.py +5 -1
- elasticsearch/_sync/client/nodes.py +46 -30
- elasticsearch/_sync/client/query_rules.py +65 -18
- elasticsearch/_sync/client/rollup.py +126 -13
- elasticsearch/_sync/client/search_application.py +170 -13
- elasticsearch/_sync/client/searchable_snapshots.py +45 -23
- elasticsearch/_sync/client/security.py +1299 -340
- elasticsearch/_sync/client/shutdown.py +43 -15
- elasticsearch/_sync/client/simulate.py +145 -0
- elasticsearch/_sync/client/slm.py +163 -19
- elasticsearch/_sync/client/snapshot.py +288 -23
- elasticsearch/_sync/client/sql.py +94 -53
- elasticsearch/_sync/client/ssl.py +16 -17
- elasticsearch/_sync/client/synonyms.py +67 -26
- elasticsearch/_sync/client/tasks.py +103 -28
- elasticsearch/_sync/client/text_structure.py +475 -46
- elasticsearch/_sync/client/transform.py +108 -72
- elasticsearch/_sync/client/utils.py +1 -1
- elasticsearch/_sync/client/watcher.py +245 -43
- elasticsearch/_sync/client/xpack.py +20 -6
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +4 -0
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
- elasticsearch-8.17.2.dist-info/RECORD +119 -0
- elasticsearch-8.17.0.dist-info/RECORD +0 -117
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
|
@@ -44,7 +44,10 @@ class InferenceClient(NamespacedClient):
|
|
|
44
44
|
pretty: t.Optional[bool] = None,
|
|
45
45
|
) -> ObjectApiResponse[t.Any]:
|
|
46
46
|
"""
|
|
47
|
-
|
|
47
|
+
.. raw:: html
|
|
48
|
+
|
|
49
|
+
<p>Delete an inference endpoint</p>
|
|
50
|
+
|
|
48
51
|
|
|
49
52
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-inference-api.html>`_
|
|
50
53
|
|
|
@@ -109,7 +112,10 @@ class InferenceClient(NamespacedClient):
|
|
|
109
112
|
pretty: t.Optional[bool] = None,
|
|
110
113
|
) -> ObjectApiResponse[t.Any]:
|
|
111
114
|
"""
|
|
112
|
-
|
|
115
|
+
.. raw:: html
|
|
116
|
+
|
|
117
|
+
<p>Get an inference endpoint</p>
|
|
118
|
+
|
|
113
119
|
|
|
114
120
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-inference-api.html>`_
|
|
115
121
|
|
|
@@ -172,7 +178,10 @@ class InferenceClient(NamespacedClient):
|
|
|
172
178
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
173
179
|
) -> ObjectApiResponse[t.Any]:
|
|
174
180
|
"""
|
|
175
|
-
|
|
181
|
+
.. raw:: html
|
|
182
|
+
|
|
183
|
+
<p>Perform inference on the service</p>
|
|
184
|
+
|
|
176
185
|
|
|
177
186
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-inference-api.html>`_
|
|
178
187
|
|
|
@@ -255,7 +264,18 @@ class InferenceClient(NamespacedClient):
|
|
|
255
264
|
pretty: t.Optional[bool] = None,
|
|
256
265
|
) -> ObjectApiResponse[t.Any]:
|
|
257
266
|
"""
|
|
258
|
-
|
|
267
|
+
.. raw:: html
|
|
268
|
+
|
|
269
|
+
<p>Create an inference endpoint.
|
|
270
|
+
When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running.
|
|
271
|
+
After creating the endpoint, wait for the model deployment to complete before using it.
|
|
272
|
+
To verify the deployment status, use the get trained model statistics API.
|
|
273
|
+
Look for <code>"state": "fully_allocated"</code> in the response and ensure that the <code>"allocation_count"</code> matches the <code>"target_allocation_count"</code>.
|
|
274
|
+
Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.</p>
|
|
275
|
+
<p>IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.
|
|
276
|
+
For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
|
|
277
|
+
However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.</p>
|
|
278
|
+
|
|
259
279
|
|
|
260
280
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-inference-api.html>`_
|
|
261
281
|
|
|
@@ -303,3 +323,80 @@ class InferenceClient(NamespacedClient):
|
|
|
303
323
|
endpoint_id="inference.put",
|
|
304
324
|
path_parts=__path_parts,
|
|
305
325
|
)
|
|
326
|
+
|
|
327
|
+
@_rewrite_parameters(
|
|
328
|
+
body_name="inference_config",
|
|
329
|
+
)
|
|
330
|
+
def update(
|
|
331
|
+
self,
|
|
332
|
+
*,
|
|
333
|
+
inference_id: str,
|
|
334
|
+
inference_config: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
335
|
+
body: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
336
|
+
task_type: t.Optional[
|
|
337
|
+
t.Union[
|
|
338
|
+
str,
|
|
339
|
+
t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"],
|
|
340
|
+
]
|
|
341
|
+
] = None,
|
|
342
|
+
error_trace: t.Optional[bool] = None,
|
|
343
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
344
|
+
human: t.Optional[bool] = None,
|
|
345
|
+
pretty: t.Optional[bool] = None,
|
|
346
|
+
) -> ObjectApiResponse[t.Any]:
|
|
347
|
+
"""
|
|
348
|
+
.. raw:: html
|
|
349
|
+
|
|
350
|
+
<p>Update an inference endpoint.</p>
|
|
351
|
+
<p>Modify <code>task_settings</code>, secrets (within <code>service_settings</code>), or <code>num_allocations</code> for an inference endpoint, depending on the specific endpoint service and <code>task_type</code>.</p>
|
|
352
|
+
<p>IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.
|
|
353
|
+
For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
|
|
354
|
+
However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.</p>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-inference-api.html>`_
|
|
358
|
+
|
|
359
|
+
:param inference_id: The unique identifier of the inference endpoint.
|
|
360
|
+
:param inference_config:
|
|
361
|
+
:param task_type: The type of inference task that the model performs.
|
|
362
|
+
"""
|
|
363
|
+
if inference_id in SKIP_IN_PATH:
|
|
364
|
+
raise ValueError("Empty value passed for parameter 'inference_id'")
|
|
365
|
+
if inference_config is None and body is None:
|
|
366
|
+
raise ValueError(
|
|
367
|
+
"Empty value passed for parameters 'inference_config' and 'body', one of them should be set."
|
|
368
|
+
)
|
|
369
|
+
elif inference_config is not None and body is not None:
|
|
370
|
+
raise ValueError("Cannot set both 'inference_config' and 'body'")
|
|
371
|
+
__path_parts: t.Dict[str, str]
|
|
372
|
+
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
|
|
373
|
+
__path_parts = {
|
|
374
|
+
"task_type": _quote(task_type),
|
|
375
|
+
"inference_id": _quote(inference_id),
|
|
376
|
+
}
|
|
377
|
+
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}/_update'
|
|
378
|
+
elif inference_id not in SKIP_IN_PATH:
|
|
379
|
+
__path_parts = {"inference_id": _quote(inference_id)}
|
|
380
|
+
__path = f'/_inference/{__path_parts["inference_id"]}/_update'
|
|
381
|
+
else:
|
|
382
|
+
raise ValueError("Couldn't find a path for the given parameters")
|
|
383
|
+
__query: t.Dict[str, t.Any] = {}
|
|
384
|
+
if error_trace is not None:
|
|
385
|
+
__query["error_trace"] = error_trace
|
|
386
|
+
if filter_path is not None:
|
|
387
|
+
__query["filter_path"] = filter_path
|
|
388
|
+
if human is not None:
|
|
389
|
+
__query["human"] = human
|
|
390
|
+
if pretty is not None:
|
|
391
|
+
__query["pretty"] = pretty
|
|
392
|
+
__body = inference_config if inference_config is not None else body
|
|
393
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
394
|
+
return self.perform_request( # type: ignore[return-value]
|
|
395
|
+
"POST",
|
|
396
|
+
__path,
|
|
397
|
+
params=__query,
|
|
398
|
+
headers=__headers,
|
|
399
|
+
body=__body,
|
|
400
|
+
endpoint_id="inference.update",
|
|
401
|
+
path_parts=__path_parts,
|
|
402
|
+
)
|
|
@@ -38,8 +38,11 @@ class IngestClient(NamespacedClient):
|
|
|
38
38
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
39
39
|
) -> ObjectApiResponse[t.Any]:
|
|
40
40
|
"""
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
.. raw:: html
|
|
42
|
+
|
|
43
|
+
<p>Delete GeoIP database configurations.
|
|
44
|
+
Delete one or more IP geolocation database configurations.</p>
|
|
45
|
+
|
|
43
46
|
|
|
44
47
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-geoip-database-api.html>`_
|
|
45
48
|
|
|
@@ -77,6 +80,62 @@ class IngestClient(NamespacedClient):
|
|
|
77
80
|
path_parts=__path_parts,
|
|
78
81
|
)
|
|
79
82
|
|
|
83
|
+
@_rewrite_parameters()
|
|
84
|
+
def delete_ip_location_database(
|
|
85
|
+
self,
|
|
86
|
+
*,
|
|
87
|
+
id: t.Union[str, t.Sequence[str]],
|
|
88
|
+
error_trace: t.Optional[bool] = None,
|
|
89
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
90
|
+
human: t.Optional[bool] = None,
|
|
91
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
92
|
+
pretty: t.Optional[bool] = None,
|
|
93
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
94
|
+
) -> ObjectApiResponse[t.Any]:
|
|
95
|
+
"""
|
|
96
|
+
.. raw:: html
|
|
97
|
+
|
|
98
|
+
<p>Delete IP geolocation database configurations.</p>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-ip-location-database-api.html>`_
|
|
102
|
+
|
|
103
|
+
:param id: A comma-separated list of IP location database configurations.
|
|
104
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
105
|
+
If no response is received before the timeout expires, the request fails
|
|
106
|
+
and returns an error. A value of `-1` indicates that the request should never
|
|
107
|
+
time out.
|
|
108
|
+
:param timeout: The period to wait for a response. If no response is received
|
|
109
|
+
before the timeout expires, the request fails and returns an error. A value
|
|
110
|
+
of `-1` indicates that the request should never time out.
|
|
111
|
+
"""
|
|
112
|
+
if id in SKIP_IN_PATH:
|
|
113
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
114
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
115
|
+
__path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
|
|
116
|
+
__query: t.Dict[str, t.Any] = {}
|
|
117
|
+
if error_trace is not None:
|
|
118
|
+
__query["error_trace"] = error_trace
|
|
119
|
+
if filter_path is not None:
|
|
120
|
+
__query["filter_path"] = filter_path
|
|
121
|
+
if human is not None:
|
|
122
|
+
__query["human"] = human
|
|
123
|
+
if master_timeout is not None:
|
|
124
|
+
__query["master_timeout"] = master_timeout
|
|
125
|
+
if pretty is not None:
|
|
126
|
+
__query["pretty"] = pretty
|
|
127
|
+
if timeout is not None:
|
|
128
|
+
__query["timeout"] = timeout
|
|
129
|
+
__headers = {"accept": "application/json"}
|
|
130
|
+
return self.perform_request( # type: ignore[return-value]
|
|
131
|
+
"DELETE",
|
|
132
|
+
__path,
|
|
133
|
+
params=__query,
|
|
134
|
+
headers=__headers,
|
|
135
|
+
endpoint_id="ingest.delete_ip_location_database",
|
|
136
|
+
path_parts=__path_parts,
|
|
137
|
+
)
|
|
138
|
+
|
|
80
139
|
@_rewrite_parameters()
|
|
81
140
|
def delete_pipeline(
|
|
82
141
|
self,
|
|
@@ -90,7 +149,11 @@ class IngestClient(NamespacedClient):
|
|
|
90
149
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
91
150
|
) -> ObjectApiResponse[t.Any]:
|
|
92
151
|
"""
|
|
93
|
-
|
|
152
|
+
.. raw:: html
|
|
153
|
+
|
|
154
|
+
<p>Delete pipelines.
|
|
155
|
+
Delete one or more ingest pipelines.</p>
|
|
156
|
+
|
|
94
157
|
|
|
95
158
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-pipeline-api.html>`_
|
|
96
159
|
|
|
@@ -139,8 +202,11 @@ class IngestClient(NamespacedClient):
|
|
|
139
202
|
pretty: t.Optional[bool] = None,
|
|
140
203
|
) -> ObjectApiResponse[t.Any]:
|
|
141
204
|
"""
|
|
142
|
-
|
|
143
|
-
|
|
205
|
+
.. raw:: html
|
|
206
|
+
|
|
207
|
+
<p>Get GeoIP statistics.
|
|
208
|
+
Get download statistics for GeoIP2 databases that are used with the GeoIP processor.</p>
|
|
209
|
+
|
|
144
210
|
|
|
145
211
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/geoip-processor.html>`_
|
|
146
212
|
"""
|
|
@@ -177,8 +243,11 @@ class IngestClient(NamespacedClient):
|
|
|
177
243
|
pretty: t.Optional[bool] = None,
|
|
178
244
|
) -> ObjectApiResponse[t.Any]:
|
|
179
245
|
"""
|
|
180
|
-
|
|
181
|
-
|
|
246
|
+
.. raw:: html
|
|
247
|
+
|
|
248
|
+
<p>Get GeoIP database configurations.
|
|
249
|
+
Get information about one or more IP geolocation database configurations.</p>
|
|
250
|
+
|
|
182
251
|
|
|
183
252
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-geoip-database-api.html>`_
|
|
184
253
|
|
|
@@ -217,6 +286,61 @@ class IngestClient(NamespacedClient):
|
|
|
217
286
|
path_parts=__path_parts,
|
|
218
287
|
)
|
|
219
288
|
|
|
289
|
+
@_rewrite_parameters()
|
|
290
|
+
def get_ip_location_database(
|
|
291
|
+
self,
|
|
292
|
+
*,
|
|
293
|
+
id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
294
|
+
error_trace: t.Optional[bool] = None,
|
|
295
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
296
|
+
human: t.Optional[bool] = None,
|
|
297
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
298
|
+
pretty: t.Optional[bool] = None,
|
|
299
|
+
) -> ObjectApiResponse[t.Any]:
|
|
300
|
+
"""
|
|
301
|
+
.. raw:: html
|
|
302
|
+
|
|
303
|
+
<p>Get IP geolocation database configurations.</p>
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ip-location-database-api.html>`_
|
|
307
|
+
|
|
308
|
+
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
|
|
309
|
+
(`*`) expressions are supported. To get all database configurations, omit
|
|
310
|
+
this parameter or use `*`.
|
|
311
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
312
|
+
If no response is received before the timeout expires, the request fails
|
|
313
|
+
and returns an error. A value of `-1` indicates that the request should never
|
|
314
|
+
time out.
|
|
315
|
+
"""
|
|
316
|
+
__path_parts: t.Dict[str, str]
|
|
317
|
+
if id not in SKIP_IN_PATH:
|
|
318
|
+
__path_parts = {"id": _quote(id)}
|
|
319
|
+
__path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
|
|
320
|
+
else:
|
|
321
|
+
__path_parts = {}
|
|
322
|
+
__path = "/_ingest/ip_location/database"
|
|
323
|
+
__query: t.Dict[str, t.Any] = {}
|
|
324
|
+
if error_trace is not None:
|
|
325
|
+
__query["error_trace"] = error_trace
|
|
326
|
+
if filter_path is not None:
|
|
327
|
+
__query["filter_path"] = filter_path
|
|
328
|
+
if human is not None:
|
|
329
|
+
__query["human"] = human
|
|
330
|
+
if master_timeout is not None:
|
|
331
|
+
__query["master_timeout"] = master_timeout
|
|
332
|
+
if pretty is not None:
|
|
333
|
+
__query["pretty"] = pretty
|
|
334
|
+
__headers = {"accept": "application/json"}
|
|
335
|
+
return self.perform_request( # type: ignore[return-value]
|
|
336
|
+
"GET",
|
|
337
|
+
__path,
|
|
338
|
+
params=__query,
|
|
339
|
+
headers=__headers,
|
|
340
|
+
endpoint_id="ingest.get_ip_location_database",
|
|
341
|
+
path_parts=__path_parts,
|
|
342
|
+
)
|
|
343
|
+
|
|
220
344
|
@_rewrite_parameters()
|
|
221
345
|
def get_pipeline(
|
|
222
346
|
self,
|
|
@@ -230,8 +354,12 @@ class IngestClient(NamespacedClient):
|
|
|
230
354
|
summary: t.Optional[bool] = None,
|
|
231
355
|
) -> ObjectApiResponse[t.Any]:
|
|
232
356
|
"""
|
|
233
|
-
|
|
234
|
-
|
|
357
|
+
.. raw:: html
|
|
358
|
+
|
|
359
|
+
<p>Get pipelines.
|
|
360
|
+
Get information about one or more ingest pipelines.
|
|
361
|
+
This API returns a local reference of the pipeline.</p>
|
|
362
|
+
|
|
235
363
|
|
|
236
364
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-pipeline-api.html>`_
|
|
237
365
|
|
|
@@ -282,10 +410,13 @@ class IngestClient(NamespacedClient):
|
|
|
282
410
|
pretty: t.Optional[bool] = None,
|
|
283
411
|
) -> ObjectApiResponse[t.Any]:
|
|
284
412
|
"""
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
413
|
+
.. raw:: html
|
|
414
|
+
|
|
415
|
+
<p>Run a grok processor.
|
|
416
|
+
Extract structured fields out of a single text field within a document.
|
|
417
|
+
You must choose which field to extract matched fields from, as well as the grok pattern you expect will match.
|
|
418
|
+
A grok pattern is like a regular expression that supports aliased expressions that can be reused.</p>
|
|
419
|
+
|
|
289
420
|
|
|
290
421
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/grok-processor.html>`_
|
|
291
422
|
"""
|
|
@@ -328,8 +459,11 @@ class IngestClient(NamespacedClient):
|
|
|
328
459
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
329
460
|
) -> ObjectApiResponse[t.Any]:
|
|
330
461
|
"""
|
|
331
|
-
|
|
332
|
-
|
|
462
|
+
.. raw:: html
|
|
463
|
+
|
|
464
|
+
<p>Create or update a GeoIP database configuration.
|
|
465
|
+
Refer to the create or update IP geolocation database configuration API.</p>
|
|
466
|
+
|
|
333
467
|
|
|
334
468
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-geoip-database-api.html>`_
|
|
335
469
|
|
|
@@ -384,6 +518,77 @@ class IngestClient(NamespacedClient):
|
|
|
384
518
|
path_parts=__path_parts,
|
|
385
519
|
)
|
|
386
520
|
|
|
521
|
+
@_rewrite_parameters(
|
|
522
|
+
body_name="configuration",
|
|
523
|
+
)
|
|
524
|
+
def put_ip_location_database(
|
|
525
|
+
self,
|
|
526
|
+
*,
|
|
527
|
+
id: str,
|
|
528
|
+
configuration: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
529
|
+
body: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
530
|
+
error_trace: t.Optional[bool] = None,
|
|
531
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
532
|
+
human: t.Optional[bool] = None,
|
|
533
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
534
|
+
pretty: t.Optional[bool] = None,
|
|
535
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
536
|
+
) -> ObjectApiResponse[t.Any]:
|
|
537
|
+
"""
|
|
538
|
+
.. raw:: html
|
|
539
|
+
|
|
540
|
+
<p>Create or update an IP geolocation database configuration.</p>
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-ip-location-database-api.html>`_
|
|
544
|
+
|
|
545
|
+
:param id: The database configuration identifier.
|
|
546
|
+
:param configuration:
|
|
547
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
548
|
+
If no response is received before the timeout expires, the request fails
|
|
549
|
+
and returns an error. A value of `-1` indicates that the request should never
|
|
550
|
+
time out.
|
|
551
|
+
:param timeout: The period to wait for a response from all relevant nodes in
|
|
552
|
+
the cluster after updating the cluster metadata. If no response is received
|
|
553
|
+
before the timeout expires, the cluster metadata update still applies but
|
|
554
|
+
the response indicates that it was not completely acknowledged. A value of
|
|
555
|
+
`-1` indicates that the request should never time out.
|
|
556
|
+
"""
|
|
557
|
+
if id in SKIP_IN_PATH:
|
|
558
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
559
|
+
if configuration is None and body is None:
|
|
560
|
+
raise ValueError(
|
|
561
|
+
"Empty value passed for parameters 'configuration' and 'body', one of them should be set."
|
|
562
|
+
)
|
|
563
|
+
elif configuration is not None and body is not None:
|
|
564
|
+
raise ValueError("Cannot set both 'configuration' and 'body'")
|
|
565
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
566
|
+
__path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
|
|
567
|
+
__query: t.Dict[str, t.Any] = {}
|
|
568
|
+
if error_trace is not None:
|
|
569
|
+
__query["error_trace"] = error_trace
|
|
570
|
+
if filter_path is not None:
|
|
571
|
+
__query["filter_path"] = filter_path
|
|
572
|
+
if human is not None:
|
|
573
|
+
__query["human"] = human
|
|
574
|
+
if master_timeout is not None:
|
|
575
|
+
__query["master_timeout"] = master_timeout
|
|
576
|
+
if pretty is not None:
|
|
577
|
+
__query["pretty"] = pretty
|
|
578
|
+
if timeout is not None:
|
|
579
|
+
__query["timeout"] = timeout
|
|
580
|
+
__body = configuration if configuration is not None else body
|
|
581
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
582
|
+
return self.perform_request( # type: ignore[return-value]
|
|
583
|
+
"PUT",
|
|
584
|
+
__path,
|
|
585
|
+
params=__query,
|
|
586
|
+
headers=__headers,
|
|
587
|
+
body=__body,
|
|
588
|
+
endpoint_id="ingest.put_ip_location_database",
|
|
589
|
+
path_parts=__path_parts,
|
|
590
|
+
)
|
|
591
|
+
|
|
387
592
|
@_rewrite_parameters(
|
|
388
593
|
body_fields=(
|
|
389
594
|
"deprecated",
|
|
@@ -415,7 +620,11 @@ class IngestClient(NamespacedClient):
|
|
|
415
620
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
416
621
|
) -> ObjectApiResponse[t.Any]:
|
|
417
622
|
"""
|
|
418
|
-
|
|
623
|
+
.. raw:: html
|
|
624
|
+
|
|
625
|
+
<p>Create or update a pipeline.
|
|
626
|
+
Changes made using this API take effect immediately.</p>
|
|
627
|
+
|
|
419
628
|
|
|
420
629
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ingest.html>`_
|
|
421
630
|
|
|
@@ -507,9 +716,12 @@ class IngestClient(NamespacedClient):
|
|
|
507
716
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
508
717
|
) -> ObjectApiResponse[t.Any]:
|
|
509
718
|
"""
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
719
|
+
.. raw:: html
|
|
720
|
+
|
|
721
|
+
<p>Simulate a pipeline.
|
|
722
|
+
Run an ingest pipeline against a set of provided documents.
|
|
723
|
+
You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.</p>
|
|
724
|
+
|
|
513
725
|
|
|
514
726
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/simulate-pipeline-api.html>`_
|
|
515
727
|
|
|
@@ -35,9 +35,12 @@ class LicenseClient(NamespacedClient):
|
|
|
35
35
|
pretty: t.Optional[bool] = None,
|
|
36
36
|
) -> ObjectApiResponse[t.Any]:
|
|
37
37
|
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
.. raw:: html
|
|
39
|
+
|
|
40
|
+
<p>Delete the license.
|
|
41
|
+
When the license expires, your subscription level reverts to Basic.</p>
|
|
42
|
+
<p>If the operator privileges feature is enabled, only operator users can use this API.</p>
|
|
43
|
+
|
|
41
44
|
|
|
42
45
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-license.html>`_
|
|
43
46
|
"""
|
|
@@ -74,11 +77,13 @@ class LicenseClient(NamespacedClient):
|
|
|
74
77
|
pretty: t.Optional[bool] = None,
|
|
75
78
|
) -> ObjectApiResponse[t.Any]:
|
|
76
79
|
"""
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
.. raw:: html
|
|
81
|
+
|
|
82
|
+
<p>Get license information.
|
|
83
|
+
Get information about your Elastic license including its type, its status, when it was issued, and when it expires.</p>
|
|
84
|
+
<p>NOTE: If the master node is generating a new cluster state, the get license API may return a <code>404 Not Found</code> response.
|
|
85
|
+
If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.</p>
|
|
86
|
+
|
|
82
87
|
|
|
83
88
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-license.html>`_
|
|
84
89
|
|
|
@@ -124,7 +129,10 @@ class LicenseClient(NamespacedClient):
|
|
|
124
129
|
pretty: t.Optional[bool] = None,
|
|
125
130
|
) -> ObjectApiResponse[t.Any]:
|
|
126
131
|
"""
|
|
127
|
-
|
|
132
|
+
.. raw:: html
|
|
133
|
+
|
|
134
|
+
<p>Get the basic license status.</p>
|
|
135
|
+
|
|
128
136
|
|
|
129
137
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-basic-status.html>`_
|
|
130
138
|
"""
|
|
@@ -159,7 +167,10 @@ class LicenseClient(NamespacedClient):
|
|
|
159
167
|
pretty: t.Optional[bool] = None,
|
|
160
168
|
) -> ObjectApiResponse[t.Any]:
|
|
161
169
|
"""
|
|
162
|
-
|
|
170
|
+
.. raw:: html
|
|
171
|
+
|
|
172
|
+
<p>Get the trial status.</p>
|
|
173
|
+
|
|
163
174
|
|
|
164
175
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-trial-status.html>`_
|
|
165
176
|
"""
|
|
@@ -200,14 +211,16 @@ class LicenseClient(NamespacedClient):
|
|
|
200
211
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
201
212
|
) -> ObjectApiResponse[t.Any]:
|
|
202
213
|
"""
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
214
|
+
.. raw:: html
|
|
215
|
+
|
|
216
|
+
<p>Update the license.
|
|
217
|
+
You can update your license at runtime without shutting down your nodes.
|
|
218
|
+
License updates take effect immediately.
|
|
219
|
+
If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response.
|
|
220
|
+
You must then re-submit the API request with the acknowledge parameter set to true.</p>
|
|
221
|
+
<p>NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license.
|
|
222
|
+
If the operator privileges feature is enabled, only operator users can use this API.</p>
|
|
223
|
+
|
|
211
224
|
|
|
212
225
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-license.html>`_
|
|
213
226
|
|
|
@@ -261,13 +274,15 @@ class LicenseClient(NamespacedClient):
|
|
|
261
274
|
pretty: t.Optional[bool] = None,
|
|
262
275
|
) -> ObjectApiResponse[t.Any]:
|
|
263
276
|
"""
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
277
|
+
.. raw:: html
|
|
278
|
+
|
|
279
|
+
<p>Start a basic license.
|
|
280
|
+
Start an indefinite basic license, which gives access to all the basic features.</p>
|
|
281
|
+
<p>NOTE: In order to start a basic license, you must not currently have a basic license.</p>
|
|
282
|
+
<p>If the basic license does not support all of the features that are available with your current license, however, you are notified in the response.
|
|
283
|
+
You must then re-submit the API request with the <code>acknowledge</code> parameter set to <code>true</code>.</p>
|
|
284
|
+
<p>To check the status of your basic license, use the get basic license API.</p>
|
|
285
|
+
|
|
271
286
|
|
|
272
287
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-basic.html>`_
|
|
273
288
|
|
|
@@ -309,12 +324,14 @@ class LicenseClient(NamespacedClient):
|
|
|
309
324
|
type_query_string: t.Optional[str] = None,
|
|
310
325
|
) -> ObjectApiResponse[t.Any]:
|
|
311
326
|
"""
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
327
|
+
.. raw:: html
|
|
328
|
+
|
|
329
|
+
<p>Start a trial.
|
|
330
|
+
Start a 30-day trial, which gives access to all subscription features.</p>
|
|
331
|
+
<p>NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version.
|
|
332
|
+
For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at <a href="https://www.elastic.co/trialextension">https://www.elastic.co/trialextension</a>.</p>
|
|
333
|
+
<p>To check the status of your trial, use the get trial status API.</p>
|
|
334
|
+
|
|
318
335
|
|
|
319
336
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-trial.html>`_
|
|
320
337
|
|
|
@@ -36,11 +36,16 @@ class LogstashClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
39
|
+
.. raw:: html
|
|
40
|
+
|
|
41
|
+
<p>Delete a Logstash pipeline.
|
|
42
|
+
Delete a pipeline that is used for Logstash Central Management.
|
|
43
|
+
If the request succeeds, you receive an empty response with an appropriate status code.</p>
|
|
44
|
+
|
|
40
45
|
|
|
41
46
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-delete-pipeline.html>`_
|
|
42
47
|
|
|
43
|
-
:param id:
|
|
48
|
+
:param id: An identifier for the pipeline.
|
|
44
49
|
"""
|
|
45
50
|
if id in SKIP_IN_PATH:
|
|
46
51
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -76,11 +81,15 @@ class LogstashClient(NamespacedClient):
|
|
|
76
81
|
pretty: t.Optional[bool] = None,
|
|
77
82
|
) -> ObjectApiResponse[t.Any]:
|
|
78
83
|
"""
|
|
79
|
-
|
|
84
|
+
.. raw:: html
|
|
85
|
+
|
|
86
|
+
<p>Get Logstash pipelines.
|
|
87
|
+
Get pipelines that are used for Logstash Central Management.</p>
|
|
88
|
+
|
|
80
89
|
|
|
81
90
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-get-pipeline.html>`_
|
|
82
91
|
|
|
83
|
-
:param id:
|
|
92
|
+
:param id: A comma-separated list of pipeline identifiers.
|
|
84
93
|
"""
|
|
85
94
|
__path_parts: t.Dict[str, str]
|
|
86
95
|
if id not in SKIP_IN_PATH:
|
|
@@ -123,11 +132,16 @@ class LogstashClient(NamespacedClient):
|
|
|
123
132
|
pretty: t.Optional[bool] = None,
|
|
124
133
|
) -> ObjectApiResponse[t.Any]:
|
|
125
134
|
"""
|
|
126
|
-
|
|
135
|
+
.. raw:: html
|
|
136
|
+
|
|
137
|
+
<p>Create or update a Logstash pipeline.</p>
|
|
138
|
+
<p>Create a pipeline that is used for Logstash Central Management.
|
|
139
|
+
If the specified pipeline exists, it is replaced.</p>
|
|
140
|
+
|
|
127
141
|
|
|
128
142
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-put-pipeline.html>`_
|
|
129
143
|
|
|
130
|
-
:param id:
|
|
144
|
+
:param id: An identifier for the pipeline.
|
|
131
145
|
:param pipeline:
|
|
132
146
|
"""
|
|
133
147
|
if id in SKIP_IN_PATH:
|