Skip to content

Commit 87e3f2c

Browse files
Auto-generated code for 8.17 (#2724)
1 parent 22e7b78 commit 87e3f2c

File tree

18 files changed

+1298
-274
lines changed

18 files changed

+1298
-274
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,12 +626,14 @@ async def bulk(
626626
error_trace: t.Optional[bool] = None,
627627
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
628628
human: t.Optional[bool] = None,
629+
list_executed_pipelines: t.Optional[bool] = None,
629630
pipeline: t.Optional[str] = None,
630631
pretty: t.Optional[bool] = None,
631632
refresh: t.Optional[
632633
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
633634
] = None,
634635
require_alias: t.Optional[bool] = None,
636+
require_data_stream: t.Optional[bool] = None,
635637
routing: t.Optional[str] = None,
636638
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
637639
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -651,6 +653,8 @@ async def bulk(
651653
:param operations:
652654
:param index: Name of the data stream, index, or index alias to perform bulk
653655
actions on.
656+
:param list_executed_pipelines: If `true`, the response will include the ingest
657+
pipelines that were executed for each index or create.
654658
:param pipeline: ID of the pipeline to use to preprocess incoming documents.
655659
If the index has a default ingest pipeline specified, then setting the value
656660
to `_none` disables the default ingest pipeline for this request. If a final
@@ -661,6 +665,8 @@ async def bulk(
661665
make this operation visible to search, if `false` do nothing with refreshes.
662666
Valid values: `true`, `false`, `wait_for`.
663667
:param require_alias: If `true`, the request’s actions must target an index alias.
668+
:param require_data_stream: If `true`, the request's actions must target a data
669+
stream (existing or to-be-created).
664670
:param routing: Custom value used to route operations to a specific shard.
665671
:param source: `true` or `false` to return the `_source` field or not, or a list
666672
of fields to return.
@@ -694,6 +700,8 @@ async def bulk(
694700
__query["filter_path"] = filter_path
695701
if human is not None:
696702
__query["human"] = human
703+
if list_executed_pipelines is not None:
704+
__query["list_executed_pipelines"] = list_executed_pipelines
697705
if pipeline is not None:
698706
__query["pipeline"] = pipeline
699707
if pretty is not None:
@@ -702,6 +710,8 @@ async def bulk(
702710
__query["refresh"] = refresh
703711
if require_alias is not None:
704712
__query["require_alias"] = require_alias
713+
if require_data_stream is not None:
714+
__query["require_data_stream"] = require_data_stream
705715
if routing is not None:
706716
__query["routing"] = routing
707717
if source is not None:
@@ -2274,7 +2284,26 @@ async def health_report(
22742284
verbose: t.Optional[bool] = None,
22752285
) -> ObjectApiResponse[t.Any]:
22762286
"""
2277-
Returns the health of the cluster.
2287+
Get the cluster health. Get a report with the health status of an Elasticsearch
2288+
cluster. The report contains a list of indicators that compose Elasticsearch
2289+
functionality. Each indicator has a health status of: green, unknown, yellow
2290+
or red. The indicator will provide an explanation and metadata describing the
2291+
reason for its current health status. The cluster’s status is controlled by the
2292+
worst indicator status. In the event that an indicator’s status is non-green,
2293+
a list of impacts may be present in the indicator result which detail the functionalities
2294+
that are negatively affected by the health issue. Each impact carries with it
2295+
a severity level, an area of the system that is affected, and a simple description
2296+
of the impact on the system. Some health indicators can determine the root cause
2297+
of a health problem and prescribe a set of steps that can be performed in order
2298+
to improve the health of the system. The root cause and remediation steps are
2299+
encapsulated in a diagnosis. A diagnosis contains a cause detailing a root cause
2300+
analysis, an action containing a brief description of the steps to take to fix
2301+
the problem, the list of affected resources (if applicable), and a detailed step-by-step
2302+
troubleshooting guide to fix the diagnosed problem. NOTE: The health indicators
2303+
perform root cause analysis of non-green health statuses. This can be computationally
2304+
expensive when called frequently. When setting up automated polling of the API
2305+
for health status, set verbose to false to disable the more expensive analysis
2306+
logic.
22782307
22792308
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/health-api.html>`_
22802309

elasticsearch/_async/client/ccr.py

Lines changed: 70 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ async def delete_auto_follow_pattern(
3636
pretty: t.Optional[bool] = None,
3737
) -> ObjectApiResponse[t.Any]:
3838
"""
39-
Deletes auto-follow patterns.
39+
Delete auto-follow patterns. Delete a collection of cross-cluster replication
40+
auto-follow patterns.
4041
4142
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-delete-auto-follow-pattern.html>`_
4243
@@ -107,7 +108,10 @@ async def follow(
107108
body: t.Optional[t.Dict[str, t.Any]] = None,
108109
) -> ObjectApiResponse[t.Any]:
109110
"""
110-
Creates a new follower index configured to follow the referenced leader index.
111+
Create a follower. Create a cross-cluster replication follower index that follows
112+
a specific leader index. When the API returns, the follower index exists and
113+
cross-cluster replication starts replicating operations from the leader index
114+
to the follower index.
111115
112116
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-follow.html>`_
113117
@@ -198,8 +202,10 @@ async def follow_info(
198202
pretty: t.Optional[bool] = None,
199203
) -> ObjectApiResponse[t.Any]:
200204
"""
201-
Retrieves information about all follower indices, including parameters and status
202-
for each follower index
205+
Get follower information. Get information about all cross-cluster replication
206+
follower indices. For example, the results include follower index names, leader
207+
index names, replication options, and whether the follower indices are active
208+
or paused.
203209
204210
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-info.html>`_
205211
@@ -240,8 +246,9 @@ async def follow_stats(
240246
pretty: t.Optional[bool] = None,
241247
) -> ObjectApiResponse[t.Any]:
242248
"""
243-
Retrieves follower stats. return shard-level stats about the following tasks
244-
associated with each shard for the specified indices.
249+
Get follower stats. Get cross-cluster replication follower stats. The API returns
250+
shard-level stats about the "following tasks" associated with each shard for
251+
the specified indices.
245252
246253
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-stats.html>`_
247254
@@ -294,7 +301,23 @@ async def forget_follower(
294301
body: t.Optional[t.Dict[str, t.Any]] = None,
295302
) -> ObjectApiResponse[t.Any]:
296303
"""
297-
Removes the follower retention leases from the leader.
304+
Forget a follower. Remove the cross-cluster replication follower retention leases
305+
from the leader. A following index takes out retention leases on its leader index.
306+
These leases are used to increase the likelihood that the shards of the leader
307+
index retain the history of operations that the shards of the following index
308+
need to run replication. When a follower index is converted to a regular index
309+
by the unfollow API (either by directly calling the API or by index lifecycle
310+
management tasks), these leases are removed. However, removal of the leases can
311+
fail, for example when the remote cluster containing the leader index is unavailable.
312+
While the leases will eventually expire on their own, their extended existence
313+
can cause the leader index to hold more history than necessary and prevent index
314+
lifecycle management from performing some operations on the leader index. This
315+
API exists to enable manually removing the leases when the unfollow API is unable
316+
to do so. NOTE: This API does not stop replication by a following index. If you
317+
use this API with a follower index that is still actively following, the following
318+
index will add back retention leases on the leader. The only purpose of this
319+
API is to handle the case of failure to remove the following retention leases
320+
after the unfollow API is invoked.
298321
299322
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-forget-follower.html>`_
300323
@@ -350,8 +373,7 @@ async def get_auto_follow_pattern(
350373
pretty: t.Optional[bool] = None,
351374
) -> ObjectApiResponse[t.Any]:
352375
"""
353-
Gets configured auto-follow patterns. Returns the specified auto-follow pattern
354-
collection.
376+
Get auto-follow patterns. Get cross-cluster replication auto-follow patterns.
355377
356378
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-auto-follow-pattern.html>`_
357379
@@ -395,7 +417,14 @@ async def pause_auto_follow_pattern(
395417
pretty: t.Optional[bool] = None,
396418
) -> ObjectApiResponse[t.Any]:
397419
"""
398-
Pauses an auto-follow pattern
420+
Pause an auto-follow pattern. Pause a cross-cluster replication auto-follow pattern.
421+
When the API returns, the auto-follow pattern is inactive. New indices that are
422+
created on the remote cluster and match the auto-follow patterns are ignored.
423+
You can resume auto-following with the resume auto-follow pattern API. When it
424+
resumes, the auto-follow pattern is active again and automatically configures
425+
follower indices for newly created indices on the remote cluster that match its
426+
patterns. Remote indices that were created while the pattern was paused will
427+
also be followed, unless they have been deleted or closed in the interim.
399428
400429
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-pause-auto-follow-pattern.html>`_
401430
@@ -436,8 +465,10 @@ async def pause_follow(
436465
pretty: t.Optional[bool] = None,
437466
) -> ObjectApiResponse[t.Any]:
438467
"""
439-
Pauses a follower index. The follower index will not fetch any additional operations
440-
from the leader index.
468+
Pause a follower. Pause a cross-cluster replication follower index. The follower
469+
index will not fetch any additional operations from the leader index. You can
470+
resume following with the resume follower API. You can pause and resume a follower
471+
index to change the configuration of the following task.
441472
442473
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-pause-follow.html>`_
443474
@@ -512,9 +543,14 @@ async def put_auto_follow_pattern(
512543
body: t.Optional[t.Dict[str, t.Any]] = None,
513544
) -> ObjectApiResponse[t.Any]:
514545
"""
515-
Creates a new named collection of auto-follow patterns against a specified remote
516-
cluster. Newly created indices on the remote cluster matching any of the specified
517-
patterns will be automatically configured as follower indices.
546+
Create or update auto-follow patterns. Create a collection of cross-cluster replication
547+
auto-follow patterns for a remote cluster. Newly created indices on the remote
548+
cluster that match any of the patterns are automatically configured as follower
549+
indices. Indices on the remote cluster that were created before the auto-follow
550+
pattern was created will not be auto-followed even if they match the pattern.
551+
This API can also be used to update auto-follow patterns. NOTE: Follower indices
552+
that were configured automatically before updating an auto-follow pattern will
553+
remain unchanged even if they do not match against the new patterns.
518554
519555
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-auto-follow-pattern.html>`_
520556
@@ -638,7 +674,11 @@ async def resume_auto_follow_pattern(
638674
pretty: t.Optional[bool] = None,
639675
) -> ObjectApiResponse[t.Any]:
640676
"""
641-
Resumes an auto-follow pattern that has been paused
677+
Resume an auto-follow pattern. Resume a cross-cluster replication auto-follow
678+
pattern that was paused. The auto-follow pattern will resume configuring following
679+
indices for newly created indices that match its patterns on the remote cluster.
680+
Remote indices created while the pattern was paused will also be followed unless
681+
they have been deleted or closed in the interim.
642682
643683
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-resume-auto-follow-pattern.html>`_
644684
@@ -703,7 +743,11 @@ async def resume_follow(
703743
body: t.Optional[t.Dict[str, t.Any]] = None,
704744
) -> ObjectApiResponse[t.Any]:
705745
"""
706-
Resumes a follower index that has been paused
746+
Resume a follower. Resume a cross-cluster replication follower index that was
747+
paused. The follower index could have been paused with the pause follower API.
748+
Alternatively it could be paused due to replication that cannot be retried due
749+
to failures during following tasks. When this API returns, the follower index
750+
will resume fetching operations from the leader index.
707751
708752
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-resume-follow.html>`_
709753
@@ -785,7 +829,8 @@ async def stats(
785829
pretty: t.Optional[bool] = None,
786830
) -> ObjectApiResponse[t.Any]:
787831
"""
788-
Gets all stats related to cross-cluster replication.
832+
Get cross-cluster replication stats. This API returns stats about auto-following
833+
and the same shard-level stats as the get follower stats API.
789834
790835
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-stats.html>`_
791836
"""
@@ -821,8 +866,13 @@ async def unfollow(
821866
pretty: t.Optional[bool] = None,
822867
) -> ObjectApiResponse[t.Any]:
823868
"""
824-
Stops the following task associated with a follower index and removes index metadata
825-
and settings associated with cross-cluster replication.
869+
Unfollow an index. Convert a cross-cluster replication follower index to a regular
870+
index. The API stops the following task associated with a follower index and
871+
removes index metadata and settings associated with cross-cluster replication.
872+
The follower index must be paused and closed before you call the unfollow API.
873+
NOTE: Currently cross-cluster replication does not support converting an existing
874+
regular index to a follower index. Converting a follower index to a regular index
875+
is an irreversible operation.
826876
827877
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-unfollow.html>`_
828878

0 commit comments

Comments
 (0)