Skip to content

Commit

Permalink
Auto-generated API code
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Dec 13, 2024
1 parent 22e7b78 commit be9e086
Show file tree
Hide file tree
Showing 18 changed files with 1,298 additions and 274 deletions.
31 changes: 30 additions & 1 deletion elasticsearch/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,14 @@ async def bulk(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
list_executed_pipelines: t.Optional[bool] = None,
pipeline: t.Optional[str] = None,
pretty: t.Optional[bool] = None,
refresh: t.Optional[
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
] = None,
require_alias: t.Optional[bool] = None,
require_data_stream: t.Optional[bool] = None,
routing: t.Optional[str] = None,
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
Expand All @@ -651,6 +653,8 @@ async def bulk(
:param operations:
:param index: Name of the data stream, index, or index alias to perform bulk
actions on.
:param list_executed_pipelines: If `true`, the response will include the ingest
pipelines that were executed for each index or create.
:param pipeline: ID of the pipeline to use to preprocess incoming documents.
If the index has a default ingest pipeline specified, then setting the value
to `_none` disables the default ingest pipeline for this request. If a final
Expand All @@ -661,6 +665,8 @@ async def bulk(
make this operation visible to search, if `false` do nothing with refreshes.
Valid values: `true`, `false`, `wait_for`.
:param require_alias: If `true`, the request’s actions must target an index alias.
:param require_data_stream: If `true`, the request's actions must target a data
stream (existing or to-be-created).
:param routing: Custom value used to route operations to a specific shard.
:param source: `true` or `false` to return the `_source` field or not, or a list
of fields to return.
Expand Down Expand Up @@ -694,6 +700,8 @@ async def bulk(
__query["filter_path"] = filter_path
if human is not None:
__query["human"] = human
if list_executed_pipelines is not None:
__query["list_executed_pipelines"] = list_executed_pipelines
if pipeline is not None:
__query["pipeline"] = pipeline
if pretty is not None:
Expand All @@ -702,6 +710,8 @@ async def bulk(
__query["refresh"] = refresh
if require_alias is not None:
__query["require_alias"] = require_alias
if require_data_stream is not None:
__query["require_data_stream"] = require_data_stream
if routing is not None:
__query["routing"] = routing
if source is not None:
Expand Down Expand Up @@ -2274,7 +2284,26 @@ async def health_report(
verbose: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns the health of the cluster.
Get the cluster health. Get a report with the health status of an Elasticsearch
cluster. The report contains a list of indicators that compose Elasticsearch
functionality. Each indicator has a health status of: green, unknown, yellow
or red. The indicator will provide an explanation and metadata describing the
reason for its current health status. The cluster’s status is controlled by the
worst indicator status. In the event that an indicator’s status is non-green,
a list of impacts may be present in the indicator result which detail the functionalities
that are negatively affected by the health issue. Each impact carries with it
a severity level, an area of the system that is affected, and a simple description
of the impact on the system. Some health indicators can determine the root cause
of a health problem and prescribe a set of steps that can be performed in order
to improve the health of the system. The root cause and remediation steps are
encapsulated in a diagnosis. A diagnosis contains a cause detailing a root cause
analysis, an action containing a brief description of the steps to take to fix
the problem, the list of affected resources (if applicable), and a detailed step-by-step
troubleshooting guide to fix the diagnosed problem. NOTE: The health indicators
perform root cause analysis of non-green health statuses. This can be computationally
expensive when called frequently. When setting up automated polling of the API
for health status, set verbose to false to disable the more expensive analysis
logic.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/health-api.html>`_
Expand Down
90 changes: 70 additions & 20 deletions elasticsearch/_async/client/ccr.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ async def delete_auto_follow_pattern(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Deletes auto-follow patterns.
Delete auto-follow patterns. Delete a collection of cross-cluster replication
auto-follow patterns.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-delete-auto-follow-pattern.html>`_
Expand Down Expand Up @@ -107,7 +108,10 @@ async def follow(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates a new follower index configured to follow the referenced leader index.
Create a follower. Create a cross-cluster replication follower index that follows
a specific leader index. When the API returns, the follower index exists and
cross-cluster replication starts replicating operations from the leader index
to the follower index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-follow.html>`_
Expand Down Expand Up @@ -198,8 +202,10 @@ async def follow_info(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Retrieves information about all follower indices, including parameters and status
for each follower index
Get follower information. Get information about all cross-cluster replication
follower indices. For example, the results include follower index names, leader
index names, replication options, and whether the follower indices are active
or paused.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-info.html>`_
Expand Down Expand Up @@ -240,8 +246,9 @@ async def follow_stats(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Retrieves follower stats. return shard-level stats about the following tasks
associated with each shard for the specified indices.
Get follower stats. Get cross-cluster replication follower stats. The API returns
shard-level stats about the "following tasks" associated with each shard for
the specified indices.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-stats.html>`_
Expand Down Expand Up @@ -294,7 +301,23 @@ async def forget_follower(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Removes the follower retention leases from the leader.
Forget a follower. Remove the cross-cluster replication follower retention leases
from the leader. A following index takes out retention leases on its leader index.
These leases are used to increase the likelihood that the shards of the leader
index retain the history of operations that the shards of the following index
need to run replication. When a follower index is converted to a regular index
by the unfollow API (either by directly calling the API or by index lifecycle
management tasks), these leases are removed. However, removal of the leases can
fail, for example when the remote cluster containing the leader index is unavailable.
While the leases will eventually expire on their own, their extended existence
can cause the leader index to hold more history than necessary and prevent index
lifecycle management from performing some operations on the leader index. This
API exists to enable manually removing the leases when the unfollow API is unable
to do so. NOTE: This API does not stop replication by a following index. If you
use this API with a follower index that is still actively following, the following
index will add back retention leases on the leader. 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.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-forget-follower.html>`_
Expand Down Expand Up @@ -350,8 +373,7 @@ async def get_auto_follow_pattern(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Gets configured auto-follow patterns. Returns the specified auto-follow pattern
collection.
Get auto-follow patterns. Get cross-cluster replication auto-follow patterns.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-auto-follow-pattern.html>`_
Expand Down Expand Up @@ -395,7 +417,14 @@ async def pause_auto_follow_pattern(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Pauses an auto-follow pattern
Pause an auto-follow pattern. Pause a cross-cluster replication auto-follow pattern.
When the API returns, the auto-follow pattern is inactive. New indices that are
created on the remote cluster and match the auto-follow patterns are ignored.
You can resume auto-following with the resume auto-follow pattern API. When it
resumes, the auto-follow pattern is active again and automatically configures
follower indices for newly created indices on the remote cluster that match its
patterns. Remote indices that were created while the pattern was paused will
also be followed, unless they have been deleted or closed in the interim.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-pause-auto-follow-pattern.html>`_
Expand Down Expand Up @@ -436,8 +465,10 @@ async def pause_follow(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Pauses a follower index. The follower index will not fetch any additional operations
from the leader index.
Pause a follower. Pause a cross-cluster replication follower index. The follower
index will not fetch any additional operations from the leader index. You can
resume following with the resume follower API. You can pause and resume a follower
index to change the configuration of the following task.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-pause-follow.html>`_
Expand Down Expand Up @@ -512,9 +543,14 @@ async def put_auto_follow_pattern(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates a new named collection of auto-follow patterns against a specified remote
cluster. Newly created indices on the remote cluster matching any of the specified
patterns will be automatically configured as follower indices.
Create or update auto-follow patterns. Create a collection of cross-cluster replication
auto-follow patterns for a remote cluster. Newly created indices on the remote
cluster that match any of the patterns are automatically configured as follower
indices. Indices on the remote cluster that were created before the auto-follow
pattern was created will not be auto-followed even if they match the pattern.
This API can also be used to update auto-follow patterns. 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.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-auto-follow-pattern.html>`_
Expand Down Expand Up @@ -638,7 +674,11 @@ async def resume_auto_follow_pattern(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Resumes an auto-follow pattern that has been paused
Resume an auto-follow pattern. Resume a cross-cluster replication auto-follow
pattern that was paused. The auto-follow pattern will resume configuring following
indices for newly created indices that match its patterns on the remote cluster.
Remote indices created while the pattern was paused will also be followed unless
they have been deleted or closed in the interim.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-resume-auto-follow-pattern.html>`_
Expand Down Expand Up @@ -703,7 +743,11 @@ async def resume_follow(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Resumes a follower index that has been paused
Resume a follower. Resume a cross-cluster replication follower index that was
paused. The follower index could have been paused with the pause follower API.
Alternatively it could be paused due to replication that cannot be retried due
to failures during following tasks. When this API returns, the follower index
will resume fetching operations from the leader index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-resume-follow.html>`_
Expand Down Expand Up @@ -785,7 +829,8 @@ async def stats(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Gets all stats related to cross-cluster replication.
Get cross-cluster replication stats. This API returns stats about auto-following
and the same shard-level stats as the get follower stats API.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-stats.html>`_
"""
Expand Down Expand Up @@ -821,8 +866,13 @@ async def unfollow(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Stops the following task associated with a follower index and removes index metadata
and settings associated with cross-cluster replication.
Unfollow an index. Convert a cross-cluster replication follower index to a regular
index. The API stops the following task associated with a follower index and
removes index metadata and settings associated with cross-cluster replication.
The follower index must be paused and closed before you call the unfollow API.
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.
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-unfollow.html>`_
Expand Down
Loading

0 comments on commit be9e086

Please sign in to comment.