listFlowExecutionEvents method

Future<ListFlowExecutionEventsResponse> listFlowExecutionEvents({
  1. required FlowExecutionEventType eventType,
  2. required String executionIdentifier,
  3. required String flowAliasIdentifier,
  4. required String flowIdentifier,
  5. int? maxResults,
  6. String? nextToken,
})

Lists events that occurred during a flow execution. Events provide detailed information about the execution progress, including node inputs and outputs, flow inputs and outputs, condition results, and failure events.

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

Parameter eventType : The type of events to retrieve. Specify Node for node-level events or Flow for flow-level events.

Parameter executionIdentifier : The unique identifier of the flow execution.

Parameter flowAliasIdentifier : The unique identifier of the flow alias used for the execution.

Parameter flowIdentifier : The unique identifier of the flow.

Parameter maxResults : The maximum number of events to return in a single response. If more events exist than the specified maxResults value, a token is included in the response so that the remaining results can be retrieved.

Parameter nextToken : A token to retrieve the next set of results. This value is returned in the response if more results are available.

Implementation

Future<ListFlowExecutionEventsResponse> listFlowExecutionEvents({
  required FlowExecutionEventType eventType,
  required String executionIdentifier,
  required String flowAliasIdentifier,
  required String flowIdentifier,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    'eventType': [eventType.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/flows/${Uri.encodeComponent(flowIdentifier)}/aliases/${Uri.encodeComponent(flowAliasIdentifier)}/executions/${Uri.encodeComponent(executionIdentifier)}/events',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListFlowExecutionEventsResponse.fromJson(response);
}