Files
opensearch-pyd/opensearchpy/_async/client/remote_store.py
T

50 lines
1.7 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2023-10-26 07:59:07 -07:00
# 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.
2023-11-06 13:08:19 -05:00
2023-10-26 07:59:07 -07:00
# ----------------------------------------------------
# THIS CODE IS GENERATED AND MANUAL EDITS WILL BE LOST.
#
# To contribute, kindly make essential modifications through either the "opensearch-py client generator":
# https://github.com/opensearch-project/opensearch-py/blob/main/utils/generate-api.py
# or the "OpenSearch API specification" available at:
# https://github.com/opensearch-project/opensearch-api-specification/blob/main/OpenSearch.openapi.json
# -----------------------------------------------------
2023-11-06 13:08:19 -05:00
from typing import Any
2023-10-26 07:59:07 -07:00
from .utils import SKIP_IN_PATH, NamespacedClient, query_params
class RemoteStoreClient(NamespacedClient):
@query_params("cluster_manager_timeout", "wait_for_completion")
2023-11-06 13:08:19 -05:00
async def restore(
self,
body: Any,
params: Any = None,
headers: Any = None,
) -> Any:
2023-10-26 07:59:07 -07:00
"""
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.
2023-10-26 07:59:07 -07:00
"""
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
)