Fix /cluster/stats in a backwards compatible way (#851)

* Ran nox -s generate.

Signed-off-by: dblock <[email protected]>

* Fix: backwards compatible parameter order in cluster stats.

Signed-off-by: dblock <[email protected]>

* Moved Updated APIs section to the correct set.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2024-11-25 14:54:03 -08:00
committed by GitHub
parent 12c379d32d
commit bf9add4eed
59 changed files with 9023 additions and 4389 deletions
+64 -43
View File
@@ -35,13 +35,15 @@ class TransformsClient(NamespacedClient):
:arg id: Transform to delete
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
@@ -68,13 +70,15 @@ class TransformsClient(NamespacedClient):
:arg id: Transform to explain
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
@@ -101,13 +105,15 @@ class TransformsClient(NamespacedClient):
:arg id: Transform to access
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
@@ -124,6 +130,7 @@ class TransformsClient(NamespacedClient):
@query_params("error_trace", "filter_path", "human", "pretty", "source")
def preview(
self,
body: Any = None,
params: Any = None,
headers: Any = None,
) -> Any:
@@ -132,18 +139,24 @@ class TransformsClient(NamespacedClient):
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
return self.transport.perform_request(
"GET", "/_plugins/_transform/_preview", params=params, headers=headers
"POST",
"/_plugins/_transform/_preview",
params=params,
headers=headers,
body=body,
)
@query_params(
@@ -163,23 +176,25 @@ class TransformsClient(NamespacedClient):
headers: Any = None,
) -> Any:
"""
Create an index transform, or update a transform if if_seq_no and
if_primary_term are provided.
Create an index transform, or update a transform if `if_seq_no` and
`if_primary_term` are provided.
:arg id: Transform to create/update
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg if_primary_term: Only perform the operation if the document
has this primary term.
:arg if_seq_no: Only perform the operation if the document has
this sequence number.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
@@ -216,14 +231,16 @@ class TransformsClient(NamespacedClient):
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg from_: The starting transform to return. Default is `0`.
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg search: The search term to use to filter results.
:arg size: Specifies the number of transforms to return. Default
is `10`.
@@ -254,13 +271,15 @@ class TransformsClient(NamespacedClient):
:arg id: Transform to start
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
@@ -287,13 +306,15 @@ class TransformsClient(NamespacedClient):
:arg id: Transform to stop
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a fields name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""