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
@@ -42,7 +42,7 @@ class AsyncSearchClient(NamespacedClient):
42
42
  the authenticated user that submitted the original search request; users that
43
43
  have the `cancel_task` cluster privilege.
44
44
 
45
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
45
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
46
46
 
47
47
  :param id: A unique identifier for the async search.
48
48
  """
@@ -90,7 +90,7 @@ class AsyncSearchClient(NamespacedClient):
90
90
  the results of a specific async search is restricted to the user or API key that
91
91
  submitted it.
92
92
 
93
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
93
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
94
94
 
95
95
  :param id: A unique identifier for the async search.
96
96
  :param keep_alive: Specifies how long the async search should be available in
@@ -145,6 +145,7 @@ class AsyncSearchClient(NamespacedClient):
145
145
  error_trace: t.Optional[bool] = None,
146
146
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
147
147
  human: t.Optional[bool] = None,
148
+ keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
148
149
  pretty: t.Optional[bool] = None,
149
150
  ) -> ObjectApiResponse[t.Any]:
150
151
  """
@@ -153,9 +154,12 @@ class AsyncSearchClient(NamespacedClient):
153
154
  security features are enabled, use of this API is restricted to the `monitoring_user`
154
155
  role.
155
156
 
156
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
157
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
157
158
 
158
159
  :param id: A unique identifier for the async search.
160
+ :param keep_alive: Specifies how long the async search needs to be available.
161
+ Ongoing async searches and any saved search results are deleted after this
162
+ period.
159
163
  """
160
164
  if id in SKIP_IN_PATH:
161
165
  raise ValueError("Empty value passed for parameter 'id'")
@@ -168,6 +172,8 @@ class AsyncSearchClient(NamespacedClient):
168
172
  __query["filter_path"] = filter_path
169
173
  if human is not None:
170
174
  __query["human"] = human
175
+ if keep_alive is not None:
176
+ __query["keep_alive"] = keep_alive
171
177
  if pretty is not None:
172
178
  __query["pretty"] = pretty
173
179
  __headers = {"accept": "application/json"}
@@ -258,7 +264,6 @@ class AsyncSearchClient(NamespacedClient):
258
264
  ignore_throttled: t.Optional[bool] = None,
259
265
  ignore_unavailable: t.Optional[bool] = None,
260
266
  indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
261
- keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
262
267
  keep_on_completion: t.Optional[bool] = None,
263
268
  knn: t.Optional[
264
269
  t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -269,7 +274,6 @@ class AsyncSearchClient(NamespacedClient):
269
274
  min_score: t.Optional[float] = None,
270
275
  pit: t.Optional[t.Mapping[str, t.Any]] = None,
271
276
  post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
272
- pre_filter_shard_size: t.Optional[int] = None,
273
277
  preference: t.Optional[str] = None,
274
278
  pretty: t.Optional[bool] = None,
275
279
  profile: t.Optional[bool] = None,
@@ -283,7 +287,6 @@ class AsyncSearchClient(NamespacedClient):
283
287
  routing: t.Optional[str] = None,
284
288
  runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
285
289
  script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
286
- scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
287
290
  search_after: t.Optional[
288
291
  t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
289
292
  ] = None,
@@ -333,7 +336,7 @@ class AsyncSearchClient(NamespacedClient):
333
336
  can be set by changing the `search.max_async_search_response_size` cluster level
334
337
  setting.
335
338
 
336
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
339
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
337
340
 
338
341
  :param index: A comma-separated list of index names to search; use `_all` or
339
342
  empty string to perform the operation on all indices
@@ -376,9 +379,6 @@ class AsyncSearchClient(NamespacedClient):
376
379
  :param ignore_unavailable: Whether specified concrete indices should be ignored
377
380
  when unavailable (missing or closed)
378
381
  :param indices_boost: Boosts the _score of documents from specified indices.
379
- :param keep_alive: Specifies how long the async search needs to be available.
380
- Ongoing async searches and any saved search results are deleted after this
381
- period.
382
382
  :param keep_on_completion: If `true`, results are stored for later retrieval
383
383
  when the search completes within the `wait_for_completion_timeout`.
384
384
  :param knn: Defines the approximate kNN search to run.
@@ -394,10 +394,6 @@ class AsyncSearchClient(NamespacedClient):
394
394
  :param pit: Limits the search to a point in time (PIT). If you provide a PIT,
395
395
  you cannot specify an <index> in the request path.
396
396
  :param post_filter:
397
- :param pre_filter_shard_size: The default value cannot be changed, which enforces
398
- the execution of a pre-filter roundtrip to retrieve statistics from each
399
- shard so that the ones that surely don’t hold any document matching the query
400
- get skipped.
401
397
  :param preference: Specify the node or shard the operation should be performed
402
398
  on (default: random)
403
399
  :param profile:
@@ -406,13 +402,13 @@ class AsyncSearchClient(NamespacedClient):
406
402
  :param request_cache: Specify if request cache should be used for this request
407
403
  or not, defaults to true
408
404
  :param rescore:
409
- :param rest_total_hits_as_int:
405
+ :param rest_total_hits_as_int: Indicates whether hits.total should be rendered
406
+ as an integer or an object in the rest search response
410
407
  :param routing: A comma-separated list of specific routing values
411
408
  :param runtime_mappings: Defines one or more runtime fields in the search request.
412
409
  These fields take precedence over mapped fields with the same name.
413
410
  :param script_fields: Retrieve a script evaluation (based on different fields)
414
411
  for each hit.
415
- :param scroll:
416
412
  :param search_after:
417
413
  :param search_type: Search operation type
418
414
  :param seq_no_primary_term: If true, returns sequence number and primary term
@@ -509,8 +505,6 @@ class AsyncSearchClient(NamespacedClient):
509
505
  __query["ignore_throttled"] = ignore_throttled
510
506
  if ignore_unavailable is not None:
511
507
  __query["ignore_unavailable"] = ignore_unavailable
512
- if keep_alive is not None:
513
- __query["keep_alive"] = keep_alive
514
508
  if keep_on_completion is not None:
515
509
  __query["keep_on_completion"] = keep_on_completion
516
510
  if lenient is not None:
@@ -519,8 +513,6 @@ class AsyncSearchClient(NamespacedClient):
519
513
  __query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
520
514
  if min_compatible_shard_node is not None:
521
515
  __query["min_compatible_shard_node"] = min_compatible_shard_node
522
- if pre_filter_shard_size is not None:
523
- __query["pre_filter_shard_size"] = pre_filter_shard_size
524
516
  if preference is not None:
525
517
  __query["preference"] = preference
526
518
  if pretty is not None:
@@ -533,8 +525,6 @@ class AsyncSearchClient(NamespacedClient):
533
525
  __query["rest_total_hits_as_int"] = rest_total_hits_as_int
534
526
  if routing is not None:
535
527
  __query["routing"] = routing
536
- if scroll is not None:
537
- __query["scroll"] = scroll
538
528
  if search_type is not None:
539
529
  __query["search_type"] = search_type
540
530
  if source_excludes is not None:
@@ -33,16 +33,23 @@ class AutoscalingClient(NamespacedClient):
33
33
  error_trace: t.Optional[bool] = None,
34
34
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
35
35
  human: t.Optional[bool] = None,
36
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
36
37
  pretty: t.Optional[bool] = None,
38
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
37
39
  ) -> ObjectApiResponse[t.Any]:
38
40
  """
39
41
  Delete an autoscaling policy. NOTE: This feature is designed for indirect use
40
42
  by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
41
43
  Direct use is not supported.
42
44
 
43
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-delete-autoscaling-policy.html>`_
45
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-delete-autoscaling-policy.html>`_
44
46
 
45
47
  :param name: the name of the autoscaling policy
48
+ :param master_timeout: Period to wait for a connection to the master node. If
49
+ no response is received before the timeout expires, the request fails and
50
+ returns an error.
51
+ :param timeout: Period to wait for a response. If no response is received before
52
+ the timeout expires, the request fails and returns an error.
46
53
  """
47
54
  if name in SKIP_IN_PATH:
48
55
  raise ValueError("Empty value passed for parameter 'name'")
@@ -55,8 +62,12 @@ class AutoscalingClient(NamespacedClient):
55
62
  __query["filter_path"] = filter_path
56
63
  if human is not None:
57
64
  __query["human"] = human
65
+ if master_timeout is not None:
66
+ __query["master_timeout"] = master_timeout
58
67
  if pretty is not None:
59
68
  __query["pretty"] = pretty
69
+ if timeout is not None:
70
+ __query["timeout"] = timeout
60
71
  __headers = {"accept": "application/json"}
61
72
  return await self.perform_request( # type: ignore[return-value]
62
73
  "DELETE",
@@ -74,6 +85,7 @@ class AutoscalingClient(NamespacedClient):
74
85
  error_trace: t.Optional[bool] = None,
75
86
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
76
87
  human: t.Optional[bool] = None,
88
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
77
89
  pretty: t.Optional[bool] = None,
78
90
  ) -> ObjectApiResponse[t.Any]:
79
91
  """
@@ -90,7 +102,11 @@ class AutoscalingClient(NamespacedClient):
90
102
  capacity was required. This information is provided for diagnosis only. Do not
91
103
  use this information to make autoscaling decisions.
92
104
 
93
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
105
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
106
+
107
+ :param master_timeout: Period to wait for a connection to the master node. If
108
+ no response is received before the timeout expires, the request fails and
109
+ returns an error.
94
110
  """
95
111
  __path_parts: t.Dict[str, str] = {}
96
112
  __path = "/_autoscaling/capacity"
@@ -101,6 +117,8 @@ class AutoscalingClient(NamespacedClient):
101
117
  __query["filter_path"] = filter_path
102
118
  if human is not None:
103
119
  __query["human"] = human
120
+ if master_timeout is not None:
121
+ __query["master_timeout"] = master_timeout
104
122
  if pretty is not None:
105
123
  __query["pretty"] = pretty
106
124
  __headers = {"accept": "application/json"}
@@ -121,6 +139,7 @@ class AutoscalingClient(NamespacedClient):
121
139
  error_trace: t.Optional[bool] = None,
122
140
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
123
141
  human: t.Optional[bool] = None,
142
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
124
143
  pretty: t.Optional[bool] = None,
125
144
  ) -> ObjectApiResponse[t.Any]:
126
145
  """
@@ -128,9 +147,12 @@ class AutoscalingClient(NamespacedClient):
128
147
  Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
129
148
  Direct use is not supported.
130
149
 
131
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
150
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
132
151
 
133
152
  :param name: the name of the autoscaling policy
153
+ :param master_timeout: Period to wait for a connection to the master node. If
154
+ no response is received before the timeout expires, the request fails and
155
+ returns an error.
134
156
  """
135
157
  if name in SKIP_IN_PATH:
136
158
  raise ValueError("Empty value passed for parameter 'name'")
@@ -143,6 +165,8 @@ class AutoscalingClient(NamespacedClient):
143
165
  __query["filter_path"] = filter_path
144
166
  if human is not None:
145
167
  __query["human"] = human
168
+ if master_timeout is not None:
169
+ __query["master_timeout"] = master_timeout
146
170
  if pretty is not None:
147
171
  __query["pretty"] = pretty
148
172
  __headers = {"accept": "application/json"}
@@ -167,17 +191,24 @@ class AutoscalingClient(NamespacedClient):
167
191
  error_trace: t.Optional[bool] = None,
168
192
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
169
193
  human: t.Optional[bool] = None,
194
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
170
195
  pretty: t.Optional[bool] = None,
196
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
171
197
  ) -> ObjectApiResponse[t.Any]:
172
198
  """
173
199
  Create or update an autoscaling policy. NOTE: This feature is designed for indirect
174
200
  use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on
175
201
  Kubernetes. Direct use is not supported.
176
202
 
177
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-put-autoscaling-policy.html>`_
203
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-put-autoscaling-policy.html>`_
178
204
 
179
205
  :param name: the name of the autoscaling policy
180
206
  :param policy:
207
+ :param master_timeout: Period to wait for a connection to the master node. If
208
+ no response is received before the timeout expires, the request fails and
209
+ returns an error.
210
+ :param timeout: Period to wait for a response. If no response is received before
211
+ the timeout expires, the request fails and returns an error.
181
212
  """
182
213
  if name in SKIP_IN_PATH:
183
214
  raise ValueError("Empty value passed for parameter 'name'")
@@ -196,8 +227,12 @@ class AutoscalingClient(NamespacedClient):
196
227
  __query["filter_path"] = filter_path
197
228
  if human is not None:
198
229
  __query["human"] = human
230
+ if master_timeout is not None:
231
+ __query["master_timeout"] = master_timeout
199
232
  if pretty is not None:
200
233
  __query["pretty"] = pretty
234
+ if timeout is not None:
235
+ __query["timeout"] = timeout
201
236
  __body = policy if policy is not None else body
202
237
  __headers = {"accept": "application/json", "content-type": "application/json"}
203
238
  return await self.perform_request( # type: ignore[return-value]