deleteWorkflowRun method

Future<DeleteWorkflowRunResponse> deleteWorkflowRun({
  1. required String workflowDefinitionName,
  2. required String workflowRunId,
})

Terminates and cleans up a workflow run, stopping all associated acts and sessions.

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

Parameter workflowDefinitionName : The name of the workflow definition containing the workflow run.

Parameter workflowRunId : The unique identifier of the workflow run to delete.

Implementation

Future<DeleteWorkflowRunResponse> deleteWorkflowRun({
  required String workflowDefinitionName,
  required String workflowRunId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/workflow-definitions/${Uri.encodeComponent(workflowDefinitionName)}/workflow-runs/${Uri.encodeComponent(workflowRunId)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteWorkflowRunResponse.fromJson(response);
}