Skip to content

Commit

Permalink
Format endpoint descriptions as Markdown (#2757)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Jan 21, 2025
1 parent 73d5df7 commit d2f93eb
Show file tree
Hide file tree
Showing 82 changed files with 9,336 additions and 6,760 deletions.
1,358 changes: 726 additions & 632 deletions elasticsearch/_async/client/__init__.py

Large diffs are not rendered by default.

49 changes: 27 additions & 22 deletions elasticsearch/_async/client/async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ async def delete(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Delete an async search. If the asynchronous search is still running, it is cancelled.
Otherwise, the saved search results are deleted. If the Elasticsearch security
features are enabled, the deletion of a specific async search is restricted to:
the authenticated user that submitted the original search request; users that
have the `cancel_task` cluster privilege.
.. raw:: html
<p>Delete an async search.</p>
<p>If the asynchronous search is still running, it is cancelled.
Otherwise, the saved search results are deleted.
If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the <code>cancel_task</code> cluster privilege.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
Expand Down Expand Up @@ -85,10 +87,12 @@ async def get(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get async search results. Retrieve the results of a previously submitted asynchronous
search request. If the Elasticsearch security features are enabled, access to
the results of a specific async search is restricted to the user or API key that
submitted it.
.. raw:: html
<p>Get async search results.</p>
<p>Retrieve the results of a previously submitted asynchronous search request.
If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
Expand Down Expand Up @@ -149,10 +153,12 @@ async def status(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get the async search status. Get the status of a previously submitted async search
request given its identifier, without retrieving search results. If the Elasticsearch
security features are enabled, use of this API is restricted to the `monitoring_user`
role.
.. raw:: html
<p>Get the async search status.</p>
<p>Get the status of a previously submitted async search request given its identifier, without retrieving search results.
If the Elasticsearch security features are enabled, use of this API is restricted to the <code>monitoring_user</code> role.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
Expand Down Expand Up @@ -325,15 +331,14 @@ async def submit(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Run an async search. When the primary sort of the results is an indexed field,
shards get sorted based on minimum and maximum value that they hold for that
field. Partial results become available following the sort criteria that was
requested. Warning: Asynchronous search does not support scroll or search requests
that include only the suggest section. By default, Elasticsearch does not allow
you to store an async search response larger than 10Mb and an attempt to do this
results in an error. The maximum allowed size for a stored async search response
can be set by changing the `search.max_async_search_response_size` cluster level
setting.
.. raw:: html
<p>Run an async search.</p>
<p>When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.</p>
<p>Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.</p>
<p>By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
The maximum allowed size for a stored async search response can be set by changing the <code>search.max_async_search_response_size</code> cluster level setting.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
Expand Down
48 changes: 27 additions & 21 deletions elasticsearch/_async/client/autoscaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ async def delete_autoscaling_policy(
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Delete an autoscaling policy. NOTE: This feature is designed for indirect use
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
Direct use is not supported.
.. raw:: html
<p>Delete an autoscaling policy.</p>
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-delete-autoscaling-policy.html>`_
Expand Down Expand Up @@ -89,18 +91,18 @@ async def get_autoscaling_capacity(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get the autoscaling capacity. NOTE: This feature is designed for indirect use
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
Direct use is not supported. This API gets the current autoscaling capacity based
on the configured autoscaling policy. It will return information to size the
cluster appropriately to the current workload. The `required_capacity` is calculated
as the maximum of the `required_capacity` result of all individual deciders that
are enabled for the policy. The operator should verify that the `current_nodes`
match the operator’s knowledge of the cluster to avoid making autoscaling decisions
based on stale or incomplete information. The response contains decider-specific
information you can use to diagnose how and why autoscaling determined a certain
capacity was required. This information is provided for diagnosis only. Do not
use this information to make autoscaling decisions.
.. raw:: html
<p>Get the autoscaling capacity.</p>
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
<p>This API gets the current autoscaling capacity based on the configured autoscaling policy.
It will return information to size the cluster appropriately to the current workload.</p>
<p>The <code>required_capacity</code> is calculated as the maximum of the <code>required_capacity</code> result of all individual deciders that are enabled for the policy.</p>
<p>The operator should verify that the <code>current_nodes</code> match the operator’s knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information.</p>
<p>The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required.
This information is provided for diagnosis only.
Do not use this information to make autoscaling decisions.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
Expand Down Expand Up @@ -143,9 +145,11 @@ async def get_autoscaling_policy(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get an autoscaling policy. NOTE: This feature is designed for indirect use by
Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
Direct use is not supported.
.. raw:: html
<p>Get an autoscaling policy.</p>
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
Expand Down Expand Up @@ -196,9 +200,11 @@ async def put_autoscaling_policy(
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Create or update an autoscaling policy. NOTE: This feature is designed for indirect
use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on
Kubernetes. Direct use is not supported.
.. raw:: html
<p>Create or update an autoscaling policy.</p>
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-put-autoscaling-policy.html>`_
Expand Down
Loading

0 comments on commit d2f93eb

Please sign in to comment.