listDurableExecutionsByFunction method
Returns a list of durable executions for a specified Lambda function. You can filter the results by execution name, status, and start time range. This API supports pagination for large result sets.
May throw InvalidParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceException.
May throw TooManyRequestsException.
Parameter functionName :
The name or ARN of the Lambda function. You can specify a function name, a
partial ARN, or a full ARN.
Parameter durableExecutionName :
Filter executions by name. Only executions with names that matches this
string are returned.
Parameter marker :
Pagination token from a previous request to continue retrieving results.
Parameter maxItems :
Maximum number of executions to return (1-1000). Default is 100.
Parameter qualifier :
The function version or alias. If not specified, lists executions for the
$LATEST version.
Parameter reverseOrder :
Set to true to return results in reverse chronological order (newest
first). Default is false.
Parameter startedAfter :
Filter executions that started after this timestamp (ISO 8601 format).
Parameter startedBefore :
Filter executions that started before this timestamp (ISO 8601 format).
Parameter statuses :
Filter executions by status. Valid values: RUNNING, SUCCEEDED, FAILED,
TIMED_OUT, STOPPED.
Implementation
Future<ListDurableExecutionsByFunctionResponse>
listDurableExecutionsByFunction({
required String functionName,
String? durableExecutionName,
String? marker,
int? maxItems,
String? qualifier,
bool? reverseOrder,
DateTime? startedAfter,
DateTime? startedBefore,
List<ExecutionStatus>? statuses,
}) async {
_s.validateNumRange(
'maxItems',
maxItems,
0,
1000,
);
final $query = <String, List<String>>{
if (durableExecutionName != null)
'DurableExecutionName': [durableExecutionName],
if (marker != null) 'Marker': [marker],
if (maxItems != null) 'MaxItems': [maxItems.toString()],
if (qualifier != null) 'Qualifier': [qualifier],
if (reverseOrder != null) 'ReverseOrder': [reverseOrder.toString()],
if (startedAfter != null)
'StartedAfter': [_s.iso8601ToJson(startedAfter).toString()],
if (startedBefore != null)
'StartedBefore': [_s.iso8601ToJson(startedBefore).toString()],
if (statuses != null) 'Statuses': statuses.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/2025-12-01/functions/${Uri.encodeComponent(functionName)}/durable-executions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDurableExecutionsByFunctionResponse.fromJson(response);
}