elasticsearch 8.16.0__py3-none-any.whl → 8.17.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.
Files changed (90) hide show
  1. elasticsearch/_async/client/__init__.py +234 -96
  2. elasticsearch/_async/client/async_search.py +12 -22
  3. elasticsearch/_async/client/autoscaling.py +39 -4
  4. elasticsearch/_async/client/cat.py +90 -221
  5. elasticsearch/_async/client/ccr.py +85 -35
  6. elasticsearch/_async/client/cluster.py +160 -68
  7. elasticsearch/_async/client/connector.py +362 -25
  8. elasticsearch/_async/client/dangling_indices.py +3 -3
  9. elasticsearch/_async/client/enrich.py +6 -6
  10. elasticsearch/_async/client/eql.py +13 -11
  11. elasticsearch/_async/client/esql.py +3 -2
  12. elasticsearch/_async/client/features.py +27 -5
  13. elasticsearch/_async/client/fleet.py +1 -1
  14. elasticsearch/_async/client/graph.py +9 -3
  15. elasticsearch/_async/client/ilm.py +74 -39
  16. elasticsearch/_async/client/indices.py +633 -152
  17. elasticsearch/_async/client/inference.py +99 -16
  18. elasticsearch/_async/client/ingest.py +201 -23
  19. elasticsearch/_async/client/license.py +38 -22
  20. elasticsearch/_async/client/logstash.py +12 -9
  21. elasticsearch/_async/client/migration.py +17 -8
  22. elasticsearch/_async/client/ml.py +137 -79
  23. elasticsearch/_async/client/monitoring.py +3 -2
  24. elasticsearch/_async/client/nodes.py +37 -23
  25. elasticsearch/_async/client/query_rules.py +47 -25
  26. elasticsearch/_async/client/rollup.py +96 -21
  27. elasticsearch/_async/client/search_application.py +138 -9
  28. elasticsearch/_async/client/searchable_snapshots.py +33 -24
  29. elasticsearch/_async/client/security.py +751 -123
  30. elasticsearch/_async/client/shutdown.py +38 -15
  31. elasticsearch/_async/client/simulate.py +151 -0
  32. elasticsearch/_async/client/slm.py +147 -28
  33. elasticsearch/_async/client/snapshot.py +309 -25
  34. elasticsearch/_async/client/sql.py +79 -58
  35. elasticsearch/_async/client/ssl.py +1 -1
  36. elasticsearch/_async/client/synonyms.py +52 -29
  37. elasticsearch/_async/client/tasks.py +71 -31
  38. elasticsearch/_async/client/text_structure.py +468 -48
  39. elasticsearch/_async/client/transform.py +21 -14
  40. elasticsearch/_async/client/watcher.py +226 -60
  41. elasticsearch/_async/client/xpack.py +13 -8
  42. elasticsearch/_sync/client/__init__.py +234 -96
  43. elasticsearch/_sync/client/async_search.py +12 -22
  44. elasticsearch/_sync/client/autoscaling.py +39 -4
  45. elasticsearch/_sync/client/cat.py +90 -221
  46. elasticsearch/_sync/client/ccr.py +85 -35
  47. elasticsearch/_sync/client/cluster.py +160 -68
  48. elasticsearch/_sync/client/connector.py +362 -25
  49. elasticsearch/_sync/client/dangling_indices.py +3 -3
  50. elasticsearch/_sync/client/enrich.py +6 -6
  51. elasticsearch/_sync/client/eql.py +13 -11
  52. elasticsearch/_sync/client/esql.py +3 -2
  53. elasticsearch/_sync/client/features.py +27 -5
  54. elasticsearch/_sync/client/fleet.py +1 -1
  55. elasticsearch/_sync/client/graph.py +9 -3
  56. elasticsearch/_sync/client/ilm.py +74 -39
  57. elasticsearch/_sync/client/indices.py +633 -152
  58. elasticsearch/_sync/client/inference.py +99 -16
  59. elasticsearch/_sync/client/ingest.py +201 -23
  60. elasticsearch/_sync/client/license.py +38 -22
  61. elasticsearch/_sync/client/logstash.py +12 -9
  62. elasticsearch/_sync/client/migration.py +17 -8
  63. elasticsearch/_sync/client/ml.py +137 -79
  64. elasticsearch/_sync/client/monitoring.py +3 -2
  65. elasticsearch/_sync/client/nodes.py +37 -23
  66. elasticsearch/_sync/client/query_rules.py +47 -25
  67. elasticsearch/_sync/client/rollup.py +96 -21
  68. elasticsearch/_sync/client/search_application.py +138 -9
  69. elasticsearch/_sync/client/searchable_snapshots.py +33 -24
  70. elasticsearch/_sync/client/security.py +751 -123
  71. elasticsearch/_sync/client/shutdown.py +38 -15
  72. elasticsearch/_sync/client/simulate.py +151 -0
  73. elasticsearch/_sync/client/slm.py +147 -28
  74. elasticsearch/_sync/client/snapshot.py +309 -25
  75. elasticsearch/_sync/client/sql.py +79 -58
  76. elasticsearch/_sync/client/ssl.py +1 -1
  77. elasticsearch/_sync/client/synonyms.py +52 -29
  78. elasticsearch/_sync/client/tasks.py +71 -31
  79. elasticsearch/_sync/client/text_structure.py +468 -48
  80. elasticsearch/_sync/client/transform.py +21 -14
  81. elasticsearch/_sync/client/watcher.py +226 -60
  82. elasticsearch/_sync/client/xpack.py +13 -8
  83. elasticsearch/_version.py +1 -1
  84. elasticsearch/client.py +2 -0
  85. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
  86. elasticsearch-8.17.1.dist-info/RECORD +119 -0
  87. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
  88. elasticsearch-8.16.0.dist-info/RECORD +0 -117
  89. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
  90. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
@@ -20,19 +20,12 @@ import typing as t
20
20
  from elastic_transport import ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import (
24
- SKIP_IN_PATH,
25
- Stability,
26
- _quote,
27
- _rewrite_parameters,
28
- _stability_warning,
29
- )
23
+ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
30
24
 
31
25
 
32
26
  class InferenceClient(NamespacedClient):
33
27
 
34
28
  @_rewrite_parameters()
35
- @_stability_warning(Stability.EXPERIMENTAL)
36
29
  async def delete(
37
30
  self,
38
31
  *,
@@ -53,7 +46,7 @@ class InferenceClient(NamespacedClient):
53
46
  """
54
47
  Delete an inference endpoint
55
48
 
56
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-inference-api.html>`_
49
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-inference-api.html>`_
57
50
 
58
51
  :param inference_id: The inference Id
59
52
  :param task_type: The task type
@@ -100,7 +93,6 @@ class InferenceClient(NamespacedClient):
100
93
  )
101
94
 
102
95
  @_rewrite_parameters()
103
- @_stability_warning(Stability.EXPERIMENTAL)
104
96
  async def get(
105
97
  self,
106
98
  *,
@@ -119,7 +111,7 @@ class InferenceClient(NamespacedClient):
119
111
  """
120
112
  Get an inference endpoint
121
113
 
122
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-inference-api.html>`_
114
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-inference-api.html>`_
123
115
 
124
116
  :param task_type: The task type
125
117
  :param inference_id: The inference Id
@@ -159,7 +151,6 @@ class InferenceClient(NamespacedClient):
159
151
  @_rewrite_parameters(
160
152
  body_fields=("input", "query", "task_settings"),
161
153
  )
162
- @_stability_warning(Stability.EXPERIMENTAL)
163
154
  async def inference(
164
155
  self,
165
156
  *,
@@ -183,7 +174,7 @@ class InferenceClient(NamespacedClient):
183
174
  """
184
175
  Perform inference on the service
185
176
 
186
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/post-inference-api.html>`_
177
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-inference-api.html>`_
187
178
 
188
179
  :param inference_id: The inference Id
189
180
  :param input: Inference input. Either a string or an array of strings.
@@ -246,7 +237,6 @@ class InferenceClient(NamespacedClient):
246
237
  @_rewrite_parameters(
247
238
  body_name="inference_config",
248
239
  )
249
- @_stability_warning(Stability.EXPERIMENTAL)
250
240
  async def put(
251
241
  self,
252
242
  *,
@@ -265,9 +255,23 @@ class InferenceClient(NamespacedClient):
265
255
  pretty: t.Optional[bool] = None,
266
256
  ) -> ObjectApiResponse[t.Any]:
267
257
  """
268
- Create an inference endpoint
258
+ Create an inference endpoint. When you create an inference endpoint, the associated
259
+ machine learning model is automatically deployed if it is not already running.
260
+ After creating the endpoint, wait for the model deployment to complete before
261
+ using it. To verify the deployment status, use the get trained model statistics
262
+ API. Look for `"state": "fully_allocated"` in the response and ensure that the
263
+ `"allocation_count"` matches the `"target_allocation_count"`. Avoid creating
264
+ multiple endpoints for the same model unless required, as each endpoint consumes
265
+ significant resources. IMPORTANT: The inference APIs enable you to use certain
266
+ services, such as built-in machine learning models (ELSER, E5), models uploaded
267
+ through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google
268
+ Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models
269
+ uploaded through Eland, the inference APIs offer an alternative way to use and
270
+ manage trained models. However, if you do not plan to use the inference APIs
271
+ to use these models or if you want to use non-NLP models, use the machine learning
272
+ trained model APIs.
269
273
 
270
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/put-inference-api.html>`_
274
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-inference-api.html>`_
271
275
 
272
276
  :param inference_id: The inference Id
273
277
  :param inference_config:
@@ -313,3 +317,82 @@ class InferenceClient(NamespacedClient):
313
317
  endpoint_id="inference.put",
314
318
  path_parts=__path_parts,
315
319
  )
320
+
321
+ @_rewrite_parameters(
322
+ body_name="inference_config",
323
+ )
324
+ async def update(
325
+ self,
326
+ *,
327
+ inference_id: str,
328
+ inference_config: t.Optional[t.Mapping[str, t.Any]] = None,
329
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
330
+ task_type: t.Optional[
331
+ t.Union[
332
+ str,
333
+ t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"],
334
+ ]
335
+ ] = None,
336
+ error_trace: t.Optional[bool] = None,
337
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
338
+ human: t.Optional[bool] = None,
339
+ pretty: t.Optional[bool] = None,
340
+ ) -> ObjectApiResponse[t.Any]:
341
+ """
342
+ Update an inference endpoint. Modify `task_settings`, secrets (within `service_settings`),
343
+ or `num_allocations` for an inference endpoint, depending on the specific endpoint
344
+ service and `task_type`. IMPORTANT: The inference APIs enable you to use certain
345
+ services, such as built-in machine learning models (ELSER, E5), models uploaded
346
+ through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic,
347
+ Watsonx.ai, or Hugging Face. For built-in models and models uploaded through
348
+ Eland, the inference APIs offer an alternative way to use and manage trained
349
+ models. However, if you do not plan to use the inference APIs to use these models
350
+ or if you want to use non-NLP models, use the machine learning trained model
351
+ APIs.
352
+
353
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-inference-api.html>`_
354
+
355
+ :param inference_id: The unique identifier of the inference endpoint.
356
+ :param inference_config:
357
+ :param task_type: The type of inference task that the model performs.
358
+ """
359
+ if inference_id in SKIP_IN_PATH:
360
+ raise ValueError("Empty value passed for parameter 'inference_id'")
361
+ if inference_config is None and body is None:
362
+ raise ValueError(
363
+ "Empty value passed for parameters 'inference_config' and 'body', one of them should be set."
364
+ )
365
+ elif inference_config is not None and body is not None:
366
+ raise ValueError("Cannot set both 'inference_config' and 'body'")
367
+ __path_parts: t.Dict[str, str]
368
+ if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
369
+ __path_parts = {
370
+ "task_type": _quote(task_type),
371
+ "inference_id": _quote(inference_id),
372
+ }
373
+ __path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}/_update'
374
+ elif inference_id not in SKIP_IN_PATH:
375
+ __path_parts = {"inference_id": _quote(inference_id)}
376
+ __path = f'/_inference/{__path_parts["inference_id"]}/_update'
377
+ else:
378
+ raise ValueError("Couldn't find a path for the given parameters")
379
+ __query: t.Dict[str, t.Any] = {}
380
+ if error_trace is not None:
381
+ __query["error_trace"] = error_trace
382
+ if filter_path is not None:
383
+ __query["filter_path"] = filter_path
384
+ if human is not None:
385
+ __query["human"] = human
386
+ if pretty is not None:
387
+ __query["pretty"] = pretty
388
+ __body = inference_config if inference_config is not None else body
389
+ __headers = {"accept": "application/json", "content-type": "application/json"}
390
+ return await self.perform_request( # type: ignore[return-value]
391
+ "POST",
392
+ __path,
393
+ params=__query,
394
+ headers=__headers,
395
+ body=__body,
396
+ endpoint_id="inference.update",
397
+ path_parts=__path_parts,
398
+ )
@@ -38,9 +38,10 @@ 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
- Deletes a geoip database configuration.
41
+ Delete GeoIP database configurations. Delete one or more IP geolocation database
42
+ configurations.
42
43
 
43
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-geoip-database-api.html>`_
44
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-geoip-database-api.html>`_
44
45
 
45
46
  :param id: A comma-separated list of geoip database configurations to delete
46
47
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -76,6 +77,59 @@ class IngestClient(NamespacedClient):
76
77
  path_parts=__path_parts,
77
78
  )
78
79
 
80
+ @_rewrite_parameters()
81
+ async def delete_ip_location_database(
82
+ self,
83
+ *,
84
+ id: t.Union[str, t.Sequence[str]],
85
+ error_trace: t.Optional[bool] = None,
86
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
87
+ human: t.Optional[bool] = None,
88
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
89
+ pretty: t.Optional[bool] = None,
90
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
91
+ ) -> ObjectApiResponse[t.Any]:
92
+ """
93
+ Delete IP geolocation database configurations.
94
+
95
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-ip-location-database-api.html>`_
96
+
97
+ :param id: A comma-separated list of IP location database configurations.
98
+ :param master_timeout: The period to wait for a connection to the master node.
99
+ If no response is received before the timeout expires, the request fails
100
+ and returns an error. A value of `-1` indicates that the request should never
101
+ time out.
102
+ :param timeout: The period to wait for a response. If no response is received
103
+ before the timeout expires, the request fails and returns an error. A value
104
+ of `-1` indicates that the request should never time out.
105
+ """
106
+ if id in SKIP_IN_PATH:
107
+ raise ValueError("Empty value passed for parameter 'id'")
108
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
109
+ __path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
110
+ __query: t.Dict[str, t.Any] = {}
111
+ if error_trace is not None:
112
+ __query["error_trace"] = error_trace
113
+ if filter_path is not None:
114
+ __query["filter_path"] = filter_path
115
+ if human is not None:
116
+ __query["human"] = human
117
+ if master_timeout is not None:
118
+ __query["master_timeout"] = master_timeout
119
+ if pretty is not None:
120
+ __query["pretty"] = pretty
121
+ if timeout is not None:
122
+ __query["timeout"] = timeout
123
+ __headers = {"accept": "application/json"}
124
+ return await self.perform_request( # type: ignore[return-value]
125
+ "DELETE",
126
+ __path,
127
+ params=__query,
128
+ headers=__headers,
129
+ endpoint_id="ingest.delete_ip_location_database",
130
+ path_parts=__path_parts,
131
+ )
132
+
79
133
  @_rewrite_parameters()
80
134
  async def delete_pipeline(
81
135
  self,
@@ -89,9 +143,9 @@ class IngestClient(NamespacedClient):
89
143
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
90
144
  ) -> ObjectApiResponse[t.Any]:
91
145
  """
92
- Deletes one or more existing ingest pipeline.
146
+ Delete pipelines. Delete one or more ingest pipelines.
93
147
 
94
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-pipeline-api.html>`_
148
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-pipeline-api.html>`_
95
149
 
96
150
  :param id: Pipeline ID or wildcard expression of pipeline IDs used to limit the
97
151
  request. To delete all ingest pipelines in a cluster, use a value of `*`.
@@ -138,9 +192,10 @@ class IngestClient(NamespacedClient):
138
192
  pretty: t.Optional[bool] = None,
139
193
  ) -> ObjectApiResponse[t.Any]:
140
194
  """
141
- Gets download statistics for GeoIP2 databases used with the geoip processor.
195
+ Get GeoIP statistics. Get download statistics for GeoIP2 databases that are used
196
+ with the GeoIP processor.
142
197
 
143
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/geoip-processor.html>`_
198
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/geoip-processor.html>`_
144
199
  """
145
200
  __path_parts: t.Dict[str, str] = {}
146
201
  __path = "/_ingest/geoip/stats"
@@ -175,9 +230,10 @@ class IngestClient(NamespacedClient):
175
230
  pretty: t.Optional[bool] = None,
176
231
  ) -> ObjectApiResponse[t.Any]:
177
232
  """
178
- Returns information about one or more geoip database configurations.
233
+ Get GeoIP database configurations. Get information about one or more IP geolocation
234
+ database configurations.
179
235
 
180
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-geoip-database-api.html>`_
236
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-geoip-database-api.html>`_
181
237
 
182
238
  :param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
183
239
  (`*`) expressions are supported. To get all database configurations, omit
@@ -214,6 +270,58 @@ class IngestClient(NamespacedClient):
214
270
  path_parts=__path_parts,
215
271
  )
216
272
 
273
+ @_rewrite_parameters()
274
+ async def get_ip_location_database(
275
+ self,
276
+ *,
277
+ id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
278
+ error_trace: t.Optional[bool] = None,
279
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
280
+ human: t.Optional[bool] = None,
281
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
282
+ pretty: t.Optional[bool] = None,
283
+ ) -> ObjectApiResponse[t.Any]:
284
+ """
285
+ Get IP geolocation database configurations.
286
+
287
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ip-location-database-api.html>`_
288
+
289
+ :param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
290
+ (`*`) expressions are supported. To get all database configurations, omit
291
+ this parameter or use `*`.
292
+ :param master_timeout: The period to wait for a connection to the master node.
293
+ If no response is received before the timeout expires, the request fails
294
+ and returns an error. A value of `-1` indicates that the request should never
295
+ time out.
296
+ """
297
+ __path_parts: t.Dict[str, str]
298
+ if id not in SKIP_IN_PATH:
299
+ __path_parts = {"id": _quote(id)}
300
+ __path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
301
+ else:
302
+ __path_parts = {}
303
+ __path = "/_ingest/ip_location/database"
304
+ __query: t.Dict[str, t.Any] = {}
305
+ if error_trace is not None:
306
+ __query["error_trace"] = error_trace
307
+ if filter_path is not None:
308
+ __query["filter_path"] = filter_path
309
+ if human is not None:
310
+ __query["human"] = human
311
+ if master_timeout is not None:
312
+ __query["master_timeout"] = master_timeout
313
+ if pretty is not None:
314
+ __query["pretty"] = pretty
315
+ __headers = {"accept": "application/json"}
316
+ return await self.perform_request( # type: ignore[return-value]
317
+ "GET",
318
+ __path,
319
+ params=__query,
320
+ headers=__headers,
321
+ endpoint_id="ingest.get_ip_location_database",
322
+ path_parts=__path_parts,
323
+ )
324
+
217
325
  @_rewrite_parameters()
218
326
  async def get_pipeline(
219
327
  self,
@@ -227,10 +335,10 @@ class IngestClient(NamespacedClient):
227
335
  summary: t.Optional[bool] = None,
228
336
  ) -> ObjectApiResponse[t.Any]:
229
337
  """
230
- Returns information about one or more ingest pipelines. This API returns a local
231
- reference of the pipeline.
338
+ Get pipelines. Get information about one or more ingest pipelines. This API returns
339
+ a local reference of the pipeline.
232
340
 
233
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-pipeline-api.html>`_
341
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-pipeline-api.html>`_
234
342
 
235
343
  :param id: Comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions
236
344
  are supported. To get all ingest pipelines, omit this parameter or use `*`.
@@ -279,12 +387,12 @@ class IngestClient(NamespacedClient):
279
387
  pretty: t.Optional[bool] = None,
280
388
  ) -> ObjectApiResponse[t.Any]:
281
389
  """
282
- Extracts structured fields out of a single text field within a document. You
283
- choose which field to extract matched fields from, as well as the grok pattern
284
- you expect will match. A grok pattern is like a regular expression that supports
285
- aliased expressions that can be reused.
390
+ Run a grok processor. Extract structured fields out of a single text field within
391
+ a document. You must choose which field to extract matched fields from, as well
392
+ as the grok pattern you expect will match. A grok pattern is like a regular expression
393
+ that supports aliased expressions that can be reused.
286
394
 
287
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/grok-processor.html>`_
395
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/grok-processor.html>`_
288
396
  """
289
397
  __path_parts: t.Dict[str, str] = {}
290
398
  __path = "/_ingest/processor/grok"
@@ -325,9 +433,10 @@ class IngestClient(NamespacedClient):
325
433
  body: t.Optional[t.Dict[str, t.Any]] = None,
326
434
  ) -> ObjectApiResponse[t.Any]:
327
435
  """
328
- Returns information about one or more geoip database configurations.
436
+ Create or update a GeoIP database configuration. Refer to the create or update
437
+ IP geolocation database configuration API.
329
438
 
330
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/put-geoip-database-api.html>`_
439
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-geoip-database-api.html>`_
331
440
 
332
441
  :param id: ID of the database configuration to create or update.
333
442
  :param maxmind: The configuration necessary to identify which IP geolocation
@@ -380,6 +489,74 @@ class IngestClient(NamespacedClient):
380
489
  path_parts=__path_parts,
381
490
  )
382
491
 
492
+ @_rewrite_parameters(
493
+ body_name="configuration",
494
+ )
495
+ async def put_ip_location_database(
496
+ self,
497
+ *,
498
+ id: str,
499
+ configuration: t.Optional[t.Mapping[str, t.Any]] = None,
500
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
501
+ error_trace: t.Optional[bool] = None,
502
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
503
+ human: t.Optional[bool] = None,
504
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
505
+ pretty: t.Optional[bool] = None,
506
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
507
+ ) -> ObjectApiResponse[t.Any]:
508
+ """
509
+ Create or update an IP geolocation database configuration.
510
+
511
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-ip-location-database-api.html>`_
512
+
513
+ :param id: The database configuration identifier.
514
+ :param configuration:
515
+ :param master_timeout: The period to wait for a connection to the master node.
516
+ If no response is received before the timeout expires, the request fails
517
+ and returns an error. A value of `-1` indicates that the request should never
518
+ time out.
519
+ :param timeout: The period to wait for a response from all relevant nodes in
520
+ the cluster after updating the cluster metadata. If no response is received
521
+ before the timeout expires, the cluster metadata update still applies but
522
+ the response indicates that it was not completely acknowledged. A value of
523
+ `-1` indicates that the request should never time out.
524
+ """
525
+ if id in SKIP_IN_PATH:
526
+ raise ValueError("Empty value passed for parameter 'id'")
527
+ if configuration is None and body is None:
528
+ raise ValueError(
529
+ "Empty value passed for parameters 'configuration' and 'body', one of them should be set."
530
+ )
531
+ elif configuration is not None and body is not None:
532
+ raise ValueError("Cannot set both 'configuration' and 'body'")
533
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
534
+ __path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
535
+ __query: t.Dict[str, t.Any] = {}
536
+ if error_trace is not None:
537
+ __query["error_trace"] = error_trace
538
+ if filter_path is not None:
539
+ __query["filter_path"] = filter_path
540
+ if human is not None:
541
+ __query["human"] = human
542
+ if master_timeout is not None:
543
+ __query["master_timeout"] = master_timeout
544
+ if pretty is not None:
545
+ __query["pretty"] = pretty
546
+ if timeout is not None:
547
+ __query["timeout"] = timeout
548
+ __body = configuration if configuration is not None else body
549
+ __headers = {"accept": "application/json", "content-type": "application/json"}
550
+ return await self.perform_request( # type: ignore[return-value]
551
+ "PUT",
552
+ __path,
553
+ params=__query,
554
+ headers=__headers,
555
+ body=__body,
556
+ endpoint_id="ingest.put_ip_location_database",
557
+ path_parts=__path_parts,
558
+ )
559
+
383
560
  @_rewrite_parameters(
384
561
  body_fields=(
385
562
  "deprecated",
@@ -411,10 +588,9 @@ class IngestClient(NamespacedClient):
411
588
  body: t.Optional[t.Dict[str, t.Any]] = None,
412
589
  ) -> ObjectApiResponse[t.Any]:
413
590
  """
414
- Creates or updates an ingest pipeline. Changes made using this API take effect
415
- immediately.
591
+ Create or update a pipeline. Changes made using this API take effect immediately.
416
592
 
417
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ingest.html>`_
593
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ingest.html>`_
418
594
 
419
595
  :param id: ID of the ingest pipeline to create or update.
420
596
  :param deprecated: Marks this ingest pipeline as deprecated. When a deprecated
@@ -504,9 +680,11 @@ class IngestClient(NamespacedClient):
504
680
  body: t.Optional[t.Dict[str, t.Any]] = None,
505
681
  ) -> ObjectApiResponse[t.Any]:
506
682
  """
507
- Executes an ingest pipeline against a set of provided documents.
683
+ Simulate a pipeline. Run an ingest pipeline against a set of provided documents.
684
+ You can either specify an existing pipeline to use with the provided documents
685
+ or supply a pipeline definition in the body of the request.
508
686
 
509
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/simulate-pipeline-api.html>`_
687
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/simulate-pipeline-api.html>`_
510
688
 
511
689
  :param docs: Sample documents to test in the pipeline.
512
690
  :param id: Pipeline to test. If you don’t specify a `pipeline` in the request
@@ -35,9 +35,11 @@ class LicenseClient(NamespacedClient):
35
35
  pretty: t.Optional[bool] = None,
36
36
  ) -> ObjectApiResponse[t.Any]:
37
37
  """
38
- Deletes licensing information for the cluster
38
+ Delete the license. When the license expires, your subscription level reverts
39
+ to Basic. If the operator privileges feature is enabled, only operator users
40
+ can use this API.
39
41
 
40
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-license.html>`_
42
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-license.html>`_
41
43
  """
42
44
  __path_parts: t.Dict[str, str] = {}
43
45
  __path = "/_license"
@@ -72,11 +74,13 @@ class LicenseClient(NamespacedClient):
72
74
  pretty: t.Optional[bool] = None,
73
75
  ) -> ObjectApiResponse[t.Any]:
74
76
  """
75
- Get license information. Returns information about your Elastic license, including
76
- its type, its status, when it was issued, and when it expires. For more information
77
- about the different types of licenses, refer to [Elastic Stack subscriptions](https://www.elastic.co/subscriptions).
77
+ Get license information. Get information about your Elastic license including
78
+ its type, its status, when it was issued, and when it expires. NOTE: If the master
79
+ node is generating a new cluster state, the get license API may return a `404
80
+ Not Found` response. If you receive an unexpected 404 response after cluster
81
+ startup, wait a short period and retry the request.
78
82
 
79
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-license.html>`_
83
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-license.html>`_
80
84
 
81
85
  :param accept_enterprise: If `true`, this parameter returns enterprise for Enterprise
82
86
  license types. If `false`, this parameter returns platinum for both platinum
@@ -120,9 +124,9 @@ class LicenseClient(NamespacedClient):
120
124
  pretty: t.Optional[bool] = None,
121
125
  ) -> ObjectApiResponse[t.Any]:
122
126
  """
123
- Retrieves information about the status of the basic license.
127
+ Get the basic license status.
124
128
 
125
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-basic-status.html>`_
129
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-basic-status.html>`_
126
130
  """
127
131
  __path_parts: t.Dict[str, str] = {}
128
132
  __path = "/_license/basic_status"
@@ -155,9 +159,9 @@ class LicenseClient(NamespacedClient):
155
159
  pretty: t.Optional[bool] = None,
156
160
  ) -> ObjectApiResponse[t.Any]:
157
161
  """
158
- Retrieves information about the status of the trial license.
162
+ Get the trial status.
159
163
 
160
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-trial-status.html>`_
164
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-trial-status.html>`_
161
165
  """
162
166
  __path_parts: t.Dict[str, str] = {}
163
167
  __path = "/_license/trial_status"
@@ -196,9 +200,16 @@ class LicenseClient(NamespacedClient):
196
200
  body: t.Optional[t.Dict[str, t.Any]] = None,
197
201
  ) -> ObjectApiResponse[t.Any]:
198
202
  """
199
- Updates the license for the cluster.
203
+ Update the license. You can update your license at runtime without shutting down
204
+ your nodes. License updates take effect immediately. If the license you are installing
205
+ does not support all of the features that were available with your previous license,
206
+ however, you are notified in the response. You must then re-submit the API request
207
+ with the acknowledge parameter set to true. NOTE: If Elasticsearch security features
208
+ are enabled and you are installing a gold or higher license, you must enable
209
+ TLS on the transport networking layer before you install the license. If the
210
+ operator privileges feature is enabled, only operator users can use this API.
200
211
 
201
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-license.html>`_
212
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-license.html>`_
202
213
 
203
214
  :param acknowledge: Specifies whether you acknowledge the license changes.
204
215
  :param license:
@@ -250,14 +261,15 @@ class LicenseClient(NamespacedClient):
250
261
  pretty: t.Optional[bool] = None,
251
262
  ) -> ObjectApiResponse[t.Any]:
252
263
  """
253
- The start basic API enables you to initiate an indefinite basic license, which
254
- gives access to all the basic features. If the basic license does not support
255
- all of the features that are available with your current license, however, you
256
- are notified in the response. You must then re-submit the API request with the
257
- acknowledge parameter set to true. To check the status of your basic license,
258
- use the following API: [Get basic status](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html).
264
+ Start a basic license. Start an indefinite basic license, which gives access
265
+ to all the basic features. NOTE: In order to start a basic license, you must
266
+ not currently have a basic license. If the basic license does not support all
267
+ of the features that are available with your current license, however, you are
268
+ notified in the response. You must then re-submit the API request with the `acknowledge`
269
+ parameter set to `true`. To check the status of your basic license, use the get
270
+ basic license API.
259
271
 
260
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/start-basic.html>`_
272
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-basic.html>`_
261
273
 
262
274
  :param acknowledge: whether the user has acknowledged acknowledge messages (default:
263
275
  false)
@@ -297,10 +309,14 @@ class LicenseClient(NamespacedClient):
297
309
  type_query_string: t.Optional[str] = None,
298
310
  ) -> ObjectApiResponse[t.Any]:
299
311
  """
300
- The start trial API enables you to start a 30-day trial, which gives access to
301
- all subscription features.
312
+ Start a trial. Start a 30-day trial, which gives access to all subscription features.
313
+ NOTE: You are allowed to start a trial only if your cluster has not already activated
314
+ a trial for the current major product version. For example, if you have already
315
+ activated a trial for v8.0, you cannot start a new trial until v9.0. You can,
316
+ however, request an extended trial at https://www.elastic.co/trialextension.
317
+ To check the status of your trial, use the get trial status API.
302
318
 
303
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/start-trial.html>`_
319
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-trial.html>`_
304
320
 
305
321
  :param acknowledge: whether the user has acknowledged acknowledge messages (default:
306
322
  false)
@@ -36,11 +36,13 @@ class LogstashClient(NamespacedClient):
36
36
  pretty: t.Optional[bool] = None,
37
37
  ) -> ObjectApiResponse[t.Any]:
38
38
  """
39
- Deletes a pipeline used for Logstash Central Management.
39
+ Delete a Logstash pipeline. Delete a pipeline that is used for Logstash Central
40
+ Management. If the request succeeds, you receive an empty response with an appropriate
41
+ status code.
40
42
 
41
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/logstash-api-delete-pipeline.html>`_
43
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-delete-pipeline.html>`_
42
44
 
43
- :param id: Identifier for the pipeline.
45
+ :param id: An identifier for the pipeline.
44
46
  """
45
47
  if id in SKIP_IN_PATH:
46
48
  raise ValueError("Empty value passed for parameter 'id'")
@@ -76,11 +78,11 @@ class LogstashClient(NamespacedClient):
76
78
  pretty: t.Optional[bool] = None,
77
79
  ) -> ObjectApiResponse[t.Any]:
78
80
  """
79
- Retrieves pipelines used for Logstash Central Management.
81
+ Get Logstash pipelines. Get pipelines that are used for Logstash Central Management.
80
82
 
81
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/logstash-api-get-pipeline.html>`_
83
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-get-pipeline.html>`_
82
84
 
83
- :param id: Comma-separated list of pipeline identifiers.
85
+ :param id: A comma-separated list of pipeline identifiers.
84
86
  """
85
87
  __path_parts: t.Dict[str, str]
86
88
  if id not in SKIP_IN_PATH:
@@ -123,11 +125,12 @@ class LogstashClient(NamespacedClient):
123
125
  pretty: t.Optional[bool] = None,
124
126
  ) -> ObjectApiResponse[t.Any]:
125
127
  """
126
- Creates or updates a pipeline used for Logstash Central Management.
128
+ Create or update a Logstash pipeline. Create a pipeline that is used for Logstash
129
+ Central Management. If the specified pipeline exists, it is replaced.
127
130
 
128
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/logstash-api-put-pipeline.html>`_
131
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-put-pipeline.html>`_
129
132
 
130
- :param id: Identifier for the pipeline.
133
+ :param id: An identifier for the pipeline.
131
134
  :param pipeline:
132
135
  """
133
136
  if id in SKIP_IN_PATH: