6f26eb3e8e
* remove unnecessary utf-8 header in .py files Signed-off-by: samuel orji <awesomeorji@gmail.com> * review feedback: add link to changelog Signed-off-by: samuel orji <awesomeorji@gmail.com> --------- Signed-off-by: samuel orji <awesomeorji@gmail.com>
48 lines
1.7 KiB
Python
48 lines
1.7 KiB
Python
# 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 SKIP_IN_PATH, NamespacedClient, query_params
|
|
|
|
|
|
class RemoteStoreClient(NamespacedClient):
|
|
@query_params("cluster_manager_timeout", "wait_for_completion")
|
|
async def restore(
|
|
self,
|
|
body: Any,
|
|
params: Any = None,
|
|
headers: Any = None,
|
|
) -> Any:
|
|
"""
|
|
Restores from remote store.
|
|
|
|
|
|
:arg body: Comma-separated list of index IDs
|
|
:arg cluster_manager_timeout: Operation timeout for connection
|
|
to cluster-manager node.
|
|
:arg wait_for_completion: Should this request wait until the
|
|
operation has completed before returning. Default is false.
|
|
"""
|
|
if body in SKIP_IN_PATH:
|
|
raise ValueError("Empty value passed for a required argument 'body'.")
|
|
|
|
return await self.transport.perform_request(
|
|
"POST", "/_remotestore/_restore", params=params, headers=headers, body=body
|
|
)
|