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:
@@ -0,0 +1,171 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# The OpenSearch Contributors require contributions made to
|
||||
# this file be licensed under the Apache-2.0 license or a
|
||||
# compatible open source license.
|
||||
#
|
||||
# Modifications Copyright OpenSearch Contributors. See
|
||||
# GitHub history for details.
|
||||
|
||||
# ------------------------------------------------------------------------------------------
|
||||
# THIS CODE IS AUTOMATICALLY GENERATED AND MANUAL EDITS WILL BE LOST
|
||||
#
|
||||
# To contribute, kindly make modifications in the opensearch-py client generator
|
||||
# or in the OpenSearch API specification, and run `nox -rs generate`. See DEVELOPER_GUIDE.md
|
||||
# and https://github.com/opensearch-project/opensearch-api-specification for details.
|
||||
# -----------------------------------------------------------------------------------------+
|
||||
|
||||
|
||||
from typing import Any
|
||||
|
||||
from ..client.utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params
|
||||
|
||||
|
||||
class AsynchronousSearchClient(NamespacedClient):
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def delete(
|
||||
self,
|
||||
id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Delete asynchronous search.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if id in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'id'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"DELETE",
|
||||
_make_path("_plugins", "_asynchronous_search", id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def get(
|
||||
self,
|
||||
id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Get partial responses from asynchronous search.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if id in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'id'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"GET",
|
||||
_make_path("_plugins", "_asynchronous_search", id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params(
|
||||
"error_trace",
|
||||
"filter_path",
|
||||
"human",
|
||||
"index",
|
||||
"keep_alive",
|
||||
"keep_on_completion",
|
||||
"pretty",
|
||||
"source",
|
||||
"wait_for_completion_timeout",
|
||||
)
|
||||
async def search(
|
||||
self,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Perform an asynchronous search.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg index: The name of the index to be searched.
|
||||
:arg keep_alive: The amount of time that the result is saved in
|
||||
the cluster.
|
||||
:arg keep_on_completion: Whether you want to save the results in
|
||||
the cluster after the search is complete.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
:arg wait_for_completion_timeout: The amount of time that you
|
||||
plan to wait for the results.
|
||||
"""
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_plugins/_asynchronous_search",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def stats(
|
||||
self,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Monitoring of asynchronous searches that are running, completed, and/or
|
||||
persisted.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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 await self.transport.perform_request(
|
||||
"GET",
|
||||
"/_plugins/_asynchronous_search/stats",
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
@@ -0,0 +1,417 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# The OpenSearch Contributors require contributions made to
|
||||
# this file be licensed under the Apache-2.0 license or a
|
||||
# compatible open source license.
|
||||
#
|
||||
# Modifications Copyright OpenSearch Contributors. See
|
||||
# GitHub history for details.
|
||||
|
||||
# ------------------------------------------------------------------------------------------
|
||||
# THIS CODE IS AUTOMATICALLY GENERATED AND MANUAL EDITS WILL BE LOST
|
||||
#
|
||||
# To contribute, kindly make modifications in the opensearch-py client generator
|
||||
# or in the OpenSearch API specification, and run `nox -rs generate`. See DEVELOPER_GUIDE.md
|
||||
# and https://github.com/opensearch-project/opensearch-api-specification for details.
|
||||
# -----------------------------------------------------------------------------------------+
|
||||
|
||||
|
||||
from typing import Any
|
||||
|
||||
from ..client.utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params
|
||||
|
||||
|
||||
class FlowFrameworkClient(NamespacedClient):
|
||||
@query_params(
|
||||
"error_trace",
|
||||
"filter_path",
|
||||
"human",
|
||||
"pretty",
|
||||
"provision",
|
||||
"reprovision",
|
||||
"source",
|
||||
"update_fields",
|
||||
"use_case",
|
||||
"validation",
|
||||
)
|
||||
async def create(
|
||||
self,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Create a workflow.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
:arg use_case: To use a workflow template, specify it in the
|
||||
`use_case` query parameter when creating a workflow.
|
||||
"""
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_plugins/_flow_framework/workflow",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params(
|
||||
"clear_status", "error_trace", "filter_path", "human", "pretty", "source"
|
||||
)
|
||||
async def delete(
|
||||
self,
|
||||
workflow_id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Delete a workflow.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if workflow_id in SKIP_IN_PATH:
|
||||
raise ValueError(
|
||||
"Empty value passed for a required argument 'workflow_id'."
|
||||
)
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"DELETE",
|
||||
_make_path("_plugins", "_flow_framework", "workflow", workflow_id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params(
|
||||
"allow_delete", "error_trace", "filter_path", "human", "pretty", "source"
|
||||
)
|
||||
async def deprovision(
|
||||
self,
|
||||
workflow_id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Deprovision workflow's resources when you no longer need it.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if workflow_id in SKIP_IN_PATH:
|
||||
raise ValueError(
|
||||
"Empty value passed for a required argument 'workflow_id'."
|
||||
)
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path(
|
||||
"_plugins", "_flow_framework", "workflow", workflow_id, "_deprovision"
|
||||
),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def get(
|
||||
self,
|
||||
workflow_id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Get a workflow.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if workflow_id in SKIP_IN_PATH:
|
||||
raise ValueError(
|
||||
"Empty value passed for a required argument 'workflow_id'."
|
||||
)
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"GET",
|
||||
_make_path("_plugins", "_flow_framework", "workflow", workflow_id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("all", "error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def get_status(
|
||||
self,
|
||||
workflow_id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Get the provisioning deployment status until it is complete.
|
||||
|
||||
|
||||
:arg all: The all parameter specifies whether the response
|
||||
should return all fields. Default is false.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if workflow_id in SKIP_IN_PATH:
|
||||
raise ValueError(
|
||||
"Empty value passed for a required argument 'workflow_id'."
|
||||
)
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"GET",
|
||||
_make_path(
|
||||
"_plugins", "_flow_framework", "workflow", workflow_id, "_status"
|
||||
),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params(
|
||||
"error_trace", "filter_path", "human", "pretty", "source", "workflow_step"
|
||||
)
|
||||
async def get_steps(
|
||||
self,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Get a list of workflow steps.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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 await self.transport.perform_request(
|
||||
"GET",
|
||||
"/_plugins/_flow_framework/workflow/_steps",
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def provision(
|
||||
self,
|
||||
workflow_id: Any,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Provisioning a workflow. This API is also executed when the Create or Update
|
||||
Workflow API is called with the provision parameter set to true.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if workflow_id in SKIP_IN_PATH:
|
||||
raise ValueError(
|
||||
"Empty value passed for a required argument 'workflow_id'."
|
||||
)
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path(
|
||||
"_plugins", "_flow_framework", "workflow", workflow_id, "_provision"
|
||||
),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def search(
|
||||
self,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Search for workflows by using a query matching a field.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_plugins/_flow_framework/workflow/_search",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def search_state(
|
||||
self,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Search for workflows by using a query matching a field.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_plugins/_flow_framework/workflow/state/_search",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params(
|
||||
"error_trace",
|
||||
"filter_path",
|
||||
"human",
|
||||
"pretty",
|
||||
"provision",
|
||||
"reprovision",
|
||||
"source",
|
||||
"update_fields",
|
||||
"use_case",
|
||||
"validation",
|
||||
)
|
||||
async def update(
|
||||
self,
|
||||
workflow_id: Any,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Update a workflow. You can only update a complete workflow if it has not yet
|
||||
been provisioned.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
:arg use_case: To use a workflow template, specify it in the
|
||||
`use_case` query parameter when creating a workflow.
|
||||
"""
|
||||
if workflow_id in SKIP_IN_PATH:
|
||||
raise ValueError(
|
||||
"Empty value passed for a required argument 'workflow_id'."
|
||||
)
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"PUT",
|
||||
_make_path("_plugins", "_flow_framework", "workflow", workflow_id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
@@ -35,13 +35,15 @@ class KnnClient(NamespacedClient):
|
||||
|
||||
:arg model_id: The id of the model.
|
||||
: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 field’s 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 KnnClient(NamespacedClient):
|
||||
|
||||
:arg model_id: The id of the model.
|
||||
: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 field’s 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.
|
||||
"""
|
||||
@@ -147,15 +151,15 @@ class KnnClient(NamespacedClient):
|
||||
Use an OpenSearch query to search for models in the index.
|
||||
|
||||
|
||||
:arg _source: True or false to return the _source field or not,
|
||||
or a list of fields to return.
|
||||
:arg _source: Set to `true` or `false` to return the `_source`
|
||||
field or not, or a list of fields to return.
|
||||
:arg _source_excludes: List of fields to exclude from the
|
||||
returned _source field.
|
||||
returned `_source` field.
|
||||
:arg _source_includes: List of fields to extract and return from
|
||||
the _source field.
|
||||
:arg allow_no_indices: Whether to ignore if a wildcard indices
|
||||
expression resolves into no concrete indices. (This includes `_all`
|
||||
string or when no indices have been specified).
|
||||
the `_source` field.
|
||||
:arg allow_no_indices: Whether to ignore if a wildcard indexes
|
||||
expression resolves into no concrete indexes. (This includes `_all`
|
||||
string or when no indexes have been specified).
|
||||
:arg allow_partial_search_results: Indicate if an error should
|
||||
be returned if there is a partial search failure or timeout. Default is
|
||||
True.
|
||||
@@ -177,20 +181,21 @@ class KnnClient(NamespacedClient):
|
||||
:arg docvalue_fields: Comma-separated list of fields to return
|
||||
as the docvalue representation of a field for each hit.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
errors.
|
||||
errors. Default is false.
|
||||
:arg expand_wildcards: Whether to expand wildcard expression to
|
||||
concrete indices that are open, closed or both. Valid choices are all,
|
||||
closed, hidden, none, open.
|
||||
concrete indexes that are open, closed or both.
|
||||
:arg explain: Specify whether to return detailed information
|
||||
about score computation as part of a hit.
|
||||
:arg filter_path: Comma-separated list of filters used to reduce
|
||||
the response.
|
||||
: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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg from_: Starting offset. Default is 0.
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics.
|
||||
statistics. Default is True.
|
||||
:arg ignore_throttled: Whether specified concrete, expanded or
|
||||
aliased indices should be ignored when throttled.
|
||||
:arg ignore_unavailable: Whether specified concrete indices
|
||||
aliased indexes should be ignored when throttled.
|
||||
:arg ignore_unavailable: Whether specified concrete indexes
|
||||
should be ignored when unavailable (missing or closed).
|
||||
:arg lenient: Specify whether format-based query failures (such
|
||||
as providing text to a numeric field) should be ignored.
|
||||
@@ -203,18 +208,18 @@ class KnnClient(NamespacedClient):
|
||||
number of shards the search request expands to exceeds the threshold.
|
||||
This filter round-trip can limit the number of shards significantly if
|
||||
for instance a shard can not match any documents based on its rewrite
|
||||
method ie. if date filters are mandatory to match but the shard bounds
|
||||
and the query are disjoint.
|
||||
method, that is if date filters are mandatory to match but the shard
|
||||
bounds and the query are disjoint.
|
||||
:arg preference: Specify the node or shard the operation should
|
||||
be performed on. Default is random.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
response.
|
||||
response. Default is false.
|
||||
:arg q: Query in the Lucene query string syntax.
|
||||
:arg request_cache: Specify if request cache should be used for
|
||||
this request or not, defaults to index level setting.
|
||||
:arg rest_total_hits_as_int: Indicates whether hits.total should
|
||||
be rendered as an integer or an object in the rest search response.
|
||||
Default is false.
|
||||
:arg rest_total_hits_as_int: Indicates whether `hits.total`
|
||||
should be rendered as an integer or an object in the rest search
|
||||
response. Default is false.
|
||||
:arg routing: Comma-separated list of specific routing values.
|
||||
:arg scroll: Specify how long a consistent view of the index
|
||||
should be maintained for scrolled search.
|
||||
@@ -280,13 +285,15 @@ class KnnClient(NamespacedClient):
|
||||
:arg stat: Comma-separated list of stats to retrieve; use `_all`
|
||||
or empty string to retrieve all stats.
|
||||
: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 field’s 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.
|
||||
:arg timeout: Operation timeout.
|
||||
@@ -315,14 +322,16 @@ class KnnClient(NamespacedClient):
|
||||
|
||||
:arg model_id: The id of the model.
|
||||
: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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics.
|
||||
statistics. Default is True.
|
||||
:arg preference: Preferred node to execute training.
|
||||
: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.
|
||||
"""
|
||||
@@ -349,16 +358,18 @@ class KnnClient(NamespacedClient):
|
||||
specified indexes.
|
||||
|
||||
|
||||
:arg index: Comma-separated list of indices; use `_all` or empty
|
||||
string to perform the operation on all indices.
|
||||
:arg index: Comma-separated list of indexes; use `_all` or empty
|
||||
string to perform the operation on all indexes.
|
||||
: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 field’s 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.
|
||||
"""
|
||||
|
||||
@@ -34,13 +34,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -66,13 +68,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -100,13 +104,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -134,13 +140,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -166,13 +174,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -196,13 +206,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -226,13 +238,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -256,13 +270,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -288,13 +304,15 @@ class MlClient(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 field’s 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.
|
||||
"""
|
||||
@@ -307,3 +325,171 @@ class MlClient(NamespacedClient):
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def create_connector(
|
||||
self,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Creates a standalone connector.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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 await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_plugins/_ml/connectors/_create",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def delete_agent(
|
||||
self,
|
||||
agent_id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Delete an agent.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if agent_id in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'agent_id'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"DELETE",
|
||||
_make_path("_plugins", "_ml", "agents", agent_id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def delete_connector(
|
||||
self,
|
||||
connector_id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Deletes a standalone connector.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if connector_id in SKIP_IN_PATH:
|
||||
raise ValueError(
|
||||
"Empty value passed for a required argument 'connector_id'."
|
||||
)
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"DELETE",
|
||||
_make_path("_plugins", "_ml", "connectors", connector_id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def delete_task(
|
||||
self,
|
||||
task_id: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Deletes a task.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if task_id in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'task_id'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"DELETE",
|
||||
_make_path("_plugins", "_ml", "tasks", task_id),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def register_agents(
|
||||
self,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Register an agent.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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 await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_plugins/_ml/agents/_register",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@@ -34,13 +34,15 @@ class NotificationsClient(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 field’s 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 NotificationsClient(NamespacedClient):
|
||||
|
||||
:arg config_id: The ID of the channel configuration 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 field’s 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.
|
||||
"""
|
||||
@@ -110,13 +114,15 @@ class NotificationsClient(NamespacedClient):
|
||||
:arg config_id_list: A comma-separated list of channel IDs 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 field’s 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.
|
||||
"""
|
||||
@@ -136,13 +142,15 @@ class NotificationsClient(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 field’s 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.
|
||||
"""
|
||||
@@ -159,6 +167,8 @@ class NotificationsClient(NamespacedClient):
|
||||
@query_params(
|
||||
"chime.url",
|
||||
"chime.url.keyword",
|
||||
"config_id",
|
||||
"config_id_list",
|
||||
"config_type",
|
||||
"created_time_ms",
|
||||
"description",
|
||||
@@ -211,17 +221,21 @@ class NotificationsClient(NamespacedClient):
|
||||
Get multiple channel configurations with filtering.
|
||||
|
||||
|
||||
:arg config_id: Notification configuration ID.
|
||||
:arg config_id_list: Notification configuration IDs.
|
||||
:arg config_type: Type of notification configuration. Valid
|
||||
choices are chime, email, email_group, microsoft_teams, ses_account,
|
||||
slack, smtp_account, sns, webhook.
|
||||
: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 field’s 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.
|
||||
"""
|
||||
@@ -244,13 +258,15 @@ class NotificationsClient(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 field’s 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.
|
||||
"""
|
||||
@@ -270,13 +286,15 @@ class NotificationsClient(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 field’s 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.
|
||||
"""
|
||||
@@ -303,13 +321,15 @@ class NotificationsClient(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 field’s 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.
|
||||
"""
|
||||
@@ -336,13 +356,15 @@ class NotificationsClient(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 field’s 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.
|
||||
"""
|
||||
|
||||
@@ -34,13 +34,15 @@ class ObservabilityClient(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 field’s 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.
|
||||
"""
|
||||
@@ -65,13 +67,15 @@ class ObservabilityClient(NamespacedClient):
|
||||
|
||||
:arg object_id: The ID of the Observability Object.
|
||||
: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 field’s 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.
|
||||
"""
|
||||
@@ -104,17 +108,19 @@ class ObservabilityClient(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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics.
|
||||
statistics. Default is True.
|
||||
:arg objectId: The ID of a single Observability Object to
|
||||
delete.
|
||||
:arg objectIdList: A comma-separated list of Observability
|
||||
Object IDs to delete.
|
||||
: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.
|
||||
"""
|
||||
@@ -133,13 +139,15 @@ class ObservabilityClient(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 field’s 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.
|
||||
"""
|
||||
@@ -163,13 +171,15 @@ class ObservabilityClient(NamespacedClient):
|
||||
|
||||
:arg object_id: The ID of the Observability Object.
|
||||
: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 field’s 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.
|
||||
"""
|
||||
@@ -194,13 +204,15 @@ class ObservabilityClient(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 field’s 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.
|
||||
"""
|
||||
@@ -222,13 +234,15 @@ class ObservabilityClient(NamespacedClient):
|
||||
|
||||
:arg object_id: The ID of the Observability Object.
|
||||
: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 field’s 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.
|
||||
"""
|
||||
|
||||
@@ -36,15 +36,17 @@ class PplClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results. Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
@@ -70,15 +72,17 @@ class PplClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results. Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
@@ -103,15 +107,17 @@ class PplClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results. Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
@@ -138,15 +144,17 @@ class PplClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results. Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
|
||||
@@ -35,13 +35,15 @@ class QueryClient(NamespacedClient):
|
||||
|
||||
:arg datasource_name: The Name of the DataSource 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 field’s 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.
|
||||
"""
|
||||
@@ -70,13 +72,15 @@ class QueryClient(NamespacedClient):
|
||||
|
||||
:arg datasource_name: The Name of the DataSource to retrieve.
|
||||
: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 field’s 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.
|
||||
"""
|
||||
@@ -104,13 +108,15 @@ class QueryClient(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 field’s 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.
|
||||
"""
|
||||
@@ -133,13 +139,15 @@ class QueryClient(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 field’s 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.
|
||||
"""
|
||||
@@ -159,13 +167,15 @@ class QueryClient(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 field’s 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.
|
||||
"""
|
||||
|
||||
@@ -0,0 +1,413 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# The OpenSearch Contributors require contributions made to
|
||||
# this file be licensed under the Apache-2.0 license or a
|
||||
# compatible open source license.
|
||||
#
|
||||
# Modifications Copyright OpenSearch Contributors. See
|
||||
# GitHub history for details.
|
||||
|
||||
# ------------------------------------------------------------------------------------------
|
||||
# THIS CODE IS AUTOMATICALLY GENERATED AND MANUAL EDITS WILL BE LOST
|
||||
#
|
||||
# To contribute, kindly make modifications in the opensearch-py client generator
|
||||
# or in the OpenSearch API specification, and run `nox -rs generate`. See DEVELOPER_GUIDE.md
|
||||
# and https://github.com/opensearch-project/opensearch-api-specification for details.
|
||||
# -----------------------------------------------------------------------------------------+
|
||||
|
||||
|
||||
from typing import Any
|
||||
|
||||
from ..client.utils import SKIP_IN_PATH, NamespacedClient, _make_path, query_params
|
||||
|
||||
|
||||
class ReplicationClient(NamespacedClient):
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def autofollow_stats(
|
||||
self,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Gets information about auto-follow activity and any replication rules
|
||||
configured on the specified cluster.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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 await self.transport.perform_request(
|
||||
"GET",
|
||||
"/_plugins/_replication/autofollow_stats",
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def create_replication_rule(
|
||||
self,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Automatically starts replication on indexes matching a specified pattern.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_plugins/_replication/_autofollow",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def delete_replication_rule(
|
||||
self,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Deletes the specified replication rule.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"DELETE",
|
||||
"/_plugins/_replication/_autofollow",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def follower_stats(
|
||||
self,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Gets information about follower (syncing) indexes on a specified cluster.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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 await self.transport.perform_request(
|
||||
"GET",
|
||||
"/_plugins/_replication/follower_stats",
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def leader_stats(
|
||||
self,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Gets information about replicated leader indexes on a specified cluster.
|
||||
|
||||
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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 await self.transport.perform_request(
|
||||
"GET", "/_plugins/_replication/leader_stats", params=params, headers=headers
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def pause(
|
||||
self,
|
||||
index: Any,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Pauses replication of the leader index.
|
||||
|
||||
|
||||
:arg index: Name of the data stream, index, or index alias to
|
||||
perform bulk actions on.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
for param in (index, body):
|
||||
if param in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path("_plugins", "_replication", index, "_pause"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def resume(
|
||||
self,
|
||||
index: Any,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Resumes replication of the leader index.
|
||||
|
||||
|
||||
:arg index: Name of the data stream, index, or index alias to
|
||||
perform bulk actions on.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
for param in (index, body):
|
||||
if param in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path("_plugins", "_replication", index, "_resume"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def start(
|
||||
self,
|
||||
index: Any,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Initiate replication of an index from the leader cluster to the follower
|
||||
cluster.
|
||||
|
||||
|
||||
:arg index: Name of the data stream, index, or index alias to
|
||||
perform bulk actions on.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
for param in (index, body):
|
||||
if param in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"PUT",
|
||||
_make_path("_plugins", "_replication", index, "_start"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def status(
|
||||
self,
|
||||
index: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Gets the status of index replication.
|
||||
|
||||
|
||||
:arg index: Name of the data stream, index, or index alias to
|
||||
perform bulk actions on.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
if index in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'index'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"GET",
|
||||
_make_path("_plugins", "_replication", index, "_status"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def stop(
|
||||
self,
|
||||
index: Any,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Terminates replication and converts the follower index to a standard index.
|
||||
|
||||
|
||||
:arg index: Name of the data stream, index, or index alias to
|
||||
perform bulk actions on.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
for param in (index, body):
|
||||
if param in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path("_plugins", "_replication", index, "_stop"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params("error_trace", "filter_path", "human", "pretty", "source")
|
||||
async def update_settings(
|
||||
self,
|
||||
index: Any,
|
||||
body: Any,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
"""
|
||||
Updates settings on the follower index.
|
||||
|
||||
|
||||
:arg index: Name of the data stream, index, or index alias to
|
||||
perform bulk actions on.
|
||||
:arg error_trace: Whether to include the stack trace of returned
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg human: Whether to return human readable values for
|
||||
statistics. Default is True.
|
||||
:arg pretty: Whether to pretty format the returned JSON
|
||||
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.
|
||||
"""
|
||||
for param in (index, body):
|
||||
if param in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"PUT",
|
||||
_make_path("_plugins", "_replication", index, "_update"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
@@ -35,13 +35,15 @@ class RollupsClient(NamespacedClient):
|
||||
|
||||
:arg id: Rollup 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 field’s 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 RollupsClient(NamespacedClient):
|
||||
|
||||
:arg id: Rollup 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 field’s 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 RollupsClient(NamespacedClient):
|
||||
|
||||
:arg id: Rollup 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 field’s 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.
|
||||
"""
|
||||
@@ -143,17 +149,19 @@ class RollupsClient(NamespacedClient):
|
||||
|
||||
:arg id: Rollup 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 field’s 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.
|
||||
"""
|
||||
@@ -181,13 +189,15 @@ class RollupsClient(NamespacedClient):
|
||||
|
||||
:arg id: Rollup 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 field’s 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.
|
||||
"""
|
||||
@@ -214,13 +224,15 @@ class RollupsClient(NamespacedClient):
|
||||
|
||||
:arg id: Rollup 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 field’s 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.
|
||||
"""
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
from typing import Any
|
||||
|
||||
from ..client.utils import SKIP_IN_PATH, NamespacedClient, query_params
|
||||
from ..client.utils import NamespacedClient, query_params
|
||||
|
||||
|
||||
class SqlClient(NamespacedClient):
|
||||
@@ -27,7 +27,7 @@ class SqlClient(NamespacedClient):
|
||||
)
|
||||
async def close(
|
||||
self,
|
||||
body: Any,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
@@ -36,23 +36,22 @@ class SqlClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
libraries that do not accept a request body for non-POST requests.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST", "/_plugins/_sql/close", params=params, headers=headers, body=body
|
||||
)
|
||||
@@ -62,7 +61,7 @@ class SqlClient(NamespacedClient):
|
||||
)
|
||||
async def explain(
|
||||
self,
|
||||
body: Any,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
@@ -71,23 +70,22 @@ class SqlClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
libraries that do not accept a request body for non-POST requests.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST", "/_plugins/_sql/_explain", params=params, headers=headers, body=body
|
||||
)
|
||||
@@ -105,15 +103,17 @@ class SqlClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
@@ -128,7 +128,7 @@ class SqlClient(NamespacedClient):
|
||||
)
|
||||
async def post_stats(
|
||||
self,
|
||||
body: Any,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
@@ -138,23 +138,22 @@ class SqlClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
libraries that do not accept a request body for non-POST requests.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST", "/_plugins/_sql/stats", params=params, headers=headers, body=body
|
||||
)
|
||||
@@ -164,7 +163,7 @@ class SqlClient(NamespacedClient):
|
||||
)
|
||||
async def query(
|
||||
self,
|
||||
body: Any,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
@@ -173,23 +172,22 @@ class SqlClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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 sanitize: Specifies whether to escape special characters in
|
||||
the results Default is True.
|
||||
:arg source: The URL-encoded request definition. Useful for
|
||||
libraries that do not accept a request body for non-POST requests.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST", "/_plugins/_sql", params=params, headers=headers, body=body
|
||||
)
|
||||
@@ -197,7 +195,7 @@ class SqlClient(NamespacedClient):
|
||||
@query_params("error_trace", "filter_path", "format", "human", "pretty", "source")
|
||||
async def settings(
|
||||
self,
|
||||
body: Any,
|
||||
body: Any = None,
|
||||
params: Any = None,
|
||||
headers: Any = None,
|
||||
) -> Any:
|
||||
@@ -206,21 +204,20 @@ class SqlClient(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.
|
||||
:arg format: A short version of the Accept header, e.g. json,
|
||||
yaml.
|
||||
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 field’s name. You can also exclude fields
|
||||
with "-".
|
||||
:arg format: A short version of the Accept header (for example,
|
||||
`json`, `yaml`).
|
||||
: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.
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"PUT",
|
||||
"/_plugins/_query/settings",
|
||||
|
||||
@@ -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 field’s 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 field’s 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 field’s 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")
|
||||
async 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 field’s 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 await 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 field’s 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 field’s 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 field’s 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 field’s 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.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user