Retrieves information about an index in an OpenSearch Serverless collection, including its schema definition. The index might be configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment.
Parameters:
-
id
(CollectionId)
–
The unique identifier of the collection containing the index.
-
index_name
(IndexName)
–
The name of the index to retrieve information about.
Raises:
Source code in docs_src/capo_opensearchserverless/_services/open_search_serverless.py
| def get_index(
self,
id: "capo_opensearchserverless.types.collection_id.CollectionId",
index_name: "capo_opensearchserverless.types.index_name.IndexName",
*,
config_overrides: Optional[OpenSearchServerlessClientConfig] = None,
) -> "capo_opensearchserverless.types.get_index_response.GetIndexResponse":
"""<p>Retrieves information about an index in an OpenSearch Serverless collection, including its schema definition. The index might be configured to conduct automatic semantic enrichment ingestion and search. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-manage.html#serverless-semantic-enrichment">About automatic semantic enrichment</a>.</p>
Args:
id: <p>The unique identifier of the collection containing the index.</p>
index_name: <p>The name of the index to retrieve information about.</p>
Raises:
capo_opensearchserverless.errors.internal_server_exception.InternalServerException: <p>Thrown when an error internal to the service occurs while processing a request.</p>
capo_opensearchserverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when accessing or deleting a resource that does not exist.</p>
capo_opensearchserverless.errors.validation_exception.ValidationException: <p>Thrown when the HTTP request contains invalid input or is missing required input.</p>
capo_opensearchserverless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_opensearchserverless.types.get_index_request.GetIndexRequest]",
) -> OperationResponse[
"capo_opensearchserverless.types.get_index_response.GetIndexResponse"
]:
import capo_opensearchserverless._operations.open_search_serverless.get_index
output, http_response = (
capo_opensearchserverless._operations.open_search_serverless.get_index.get_index(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetIndex")
)
input_: capo_opensearchserverless.types.get_index_request.GetIndexRequest = {
"id": id,
"index_name": index_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|