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.
Files changed (105) hide show
  1. elasticsearch/__init__.py +7 -0
  2. elasticsearch/_async/client/__init__.py +477 -128
  3. elasticsearch/_async/client/_base.py +41 -1
  4. elasticsearch/_async/client/async_search.py +40 -12
  5. elasticsearch/_async/client/autoscaling.py +37 -11
  6. elasticsearch/_async/client/cat.py +260 -69
  7. elasticsearch/_async/client/ccr.py +123 -38
  8. elasticsearch/_async/client/cluster.py +153 -42
  9. elasticsearch/_async/client/dangling_indices.py +27 -8
  10. elasticsearch/_async/client/enrich.py +48 -14
  11. elasticsearch/_async/client/eql.py +38 -12
  12. elasticsearch/_async/client/esql.py +10 -2
  13. elasticsearch/_async/client/features.py +17 -4
  14. elasticsearch/_async/client/fleet.py +30 -7
  15. elasticsearch/_async/client/graph.py +11 -3
  16. elasticsearch/_async/client/ilm.py +101 -29
  17. elasticsearch/_async/client/indices.py +688 -181
  18. elasticsearch/_async/client/inference.py +111 -44
  19. elasticsearch/_async/client/ingest.py +59 -16
  20. elasticsearch/_async/client/license.py +58 -14
  21. elasticsearch/_async/client/logstash.py +31 -9
  22. elasticsearch/_async/client/migration.py +28 -7
  23. elasticsearch/_async/client/ml.py +781 -214
  24. elasticsearch/_async/client/monitoring.py +10 -2
  25. elasticsearch/_async/client/nodes.py +103 -29
  26. elasticsearch/_async/client/query_ruleset.py +37 -11
  27. elasticsearch/_async/client/rollup.py +79 -24
  28. elasticsearch/_async/client/search_application.py +76 -23
  29. elasticsearch/_async/client/searchable_snapshots.py +49 -12
  30. elasticsearch/_async/client/security.py +544 -143
  31. elasticsearch/_async/client/shutdown.py +28 -6
  32. elasticsearch/_async/client/slm.py +80 -22
  33. elasticsearch/_async/client/snapshot.py +140 -54
  34. elasticsearch/_async/client/sql.py +55 -15
  35. elasticsearch/_async/client/ssl.py +9 -2
  36. elasticsearch/_async/client/synonyms.py +75 -21
  37. elasticsearch/_async/client/tasks.py +29 -8
  38. elasticsearch/_async/client/text_structure.py +74 -2
  39. elasticsearch/_async/client/transform.py +106 -32
  40. elasticsearch/_async/client/watcher.py +110 -31
  41. elasticsearch/_async/client/xpack.py +16 -4
  42. elasticsearch/_async/helpers.py +1 -1
  43. elasticsearch/_otel.py +92 -0
  44. elasticsearch/_sync/client/__init__.py +477 -128
  45. elasticsearch/_sync/client/_base.py +41 -1
  46. elasticsearch/_sync/client/async_search.py +40 -12
  47. elasticsearch/_sync/client/autoscaling.py +37 -11
  48. elasticsearch/_sync/client/cat.py +260 -69
  49. elasticsearch/_sync/client/ccr.py +123 -38
  50. elasticsearch/_sync/client/cluster.py +153 -42
  51. elasticsearch/_sync/client/dangling_indices.py +27 -8
  52. elasticsearch/_sync/client/enrich.py +48 -14
  53. elasticsearch/_sync/client/eql.py +38 -12
  54. elasticsearch/_sync/client/esql.py +10 -2
  55. elasticsearch/_sync/client/features.py +17 -4
  56. elasticsearch/_sync/client/fleet.py +30 -7
  57. elasticsearch/_sync/client/graph.py +11 -3
  58. elasticsearch/_sync/client/ilm.py +101 -29
  59. elasticsearch/_sync/client/indices.py +688 -181
  60. elasticsearch/_sync/client/inference.py +111 -44
  61. elasticsearch/_sync/client/ingest.py +59 -16
  62. elasticsearch/_sync/client/license.py +58 -14
  63. elasticsearch/_sync/client/logstash.py +31 -9
  64. elasticsearch/_sync/client/migration.py +28 -7
  65. elasticsearch/_sync/client/ml.py +781 -214
  66. elasticsearch/_sync/client/monitoring.py +10 -2
  67. elasticsearch/_sync/client/nodes.py +103 -29
  68. elasticsearch/_sync/client/query_ruleset.py +37 -11
  69. elasticsearch/_sync/client/rollup.py +79 -24
  70. elasticsearch/_sync/client/search_application.py +76 -23
  71. elasticsearch/_sync/client/searchable_snapshots.py +49 -12
  72. elasticsearch/_sync/client/security.py +544 -143
  73. elasticsearch/_sync/client/shutdown.py +28 -6
  74. elasticsearch/_sync/client/slm.py +80 -22
  75. elasticsearch/_sync/client/snapshot.py +140 -54
  76. elasticsearch/_sync/client/sql.py +55 -15
  77. elasticsearch/_sync/client/ssl.py +9 -2
  78. elasticsearch/_sync/client/synonyms.py +75 -21
  79. elasticsearch/_sync/client/tasks.py +29 -8
  80. elasticsearch/_sync/client/text_structure.py +74 -2
  81. elasticsearch/_sync/client/transform.py +106 -32
  82. elasticsearch/_sync/client/watcher.py +110 -31
  83. elasticsearch/_sync/client/xpack.py +16 -4
  84. elasticsearch/_version.py +1 -1
  85. elasticsearch/helpers/actions.py +1 -1
  86. elasticsearch/helpers/vectorstore/__init__.py +62 -0
  87. elasticsearch/helpers/vectorstore/_async/__init__.py +16 -0
  88. elasticsearch/helpers/vectorstore/_async/_utils.py +39 -0
  89. elasticsearch/helpers/vectorstore/_async/embedding_service.py +89 -0
  90. elasticsearch/helpers/vectorstore/_async/strategies.py +466 -0
  91. elasticsearch/helpers/vectorstore/_async/vectorstore.py +391 -0
  92. elasticsearch/helpers/vectorstore/_sync/__init__.py +16 -0
  93. elasticsearch/helpers/vectorstore/_sync/_utils.py +39 -0
  94. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +89 -0
  95. elasticsearch/helpers/vectorstore/_sync/strategies.py +466 -0
  96. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +388 -0
  97. elasticsearch/helpers/vectorstore/_utils.py +116 -0
  98. elasticsearch/serializer.py +14 -0
  99. {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/METADATA +28 -8
  100. elasticsearch-8.13.1.dist-info/RECORD +116 -0
  101. {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/WHEEL +1 -1
  102. elasticsearch-8.12.1.dist-info/RECORD +0 -103
  103. {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/LICENSE +0 -0
  104. {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/NOTICE +0 -0
  105. {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/top_level.txt +0 -0
@@ -24,6 +24,7 @@ from .utils import _rewrite_parameters
24
24
 
25
25
 
26
26
  class MonitoringClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters(
28
29
  body_name="operations",
29
30
  )
@@ -43,7 +44,7 @@ class MonitoringClient(NamespacedClient):
43
44
  """
44
45
  Used by the monitoring features to send monitoring data.
45
46
 
46
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/monitor-elasticsearch-cluster.html>`_
47
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/monitor-elasticsearch-cluster.html>`_
47
48
 
48
49
  :param interval: Collection interval (e.g., '10s' or '10000ms') of the payload
49
50
  :param operations:
@@ -62,6 +63,7 @@ class MonitoringClient(NamespacedClient):
62
63
  raise ValueError("Empty value passed for parameter 'system_api_version'")
63
64
  if system_id is None:
64
65
  raise ValueError("Empty value passed for parameter 'system_id'")
66
+ __path_parts: t.Dict[str, str] = {}
65
67
  __path = "/_monitoring/bulk"
66
68
  __query: t.Dict[str, t.Any] = {}
67
69
  if interval is not None:
@@ -84,5 +86,11 @@ class MonitoringClient(NamespacedClient):
84
86
  "content-type": "application/x-ndjson",
85
87
  }
86
88
  return self.perform_request( # type: ignore[return-value]
87
- "PUT", __path, params=__query, headers=__headers, body=__body
89
+ "PUT",
90
+ __path,
91
+ params=__query,
92
+ headers=__headers,
93
+ body=__body,
94
+ endpoint_id="monitoring.bulk",
95
+ path_parts=__path_parts,
88
96
  )
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24
24
 
25
25
 
26
26
  class NodesClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters()
28
29
  def clear_repositories_metering_archive(
29
30
  self,
@@ -38,7 +39,7 @@ class NodesClient(NamespacedClient):
38
39
  """
39
40
  Removes the archived repositories metering information present in the cluster.
40
41
 
41
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/clear-repositories-metering-archive-api.html>`_
42
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/clear-repositories-metering-archive-api.html>`_
42
43
 
43
44
  :param node_id: Comma-separated list of node IDs or names used to limit returned
44
45
  information. All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
@@ -49,7 +50,11 @@ class NodesClient(NamespacedClient):
49
50
  raise ValueError("Empty value passed for parameter 'node_id'")
50
51
  if max_archive_version in SKIP_IN_PATH:
51
52
  raise ValueError("Empty value passed for parameter 'max_archive_version'")
52
- __path = f"/_nodes/{_quote(node_id)}/_repositories_metering/{_quote(max_archive_version)}"
53
+ __path_parts: t.Dict[str, str] = {
54
+ "node_id": _quote(node_id),
55
+ "max_archive_version": _quote(max_archive_version),
56
+ }
57
+ __path = f'/_nodes/{__path_parts["node_id"]}/_repositories_metering/{__path_parts["max_archive_version"]}'
53
58
  __query: t.Dict[str, t.Any] = {}
54
59
  if error_trace is not None:
55
60
  __query["error_trace"] = error_trace
@@ -61,7 +66,12 @@ class NodesClient(NamespacedClient):
61
66
  __query["pretty"] = pretty
62
67
  __headers = {"accept": "application/json"}
63
68
  return self.perform_request( # type: ignore[return-value]
64
- "DELETE", __path, params=__query, headers=__headers
69
+ "DELETE",
70
+ __path,
71
+ params=__query,
72
+ headers=__headers,
73
+ endpoint_id="nodes.clear_repositories_metering_archive",
74
+ path_parts=__path_parts,
65
75
  )
66
76
 
67
77
  @_rewrite_parameters()
@@ -77,14 +87,15 @@ class NodesClient(NamespacedClient):
77
87
  """
78
88
  Returns cluster repositories metering information.
79
89
 
80
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-repositories-metering-api.html>`_
90
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-repositories-metering-api.html>`_
81
91
 
82
92
  :param node_id: Comma-separated list of node IDs or names used to limit returned
83
93
  information. All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
84
94
  """
85
95
  if node_id in SKIP_IN_PATH:
86
96
  raise ValueError("Empty value passed for parameter 'node_id'")
87
- __path = f"/_nodes/{_quote(node_id)}/_repositories_metering"
97
+ __path_parts: t.Dict[str, str] = {"node_id": _quote(node_id)}
98
+ __path = f'/_nodes/{__path_parts["node_id"]}/_repositories_metering'
88
99
  __query: t.Dict[str, t.Any] = {}
89
100
  if error_trace is not None:
90
101
  __query["error_trace"] = error_trace
@@ -96,7 +107,12 @@ class NodesClient(NamespacedClient):
96
107
  __query["pretty"] = pretty
97
108
  __headers = {"accept": "application/json"}
98
109
  return self.perform_request( # type: ignore[return-value]
99
- "GET", __path, params=__query, headers=__headers
110
+ "GET",
111
+ __path,
112
+ params=__query,
113
+ headers=__headers,
114
+ endpoint_id="nodes.get_repositories_metering_info",
115
+ path_parts=__path_parts,
100
116
  )
101
117
 
102
118
  @_rewrite_parameters()
@@ -126,7 +142,7 @@ class NodesClient(NamespacedClient):
126
142
  """
127
143
  Returns information about hot threads on each node in the cluster.
128
144
 
129
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-hot-threads.html>`_
145
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-nodes-hot-threads.html>`_
130
146
 
131
147
  :param node_id: List of node IDs or names used to limit returned information.
132
148
  :param ignore_idle_threads: If true, known idle threads (e.g. waiting in a socket
@@ -142,9 +158,12 @@ class NodesClient(NamespacedClient):
142
158
  the timeout expires, the request fails and returns an error.
143
159
  :param type: The type to sample.
144
160
  """
161
+ __path_parts: t.Dict[str, str]
145
162
  if node_id not in SKIP_IN_PATH:
146
- __path = f"/_nodes/{_quote(node_id)}/hot_threads"
163
+ __path_parts = {"node_id": _quote(node_id)}
164
+ __path = f'/_nodes/{__path_parts["node_id"]}/hot_threads'
147
165
  else:
166
+ __path_parts = {}
148
167
  __path = "/_nodes/hot_threads"
149
168
  __query: t.Dict[str, t.Any] = {}
150
169
  if error_trace is not None:
@@ -173,7 +192,12 @@ class NodesClient(NamespacedClient):
173
192
  __query["type"] = type
174
193
  __headers = {"accept": "text/plain"}
175
194
  return self.perform_request( # type: ignore[return-value]
176
- "GET", __path, params=__query, headers=__headers
195
+ "GET",
196
+ __path,
197
+ params=__query,
198
+ headers=__headers,
199
+ endpoint_id="nodes.hot_threads",
200
+ path_parts=__path_parts,
177
201
  )
178
202
 
179
203
  @_rewrite_parameters()
@@ -195,7 +219,7 @@ class NodesClient(NamespacedClient):
195
219
  """
196
220
  Returns information about nodes in the cluster.
197
221
 
198
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-info.html>`_
222
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-nodes-info.html>`_
199
223
 
200
224
  :param node_id: Comma-separated list of node IDs or names used to limit returned
201
225
  information.
@@ -208,13 +232,18 @@ class NodesClient(NamespacedClient):
208
232
  :param timeout: Period to wait for a response. If no response is received before
209
233
  the timeout expires, the request fails and returns an error.
210
234
  """
235
+ __path_parts: t.Dict[str, str]
211
236
  if node_id not in SKIP_IN_PATH and metric not in SKIP_IN_PATH:
212
- __path = f"/_nodes/{_quote(node_id)}/{_quote(metric)}"
237
+ __path_parts = {"node_id": _quote(node_id), "metric": _quote(metric)}
238
+ __path = f'/_nodes/{__path_parts["node_id"]}/{__path_parts["metric"]}'
213
239
  elif node_id not in SKIP_IN_PATH:
214
- __path = f"/_nodes/{_quote(node_id)}"
240
+ __path_parts = {"node_id": _quote(node_id)}
241
+ __path = f'/_nodes/{__path_parts["node_id"]}'
215
242
  elif metric not in SKIP_IN_PATH:
216
- __path = f"/_nodes/{_quote(metric)}"
243
+ __path_parts = {"metric": _quote(metric)}
244
+ __path = f'/_nodes/{__path_parts["metric"]}'
217
245
  else:
246
+ __path_parts = {}
218
247
  __path = "/_nodes"
219
248
  __query: t.Dict[str, t.Any] = {}
220
249
  if error_trace is not None:
@@ -233,7 +262,12 @@ class NodesClient(NamespacedClient):
233
262
  __query["timeout"] = timeout
234
263
  __headers = {"accept": "application/json"}
235
264
  return self.perform_request( # type: ignore[return-value]
236
- "GET", __path, params=__query, headers=__headers
265
+ "GET",
266
+ __path,
267
+ params=__query,
268
+ headers=__headers,
269
+ endpoint_id="nodes.info",
270
+ path_parts=__path_parts,
237
271
  )
238
272
 
239
273
  @_rewrite_parameters(
@@ -254,16 +288,19 @@ class NodesClient(NamespacedClient):
254
288
  """
255
289
  Reloads secure settings.
256
290
 
257
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/secure-settings.html#reloadable-secure-settings>`_
291
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/secure-settings.html#reloadable-secure-settings>`_
258
292
 
259
293
  :param node_id: The names of particular nodes in the cluster to target.
260
294
  :param secure_settings_password: The password for the Elasticsearch keystore.
261
295
  :param timeout: Period to wait for a response. If no response is received before
262
296
  the timeout expires, the request fails and returns an error.
263
297
  """
298
+ __path_parts: t.Dict[str, str]
264
299
  if node_id not in SKIP_IN_PATH:
265
- __path = f"/_nodes/{_quote(node_id)}/reload_secure_settings"
300
+ __path_parts = {"node_id": _quote(node_id)}
301
+ __path = f'/_nodes/{__path_parts["node_id"]}/reload_secure_settings'
266
302
  else:
303
+ __path_parts = {}
267
304
  __path = "/_nodes/reload_secure_settings"
268
305
  __query: t.Dict[str, t.Any] = {}
269
306
  __body: t.Dict[str, t.Any] = body if body is not None else {}
@@ -286,7 +323,13 @@ class NodesClient(NamespacedClient):
286
323
  if __body is not None:
287
324
  __headers["content-type"] = "application/json"
288
325
  return self.perform_request( # type: ignore[return-value]
289
- "POST", __path, params=__query, headers=__headers, body=__body
326
+ "POST",
327
+ __path,
328
+ params=__query,
329
+ headers=__headers,
330
+ body=__body,
331
+ endpoint_id="nodes.reload_secure_settings",
332
+ path_parts=__path_parts,
290
333
  )
291
334
 
292
335
  @_rewrite_parameters()
@@ -318,7 +361,7 @@ class NodesClient(NamespacedClient):
318
361
  """
319
362
  Returns statistical information about nodes in the cluster.
320
363
 
321
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-stats.html>`_
364
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-nodes-stats.html>`_
322
365
 
323
366
  :param node_id: Comma-separated list of node IDs or names used to limit returned
324
367
  information.
@@ -349,21 +392,37 @@ class NodesClient(NamespacedClient):
349
392
  :param types: A comma-separated list of document types for the indexing index
350
393
  metric.
351
394
  """
395
+ __path_parts: t.Dict[str, str]
352
396
  if (
353
397
  node_id not in SKIP_IN_PATH
354
398
  and metric not in SKIP_IN_PATH
355
399
  and index_metric not in SKIP_IN_PATH
356
400
  ):
357
- __path = f"/_nodes/{_quote(node_id)}/stats/{_quote(metric)}/{_quote(index_metric)}"
401
+ __path_parts = {
402
+ "node_id": _quote(node_id),
403
+ "metric": _quote(metric),
404
+ "index_metric": _quote(index_metric),
405
+ }
406
+ __path = f'/_nodes/{__path_parts["node_id"]}/stats/{__path_parts["metric"]}/{__path_parts["index_metric"]}'
358
407
  elif node_id not in SKIP_IN_PATH and metric not in SKIP_IN_PATH:
359
- __path = f"/_nodes/{_quote(node_id)}/stats/{_quote(metric)}"
408
+ __path_parts = {"node_id": _quote(node_id), "metric": _quote(metric)}
409
+ __path = f'/_nodes/{__path_parts["node_id"]}/stats/{__path_parts["metric"]}'
360
410
  elif metric not in SKIP_IN_PATH and index_metric not in SKIP_IN_PATH:
361
- __path = f"/_nodes/stats/{_quote(metric)}/{_quote(index_metric)}"
411
+ __path_parts = {
412
+ "metric": _quote(metric),
413
+ "index_metric": _quote(index_metric),
414
+ }
415
+ __path = (
416
+ f'/_nodes/stats/{__path_parts["metric"]}/{__path_parts["index_metric"]}'
417
+ )
362
418
  elif node_id not in SKIP_IN_PATH:
363
- __path = f"/_nodes/{_quote(node_id)}/stats"
419
+ __path_parts = {"node_id": _quote(node_id)}
420
+ __path = f'/_nodes/{__path_parts["node_id"]}/stats'
364
421
  elif metric not in SKIP_IN_PATH:
365
- __path = f"/_nodes/stats/{_quote(metric)}"
422
+ __path_parts = {"metric": _quote(metric)}
423
+ __path = f'/_nodes/stats/{__path_parts["metric"]}'
366
424
  else:
425
+ __path_parts = {}
367
426
  __path = "/_nodes/stats"
368
427
  __query: t.Dict[str, t.Any] = {}
369
428
  if completion_fields is not None:
@@ -396,7 +455,12 @@ class NodesClient(NamespacedClient):
396
455
  __query["types"] = types
397
456
  __headers = {"accept": "application/json"}
398
457
  return self.perform_request( # type: ignore[return-value]
399
- "GET", __path, params=__query, headers=__headers
458
+ "GET",
459
+ __path,
460
+ params=__query,
461
+ headers=__headers,
462
+ endpoint_id="nodes.stats",
463
+ path_parts=__path_parts,
400
464
  )
401
465
 
402
466
  @_rewrite_parameters()
@@ -414,7 +478,7 @@ class NodesClient(NamespacedClient):
414
478
  """
415
479
  Returns low-level information about REST actions usage on nodes.
416
480
 
417
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cluster-nodes-usage.html>`_
481
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-nodes-usage.html>`_
418
482
 
419
483
  :param node_id: A comma-separated list of node IDs or names to limit the returned
420
484
  information; use `_local` to return information from the node you're connecting
@@ -424,13 +488,18 @@ class NodesClient(NamespacedClient):
424
488
  :param timeout: Period to wait for a response. If no response is received before
425
489
  the timeout expires, the request fails and returns an error.
426
490
  """
491
+ __path_parts: t.Dict[str, str]
427
492
  if node_id not in SKIP_IN_PATH and metric not in SKIP_IN_PATH:
428
- __path = f"/_nodes/{_quote(node_id)}/usage/{_quote(metric)}"
493
+ __path_parts = {"node_id": _quote(node_id), "metric": _quote(metric)}
494
+ __path = f'/_nodes/{__path_parts["node_id"]}/usage/{__path_parts["metric"]}'
429
495
  elif node_id not in SKIP_IN_PATH:
430
- __path = f"/_nodes/{_quote(node_id)}/usage"
496
+ __path_parts = {"node_id": _quote(node_id)}
497
+ __path = f'/_nodes/{__path_parts["node_id"]}/usage'
431
498
  elif metric not in SKIP_IN_PATH:
432
- __path = f"/_nodes/usage/{_quote(metric)}"
499
+ __path_parts = {"metric": _quote(metric)}
500
+ __path = f'/_nodes/usage/{__path_parts["metric"]}'
433
501
  else:
502
+ __path_parts = {}
434
503
  __path = "/_nodes/usage"
435
504
  __query: t.Dict[str, t.Any] = {}
436
505
  if error_trace is not None:
@@ -445,5 +514,10 @@ class NodesClient(NamespacedClient):
445
514
  __query["timeout"] = timeout
446
515
  __headers = {"accept": "application/json"}
447
516
  return self.perform_request( # type: ignore[return-value]
448
- "GET", __path, params=__query, headers=__headers
517
+ "GET",
518
+ __path,
519
+ params=__query,
520
+ headers=__headers,
521
+ endpoint_id="nodes.usage",
522
+ path_parts=__path_parts,
449
523
  )
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24
24
 
25
25
 
26
26
  class QueryRulesetClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters()
28
29
  def delete(
29
30
  self,
@@ -37,13 +38,14 @@ class QueryRulesetClient(NamespacedClient):
37
38
  """
38
39
  Deletes a query ruleset.
39
40
 
40
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-query-ruleset.html>`_
41
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-query-ruleset.html>`_
41
42
 
42
43
  :param ruleset_id: The unique identifier of the query ruleset to delete
43
44
  """
44
45
  if ruleset_id in SKIP_IN_PATH:
45
46
  raise ValueError("Empty value passed for parameter 'ruleset_id'")
46
- __path = f"/_query_rules/{_quote(ruleset_id)}"
47
+ __path_parts: t.Dict[str, str] = {"ruleset_id": _quote(ruleset_id)}
48
+ __path = f'/_query_rules/{__path_parts["ruleset_id"]}'
47
49
  __query: t.Dict[str, t.Any] = {}
48
50
  if error_trace is not None:
49
51
  __query["error_trace"] = error_trace
@@ -55,7 +57,12 @@ class QueryRulesetClient(NamespacedClient):
55
57
  __query["pretty"] = pretty
56
58
  __headers = {"accept": "application/json"}
57
59
  return self.perform_request( # type: ignore[return-value]
58
- "DELETE", __path, params=__query, headers=__headers
60
+ "DELETE",
61
+ __path,
62
+ params=__query,
63
+ headers=__headers,
64
+ endpoint_id="query_ruleset.delete",
65
+ path_parts=__path_parts,
59
66
  )
60
67
 
61
68
  @_rewrite_parameters()
@@ -71,13 +78,14 @@ class QueryRulesetClient(NamespacedClient):
71
78
  """
72
79
  Returns the details about a query ruleset.
73
80
 
74
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-query-ruleset.html>`_
81
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-query-ruleset.html>`_
75
82
 
76
83
  :param ruleset_id: The unique identifier of the query ruleset
77
84
  """
78
85
  if ruleset_id in SKIP_IN_PATH:
79
86
  raise ValueError("Empty value passed for parameter 'ruleset_id'")
80
- __path = f"/_query_rules/{_quote(ruleset_id)}"
87
+ __path_parts: t.Dict[str, str] = {"ruleset_id": _quote(ruleset_id)}
88
+ __path = f'/_query_rules/{__path_parts["ruleset_id"]}'
81
89
  __query: t.Dict[str, t.Any] = {}
82
90
  if error_trace is not None:
83
91
  __query["error_trace"] = error_trace
@@ -89,7 +97,12 @@ class QueryRulesetClient(NamespacedClient):
89
97
  __query["pretty"] = pretty
90
98
  __headers = {"accept": "application/json"}
91
99
  return self.perform_request( # type: ignore[return-value]
92
- "GET", __path, params=__query, headers=__headers
100
+ "GET",
101
+ __path,
102
+ params=__query,
103
+ headers=__headers,
104
+ endpoint_id="query_ruleset.get",
105
+ path_parts=__path_parts,
93
106
  )
94
107
 
95
108
  @_rewrite_parameters(
@@ -108,11 +121,12 @@ class QueryRulesetClient(NamespacedClient):
108
121
  """
109
122
  Lists query rulesets.
110
123
 
111
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-query-rulesets.html>`_
124
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/list-query-rulesets.html>`_
112
125
 
113
126
  :param from_: Starting offset (default: 0)
114
127
  :param size: specifies a max number of results to get
115
128
  """
129
+ __path_parts: t.Dict[str, str] = {}
116
130
  __path = "/_query_rules"
117
131
  __query: t.Dict[str, t.Any] = {}
118
132
  if error_trace is not None:
@@ -129,7 +143,12 @@ class QueryRulesetClient(NamespacedClient):
129
143
  __query["size"] = size
130
144
  __headers = {"accept": "application/json"}
131
145
  return self.perform_request( # type: ignore[return-value]
132
- "GET", __path, params=__query, headers=__headers
146
+ "GET",
147
+ __path,
148
+ params=__query,
149
+ headers=__headers,
150
+ endpoint_id="query_ruleset.list",
151
+ path_parts=__path_parts,
133
152
  )
134
153
 
135
154
  @_rewrite_parameters(
@@ -149,7 +168,7 @@ class QueryRulesetClient(NamespacedClient):
149
168
  """
150
169
  Creates or updates a query ruleset.
151
170
 
152
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-query-ruleset.html>`_
171
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-query-ruleset.html>`_
153
172
 
154
173
  :param ruleset_id: The unique identifier of the query ruleset to be created or
155
174
  updated
@@ -159,7 +178,8 @@ class QueryRulesetClient(NamespacedClient):
159
178
  raise ValueError("Empty value passed for parameter 'ruleset_id'")
160
179
  if rules is None and body is None:
161
180
  raise ValueError("Empty value passed for parameter 'rules'")
162
- __path = f"/_query_rules/{_quote(ruleset_id)}"
181
+ __path_parts: t.Dict[str, str] = {"ruleset_id": _quote(ruleset_id)}
182
+ __path = f'/_query_rules/{__path_parts["ruleset_id"]}'
163
183
  __query: t.Dict[str, t.Any] = {}
164
184
  __body: t.Dict[str, t.Any] = body if body is not None else {}
165
185
  if error_trace is not None:
@@ -175,5 +195,11 @@ class QueryRulesetClient(NamespacedClient):
175
195
  __body["rules"] = rules
176
196
  __headers = {"accept": "application/json", "content-type": "application/json"}
177
197
  return self.perform_request( # type: ignore[return-value]
178
- "PUT", __path, params=__query, headers=__headers, body=__body
198
+ "PUT",
199
+ __path,
200
+ params=__query,
201
+ headers=__headers,
202
+ body=__body,
203
+ endpoint_id="query_ruleset.put",
204
+ path_parts=__path_parts,
179
205
  )