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 SKIP_IN_PATH, _quote, _rewrite_parameters
24
24
 
25
25
 
26
26
  class ShutdownClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters()
28
29
  async def delete_node(
29
30
  self,
@@ -55,7 +56,8 @@ class ShutdownClient(NamespacedClient):
55
56
  """
56
57
  if node_id in SKIP_IN_PATH:
57
58
  raise ValueError("Empty value passed for parameter 'node_id'")
58
- __path = f"/_nodes/{_quote(node_id)}/shutdown"
59
+ __path_parts: t.Dict[str, str] = {"node_id": _quote(node_id)}
60
+ __path = f'/_nodes/{__path_parts["node_id"]}/shutdown'
59
61
  __query: t.Dict[str, t.Any] = {}
60
62
  if error_trace is not None:
61
63
  __query["error_trace"] = error_trace
@@ -71,7 +73,12 @@ class ShutdownClient(NamespacedClient):
71
73
  __query["timeout"] = timeout
72
74
  __headers = {"accept": "application/json"}
73
75
  return await self.perform_request( # type: ignore[return-value]
74
- "DELETE", __path, params=__query, headers=__headers
76
+ "DELETE",
77
+ __path,
78
+ params=__query,
79
+ headers=__headers,
80
+ endpoint_id="shutdown.delete_node",
81
+ path_parts=__path_parts,
75
82
  )
76
83
 
77
84
  @_rewrite_parameters()
@@ -103,9 +110,12 @@ class ShutdownClient(NamespacedClient):
103
110
  :param timeout: Period to wait for a response. If no response is received before
104
111
  the timeout expires, the request fails and returns an error.
105
112
  """
113
+ __path_parts: t.Dict[str, str]
106
114
  if node_id not in SKIP_IN_PATH:
107
- __path = f"/_nodes/{_quote(node_id)}/shutdown"
115
+ __path_parts = {"node_id": _quote(node_id)}
116
+ __path = f'/_nodes/{__path_parts["node_id"]}/shutdown'
108
117
  else:
118
+ __path_parts = {}
109
119
  __path = "/_nodes/shutdown"
110
120
  __query: t.Dict[str, t.Any] = {}
111
121
  if error_trace is not None:
@@ -122,7 +132,12 @@ class ShutdownClient(NamespacedClient):
122
132
  __query["timeout"] = timeout
123
133
  __headers = {"accept": "application/json"}
124
134
  return await self.perform_request( # type: ignore[return-value]
125
- "GET", __path, params=__query, headers=__headers
135
+ "GET",
136
+ __path,
137
+ params=__query,
138
+ headers=__headers,
139
+ endpoint_id="shutdown.get_node",
140
+ path_parts=__path_parts,
126
141
  )
127
142
 
128
143
  @_rewrite_parameters(
@@ -195,7 +210,8 @@ class ShutdownClient(NamespacedClient):
195
210
  raise ValueError("Empty value passed for parameter 'reason'")
196
211
  if type is None and body is None:
197
212
  raise ValueError("Empty value passed for parameter 'type'")
198
- __path = f"/_nodes/{_quote(node_id)}/shutdown"
213
+ __path_parts: t.Dict[str, str] = {"node_id": _quote(node_id)}
214
+ __path = f'/_nodes/{__path_parts["node_id"]}/shutdown'
199
215
  __query: t.Dict[str, t.Any] = {}
200
216
  __body: t.Dict[str, t.Any] = body if body is not None else {}
201
217
  if error_trace is not None:
@@ -221,5 +237,11 @@ class ShutdownClient(NamespacedClient):
221
237
  __body["target_node_name"] = target_node_name
222
238
  __headers = {"accept": "application/json", "content-type": "application/json"}
223
239
  return await self.perform_request( # type: ignore[return-value]
224
- "PUT", __path, params=__query, headers=__headers, body=__body
240
+ "PUT",
241
+ __path,
242
+ params=__query,
243
+ headers=__headers,
244
+ body=__body,
245
+ endpoint_id="shutdown.put_node",
246
+ path_parts=__path_parts,
225
247
  )
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24
24
 
25
25
 
26
26
  class SlmClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters()
28
29
  async def delete_lifecycle(
29
30
  self,
@@ -37,13 +38,14 @@ class SlmClient(NamespacedClient):
37
38
  """
38
39
  Deletes an existing snapshot lifecycle policy.
39
40
 
40
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-delete-policy.html>`_
41
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-delete-policy.html>`_
41
42
 
42
43
  :param policy_id: The id of the snapshot lifecycle policy to remove
43
44
  """
44
45
  if policy_id in SKIP_IN_PATH:
45
46
  raise ValueError("Empty value passed for parameter 'policy_id'")
46
- __path = f"/_slm/policy/{_quote(policy_id)}"
47
+ __path_parts: t.Dict[str, str] = {"policy_id": _quote(policy_id)}
48
+ __path = f'/_slm/policy/{__path_parts["policy_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 SlmClient(NamespacedClient):
55
57
  __query["pretty"] = pretty
56
58
  __headers = {"accept": "application/json"}
57
59
  return await 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="slm.delete_lifecycle",
65
+ path_parts=__path_parts,
59
66
  )
60
67
 
61
68
  @_rewrite_parameters()
@@ -72,13 +79,14 @@ class SlmClient(NamespacedClient):
72
79
  Immediately creates a snapshot according to the lifecycle policy, without waiting
73
80
  for the scheduled time.
74
81
 
75
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-execute-lifecycle.html>`_
82
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-execute-lifecycle.html>`_
76
83
 
77
84
  :param policy_id: The id of the snapshot lifecycle policy to be executed
78
85
  """
79
86
  if policy_id in SKIP_IN_PATH:
80
87
  raise ValueError("Empty value passed for parameter 'policy_id'")
81
- __path = f"/_slm/policy/{_quote(policy_id)}/_execute"
88
+ __path_parts: t.Dict[str, str] = {"policy_id": _quote(policy_id)}
89
+ __path = f'/_slm/policy/{__path_parts["policy_id"]}/_execute'
82
90
  __query: t.Dict[str, t.Any] = {}
83
91
  if error_trace is not None:
84
92
  __query["error_trace"] = error_trace
@@ -90,7 +98,12 @@ class SlmClient(NamespacedClient):
90
98
  __query["pretty"] = pretty
91
99
  __headers = {"accept": "application/json"}
92
100
  return await self.perform_request( # type: ignore[return-value]
93
- "PUT", __path, params=__query, headers=__headers
101
+ "PUT",
102
+ __path,
103
+ params=__query,
104
+ headers=__headers,
105
+ endpoint_id="slm.execute_lifecycle",
106
+ path_parts=__path_parts,
94
107
  )
95
108
 
96
109
  @_rewrite_parameters()
@@ -105,8 +118,9 @@ class SlmClient(NamespacedClient):
105
118
  """
106
119
  Deletes any snapshots that are expired according to the policy's retention rules.
107
120
 
108
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-execute-retention.html>`_
121
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-execute-retention.html>`_
109
122
  """
123
+ __path_parts: t.Dict[str, str] = {}
110
124
  __path = "/_slm/_execute_retention"
111
125
  __query: t.Dict[str, t.Any] = {}
112
126
  if error_trace is not None:
@@ -119,7 +133,12 @@ class SlmClient(NamespacedClient):
119
133
  __query["pretty"] = pretty
120
134
  __headers = {"accept": "application/json"}
121
135
  return await self.perform_request( # type: ignore[return-value]
122
- "POST", __path, params=__query, headers=__headers
136
+ "POST",
137
+ __path,
138
+ params=__query,
139
+ headers=__headers,
140
+ endpoint_id="slm.execute_retention",
141
+ path_parts=__path_parts,
123
142
  )
124
143
 
125
144
  @_rewrite_parameters()
@@ -136,13 +155,16 @@ class SlmClient(NamespacedClient):
136
155
  Retrieves one or more snapshot lifecycle policy definitions and information about
137
156
  the latest snapshot attempts.
138
157
 
139
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-get-policy.html>`_
158
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-get-policy.html>`_
140
159
 
141
160
  :param policy_id: Comma-separated list of snapshot lifecycle policies to retrieve
142
161
  """
162
+ __path_parts: t.Dict[str, str]
143
163
  if policy_id not in SKIP_IN_PATH:
144
- __path = f"/_slm/policy/{_quote(policy_id)}"
164
+ __path_parts = {"policy_id": _quote(policy_id)}
165
+ __path = f'/_slm/policy/{__path_parts["policy_id"]}'
145
166
  else:
167
+ __path_parts = {}
146
168
  __path = "/_slm/policy"
147
169
  __query: t.Dict[str, t.Any] = {}
148
170
  if error_trace is not None:
@@ -155,7 +177,12 @@ class SlmClient(NamespacedClient):
155
177
  __query["pretty"] = pretty
156
178
  __headers = {"accept": "application/json"}
157
179
  return await self.perform_request( # type: ignore[return-value]
158
- "GET", __path, params=__query, headers=__headers
180
+ "GET",
181
+ __path,
182
+ params=__query,
183
+ headers=__headers,
184
+ endpoint_id="slm.get_lifecycle",
185
+ path_parts=__path_parts,
159
186
  )
160
187
 
161
188
  @_rewrite_parameters()
@@ -171,8 +198,9 @@ class SlmClient(NamespacedClient):
171
198
  Returns global and policy-level statistics about actions taken by snapshot lifecycle
172
199
  management.
173
200
 
174
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-get-stats.html>`_
201
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-get-stats.html>`_
175
202
  """
203
+ __path_parts: t.Dict[str, str] = {}
176
204
  __path = "/_slm/stats"
177
205
  __query: t.Dict[str, t.Any] = {}
178
206
  if error_trace is not None:
@@ -185,7 +213,12 @@ class SlmClient(NamespacedClient):
185
213
  __query["pretty"] = pretty
186
214
  __headers = {"accept": "application/json"}
187
215
  return await self.perform_request( # type: ignore[return-value]
188
- "GET", __path, params=__query, headers=__headers
216
+ "GET",
217
+ __path,
218
+ params=__query,
219
+ headers=__headers,
220
+ endpoint_id="slm.get_stats",
221
+ path_parts=__path_parts,
189
222
  )
190
223
 
191
224
  @_rewrite_parameters()
@@ -200,8 +233,9 @@ class SlmClient(NamespacedClient):
200
233
  """
201
234
  Retrieves the status of snapshot lifecycle management (SLM).
202
235
 
203
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-get-status.html>`_
236
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-get-status.html>`_
204
237
  """
238
+ __path_parts: t.Dict[str, str] = {}
205
239
  __path = "/_slm/status"
206
240
  __query: t.Dict[str, t.Any] = {}
207
241
  if error_trace is not None:
@@ -214,7 +248,12 @@ class SlmClient(NamespacedClient):
214
248
  __query["pretty"] = pretty
215
249
  __headers = {"accept": "application/json"}
216
250
  return await self.perform_request( # type: ignore[return-value]
217
- "GET", __path, params=__query, headers=__headers
251
+ "GET",
252
+ __path,
253
+ params=__query,
254
+ headers=__headers,
255
+ endpoint_id="slm.get_status",
256
+ path_parts=__path_parts,
218
257
  )
219
258
 
220
259
  @_rewrite_parameters(
@@ -242,7 +281,7 @@ class SlmClient(NamespacedClient):
242
281
  """
243
282
  Creates or updates a snapshot lifecycle policy.
244
283
 
245
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-put-policy.html>`_
284
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-put-policy.html>`_
246
285
 
247
286
  :param policy_id: ID for the snapshot lifecycle policy you want to create or
248
287
  update.
@@ -265,7 +304,8 @@ class SlmClient(NamespacedClient):
265
304
  """
266
305
  if policy_id in SKIP_IN_PATH:
267
306
  raise ValueError("Empty value passed for parameter 'policy_id'")
268
- __path = f"/_slm/policy/{_quote(policy_id)}"
307
+ __path_parts: t.Dict[str, str] = {"policy_id": _quote(policy_id)}
308
+ __path = f'/_slm/policy/{__path_parts["policy_id"]}'
269
309
  __query: t.Dict[str, t.Any] = {}
270
310
  __body: t.Dict[str, t.Any] = body if body is not None else {}
271
311
  if error_trace is not None:
@@ -297,7 +337,13 @@ class SlmClient(NamespacedClient):
297
337
  if __body is not None:
298
338
  __headers["content-type"] = "application/json"
299
339
  return await self.perform_request( # type: ignore[return-value]
300
- "PUT", __path, params=__query, headers=__headers, body=__body
340
+ "PUT",
341
+ __path,
342
+ params=__query,
343
+ headers=__headers,
344
+ body=__body,
345
+ endpoint_id="slm.put_lifecycle",
346
+ path_parts=__path_parts,
301
347
  )
302
348
 
303
349
  @_rewrite_parameters()
@@ -312,8 +358,9 @@ class SlmClient(NamespacedClient):
312
358
  """
313
359
  Turns on snapshot lifecycle management (SLM).
314
360
 
315
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-start.html>`_
361
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-start.html>`_
316
362
  """
363
+ __path_parts: t.Dict[str, str] = {}
317
364
  __path = "/_slm/start"
318
365
  __query: t.Dict[str, t.Any] = {}
319
366
  if error_trace is not None:
@@ -326,7 +373,12 @@ class SlmClient(NamespacedClient):
326
373
  __query["pretty"] = pretty
327
374
  __headers = {"accept": "application/json"}
328
375
  return await self.perform_request( # type: ignore[return-value]
329
- "POST", __path, params=__query, headers=__headers
376
+ "POST",
377
+ __path,
378
+ params=__query,
379
+ headers=__headers,
380
+ endpoint_id="slm.start",
381
+ path_parts=__path_parts,
330
382
  )
331
383
 
332
384
  @_rewrite_parameters()
@@ -341,8 +393,9 @@ class SlmClient(NamespacedClient):
341
393
  """
342
394
  Turns off snapshot lifecycle management (SLM).
343
395
 
344
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/slm-api-stop.html>`_
396
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/slm-api-stop.html>`_
345
397
  """
398
+ __path_parts: t.Dict[str, str] = {}
346
399
  __path = "/_slm/stop"
347
400
  __query: t.Dict[str, t.Any] = {}
348
401
  if error_trace is not None:
@@ -355,5 +408,10 @@ class SlmClient(NamespacedClient):
355
408
  __query["pretty"] = pretty
356
409
  __headers = {"accept": "application/json"}
357
410
  return await self.perform_request( # type: ignore[return-value]
358
- "POST", __path, params=__query, headers=__headers
411
+ "POST",
412
+ __path,
413
+ params=__query,
414
+ headers=__headers,
415
+ endpoint_id="slm.stop",
416
+ path_parts=__path_parts,
359
417
  )