getIndex method

Future<GetIndexResponse> getIndex({
  1. required String domainName,
  2. required String indexName,
})

Retrieves information about an OpenSearch index including its schema and semantic enrichment configuration. Use this operation to view the current index structure and semantic search settings.

May throw AccessDeniedException. May throw DependencyFailureException. May throw DisabledOperationException. May throw InternalException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter indexName : The name of the index to retrieve information about.

Implementation

Future<GetIndexResponse> getIndex({
  required String domainName,
  required String indexName,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}/index/${Uri.encodeComponent(indexName)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetIndexResponse.fromJson(response);
}