deleteTask method
Deletes a task from the specified workspace. A task cannot be deleted if it is currently referenced by any existing pipeline. Remove the task from all pipelines before attempting to delete it.
May throw AccessDeniedException.
May throw ConflictingOperationException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter taskName :
The name of the task to delete.
Parameter workspaceName :
The name of the workspace.
Implementation
Future<DeleteTaskResponse> deleteTask({
required String taskName,
required String workspaceName,
}) async {
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceName)}/tasks/${Uri.encodeComponent(taskName)}',
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return DeleteTaskResponse.fromJson(response);
}