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 RollupClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters()
28
29
  def delete_job(
29
30
  self,
@@ -37,13 +38,14 @@ class RollupClient(NamespacedClient):
37
38
  """
38
39
  Deletes an existing rollup job.
39
40
 
40
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-delete-job.html>`_
41
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-delete-job.html>`_
41
42
 
42
43
  :param id: Identifier for the job.
43
44
  """
44
45
  if id in SKIP_IN_PATH:
45
46
  raise ValueError("Empty value passed for parameter 'id'")
46
- __path = f"/_rollup/job/{_quote(id)}"
47
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
48
+ __path = f'/_rollup/job/{__path_parts["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 RollupClient(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="rollup.delete_job",
65
+ path_parts=__path_parts,
59
66
  )
60
67
 
61
68
  @_rewrite_parameters()
@@ -71,14 +78,17 @@ class RollupClient(NamespacedClient):
71
78
  """
72
79
  Retrieves the configuration, stats, and status of rollup jobs.
73
80
 
74
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-get-job.html>`_
81
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-get-job.html>`_
75
82
 
76
83
  :param id: Identifier for the rollup job. If it is `_all` or omitted, the API
77
84
  returns all rollup jobs.
78
85
  """
86
+ __path_parts: t.Dict[str, str]
79
87
  if id not in SKIP_IN_PATH:
80
- __path = f"/_rollup/job/{_quote(id)}"
88
+ __path_parts = {"id": _quote(id)}
89
+ __path = f'/_rollup/job/{__path_parts["id"]}'
81
90
  else:
91
+ __path_parts = {}
82
92
  __path = "/_rollup/job"
83
93
  __query: t.Dict[str, t.Any] = {}
84
94
  if error_trace is not None:
@@ -91,7 +101,12 @@ class RollupClient(NamespacedClient):
91
101
  __query["pretty"] = pretty
92
102
  __headers = {"accept": "application/json"}
93
103
  return self.perform_request( # type: ignore[return-value]
94
- "GET", __path, params=__query, headers=__headers
104
+ "GET",
105
+ __path,
106
+ params=__query,
107
+ headers=__headers,
108
+ endpoint_id="rollup.get_jobs",
109
+ path_parts=__path_parts,
95
110
  )
96
111
 
97
112
  @_rewrite_parameters()
@@ -108,14 +123,17 @@ class RollupClient(NamespacedClient):
108
123
  Returns the capabilities of any rollup jobs that have been configured for a specific
109
124
  index or index pattern.
110
125
 
111
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-get-rollup-caps.html>`_
126
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-get-rollup-caps.html>`_
112
127
 
113
128
  :param id: Index, indices or index-pattern to return rollup capabilities for.
114
129
  `_all` may be used to fetch rollup capabilities from all jobs.
115
130
  """
131
+ __path_parts: t.Dict[str, str]
116
132
  if id not in SKIP_IN_PATH:
117
- __path = f"/_rollup/data/{_quote(id)}"
133
+ __path_parts = {"id": _quote(id)}
134
+ __path = f'/_rollup/data/{__path_parts["id"]}'
118
135
  else:
136
+ __path_parts = {}
119
137
  __path = "/_rollup/data"
120
138
  __query: t.Dict[str, t.Any] = {}
121
139
  if error_trace is not None:
@@ -128,7 +146,12 @@ class RollupClient(NamespacedClient):
128
146
  __query["pretty"] = pretty
129
147
  __headers = {"accept": "application/json"}
130
148
  return self.perform_request( # type: ignore[return-value]
131
- "GET", __path, params=__query, headers=__headers
149
+ "GET",
150
+ __path,
151
+ params=__query,
152
+ headers=__headers,
153
+ endpoint_id="rollup.get_rollup_caps",
154
+ path_parts=__path_parts,
132
155
  )
133
156
 
134
157
  @_rewrite_parameters()
@@ -145,14 +168,15 @@ class RollupClient(NamespacedClient):
145
168
  Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the
146
169
  index where rollup data is stored).
147
170
 
148
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-get-rollup-index-caps.html>`_
171
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-get-rollup-index-caps.html>`_
149
172
 
150
173
  :param index: Data stream or index to check for rollup capabilities. Wildcard
151
174
  (`*`) expressions are supported.
152
175
  """
153
176
  if index in SKIP_IN_PATH:
154
177
  raise ValueError("Empty value passed for parameter 'index'")
155
- __path = f"/{_quote(index)}/_rollup/data"
178
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
179
+ __path = f'/{__path_parts["index"]}/_rollup/data'
156
180
  __query: t.Dict[str, t.Any] = {}
157
181
  if error_trace is not None:
158
182
  __query["error_trace"] = error_trace
@@ -164,7 +188,12 @@ class RollupClient(NamespacedClient):
164
188
  __query["pretty"] = pretty
165
189
  __headers = {"accept": "application/json"}
166
190
  return self.perform_request( # type: ignore[return-value]
167
- "GET", __path, params=__query, headers=__headers
191
+ "GET",
192
+ __path,
193
+ params=__query,
194
+ headers=__headers,
195
+ endpoint_id="rollup.get_rollup_index_caps",
196
+ path_parts=__path_parts,
168
197
  )
169
198
 
170
199
  @_rewrite_parameters(
@@ -201,7 +230,7 @@ class RollupClient(NamespacedClient):
201
230
  """
202
231
  Creates a rollup job.
203
232
 
204
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-put-job.html>`_
233
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-put-job.html>`_
205
234
 
206
235
  :param id: Identifier for the rollup job. This can be any alphanumeric string
207
236
  and uniquely identifies the data that is associated with the rollup job.
@@ -255,7 +284,8 @@ class RollupClient(NamespacedClient):
255
284
  raise ValueError("Empty value passed for parameter 'page_size'")
256
285
  if rollup_index is None and body is None:
257
286
  raise ValueError("Empty value passed for parameter 'rollup_index'")
258
- __path = f"/_rollup/job/{_quote(id)}"
287
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
288
+ __path = f'/_rollup/job/{__path_parts["id"]}'
259
289
  __query: t.Dict[str, t.Any] = {}
260
290
  __body: t.Dict[str, t.Any] = body if body is not None else {}
261
291
  if error_trace is not None:
@@ -285,7 +315,13 @@ class RollupClient(NamespacedClient):
285
315
  __body["timeout"] = timeout
286
316
  __headers = {"accept": "application/json", "content-type": "application/json"}
287
317
  return self.perform_request( # type: ignore[return-value]
288
- "PUT", __path, params=__query, headers=__headers, body=__body
318
+ "PUT",
319
+ __path,
320
+ params=__query,
321
+ headers=__headers,
322
+ body=__body,
323
+ endpoint_id="rollup.put_job",
324
+ path_parts=__path_parts,
289
325
  )
290
326
 
291
327
  @_rewrite_parameters(
@@ -310,7 +346,7 @@ class RollupClient(NamespacedClient):
310
346
  """
311
347
  Enables searching rolled-up data using the standard query DSL.
312
348
 
313
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-search.html>`_
349
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-search.html>`_
314
350
 
315
351
  :param index: Enables searching rolled-up data using the standard Query DSL.
316
352
  :param aggregations: Specifies aggregations.
@@ -324,7 +360,8 @@ class RollupClient(NamespacedClient):
324
360
  """
325
361
  if index in SKIP_IN_PATH:
326
362
  raise ValueError("Empty value passed for parameter 'index'")
327
- __path = f"/{_quote(index)}/_rollup_search"
363
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
364
+ __path = f'/{__path_parts["index"]}/_rollup_search'
328
365
  __query: t.Dict[str, t.Any] = {}
329
366
  __body: t.Dict[str, t.Any] = body if body is not None else {}
330
367
  if error_trace is not None:
@@ -350,7 +387,13 @@ class RollupClient(NamespacedClient):
350
387
  __body["size"] = size
351
388
  __headers = {"accept": "application/json", "content-type": "application/json"}
352
389
  return self.perform_request( # type: ignore[return-value]
353
- "POST", __path, params=__query, headers=__headers, body=__body
390
+ "POST",
391
+ __path,
392
+ params=__query,
393
+ headers=__headers,
394
+ body=__body,
395
+ endpoint_id="rollup.rollup_search",
396
+ path_parts=__path_parts,
354
397
  )
355
398
 
356
399
  @_rewrite_parameters()
@@ -366,13 +409,14 @@ class RollupClient(NamespacedClient):
366
409
  """
367
410
  Starts an existing, stopped rollup job.
368
411
 
369
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-start-job.html>`_
412
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-start-job.html>`_
370
413
 
371
414
  :param id: Identifier for the rollup job.
372
415
  """
373
416
  if id in SKIP_IN_PATH:
374
417
  raise ValueError("Empty value passed for parameter 'id'")
375
- __path = f"/_rollup/job/{_quote(id)}/_start"
418
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
419
+ __path = f'/_rollup/job/{__path_parts["id"]}/_start'
376
420
  __query: t.Dict[str, t.Any] = {}
377
421
  if error_trace is not None:
378
422
  __query["error_trace"] = error_trace
@@ -384,7 +428,12 @@ class RollupClient(NamespacedClient):
384
428
  __query["pretty"] = pretty
385
429
  __headers = {"accept": "application/json"}
386
430
  return self.perform_request( # type: ignore[return-value]
387
- "POST", __path, params=__query, headers=__headers
431
+ "POST",
432
+ __path,
433
+ params=__query,
434
+ headers=__headers,
435
+ endpoint_id="rollup.start_job",
436
+ path_parts=__path_parts,
388
437
  )
389
438
 
390
439
  @_rewrite_parameters()
@@ -402,7 +451,7 @@ class RollupClient(NamespacedClient):
402
451
  """
403
452
  Stops an existing, started rollup job.
404
453
 
405
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/rollup-stop-job.html>`_
454
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-stop-job.html>`_
406
455
 
407
456
  :param id: Identifier for the rollup job.
408
457
  :param timeout: If `wait_for_completion` is `true`, the API blocks for (at maximum)
@@ -414,7 +463,8 @@ class RollupClient(NamespacedClient):
414
463
  """
415
464
  if id in SKIP_IN_PATH:
416
465
  raise ValueError("Empty value passed for parameter 'id'")
417
- __path = f"/_rollup/job/{_quote(id)}/_stop"
466
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
467
+ __path = f'/_rollup/job/{__path_parts["id"]}/_stop'
418
468
  __query: t.Dict[str, t.Any] = {}
419
469
  if error_trace is not None:
420
470
  __query["error_trace"] = error_trace
@@ -430,5 +480,10 @@ class RollupClient(NamespacedClient):
430
480
  __query["wait_for_completion"] = wait_for_completion
431
481
  __headers = {"accept": "application/json"}
432
482
  return self.perform_request( # type: ignore[return-value]
433
- "POST", __path, params=__query, headers=__headers
483
+ "POST",
484
+ __path,
485
+ params=__query,
486
+ headers=__headers,
487
+ endpoint_id="rollup.stop_job",
488
+ path_parts=__path_parts,
434
489
  )
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24
24
 
25
25
 
26
26
  class SearchApplicationClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters()
28
29
  def delete(
29
30
  self,
@@ -37,13 +38,14 @@ class SearchApplicationClient(NamespacedClient):
37
38
  """
38
39
  Deletes a search application.
39
40
 
40
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-search-application.html>`_
41
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-search-application.html>`_
41
42
 
42
43
  :param name: The name of the search application to delete
43
44
  """
44
45
  if name in SKIP_IN_PATH:
45
46
  raise ValueError("Empty value passed for parameter 'name'")
46
- __path = f"/_application/search_application/{_quote(name)}"
47
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
48
+ __path = f'/_application/search_application/{__path_parts["name"]}'
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 SearchApplicationClient(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="search_application.delete",
65
+ path_parts=__path_parts,
59
66
  )
60
67
 
61
68
  @_rewrite_parameters()
@@ -71,13 +78,14 @@ class SearchApplicationClient(NamespacedClient):
71
78
  """
72
79
  Delete a behavioral analytics collection.
73
80
 
74
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-analytics-collection.html>`_
81
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-analytics-collection.html>`_
75
82
 
76
83
  :param name: The name of the analytics collection to be deleted
77
84
  """
78
85
  if name in SKIP_IN_PATH:
79
86
  raise ValueError("Empty value passed for parameter 'name'")
80
- __path = f"/_application/analytics/{_quote(name)}"
87
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
88
+ __path = f'/_application/analytics/{__path_parts["name"]}'
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 SearchApplicationClient(NamespacedClient):
89
97
  __query["pretty"] = pretty
90
98
  __headers = {"accept": "application/json"}
91
99
  return self.perform_request( # type: ignore[return-value]
92
- "DELETE", __path, params=__query, headers=__headers
100
+ "DELETE",
101
+ __path,
102
+ params=__query,
103
+ headers=__headers,
104
+ endpoint_id="search_application.delete_behavioral_analytics",
105
+ path_parts=__path_parts,
93
106
  )
94
107
 
95
108
  @_rewrite_parameters()
@@ -105,13 +118,14 @@ class SearchApplicationClient(NamespacedClient):
105
118
  """
106
119
  Returns the details about a search application.
107
120
 
108
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-search-application.html>`_
121
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-search-application.html>`_
109
122
 
110
123
  :param name: The name of the search application
111
124
  """
112
125
  if name in SKIP_IN_PATH:
113
126
  raise ValueError("Empty value passed for parameter 'name'")
114
- __path = f"/_application/search_application/{_quote(name)}"
127
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
128
+ __path = f'/_application/search_application/{__path_parts["name"]}'
115
129
  __query: t.Dict[str, t.Any] = {}
116
130
  if error_trace is not None:
117
131
  __query["error_trace"] = error_trace
@@ -123,7 +137,12 @@ class SearchApplicationClient(NamespacedClient):
123
137
  __query["pretty"] = pretty
124
138
  __headers = {"accept": "application/json"}
125
139
  return self.perform_request( # type: ignore[return-value]
126
- "GET", __path, params=__query, headers=__headers
140
+ "GET",
141
+ __path,
142
+ params=__query,
143
+ headers=__headers,
144
+ endpoint_id="search_application.get",
145
+ path_parts=__path_parts,
127
146
  )
128
147
 
129
148
  @_rewrite_parameters()
@@ -139,13 +158,16 @@ class SearchApplicationClient(NamespacedClient):
139
158
  """
140
159
  Returns the existing behavioral analytics collections.
141
160
 
142
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-analytics-collection.html>`_
161
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/list-analytics-collection.html>`_
143
162
 
144
163
  :param name: A list of analytics collections to limit the returned information
145
164
  """
165
+ __path_parts: t.Dict[str, str]
146
166
  if name not in SKIP_IN_PATH:
147
- __path = f"/_application/analytics/{_quote(name)}"
167
+ __path_parts = {"name": _quote(name)}
168
+ __path = f'/_application/analytics/{__path_parts["name"]}'
148
169
  else:
170
+ __path_parts = {}
149
171
  __path = "/_application/analytics"
150
172
  __query: t.Dict[str, t.Any] = {}
151
173
  if error_trace is not None:
@@ -158,7 +180,12 @@ class SearchApplicationClient(NamespacedClient):
158
180
  __query["pretty"] = pretty
159
181
  __headers = {"accept": "application/json"}
160
182
  return self.perform_request( # type: ignore[return-value]
161
- "GET", __path, params=__query, headers=__headers
183
+ "GET",
184
+ __path,
185
+ params=__query,
186
+ headers=__headers,
187
+ endpoint_id="search_application.get_behavioral_analytics",
188
+ path_parts=__path_parts,
162
189
  )
163
190
 
164
191
  @_rewrite_parameters(
@@ -178,12 +205,13 @@ class SearchApplicationClient(NamespacedClient):
178
205
  """
179
206
  Returns the existing search applications.
180
207
 
181
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-search-applications.html>`_
208
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/list-search-applications.html>`_
182
209
 
183
210
  :param from_: Starting offset.
184
211
  :param q: Query in the Lucene query string syntax.
185
212
  :param size: Specifies a max number of results to get.
186
213
  """
214
+ __path_parts: t.Dict[str, str] = {}
187
215
  __path = "/_application/search_application"
188
216
  __query: t.Dict[str, t.Any] = {}
189
217
  if error_trace is not None:
@@ -202,7 +230,12 @@ class SearchApplicationClient(NamespacedClient):
202
230
  __query["size"] = size
203
231
  __headers = {"accept": "application/json"}
204
232
  return self.perform_request( # type: ignore[return-value]
205
- "GET", __path, params=__query, headers=__headers
233
+ "GET",
234
+ __path,
235
+ params=__query,
236
+ headers=__headers,
237
+ endpoint_id="search_application.list",
238
+ path_parts=__path_parts,
206
239
  )
207
240
 
208
241
  @_rewrite_parameters(
@@ -223,7 +256,7 @@ class SearchApplicationClient(NamespacedClient):
223
256
  """
224
257
  Creates or updates a search application.
225
258
 
226
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-search-application.html>`_
259
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-search-application.html>`_
227
260
 
228
261
  :param name: The name of the search application to be created or updated.
229
262
  :param search_application:
@@ -238,7 +271,8 @@ class SearchApplicationClient(NamespacedClient):
238
271
  )
239
272
  elif search_application is not None and body is not None:
240
273
  raise ValueError("Cannot set both 'search_application' and 'body'")
241
- __path = f"/_application/search_application/{_quote(name)}"
274
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
275
+ __path = f'/_application/search_application/{__path_parts["name"]}'
242
276
  __query: t.Dict[str, t.Any] = {}
243
277
  if create is not None:
244
278
  __query["create"] = create
@@ -253,7 +287,13 @@ class SearchApplicationClient(NamespacedClient):
253
287
  __body = search_application if search_application is not None else body
254
288
  __headers = {"accept": "application/json", "content-type": "application/json"}
255
289
  return self.perform_request( # type: ignore[return-value]
256
- "PUT", __path, params=__query, headers=__headers, body=__body
290
+ "PUT",
291
+ __path,
292
+ params=__query,
293
+ headers=__headers,
294
+ body=__body,
295
+ endpoint_id="search_application.put",
296
+ path_parts=__path_parts,
257
297
  )
258
298
 
259
299
  @_rewrite_parameters()
@@ -269,13 +309,14 @@ class SearchApplicationClient(NamespacedClient):
269
309
  """
270
310
  Creates a behavioral analytics collection.
271
311
 
272
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/put-analytics-collection.html>`_
312
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-analytics-collection.html>`_
273
313
 
274
314
  :param name: The name of the analytics collection to be created or updated.
275
315
  """
276
316
  if name in SKIP_IN_PATH:
277
317
  raise ValueError("Empty value passed for parameter 'name'")
278
- __path = f"/_application/analytics/{_quote(name)}"
318
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
319
+ __path = f'/_application/analytics/{__path_parts["name"]}'
279
320
  __query: t.Dict[str, t.Any] = {}
280
321
  if error_trace is not None:
281
322
  __query["error_trace"] = error_trace
@@ -287,7 +328,12 @@ class SearchApplicationClient(NamespacedClient):
287
328
  __query["pretty"] = pretty
288
329
  __headers = {"accept": "application/json"}
289
330
  return self.perform_request( # type: ignore[return-value]
290
- "PUT", __path, params=__query, headers=__headers
331
+ "PUT",
332
+ __path,
333
+ params=__query,
334
+ headers=__headers,
335
+ endpoint_id="search_application.put_behavioral_analytics",
336
+ path_parts=__path_parts,
291
337
  )
292
338
 
293
339
  @_rewrite_parameters(
@@ -308,7 +354,7 @@ class SearchApplicationClient(NamespacedClient):
308
354
  """
309
355
  Perform a search against a search application
310
356
 
311
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-application-search.html>`_
357
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/search-application-search.html>`_
312
358
 
313
359
  :param name: The name of the search application to be searched.
314
360
  :param params: Query parameters specific to this request, which will override
@@ -316,7 +362,8 @@ class SearchApplicationClient(NamespacedClient):
316
362
  """
317
363
  if name in SKIP_IN_PATH:
318
364
  raise ValueError("Empty value passed for parameter 'name'")
319
- __path = f"/_application/search_application/{_quote(name)}/_search"
365
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
366
+ __path = f'/_application/search_application/{__path_parts["name"]}/_search'
320
367
  __query: t.Dict[str, t.Any] = {}
321
368
  __body: t.Dict[str, t.Any] = body if body is not None else {}
322
369
  if error_trace is not None:
@@ -336,5 +383,11 @@ class SearchApplicationClient(NamespacedClient):
336
383
  if __body is not None:
337
384
  __headers["content-type"] = "application/json"
338
385
  return self.perform_request( # type: ignore[return-value]
339
- "POST", __path, params=__query, headers=__headers, body=__body
386
+ "POST",
387
+ __path,
388
+ params=__query,
389
+ headers=__headers,
390
+ body=__body,
391
+ endpoint_id="search_application.search",
392
+ path_parts=__path_parts,
340
393
  )
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24
24
 
25
25
 
26
26
  class SearchableSnapshotsClient(NamespacedClient):
27
+
27
28
  @_rewrite_parameters()
28
29
  def cache_stats(
29
30
  self,
@@ -40,16 +41,19 @@ class SearchableSnapshotsClient(NamespacedClient):
40
41
  """
41
42
  Retrieve node-level cache statistics about searchable snapshots.
42
43
 
43
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/searchable-snapshots-apis.html>`_
44
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-apis.html>`_
44
45
 
45
46
  :param node_id: A comma-separated list of node IDs or names to limit the returned
46
47
  information; use `_local` to return information from the node you're connecting
47
48
  to, leave empty to get information from all nodes
48
49
  :param master_timeout:
49
50
  """
51
+ __path_parts: t.Dict[str, str]
50
52
  if node_id not in SKIP_IN_PATH:
51
- __path = f"/_searchable_snapshots/{_quote(node_id)}/cache/stats"
53
+ __path_parts = {"node_id": _quote(node_id)}
54
+ __path = f'/_searchable_snapshots/{__path_parts["node_id"]}/cache/stats'
52
55
  else:
56
+ __path_parts = {}
53
57
  __path = "/_searchable_snapshots/cache/stats"
54
58
  __query: t.Dict[str, t.Any] = {}
55
59
  if error_trace is not None:
@@ -64,7 +68,12 @@ class SearchableSnapshotsClient(NamespacedClient):
64
68
  __query["pretty"] = pretty
65
69
  __headers = {"accept": "application/json"}
66
70
  return self.perform_request( # type: ignore[return-value]
67
- "GET", __path, params=__query, headers=__headers
71
+ "GET",
72
+ __path,
73
+ params=__query,
74
+ headers=__headers,
75
+ endpoint_id="searchable_snapshots.cache_stats",
76
+ path_parts=__path_parts,
68
77
  )
69
78
 
70
79
  @_rewrite_parameters()
@@ -90,7 +99,7 @@ class SearchableSnapshotsClient(NamespacedClient):
90
99
  """
91
100
  Clear the cache of searchable snapshots.
92
101
 
93
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/searchable-snapshots-apis.html>`_
102
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-apis.html>`_
94
103
 
95
104
  :param index: A comma-separated list of index names
96
105
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
@@ -101,9 +110,12 @@ class SearchableSnapshotsClient(NamespacedClient):
101
110
  :param ignore_unavailable: Whether specified concrete indices should be ignored
102
111
  when unavailable (missing or closed)
103
112
  """
113
+ __path_parts: t.Dict[str, str]
104
114
  if index not in SKIP_IN_PATH:
105
- __path = f"/{_quote(index)}/_searchable_snapshots/cache/clear"
115
+ __path_parts = {"index": _quote(index)}
116
+ __path = f'/{__path_parts["index"]}/_searchable_snapshots/cache/clear'
106
117
  else:
118
+ __path_parts = {}
107
119
  __path = "/_searchable_snapshots/cache/clear"
108
120
  __query: t.Dict[str, t.Any] = {}
109
121
  if allow_no_indices is not None:
@@ -122,7 +134,12 @@ class SearchableSnapshotsClient(NamespacedClient):
122
134
  __query["pretty"] = pretty
123
135
  __headers = {"accept": "application/json"}
124
136
  return self.perform_request( # type: ignore[return-value]
125
- "POST", __path, params=__query, headers=__headers
137
+ "POST",
138
+ __path,
139
+ params=__query,
140
+ headers=__headers,
141
+ endpoint_id="searchable_snapshots.clear_cache",
142
+ path_parts=__path_parts,
126
143
  )
127
144
 
128
145
  @_rewrite_parameters(
@@ -156,7 +173,7 @@ class SearchableSnapshotsClient(NamespacedClient):
156
173
  """
157
174
  Mount a snapshot as a searchable index.
158
175
 
159
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/searchable-snapshots-api-mount-snapshot.html>`_
176
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-api-mount-snapshot.html>`_
160
177
 
161
178
  :param repository: The name of the repository containing the snapshot of the
162
179
  index to mount
@@ -177,7 +194,13 @@ class SearchableSnapshotsClient(NamespacedClient):
177
194
  raise ValueError("Empty value passed for parameter 'snapshot'")
178
195
  if index is None and body is None:
179
196
  raise ValueError("Empty value passed for parameter 'index'")
180
- __path = f"/_snapshot/{_quote(repository)}/{_quote(snapshot)}/_mount"
197
+ __path_parts: t.Dict[str, str] = {
198
+ "repository": _quote(repository),
199
+ "snapshot": _quote(snapshot),
200
+ }
201
+ __path = (
202
+ f'/_snapshot/{__path_parts["repository"]}/{__path_parts["snapshot"]}/_mount'
203
+ )
181
204
  __query: t.Dict[str, t.Any] = {}
182
205
  __body: t.Dict[str, t.Any] = body if body is not None else {}
183
206
  if error_trace is not None:
@@ -205,7 +228,13 @@ class SearchableSnapshotsClient(NamespacedClient):
205
228
  __body["renamed_index"] = renamed_index
206
229
  __headers = {"accept": "application/json", "content-type": "application/json"}
207
230
  return self.perform_request( # type: ignore[return-value]
208
- "POST", __path, params=__query, headers=__headers, body=__body
231
+ "POST",
232
+ __path,
233
+ params=__query,
234
+ headers=__headers,
235
+ body=__body,
236
+ endpoint_id="searchable_snapshots.mount",
237
+ path_parts=__path_parts,
209
238
  )
210
239
 
211
240
  @_rewrite_parameters()
@@ -224,14 +253,17 @@ class SearchableSnapshotsClient(NamespacedClient):
224
253
  """
225
254
  Retrieve shard-level statistics about searchable snapshots.
226
255
 
227
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/searchable-snapshots-apis.html>`_
256
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-apis.html>`_
228
257
 
229
258
  :param index: A comma-separated list of index names
230
259
  :param level: Return stats aggregated at cluster, index or shard level
231
260
  """
261
+ __path_parts: t.Dict[str, str]
232
262
  if index not in SKIP_IN_PATH:
233
- __path = f"/{_quote(index)}/_searchable_snapshots/stats"
263
+ __path_parts = {"index": _quote(index)}
264
+ __path = f'/{__path_parts["index"]}/_searchable_snapshots/stats'
234
265
  else:
266
+ __path_parts = {}
235
267
  __path = "/_searchable_snapshots/stats"
236
268
  __query: t.Dict[str, t.Any] = {}
237
269
  if error_trace is not None:
@@ -246,5 +278,10 @@ class SearchableSnapshotsClient(NamespacedClient):
246
278
  __query["pretty"] = pretty
247
279
  __headers = {"accept": "application/json"}
248
280
  return self.perform_request( # type: ignore[return-value]
249
- "GET", __path, params=__query, headers=__headers
281
+ "GET",
282
+ __path,
283
+ params=__query,
284
+ headers=__headers,
285
+ endpoint_id="searchable_snapshots.stats",
286
+ path_parts=__path_parts,
250
287
  )