Updated opensearch-py to reflect the latest OpenSearch API spec (2024-04-24) (#734)

Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
This commit is contained in:
opensearch-trigger-bot[bot]
2024-04-23 22:35:59 -07:00
committed by GitHub
co-authored by saimedhi
parent fd48eb450a
commit 303b6c6f64
3 changed files with 51 additions and 0 deletions
+25
View File
@@ -324,3 +324,28 @@ class NotificationsClient(NamespacedClient):
headers=headers,
body=body,
)
@query_params("error_trace", "filter_path", "human", "pretty", "source")
def list_channels(
self,
params: Any = None,
headers: Any = None,
) -> Any:
"""
List created notification channels.
: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 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 self.transport.perform_request(
"GET", "/_plugins/_notifications/channels", params=params, headers=headers
)