elasticsearch 8.11.1__py3-none-any.whl → 8.12.0__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 +493 -347
  2. elasticsearch/_async/client/async_search.py +108 -72
  3. elasticsearch/_async/client/autoscaling.py +13 -8
  4. elasticsearch/_async/client/cat.py +26 -26
  5. elasticsearch/_async/client/ccr.py +178 -117
  6. elasticsearch/_async/client/cluster.py +56 -48
  7. elasticsearch/_async/client/dangling_indices.py +3 -3
  8. elasticsearch/_async/client/enrich.py +15 -13
  9. elasticsearch/_async/client/eql.py +53 -36
  10. elasticsearch/_async/client/esql.py +99 -0
  11. elasticsearch/_async/client/features.py +2 -2
  12. elasticsearch/_async/client/fleet.py +111 -71
  13. elasticsearch/_async/client/graph.py +13 -11
  14. elasticsearch/_async/client/ilm.py +33 -27
  15. elasticsearch/_async/client/indices.py +326 -227
  16. elasticsearch/_async/client/inference.py +212 -0
  17. elasticsearch/_async/client/ingest.py +28 -24
  18. elasticsearch/_async/client/license.py +15 -13
  19. elasticsearch/_async/client/logstash.py +13 -10
  20. elasticsearch/_async/client/migration.py +3 -3
  21. elasticsearch/_async/client/ml.py +758 -538
  22. elasticsearch/_async/client/monitoring.py +10 -5
  23. elasticsearch/_async/client/nodes.py +13 -11
  24. elasticsearch/_async/client/query_ruleset.py +12 -10
  25. elasticsearch/_async/client/rollup.py +59 -46
  26. elasticsearch/_async/client/search_application.py +23 -16
  27. elasticsearch/_async/client/searchable_snapshots.py +23 -16
  28. elasticsearch/_async/client/security.py +391 -289
  29. elasticsearch/_async/client/shutdown.py +18 -14
  30. elasticsearch/_async/client/slm.py +23 -21
  31. elasticsearch/_async/client/snapshot.py +91 -65
  32. elasticsearch/_async/client/sql.py +81 -58
  33. elasticsearch/_async/client/ssl.py +1 -1
  34. elasticsearch/_async/client/synonyms.py +23 -19
  35. elasticsearch/_async/client/tasks.py +3 -3
  36. elasticsearch/_async/client/text_structure.py +10 -5
  37. elasticsearch/_async/client/transform.py +111 -75
  38. elasticsearch/_async/client/watcher.py +77 -55
  39. elasticsearch/_async/client/xpack.py +2 -2
  40. elasticsearch/_async/helpers.py +1 -1
  41. elasticsearch/_sync/client/__init__.py +493 -347
  42. elasticsearch/_sync/client/async_search.py +108 -72
  43. elasticsearch/_sync/client/autoscaling.py +13 -8
  44. elasticsearch/_sync/client/cat.py +26 -26
  45. elasticsearch/_sync/client/ccr.py +178 -117
  46. elasticsearch/_sync/client/cluster.py +56 -48
  47. elasticsearch/_sync/client/dangling_indices.py +3 -3
  48. elasticsearch/_sync/client/enrich.py +15 -13
  49. elasticsearch/_sync/client/eql.py +53 -36
  50. elasticsearch/_sync/client/esql.py +99 -0
  51. elasticsearch/_sync/client/features.py +2 -2
  52. elasticsearch/_sync/client/fleet.py +111 -71
  53. elasticsearch/_sync/client/graph.py +13 -11
  54. elasticsearch/_sync/client/ilm.py +33 -27
  55. elasticsearch/_sync/client/indices.py +326 -227
  56. elasticsearch/_sync/client/inference.py +212 -0
  57. elasticsearch/_sync/client/ingest.py +28 -24
  58. elasticsearch/_sync/client/license.py +15 -13
  59. elasticsearch/_sync/client/logstash.py +13 -10
  60. elasticsearch/_sync/client/migration.py +3 -3
  61. elasticsearch/_sync/client/ml.py +758 -538
  62. elasticsearch/_sync/client/monitoring.py +10 -5
  63. elasticsearch/_sync/client/nodes.py +13 -11
  64. elasticsearch/_sync/client/query_ruleset.py +12 -10
  65. elasticsearch/_sync/client/rollup.py +59 -46
  66. elasticsearch/_sync/client/search_application.py +23 -16
  67. elasticsearch/_sync/client/searchable_snapshots.py +23 -16
  68. elasticsearch/_sync/client/security.py +391 -289
  69. elasticsearch/_sync/client/shutdown.py +18 -14
  70. elasticsearch/_sync/client/slm.py +23 -21
  71. elasticsearch/_sync/client/snapshot.py +91 -65
  72. elasticsearch/_sync/client/sql.py +81 -58
  73. elasticsearch/_sync/client/ssl.py +1 -1
  74. elasticsearch/_sync/client/synonyms.py +23 -19
  75. elasticsearch/_sync/client/tasks.py +3 -3
  76. elasticsearch/_sync/client/text_structure.py +10 -5
  77. elasticsearch/_sync/client/transform.py +111 -75
  78. elasticsearch/_sync/client/utils.py +34 -10
  79. elasticsearch/_sync/client/watcher.py +77 -55
  80. elasticsearch/_sync/client/xpack.py +2 -2
  81. elasticsearch/_version.py +1 -1
  82. elasticsearch/client.py +2 -0
  83. elasticsearch/helpers/actions.py +1 -1
  84. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/METADATA +2 -3
  85. elasticsearch-8.12.0.dist-info/RECORD +103 -0
  86. elasticsearch-8.11.1.dist-info/RECORD +0 -99
  87. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/LICENSE +0 -0
  88. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/NOTICE +0 -0
  89. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/WHEEL +0 -0
  90. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/top_level.txt +0 -0
@@ -37,7 +37,7 @@ class CcrClient(NamespacedClient):
37
37
  """
38
38
  Deletes auto-follow patterns.
39
39
 
40
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-delete-auto-follow-pattern.html>`_
40
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-delete-auto-follow-pattern.html>`_
41
41
 
42
42
  :param name: The name of the auto follow pattern.
43
43
  """
@@ -59,7 +59,20 @@ class CcrClient(NamespacedClient):
59
59
  )
60
60
 
61
61
  @_rewrite_parameters(
62
- body_fields=True,
62
+ body_fields=(
63
+ "leader_index",
64
+ "max_outstanding_read_requests",
65
+ "max_outstanding_write_requests",
66
+ "max_read_request_operation_count",
67
+ "max_read_request_size",
68
+ "max_retry_delay",
69
+ "max_write_buffer_count",
70
+ "max_write_buffer_size",
71
+ "max_write_request_operation_count",
72
+ "max_write_request_size",
73
+ "read_poll_timeout",
74
+ "remote_cluster",
75
+ ),
63
76
  )
64
77
  def follow(
65
78
  self,
@@ -88,11 +101,12 @@ class CcrClient(NamespacedClient):
88
101
  wait_for_active_shards: t.Optional[
89
102
  t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
90
103
  ] = None,
104
+ body: t.Optional[t.Dict[str, t.Any]] = None,
91
105
  ) -> ObjectApiResponse[t.Any]:
92
106
  """
93
107
  Creates a new follower index configured to follow the referenced leader index.
94
108
 
95
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-put-follow.html>`_
109
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-follow.html>`_
96
110
 
97
111
  :param index: The name of the follower index
98
112
  :param leader_index:
@@ -116,45 +130,48 @@ class CcrClient(NamespacedClient):
116
130
  raise ValueError("Empty value passed for parameter 'index'")
117
131
  __path = f"/{_quote(index)}/_ccr/follow"
118
132
  __query: t.Dict[str, t.Any] = {}
119
- __body: t.Dict[str, t.Any] = {}
133
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
120
134
  if error_trace is not None:
121
135
  __query["error_trace"] = error_trace
122
136
  if filter_path is not None:
123
137
  __query["filter_path"] = filter_path
124
138
  if human is not None:
125
139
  __query["human"] = human
126
- if leader_index is not None:
127
- __body["leader_index"] = leader_index
128
- if max_outstanding_read_requests is not None:
129
- __body["max_outstanding_read_requests"] = max_outstanding_read_requests
130
- if max_outstanding_write_requests is not None:
131
- __body["max_outstanding_write_requests"] = max_outstanding_write_requests
132
- if max_read_request_operation_count is not None:
133
- __body[
134
- "max_read_request_operation_count"
135
- ] = max_read_request_operation_count
136
- if max_read_request_size is not None:
137
- __body["max_read_request_size"] = max_read_request_size
138
- if max_retry_delay is not None:
139
- __body["max_retry_delay"] = max_retry_delay
140
- if max_write_buffer_count is not None:
141
- __body["max_write_buffer_count"] = max_write_buffer_count
142
- if max_write_buffer_size is not None:
143
- __body["max_write_buffer_size"] = max_write_buffer_size
144
- if max_write_request_operation_count is not None:
145
- __body[
146
- "max_write_request_operation_count"
147
- ] = max_write_request_operation_count
148
- if max_write_request_size is not None:
149
- __body["max_write_request_size"] = max_write_request_size
150
140
  if pretty is not None:
151
141
  __query["pretty"] = pretty
152
- if read_poll_timeout is not None:
153
- __body["read_poll_timeout"] = read_poll_timeout
154
- if remote_cluster is not None:
155
- __body["remote_cluster"] = remote_cluster
156
142
  if wait_for_active_shards is not None:
157
143
  __query["wait_for_active_shards"] = wait_for_active_shards
144
+ if not __body:
145
+ if leader_index is not None:
146
+ __body["leader_index"] = leader_index
147
+ if max_outstanding_read_requests is not None:
148
+ __body["max_outstanding_read_requests"] = max_outstanding_read_requests
149
+ if max_outstanding_write_requests is not None:
150
+ __body[
151
+ "max_outstanding_write_requests"
152
+ ] = max_outstanding_write_requests
153
+ if max_read_request_operation_count is not None:
154
+ __body[
155
+ "max_read_request_operation_count"
156
+ ] = max_read_request_operation_count
157
+ if max_read_request_size is not None:
158
+ __body["max_read_request_size"] = max_read_request_size
159
+ if max_retry_delay is not None:
160
+ __body["max_retry_delay"] = max_retry_delay
161
+ if max_write_buffer_count is not None:
162
+ __body["max_write_buffer_count"] = max_write_buffer_count
163
+ if max_write_buffer_size is not None:
164
+ __body["max_write_buffer_size"] = max_write_buffer_size
165
+ if max_write_request_operation_count is not None:
166
+ __body[
167
+ "max_write_request_operation_count"
168
+ ] = max_write_request_operation_count
169
+ if max_write_request_size is not None:
170
+ __body["max_write_request_size"] = max_write_request_size
171
+ if read_poll_timeout is not None:
172
+ __body["read_poll_timeout"] = read_poll_timeout
173
+ if remote_cluster is not None:
174
+ __body["remote_cluster"] = remote_cluster
158
175
  __headers = {"accept": "application/json", "content-type": "application/json"}
159
176
  return self.perform_request( # type: ignore[return-value]
160
177
  "PUT", __path, params=__query, headers=__headers, body=__body
@@ -174,7 +191,7 @@ class CcrClient(NamespacedClient):
174
191
  Retrieves information about all follower indices, including parameters and status
175
192
  for each follower index
176
193
 
177
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-get-follow-info.html>`_
194
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-info.html>`_
178
195
 
179
196
  :param index: A comma-separated list of index patterns; use `_all` to perform
180
197
  the operation on all indices
@@ -210,7 +227,7 @@ class CcrClient(NamespacedClient):
210
227
  Retrieves follower stats. return shard-level stats about the following tasks
211
228
  associated with each shard for the specified indices.
212
229
 
213
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-get-follow-stats.html>`_
230
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-follow-stats.html>`_
214
231
 
215
232
  :param index: A comma-separated list of index patterns; use `_all` to perform
216
233
  the operation on all indices
@@ -233,7 +250,12 @@ class CcrClient(NamespacedClient):
233
250
  )
234
251
 
235
252
  @_rewrite_parameters(
236
- body_fields=True,
253
+ body_fields=(
254
+ "follower_cluster",
255
+ "follower_index",
256
+ "follower_index_uuid",
257
+ "leader_remote_cluster",
258
+ ),
237
259
  )
238
260
  def forget_follower(
239
261
  self,
@@ -247,11 +269,12 @@ class CcrClient(NamespacedClient):
247
269
  human: t.Optional[bool] = None,
248
270
  leader_remote_cluster: t.Optional[str] = None,
249
271
  pretty: t.Optional[bool] = None,
272
+ body: t.Optional[t.Dict[str, t.Any]] = None,
250
273
  ) -> ObjectApiResponse[t.Any]:
251
274
  """
252
275
  Removes the follower retention leases from the leader.
253
276
 
254
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-post-forget-follower.html>`_
277
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-forget-follower.html>`_
255
278
 
256
279
  :param index: the name of the leader index for which specified follower retention
257
280
  leases should be removed
@@ -264,23 +287,24 @@ class CcrClient(NamespacedClient):
264
287
  raise ValueError("Empty value passed for parameter 'index'")
265
288
  __path = f"/{_quote(index)}/_ccr/forget_follower"
266
289
  __query: t.Dict[str, t.Any] = {}
267
- __body: t.Dict[str, t.Any] = {}
290
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
268
291
  if error_trace is not None:
269
292
  __query["error_trace"] = error_trace
270
293
  if filter_path is not None:
271
294
  __query["filter_path"] = filter_path
272
- if follower_cluster is not None:
273
- __body["follower_cluster"] = follower_cluster
274
- if follower_index is not None:
275
- __body["follower_index"] = follower_index
276
- if follower_index_uuid is not None:
277
- __body["follower_index_uuid"] = follower_index_uuid
278
295
  if human is not None:
279
296
  __query["human"] = human
280
- if leader_remote_cluster is not None:
281
- __body["leader_remote_cluster"] = leader_remote_cluster
282
297
  if pretty is not None:
283
298
  __query["pretty"] = pretty
299
+ if not __body:
300
+ if follower_cluster is not None:
301
+ __body["follower_cluster"] = follower_cluster
302
+ if follower_index is not None:
303
+ __body["follower_index"] = follower_index
304
+ if follower_index_uuid is not None:
305
+ __body["follower_index_uuid"] = follower_index_uuid
306
+ if leader_remote_cluster is not None:
307
+ __body["leader_remote_cluster"] = leader_remote_cluster
284
308
  __headers = {"accept": "application/json", "content-type": "application/json"}
285
309
  return self.perform_request( # type: ignore[return-value]
286
310
  "POST", __path, params=__query, headers=__headers, body=__body
@@ -300,7 +324,7 @@ class CcrClient(NamespacedClient):
300
324
  Gets configured auto-follow patterns. Returns the specified auto-follow pattern
301
325
  collection.
302
326
 
303
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-get-auto-follow-pattern.html>`_
327
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-auto-follow-pattern.html>`_
304
328
 
305
329
  :param name: Specifies the auto-follow pattern collection that you want to retrieve.
306
330
  If you do not specify a name, the API returns information for all collections.
@@ -336,7 +360,7 @@ class CcrClient(NamespacedClient):
336
360
  """
337
361
  Pauses an auto-follow pattern
338
362
 
339
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-pause-auto-follow-pattern.html>`_
363
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-pause-auto-follow-pattern.html>`_
340
364
 
341
365
  :param name: The name of the auto follow pattern that should pause discovering
342
366
  new indices to follow.
@@ -372,7 +396,7 @@ class CcrClient(NamespacedClient):
372
396
  Pauses a follower index. The follower index will not fetch any additional operations
373
397
  from the leader index.
374
398
 
375
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-post-pause-follow.html>`_
399
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-pause-follow.html>`_
376
400
 
377
401
  :param index: The name of the follower index that should pause following its
378
402
  leader index.
@@ -395,13 +419,29 @@ class CcrClient(NamespacedClient):
395
419
  )
396
420
 
397
421
  @_rewrite_parameters(
398
- body_fields=True,
422
+ body_fields=(
423
+ "remote_cluster",
424
+ "follow_index_pattern",
425
+ "leader_index_exclusion_patterns",
426
+ "leader_index_patterns",
427
+ "max_outstanding_read_requests",
428
+ "max_outstanding_write_requests",
429
+ "max_read_request_operation_count",
430
+ "max_read_request_size",
431
+ "max_retry_delay",
432
+ "max_write_buffer_count",
433
+ "max_write_buffer_size",
434
+ "max_write_request_operation_count",
435
+ "max_write_request_size",
436
+ "read_poll_timeout",
437
+ "settings",
438
+ ),
399
439
  )
400
440
  def put_auto_follow_pattern(
401
441
  self,
402
442
  *,
403
443
  name: str,
404
- remote_cluster: str,
444
+ remote_cluster: t.Optional[str] = None,
405
445
  error_trace: t.Optional[bool] = None,
406
446
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
407
447
  follow_index_pattern: t.Optional[str] = None,
@@ -424,13 +464,14 @@ class CcrClient(NamespacedClient):
424
464
  t.Union["t.Literal[-1]", "t.Literal[0]", str]
425
465
  ] = None,
426
466
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
467
+ body: t.Optional[t.Dict[str, t.Any]] = None,
427
468
  ) -> ObjectApiResponse[t.Any]:
428
469
  """
429
470
  Creates a new named collection of auto-follow patterns against a specified remote
430
471
  cluster. Newly created indices on the remote cluster matching any of the specified
431
472
  patterns will be automatically configured as follower indices.
432
473
 
433
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-put-auto-follow-pattern.html>`_
474
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-put-auto-follow-pattern.html>`_
434
475
 
435
476
  :param name: The name of the collection of auto-follow patterns.
436
477
  :param remote_cluster: The remote cluster containing the leader indices to match
@@ -477,53 +518,58 @@ class CcrClient(NamespacedClient):
477
518
  """
478
519
  if name in SKIP_IN_PATH:
479
520
  raise ValueError("Empty value passed for parameter 'name'")
480
- if remote_cluster is None:
521
+ if remote_cluster is None and body is None:
481
522
  raise ValueError("Empty value passed for parameter 'remote_cluster'")
482
523
  __path = f"/_ccr/auto_follow/{_quote(name)}"
483
- __body: t.Dict[str, t.Any] = {}
484
524
  __query: t.Dict[str, t.Any] = {}
485
- if remote_cluster is not None:
486
- __body["remote_cluster"] = remote_cluster
525
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
487
526
  if error_trace is not None:
488
527
  __query["error_trace"] = error_trace
489
528
  if filter_path is not None:
490
529
  __query["filter_path"] = filter_path
491
- if follow_index_pattern is not None:
492
- __body["follow_index_pattern"] = follow_index_pattern
493
530
  if human is not None:
494
531
  __query["human"] = human
495
- if leader_index_exclusion_patterns is not None:
496
- __body["leader_index_exclusion_patterns"] = leader_index_exclusion_patterns
497
- if leader_index_patterns is not None:
498
- __body["leader_index_patterns"] = leader_index_patterns
499
- if max_outstanding_read_requests is not None:
500
- __body["max_outstanding_read_requests"] = max_outstanding_read_requests
501
- if max_outstanding_write_requests is not None:
502
- __body["max_outstanding_write_requests"] = max_outstanding_write_requests
503
- if max_read_request_operation_count is not None:
504
- __body[
505
- "max_read_request_operation_count"
506
- ] = max_read_request_operation_count
507
- if max_read_request_size is not None:
508
- __body["max_read_request_size"] = max_read_request_size
509
- if max_retry_delay is not None:
510
- __body["max_retry_delay"] = max_retry_delay
511
- if max_write_buffer_count is not None:
512
- __body["max_write_buffer_count"] = max_write_buffer_count
513
- if max_write_buffer_size is not None:
514
- __body["max_write_buffer_size"] = max_write_buffer_size
515
- if max_write_request_operation_count is not None:
516
- __body[
517
- "max_write_request_operation_count"
518
- ] = max_write_request_operation_count
519
- if max_write_request_size is not None:
520
- __body["max_write_request_size"] = max_write_request_size
521
532
  if pretty is not None:
522
533
  __query["pretty"] = pretty
523
- if read_poll_timeout is not None:
524
- __body["read_poll_timeout"] = read_poll_timeout
525
- if settings is not None:
526
- __body["settings"] = settings
534
+ if not __body:
535
+ if remote_cluster is not None:
536
+ __body["remote_cluster"] = remote_cluster
537
+ if follow_index_pattern is not None:
538
+ __body["follow_index_pattern"] = follow_index_pattern
539
+ if leader_index_exclusion_patterns is not None:
540
+ __body[
541
+ "leader_index_exclusion_patterns"
542
+ ] = leader_index_exclusion_patterns
543
+ if leader_index_patterns is not None:
544
+ __body["leader_index_patterns"] = leader_index_patterns
545
+ if max_outstanding_read_requests is not None:
546
+ __body["max_outstanding_read_requests"] = max_outstanding_read_requests
547
+ if max_outstanding_write_requests is not None:
548
+ __body[
549
+ "max_outstanding_write_requests"
550
+ ] = max_outstanding_write_requests
551
+ if max_read_request_operation_count is not None:
552
+ __body[
553
+ "max_read_request_operation_count"
554
+ ] = max_read_request_operation_count
555
+ if max_read_request_size is not None:
556
+ __body["max_read_request_size"] = max_read_request_size
557
+ if max_retry_delay is not None:
558
+ __body["max_retry_delay"] = max_retry_delay
559
+ if max_write_buffer_count is not None:
560
+ __body["max_write_buffer_count"] = max_write_buffer_count
561
+ if max_write_buffer_size is not None:
562
+ __body["max_write_buffer_size"] = max_write_buffer_size
563
+ if max_write_request_operation_count is not None:
564
+ __body[
565
+ "max_write_request_operation_count"
566
+ ] = max_write_request_operation_count
567
+ if max_write_request_size is not None:
568
+ __body["max_write_request_size"] = max_write_request_size
569
+ if read_poll_timeout is not None:
570
+ __body["read_poll_timeout"] = read_poll_timeout
571
+ if settings is not None:
572
+ __body["settings"] = settings
527
573
  __headers = {"accept": "application/json", "content-type": "application/json"}
528
574
  return self.perform_request( # type: ignore[return-value]
529
575
  "PUT", __path, params=__query, headers=__headers, body=__body
@@ -542,7 +588,7 @@ class CcrClient(NamespacedClient):
542
588
  """
543
589
  Resumes an auto-follow pattern that has been paused
544
590
 
545
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-resume-auto-follow-pattern.html>`_
591
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-resume-auto-follow-pattern.html>`_
546
592
 
547
593
  :param name: The name of the auto follow pattern to resume discovering new indices
548
594
  to follow.
@@ -565,7 +611,18 @@ class CcrClient(NamespacedClient):
565
611
  )
566
612
 
567
613
  @_rewrite_parameters(
568
- body_fields=True,
614
+ body_fields=(
615
+ "max_outstanding_read_requests",
616
+ "max_outstanding_write_requests",
617
+ "max_read_request_operation_count",
618
+ "max_read_request_size",
619
+ "max_retry_delay",
620
+ "max_write_buffer_count",
621
+ "max_write_buffer_size",
622
+ "max_write_request_operation_count",
623
+ "max_write_request_size",
624
+ "read_poll_timeout",
625
+ ),
569
626
  )
570
627
  def resume_follow(
571
628
  self,
@@ -589,11 +646,12 @@ class CcrClient(NamespacedClient):
589
646
  read_poll_timeout: t.Optional[
590
647
  t.Union["t.Literal[-1]", "t.Literal[0]", str]
591
648
  ] = None,
649
+ body: t.Optional[t.Dict[str, t.Any]] = None,
592
650
  ) -> ObjectApiResponse[t.Any]:
593
651
  """
594
652
  Resumes a follower index that has been paused
595
653
 
596
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-post-resume-follow.html>`_
654
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-resume-follow.html>`_
597
655
 
598
656
  :param index: The name of the follow index to resume following.
599
657
  :param max_outstanding_read_requests:
@@ -611,39 +669,42 @@ class CcrClient(NamespacedClient):
611
669
  raise ValueError("Empty value passed for parameter 'index'")
612
670
  __path = f"/{_quote(index)}/_ccr/resume_follow"
613
671
  __query: t.Dict[str, t.Any] = {}
614
- __body: t.Dict[str, t.Any] = {}
672
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
615
673
  if error_trace is not None:
616
674
  __query["error_trace"] = error_trace
617
675
  if filter_path is not None:
618
676
  __query["filter_path"] = filter_path
619
677
  if human is not None:
620
678
  __query["human"] = human
621
- if max_outstanding_read_requests is not None:
622
- __body["max_outstanding_read_requests"] = max_outstanding_read_requests
623
- if max_outstanding_write_requests is not None:
624
- __body["max_outstanding_write_requests"] = max_outstanding_write_requests
625
- if max_read_request_operation_count is not None:
626
- __body[
627
- "max_read_request_operation_count"
628
- ] = max_read_request_operation_count
629
- if max_read_request_size is not None:
630
- __body["max_read_request_size"] = max_read_request_size
631
- if max_retry_delay is not None:
632
- __body["max_retry_delay"] = max_retry_delay
633
- if max_write_buffer_count is not None:
634
- __body["max_write_buffer_count"] = max_write_buffer_count
635
- if max_write_buffer_size is not None:
636
- __body["max_write_buffer_size"] = max_write_buffer_size
637
- if max_write_request_operation_count is not None:
638
- __body[
639
- "max_write_request_operation_count"
640
- ] = max_write_request_operation_count
641
- if max_write_request_size is not None:
642
- __body["max_write_request_size"] = max_write_request_size
643
679
  if pretty is not None:
644
680
  __query["pretty"] = pretty
645
- if read_poll_timeout is not None:
646
- __body["read_poll_timeout"] = read_poll_timeout
681
+ if not __body:
682
+ if max_outstanding_read_requests is not None:
683
+ __body["max_outstanding_read_requests"] = max_outstanding_read_requests
684
+ if max_outstanding_write_requests is not None:
685
+ __body[
686
+ "max_outstanding_write_requests"
687
+ ] = max_outstanding_write_requests
688
+ if max_read_request_operation_count is not None:
689
+ __body[
690
+ "max_read_request_operation_count"
691
+ ] = max_read_request_operation_count
692
+ if max_read_request_size is not None:
693
+ __body["max_read_request_size"] = max_read_request_size
694
+ if max_retry_delay is not None:
695
+ __body["max_retry_delay"] = max_retry_delay
696
+ if max_write_buffer_count is not None:
697
+ __body["max_write_buffer_count"] = max_write_buffer_count
698
+ if max_write_buffer_size is not None:
699
+ __body["max_write_buffer_size"] = max_write_buffer_size
700
+ if max_write_request_operation_count is not None:
701
+ __body[
702
+ "max_write_request_operation_count"
703
+ ] = max_write_request_operation_count
704
+ if max_write_request_size is not None:
705
+ __body["max_write_request_size"] = max_write_request_size
706
+ if read_poll_timeout is not None:
707
+ __body["read_poll_timeout"] = read_poll_timeout
647
708
  if not __body:
648
709
  __body = None # type: ignore[assignment]
649
710
  __headers = {"accept": "application/json"}
@@ -665,7 +726,7 @@ class CcrClient(NamespacedClient):
665
726
  """
666
727
  Gets all stats related to cross-cluster replication.
667
728
 
668
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-get-stats.html>`_
729
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-get-stats.html>`_
669
730
  """
670
731
  __path = "/_ccr/stats"
671
732
  __query: t.Dict[str, t.Any] = {}
@@ -696,7 +757,7 @@ class CcrClient(NamespacedClient):
696
757
  Stops the following task associated with a follower index and removes index metadata
697
758
  and settings associated with cross-cluster replication.
698
759
 
699
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ccr-post-unfollow.html>`_
760
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ccr-post-unfollow.html>`_
700
761
 
701
762
  :param index: The name of the follower index that should be turned into a regular
702
763
  index.