deleteDataSource method

Future<DeleteDataSourceResponse> deleteDataSource({
  1. required String dataSourceId,
  2. required String knowledgeBaseId,
})

Deletes a data source from a knowledge base.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter dataSourceId : The unique identifier of the data source to delete.

Parameter knowledgeBaseId : The unique identifier of the knowledge base from which to delete the data source.

Implementation

Future<DeleteDataSourceResponse> deleteDataSource({
  required String dataSourceId,
  required String knowledgeBaseId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/knowledgebases/${Uri.encodeComponent(knowledgeBaseId)}/datasources/${Uri.encodeComponent(dataSourceId)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteDataSourceResponse.fromJson(response);
}