deleteDataset method

Future<DeleteDatasetResponse> deleteDataset({
  1. required String datasetId,
  2. String? datasetVersion,
})

Deletes a dataset version or an entire dataset asynchronously. If datasetVersion is absent, deletes all versions and the dataset record itself. If provided, deletes only that specific version.

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

Parameter datasetId : The unique identifier of the dataset to delete.

Parameter datasetVersion : Optional version to delete. If absent, deletes the entire dataset. If provided, deletes only that specific version.

Implementation

Future<DeleteDatasetResponse> deleteDataset({
  required String datasetId,
  String? datasetVersion,
}) async {
  final $query = <String, List<String>>{
    if (datasetVersion != null) 'datasetVersion': [datasetVersion],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/datasets/${Uri.encodeComponent(datasetId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteDatasetResponse.fromJson(response);
}