updateWorkflowRun method

Future<void> updateWorkflowRun({
  1. required WorkflowRunStatus status,
  2. required String workflowDefinitionName,
  3. required String workflowRunId,
})

Updates the configuration or state of an active workflow run.

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

Parameter status : The new status to set for the workflow run.

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

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

Implementation

Future<void> updateWorkflowRun({
  required WorkflowRunStatus status,
  required String workflowDefinitionName,
  required String workflowRunId,
}) async {
  final $payload = <String, dynamic>{
    'status': status.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/workflow-definitions/${Uri.encodeComponent(workflowDefinitionName)}/workflow-runs/${Uri.encodeComponent(workflowRunId)}',
    exceptionFnMap: _exceptionFns,
  );
}