elasticsearch 8.17.2__py3-none-any.whl → 8.18.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 (137) hide show
  1. elasticsearch/_async/client/__init__.py +174 -79
  2. elasticsearch/_async/client/_base.py +0 -1
  3. elasticsearch/_async/client/async_search.py +12 -8
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -26
  6. elasticsearch/_async/client/ccr.py +186 -72
  7. elasticsearch/_async/client/cluster.py +38 -19
  8. elasticsearch/_async/client/connector.py +30 -30
  9. elasticsearch/_async/client/dangling_indices.py +3 -3
  10. elasticsearch/_async/client/enrich.py +26 -5
  11. elasticsearch/_async/client/eql.py +32 -4
  12. elasticsearch/_async/client/esql.py +62 -6
  13. elasticsearch/_async/client/features.py +12 -2
  14. elasticsearch/_async/client/fleet.py +8 -2
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +23 -22
  17. elasticsearch/_async/client/indices.py +424 -132
  18. elasticsearch/_async/client/inference.py +1906 -61
  19. elasticsearch/_async/client/ingest.py +32 -38
  20. elasticsearch/_async/client/license.py +51 -16
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +144 -115
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +9 -27
  26. elasticsearch/_async/client/query_rules.py +8 -8
  27. elasticsearch/_async/client/rollup.py +8 -8
  28. elasticsearch/_async/client/search_application.py +13 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  30. elasticsearch/_async/client/security.py +71 -71
  31. elasticsearch/_async/client/shutdown.py +3 -10
  32. elasticsearch/_async/client/simulate.py +6 -6
  33. elasticsearch/_async/client/slm.py +9 -9
  34. elasticsearch/_async/client/snapshot.py +13 -17
  35. elasticsearch/_async/client/sql.py +6 -6
  36. elasticsearch/_async/client/ssl.py +1 -1
  37. elasticsearch/_async/client/synonyms.py +7 -7
  38. elasticsearch/_async/client/tasks.py +3 -9
  39. elasticsearch/_async/client/text_structure.py +4 -4
  40. elasticsearch/_async/client/transform.py +30 -28
  41. elasticsearch/_async/client/watcher.py +22 -14
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_async/helpers.py +0 -1
  44. elasticsearch/_sync/client/__init__.py +174 -79
  45. elasticsearch/_sync/client/_base.py +0 -1
  46. elasticsearch/_sync/client/async_search.py +12 -8
  47. elasticsearch/_sync/client/autoscaling.py +4 -4
  48. elasticsearch/_sync/client/cat.py +26 -26
  49. elasticsearch/_sync/client/ccr.py +186 -72
  50. elasticsearch/_sync/client/cluster.py +38 -19
  51. elasticsearch/_sync/client/connector.py +30 -30
  52. elasticsearch/_sync/client/dangling_indices.py +3 -3
  53. elasticsearch/_sync/client/enrich.py +26 -5
  54. elasticsearch/_sync/client/eql.py +32 -4
  55. elasticsearch/_sync/client/esql.py +62 -6
  56. elasticsearch/_sync/client/features.py +12 -2
  57. elasticsearch/_sync/client/fleet.py +8 -2
  58. elasticsearch/_sync/client/graph.py +1 -1
  59. elasticsearch/_sync/client/ilm.py +23 -22
  60. elasticsearch/_sync/client/indices.py +424 -132
  61. elasticsearch/_sync/client/inference.py +1906 -61
  62. elasticsearch/_sync/client/ingest.py +32 -38
  63. elasticsearch/_sync/client/license.py +51 -16
  64. elasticsearch/_sync/client/logstash.py +3 -3
  65. elasticsearch/_sync/client/migration.py +3 -3
  66. elasticsearch/_sync/client/ml.py +144 -115
  67. elasticsearch/_sync/client/monitoring.py +1 -1
  68. elasticsearch/_sync/client/nodes.py +9 -27
  69. elasticsearch/_sync/client/query_rules.py +8 -8
  70. elasticsearch/_sync/client/rollup.py +8 -8
  71. elasticsearch/_sync/client/search_application.py +13 -13
  72. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  73. elasticsearch/_sync/client/security.py +71 -71
  74. elasticsearch/_sync/client/shutdown.py +3 -10
  75. elasticsearch/_sync/client/simulate.py +6 -6
  76. elasticsearch/_sync/client/slm.py +9 -9
  77. elasticsearch/_sync/client/snapshot.py +13 -17
  78. elasticsearch/_sync/client/sql.py +6 -6
  79. elasticsearch/_sync/client/ssl.py +1 -1
  80. elasticsearch/_sync/client/synonyms.py +7 -7
  81. elasticsearch/_sync/client/tasks.py +3 -9
  82. elasticsearch/_sync/client/text_structure.py +4 -4
  83. elasticsearch/_sync/client/transform.py +30 -28
  84. elasticsearch/_sync/client/utils.py +0 -3
  85. elasticsearch/_sync/client/watcher.py +22 -14
  86. elasticsearch/_sync/client/xpack.py +2 -2
  87. elasticsearch/_version.py +1 -1
  88. elasticsearch/dsl/__init__.py +203 -0
  89. elasticsearch/dsl/_async/__init__.py +16 -0
  90. elasticsearch/dsl/_async/document.py +522 -0
  91. elasticsearch/dsl/_async/faceted_search.py +50 -0
  92. elasticsearch/dsl/_async/index.py +639 -0
  93. elasticsearch/dsl/_async/mapping.py +49 -0
  94. elasticsearch/dsl/_async/search.py +233 -0
  95. elasticsearch/dsl/_async/update_by_query.py +47 -0
  96. elasticsearch/dsl/_sync/__init__.py +16 -0
  97. elasticsearch/dsl/_sync/document.py +514 -0
  98. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  99. elasticsearch/dsl/_sync/index.py +597 -0
  100. elasticsearch/dsl/_sync/mapping.py +49 -0
  101. elasticsearch/dsl/_sync/search.py +226 -0
  102. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  103. elasticsearch/dsl/aggs.py +3730 -0
  104. elasticsearch/dsl/analysis.py +341 -0
  105. elasticsearch/dsl/async_connections.py +37 -0
  106. elasticsearch/dsl/connections.py +142 -0
  107. elasticsearch/dsl/document.py +20 -0
  108. elasticsearch/dsl/document_base.py +444 -0
  109. elasticsearch/dsl/exceptions.py +32 -0
  110. elasticsearch/dsl/faceted_search.py +28 -0
  111. elasticsearch/dsl/faceted_search_base.py +489 -0
  112. elasticsearch/dsl/field.py +4392 -0
  113. elasticsearch/dsl/function.py +180 -0
  114. elasticsearch/dsl/index.py +23 -0
  115. elasticsearch/dsl/index_base.py +178 -0
  116. elasticsearch/dsl/mapping.py +19 -0
  117. elasticsearch/dsl/mapping_base.py +219 -0
  118. elasticsearch/dsl/query.py +2822 -0
  119. elasticsearch/dsl/response/__init__.py +388 -0
  120. elasticsearch/dsl/response/aggs.py +100 -0
  121. elasticsearch/dsl/response/hit.py +53 -0
  122. elasticsearch/dsl/search.py +20 -0
  123. elasticsearch/dsl/search_base.py +1040 -0
  124. elasticsearch/dsl/serializer.py +34 -0
  125. elasticsearch/dsl/types.py +6509 -0
  126. elasticsearch/dsl/update_by_query.py +19 -0
  127. elasticsearch/dsl/update_by_query_base.py +149 -0
  128. elasticsearch/dsl/utils.py +687 -0
  129. elasticsearch/dsl/wrappers.py +119 -0
  130. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/METADATA +14 -2
  131. elasticsearch-8.18.1.dist-info/RECORD +163 -0
  132. elasticsearch-8.18.1.dist-info/licenses/LICENSE.txt +175 -0
  133. elasticsearch-8.18.1.dist-info/licenses/NOTICE.txt +559 -0
  134. elasticsearch-8.17.2.dist-info/RECORD +0 -119
  135. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/WHEEL +0 -0
  136. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/licenses/LICENSE +0 -0
  137. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/licenses/NOTICE +0 -0
@@ -33,18 +33,23 @@ class CcrClient(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,
37
38
  ) -> ObjectApiResponse[t.Any]:
38
39
  """
39
40
  .. raw:: html
40
41
 
41
- <p>Delete auto-follow patterns.
42
- Delete a collection of cross-cluster replication auto-follow patterns.</p>
42
+ <p>Delete auto-follow patterns.</p>
43
+ <p>Delete a collection of cross-cluster replication auto-follow patterns.</p>
43
44
 
44
45
 
45
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-delete-auto-follow-pattern.html>`_
46
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-delete-auto-follow-pattern.html>`_
46
47
 
47
- :param name: The name of the auto follow pattern.
48
+ :param name: The auto-follow pattern collection to delete.
49
+ :param master_timeout: The period to wait for a connection to the master node.
50
+ If the master node is not available before the timeout expires, the request
51
+ fails and returns an error. It can also be set to `-1` to indicate that the
52
+ request should never timeout.
48
53
  """
49
54
  if name in SKIP_IN_PATH:
50
55
  raise ValueError("Empty value passed for parameter 'name'")
@@ -57,6 +62,8 @@ class CcrClient(NamespacedClient):
57
62
  __query["filter_path"] = filter_path
58
63
  if human is not None:
59
64
  __query["human"] = human
65
+ if master_timeout is not None:
66
+ __query["master_timeout"] = master_timeout
60
67
  if pretty is not None:
61
68
  __query["pretty"] = pretty
62
69
  __headers = {"accept": "application/json"}
@@ -72,6 +79,8 @@ class CcrClient(NamespacedClient):
72
79
  @_rewrite_parameters(
73
80
  body_fields=(
74
81
  "leader_index",
82
+ "remote_cluster",
83
+ "data_stream_name",
75
84
  "max_outstanding_read_requests",
76
85
  "max_outstanding_write_requests",
77
86
  "max_read_request_operation_count",
@@ -82,29 +91,32 @@ class CcrClient(NamespacedClient):
82
91
  "max_write_request_operation_count",
83
92
  "max_write_request_size",
84
93
  "read_poll_timeout",
85
- "remote_cluster",
94
+ "settings",
86
95
  ),
87
96
  )
88
97
  async def follow(
89
98
  self,
90
99
  *,
91
100
  index: str,
101
+ leader_index: t.Optional[str] = None,
102
+ remote_cluster: t.Optional[str] = None,
103
+ data_stream_name: t.Optional[str] = None,
92
104
  error_trace: t.Optional[bool] = None,
93
105
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
94
106
  human: t.Optional[bool] = None,
95
- leader_index: t.Optional[str] = None,
107
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
96
108
  max_outstanding_read_requests: t.Optional[int] = None,
97
109
  max_outstanding_write_requests: t.Optional[int] = None,
98
110
  max_read_request_operation_count: t.Optional[int] = None,
99
- max_read_request_size: t.Optional[str] = None,
111
+ max_read_request_size: t.Optional[t.Union[int, str]] = None,
100
112
  max_retry_delay: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
101
113
  max_write_buffer_count: t.Optional[int] = None,
102
- max_write_buffer_size: t.Optional[str] = None,
114
+ max_write_buffer_size: t.Optional[t.Union[int, str]] = None,
103
115
  max_write_request_operation_count: t.Optional[int] = None,
104
- max_write_request_size: t.Optional[str] = None,
116
+ max_write_request_size: t.Optional[t.Union[int, str]] = None,
105
117
  pretty: t.Optional[bool] = None,
106
118
  read_poll_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
107
- remote_cluster: t.Optional[str] = None,
119
+ settings: t.Optional[t.Mapping[str, t.Any]] = None,
108
120
  wait_for_active_shards: t.Optional[
109
121
  t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
110
122
  ] = None,
@@ -118,28 +130,54 @@ class CcrClient(NamespacedClient):
118
130
  When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.</p>
119
131
 
120
132
 
121
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-follow.html>`_
133
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-follow.html>`_
122
134
 
123
- :param index: The name of the follower index
124
- :param leader_index:
125
- :param max_outstanding_read_requests:
126
- :param max_outstanding_write_requests:
127
- :param max_read_request_operation_count:
128
- :param max_read_request_size:
129
- :param max_retry_delay:
130
- :param max_write_buffer_count:
131
- :param max_write_buffer_size:
132
- :param max_write_request_operation_count:
133
- :param max_write_request_size:
134
- :param read_poll_timeout:
135
- :param remote_cluster:
136
- :param wait_for_active_shards: Sets the number of shard copies that must be active
137
- before returning. Defaults to 0. Set to `all` for all shard copies, otherwise
138
- set to any non-negative value less than or equal to the total number of copies
139
- for the shard (number of replicas + 1)
135
+ :param index: The name of the follower index.
136
+ :param leader_index: The name of the index in the leader cluster to follow.
137
+ :param remote_cluster: The remote cluster containing the leader index.
138
+ :param data_stream_name: If the leader index is part of a data stream, the name
139
+ to which the local data stream for the followed index should be renamed.
140
+ :param master_timeout: Period to wait for a connection to the master node.
141
+ :param max_outstanding_read_requests: The maximum number of outstanding reads
142
+ requests from the remote cluster.
143
+ :param max_outstanding_write_requests: The maximum number of outstanding write
144
+ requests on the follower.
145
+ :param max_read_request_operation_count: The maximum number of operations to
146
+ pull per read from the remote cluster.
147
+ :param max_read_request_size: The maximum size in bytes of per read of a batch
148
+ of operations pulled from the remote cluster.
149
+ :param max_retry_delay: The maximum time to wait before retrying an operation
150
+ that failed exceptionally. An exponential backoff strategy is employed when
151
+ retrying.
152
+ :param max_write_buffer_count: The maximum number of operations that can be queued
153
+ for writing. When this limit is reached, reads from the remote cluster will
154
+ be deferred until the number of queued operations goes below the limit.
155
+ :param max_write_buffer_size: The maximum total bytes of operations that can
156
+ be queued for writing. When this limit is reached, reads from the remote
157
+ cluster will be deferred until the total bytes of queued operations goes
158
+ below the limit.
159
+ :param max_write_request_operation_count: The maximum number of operations per
160
+ bulk write request executed on the follower.
161
+ :param max_write_request_size: The maximum total bytes of operations per bulk
162
+ write request executed on the follower.
163
+ :param read_poll_timeout: The maximum time to wait for new operations on the
164
+ remote cluster when the follower index is synchronized with the leader index.
165
+ When the timeout has elapsed, the poll for operations will return to the
166
+ follower so that it can update some statistics. Then the follower will immediately
167
+ attempt to read from the leader again.
168
+ :param settings: Settings to override from the leader index.
169
+ :param wait_for_active_shards: Specifies the number of shards to wait on being
170
+ active before responding. This defaults to waiting on none of the shards
171
+ to be active. A shard must be restored from the leader index before being
172
+ active. Restoring a follower shard requires transferring all the remote Lucene
173
+ segment files to the follower index.
140
174
  """
141
175
  if index in SKIP_IN_PATH:
142
176
  raise ValueError("Empty value passed for parameter 'index'")
177
+ if leader_index is None and body is None:
178
+ raise ValueError("Empty value passed for parameter 'leader_index'")
179
+ if remote_cluster is None and body is None:
180
+ raise ValueError("Empty value passed for parameter 'remote_cluster'")
143
181
  __path_parts: t.Dict[str, str] = {"index": _quote(index)}
144
182
  __path = f'/{__path_parts["index"]}/_ccr/follow'
145
183
  __query: t.Dict[str, t.Any] = {}
@@ -150,6 +188,8 @@ class CcrClient(NamespacedClient):
150
188
  __query["filter_path"] = filter_path
151
189
  if human is not None:
152
190
  __query["human"] = human
191
+ if master_timeout is not None:
192
+ __query["master_timeout"] = master_timeout
153
193
  if pretty is not None:
154
194
  __query["pretty"] = pretty
155
195
  if wait_for_active_shards is not None:
@@ -157,6 +197,10 @@ class CcrClient(NamespacedClient):
157
197
  if not __body:
158
198
  if leader_index is not None:
159
199
  __body["leader_index"] = leader_index
200
+ if remote_cluster is not None:
201
+ __body["remote_cluster"] = remote_cluster
202
+ if data_stream_name is not None:
203
+ __body["data_stream_name"] = data_stream_name
160
204
  if max_outstanding_read_requests is not None:
161
205
  __body["max_outstanding_read_requests"] = max_outstanding_read_requests
162
206
  if max_outstanding_write_requests is not None:
@@ -183,8 +227,8 @@ class CcrClient(NamespacedClient):
183
227
  __body["max_write_request_size"] = max_write_request_size
184
228
  if read_poll_timeout is not None:
185
229
  __body["read_poll_timeout"] = read_poll_timeout
186
- if remote_cluster is not None:
187
- __body["remote_cluster"] = remote_cluster
230
+ if settings is not None:
231
+ __body["settings"] = settings
188
232
  __headers = {"accept": "application/json", "content-type": "application/json"}
189
233
  return await self.perform_request( # type: ignore[return-value]
190
234
  "PUT",
@@ -204,20 +248,24 @@ class CcrClient(NamespacedClient):
204
248
  error_trace: t.Optional[bool] = None,
205
249
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
206
250
  human: t.Optional[bool] = None,
251
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
207
252
  pretty: t.Optional[bool] = None,
208
253
  ) -> ObjectApiResponse[t.Any]:
209
254
  """
210
255
  .. raw:: html
211
256
 
212
- <p>Get follower information.
213
- Get information about all cross-cluster replication follower indices.
257
+ <p>Get follower information.</p>
258
+ <p>Get information about all cross-cluster replication follower indices.
214
259
  For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.</p>
215
260
 
216
261
 
217
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-info.html>`_
262
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-info.html>`_
218
263
 
219
- :param index: A comma-separated list of index patterns; use `_all` to perform
220
- the operation on all indices
264
+ :param index: A comma-delimited list of follower index patterns.
265
+ :param master_timeout: The period to wait for a connection to the master node.
266
+ If the master node is not available before the timeout expires, the request
267
+ fails and returns an error. It can also be set to `-1` to indicate that the
268
+ request should never timeout.
221
269
  """
222
270
  if index in SKIP_IN_PATH:
223
271
  raise ValueError("Empty value passed for parameter 'index'")
@@ -230,6 +278,8 @@ class CcrClient(NamespacedClient):
230
278
  __query["filter_path"] = filter_path
231
279
  if human is not None:
232
280
  __query["human"] = human
281
+ if master_timeout is not None:
282
+ __query["master_timeout"] = master_timeout
233
283
  if pretty is not None:
234
284
  __query["pretty"] = pretty
235
285
  __headers = {"accept": "application/json"}
@@ -251,19 +301,21 @@ class CcrClient(NamespacedClient):
251
301
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
252
302
  human: t.Optional[bool] = None,
253
303
  pretty: t.Optional[bool] = None,
304
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
254
305
  ) -> ObjectApiResponse[t.Any]:
255
306
  """
256
307
  .. raw:: html
257
308
 
258
- <p>Get follower stats.
259
- Get cross-cluster replication follower stats.
309
+ <p>Get follower stats.</p>
310
+ <p>Get cross-cluster replication follower stats.
260
311
  The API returns shard-level stats about the &quot;following tasks&quot; associated with each shard for the specified indices.</p>
261
312
 
262
313
 
263
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-stats.html>`_
314
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-stats.html>`_
264
315
 
265
- :param index: A comma-separated list of index patterns; use `_all` to perform
266
- the operation on all indices
316
+ :param index: A comma-delimited list of index patterns.
317
+ :param timeout: The period to wait for a response. If no response is received
318
+ before the timeout expires, the request fails and returns an error.
267
319
  """
268
320
  if index in SKIP_IN_PATH:
269
321
  raise ValueError("Empty value passed for parameter 'index'")
@@ -278,6 +330,8 @@ class CcrClient(NamespacedClient):
278
330
  __query["human"] = human
279
331
  if pretty is not None:
280
332
  __query["pretty"] = pretty
333
+ if timeout is not None:
334
+ __query["timeout"] = timeout
281
335
  __headers = {"accept": "application/json"}
282
336
  return await self.perform_request( # type: ignore[return-value]
283
337
  "GET",
@@ -308,6 +362,7 @@ class CcrClient(NamespacedClient):
308
362
  human: t.Optional[bool] = None,
309
363
  leader_remote_cluster: t.Optional[str] = None,
310
364
  pretty: t.Optional[bool] = None,
365
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
311
366
  body: t.Optional[t.Dict[str, t.Any]] = None,
312
367
  ) -> ObjectApiResponse[t.Any]:
313
368
  """
@@ -325,7 +380,7 @@ class CcrClient(NamespacedClient):
325
380
  The only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked.</p>
326
381
 
327
382
 
328
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-forget-follower.html>`_
383
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-forget-follower.html>`_
329
384
 
330
385
  :param index: the name of the leader index for which specified follower retention
331
386
  leases should be removed
@@ -333,6 +388,8 @@ class CcrClient(NamespacedClient):
333
388
  :param follower_index:
334
389
  :param follower_index_uuid:
335
390
  :param leader_remote_cluster:
391
+ :param timeout: Period to wait for a response. If no response is received before
392
+ the timeout expires, the request fails and returns an error.
336
393
  """
337
394
  if index in SKIP_IN_PATH:
338
395
  raise ValueError("Empty value passed for parameter 'index'")
@@ -348,6 +405,8 @@ class CcrClient(NamespacedClient):
348
405
  __query["human"] = human
349
406
  if pretty is not None:
350
407
  __query["pretty"] = pretty
408
+ if timeout is not None:
409
+ __query["timeout"] = timeout
351
410
  if not __body:
352
411
  if follower_cluster is not None:
353
412
  __body["follower_cluster"] = follower_cluster
@@ -376,19 +435,24 @@ class CcrClient(NamespacedClient):
376
435
  error_trace: t.Optional[bool] = None,
377
436
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
378
437
  human: t.Optional[bool] = None,
438
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
379
439
  pretty: t.Optional[bool] = None,
380
440
  ) -> ObjectApiResponse[t.Any]:
381
441
  """
382
442
  .. raw:: html
383
443
 
384
- <p>Get auto-follow patterns.
385
- Get cross-cluster replication auto-follow patterns.</p>
444
+ <p>Get auto-follow patterns.</p>
445
+ <p>Get cross-cluster replication auto-follow patterns.</p>
386
446
 
387
447
 
388
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-auto-follow-pattern.html>`_
448
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-auto-follow-pattern.html>`_
389
449
 
390
- :param name: Specifies the auto-follow pattern collection that you want to retrieve.
391
- If you do not specify a name, the API returns information for all collections.
450
+ :param name: The auto-follow pattern collection that you want to retrieve. If
451
+ you do not specify a name, the API returns information for all collections.
452
+ :param master_timeout: The period to wait for a connection to the master node.
453
+ If the master node is not available before the timeout expires, the request
454
+ fails and returns an error. It can also be set to `-1` to indicate that the
455
+ request should never timeout.
392
456
  """
393
457
  __path_parts: t.Dict[str, str]
394
458
  if name not in SKIP_IN_PATH:
@@ -404,6 +468,8 @@ class CcrClient(NamespacedClient):
404
468
  __query["filter_path"] = filter_path
405
469
  if human is not None:
406
470
  __query["human"] = human
471
+ if master_timeout is not None:
472
+ __query["master_timeout"] = master_timeout
407
473
  if pretty is not None:
408
474
  __query["pretty"] = pretty
409
475
  __headers = {"accept": "application/json"}
@@ -424,13 +490,14 @@ class CcrClient(NamespacedClient):
424
490
  error_trace: t.Optional[bool] = None,
425
491
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
426
492
  human: t.Optional[bool] = None,
493
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
427
494
  pretty: t.Optional[bool] = None,
428
495
  ) -> ObjectApiResponse[t.Any]:
429
496
  """
430
497
  .. raw:: html
431
498
 
432
- <p>Pause an auto-follow pattern.
433
- Pause a cross-cluster replication auto-follow pattern.
499
+ <p>Pause an auto-follow pattern.</p>
500
+ <p>Pause a cross-cluster replication auto-follow pattern.
434
501
  When the API returns, the auto-follow pattern is inactive.
435
502
  New indices that are created on the remote cluster and match the auto-follow patterns are ignored.</p>
436
503
  <p>You can resume auto-following with the resume auto-follow pattern API.
@@ -438,10 +505,13 @@ class CcrClient(NamespacedClient):
438
505
  Remote indices that were created while the pattern was paused will also be followed, unless they have been deleted or closed in the interim.</p>
439
506
 
440
507
 
441
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-pause-auto-follow-pattern.html>`_
508
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-pause-auto-follow-pattern.html>`_
442
509
 
443
- :param name: The name of the auto follow pattern that should pause discovering
444
- new indices to follow.
510
+ :param name: The name of the auto-follow pattern to pause.
511
+ :param master_timeout: The period to wait for a connection to the master node.
512
+ If the master node is not available before the timeout expires, the request
513
+ fails and returns an error. It can also be set to `-1` to indicate that the
514
+ request should never timeout.
445
515
  """
446
516
  if name in SKIP_IN_PATH:
447
517
  raise ValueError("Empty value passed for parameter 'name'")
@@ -454,6 +524,8 @@ class CcrClient(NamespacedClient):
454
524
  __query["filter_path"] = filter_path
455
525
  if human is not None:
456
526
  __query["human"] = human
527
+ if master_timeout is not None:
528
+ __query["master_timeout"] = master_timeout
457
529
  if pretty is not None:
458
530
  __query["pretty"] = pretty
459
531
  __headers = {"accept": "application/json"}
@@ -474,22 +546,26 @@ class CcrClient(NamespacedClient):
474
546
  error_trace: t.Optional[bool] = None,
475
547
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
476
548
  human: t.Optional[bool] = None,
549
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
477
550
  pretty: t.Optional[bool] = None,
478
551
  ) -> ObjectApiResponse[t.Any]:
479
552
  """
480
553
  .. raw:: html
481
554
 
482
- <p>Pause a follower.
483
- Pause a cross-cluster replication follower index.
555
+ <p>Pause a follower.</p>
556
+ <p>Pause a cross-cluster replication follower index.
484
557
  The follower index will not fetch any additional operations from the leader index.
485
558
  You can resume following with the resume follower API.
486
559
  You can pause and resume a follower index to change the configuration of the following task.</p>
487
560
 
488
561
 
489
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-pause-follow.html>`_
562
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-pause-follow.html>`_
490
563
 
491
- :param index: The name of the follower index that should pause following its
492
- leader index.
564
+ :param index: The name of the follower index.
565
+ :param master_timeout: The period to wait for a connection to the master node.
566
+ If the master node is not available before the timeout expires, the request
567
+ fails and returns an error. It can also be set to `-1` to indicate that the
568
+ request should never timeout.
493
569
  """
494
570
  if index in SKIP_IN_PATH:
495
571
  raise ValueError("Empty value passed for parameter 'index'")
@@ -502,6 +578,8 @@ class CcrClient(NamespacedClient):
502
578
  __query["filter_path"] = filter_path
503
579
  if human is not None:
504
580
  __query["human"] = human
581
+ if master_timeout is not None:
582
+ __query["master_timeout"] = master_timeout
505
583
  if pretty is not None:
506
584
  __query["pretty"] = pretty
507
585
  __headers = {"accept": "application/json"}
@@ -544,6 +622,7 @@ class CcrClient(NamespacedClient):
544
622
  human: t.Optional[bool] = None,
545
623
  leader_index_exclusion_patterns: t.Optional[t.Sequence[str]] = None,
546
624
  leader_index_patterns: t.Optional[t.Sequence[str]] = None,
625
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
547
626
  max_outstanding_read_requests: t.Optional[int] = None,
548
627
  max_outstanding_write_requests: t.Optional[int] = None,
549
628
  max_read_request_operation_count: t.Optional[int] = None,
@@ -569,7 +648,7 @@ class CcrClient(NamespacedClient):
569
648
  NOTE: Follower indices that were configured automatically before updating an auto-follow pattern will remain unchanged even if they do not match against the new patterns.</p>
570
649
 
571
650
 
572
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-auto-follow-pattern.html>`_
651
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-auto-follow-pattern.html>`_
573
652
 
574
653
  :param name: The name of the collection of auto-follow patterns.
575
654
  :param remote_cluster: The remote cluster containing the leader indices to match
@@ -584,6 +663,7 @@ class CcrClient(NamespacedClient):
584
663
  or more leader_index_exclusion_patterns won’t be followed.
585
664
  :param leader_index_patterns: An array of simple index patterns to match against
586
665
  indices in the remote cluster specified by the remote_cluster field.
666
+ :param master_timeout: Period to wait for a connection to the master node.
587
667
  :param max_outstanding_read_requests: The maximum number of outstanding reads
588
668
  requests from the remote cluster.
589
669
  :param max_outstanding_write_requests: The maximum number of outstanding reads
@@ -628,6 +708,8 @@ class CcrClient(NamespacedClient):
628
708
  __query["filter_path"] = filter_path
629
709
  if human is not None:
630
710
  __query["human"] = human
711
+ if master_timeout is not None:
712
+ __query["master_timeout"] = master_timeout
631
713
  if pretty is not None:
632
714
  __query["pretty"] = pretty
633
715
  if not __body:
@@ -688,21 +770,25 @@ class CcrClient(NamespacedClient):
688
770
  error_trace: t.Optional[bool] = None,
689
771
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
690
772
  human: t.Optional[bool] = None,
773
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
691
774
  pretty: t.Optional[bool] = None,
692
775
  ) -> ObjectApiResponse[t.Any]:
693
776
  """
694
777
  .. raw:: html
695
778
 
696
- <p>Resume an auto-follow pattern.
697
- Resume a cross-cluster replication auto-follow pattern that was paused.
779
+ <p>Resume an auto-follow pattern.</p>
780
+ <p>Resume a cross-cluster replication auto-follow pattern that was paused.
698
781
  The auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster.
699
782
  Remote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.</p>
700
783
 
701
784
 
702
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-resume-auto-follow-pattern.html>`_
785
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-resume-auto-follow-pattern.html>`_
703
786
 
704
- :param name: The name of the auto follow pattern to resume discovering new indices
705
- to follow.
787
+ :param name: The name of the auto-follow pattern to resume.
788
+ :param master_timeout: The period to wait for a connection to the master node.
789
+ If the master node is not available before the timeout expires, the request
790
+ fails and returns an error. It can also be set to `-1` to indicate that the
791
+ request should never timeout.
706
792
  """
707
793
  if name in SKIP_IN_PATH:
708
794
  raise ValueError("Empty value passed for parameter 'name'")
@@ -715,6 +801,8 @@ class CcrClient(NamespacedClient):
715
801
  __query["filter_path"] = filter_path
716
802
  if human is not None:
717
803
  __query["human"] = human
804
+ if master_timeout is not None:
805
+ __query["master_timeout"] = master_timeout
718
806
  if pretty is not None:
719
807
  __query["pretty"] = pretty
720
808
  __headers = {"accept": "application/json"}
@@ -748,6 +836,7 @@ class CcrClient(NamespacedClient):
748
836
  error_trace: t.Optional[bool] = None,
749
837
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
750
838
  human: t.Optional[bool] = None,
839
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
751
840
  max_outstanding_read_requests: t.Optional[int] = None,
752
841
  max_outstanding_write_requests: t.Optional[int] = None,
753
842
  max_read_request_operation_count: t.Optional[int] = None,
@@ -771,9 +860,10 @@ class CcrClient(NamespacedClient):
771
860
  When this API returns, the follower index will resume fetching operations from the leader index.</p>
772
861
 
773
862
 
774
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-resume-follow.html>`_
863
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-resume-follow.html>`_
775
864
 
776
865
  :param index: The name of the follow index to resume following.
866
+ :param master_timeout: Period to wait for a connection to the master node.
777
867
  :param max_outstanding_read_requests:
778
868
  :param max_outstanding_write_requests:
779
869
  :param max_read_request_operation_count:
@@ -797,6 +887,8 @@ class CcrClient(NamespacedClient):
797
887
  __query["filter_path"] = filter_path
798
888
  if human is not None:
799
889
  __query["human"] = human
890
+ if master_timeout is not None:
891
+ __query["master_timeout"] = master_timeout
800
892
  if pretty is not None:
801
893
  __query["pretty"] = pretty
802
894
  if not __body:
@@ -848,16 +940,25 @@ class CcrClient(NamespacedClient):
848
940
  error_trace: t.Optional[bool] = None,
849
941
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
850
942
  human: t.Optional[bool] = None,
943
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
851
944
  pretty: t.Optional[bool] = None,
945
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
852
946
  ) -> ObjectApiResponse[t.Any]:
853
947
  """
854
948
  .. raw:: html
855
949
 
856
- <p>Get cross-cluster replication stats.
857
- This API returns stats about auto-following and the same shard-level stats as the get follower stats API.</p>
950
+ <p>Get cross-cluster replication stats.</p>
951
+ <p>This API returns stats about auto-following and the same shard-level stats as the get follower stats API.</p>
952
+
858
953
 
954
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-stats.html>`_
859
955
 
860
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-stats.html>`_
956
+ :param master_timeout: The period to wait for a connection to the master node.
957
+ If the master node is not available before the timeout expires, the request
958
+ fails and returns an error. It can also be set to `-1` to indicate that the
959
+ request should never timeout.
960
+ :param timeout: The period to wait for a response. If no response is received
961
+ before the timeout expires, the request fails and returns an error.
861
962
  """
862
963
  __path_parts: t.Dict[str, str] = {}
863
964
  __path = "/_ccr/stats"
@@ -868,8 +969,12 @@ class CcrClient(NamespacedClient):
868
969
  __query["filter_path"] = filter_path
869
970
  if human is not None:
870
971
  __query["human"] = human
972
+ if master_timeout is not None:
973
+ __query["master_timeout"] = master_timeout
871
974
  if pretty is not None:
872
975
  __query["pretty"] = pretty
976
+ if timeout is not None:
977
+ __query["timeout"] = timeout
873
978
  __headers = {"accept": "application/json"}
874
979
  return await self.perform_request( # type: ignore[return-value]
875
980
  "GET",
@@ -888,22 +993,29 @@ class CcrClient(NamespacedClient):
888
993
  error_trace: t.Optional[bool] = None,
889
994
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
890
995
  human: t.Optional[bool] = None,
996
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
891
997
  pretty: t.Optional[bool] = None,
892
998
  ) -> ObjectApiResponse[t.Any]:
893
999
  """
894
1000
  .. raw:: html
895
1001
 
896
- <p>Unfollow an index.
897
- Convert a cross-cluster replication follower index to a regular index.
1002
+ <p>Unfollow an index.</p>
1003
+ <p>Convert a cross-cluster replication follower index to a regular index.
898
1004
  The API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
899
1005
  The follower index must be paused and closed before you call the unfollow API.</p>
900
- <p>NOTE: Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.</p>
1006
+ <blockquote>
1007
+ <p>info
1008
+ Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.</p>
1009
+ </blockquote>
901
1010
 
902
1011
 
903
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-unfollow.html>`_
1012
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-unfollow.html>`_
904
1013
 
905
- :param index: The name of the follower index that should be turned into a regular
906
- index.
1014
+ :param index: The name of the follower index.
1015
+ :param master_timeout: The period to wait for a connection to the master node.
1016
+ If the master node is not available before the timeout expires, the request
1017
+ fails and returns an error. It can also be set to `-1` to indicate that the
1018
+ request should never timeout.
907
1019
  """
908
1020
  if index in SKIP_IN_PATH:
909
1021
  raise ValueError("Empty value passed for parameter 'index'")
@@ -916,6 +1028,8 @@ class CcrClient(NamespacedClient):
916
1028
  __query["filter_path"] = filter_path
917
1029
  if human is not None:
918
1030
  __query["human"] = human
1031
+ if master_timeout is not None:
1032
+ __query["master_timeout"] = master_timeout
919
1033
  if pretty is not None:
920
1034
  __query["pretty"] = pretty
921
1035
  __headers = {"accept": "application/json"}