-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated opensearch-py to reflect the latest OpenSearch API spec (2024…
…-10-26) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6fa54a7
commit 6d71623
Showing
51 changed files
with
4,327 additions
and
1,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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 .utils import NamespacedClient, query_params | ||
|
||
|
||
class InsightsClient(NamespacedClient): | ||
@query_params("error_trace", "filter_path", "human", "pretty", "source") | ||
async def top_queries( | ||
self, | ||
params: Any = None, | ||
headers: Any = None, | ||
) -> Any: | ||
""" | ||
Retrieves the top queries based on the given metric type (latency, CPU, or | ||
memory). | ||
:arg error_trace: Whether to include the stack trace of returned | ||
errors. | ||
: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. | ||
:arg pretty: Whether to pretty format the returned JSON | ||
response. | ||
: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", "/_insights/top_queries", params=params, headers=headers | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.