deleteIndex method

Future<DeleteIndexResponse> deleteIndex({
  1. required String domainName,
  2. required String indexName,
})

Deletes an OpenSearch index. This operation permanently removes the index and cannot be undone.

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 delete.

Implementation

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