listPipelineExecutions method
Lists pipeline executions for a specific pipeline in a workspace. Supports filtering by state and time range. State can be combined with either startTime or endTime filters. Time range filters are grouped: use startTime filters (startTimeAfter, startTimeBefore) or endTime filters (endTimeAfter, endTimeBefore), but not both. Combining startTime and endTime filters returns an InvalidRequestException. Note: endTime filters only return executions in terminal states, as in-progress executions have no endTime.
May throw AccessDeniedException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter pipelineName :
The name of the pipeline.
Parameter workspaceName :
The name of the workspace.
Parameter endTimeAfter :
Inclusive lower bound on execution end time (ISO-8601). Only executions
with endTime >= endTimeAfter are returned. Cannot be combined with
startTimeAfter or startTimeBefore. Only matches executions in terminal
states.
Parameter endTimeBefore :
Exclusive upper bound on execution end time (ISO-8601). Only executions
with endTime < endTimeBefore are returned. Cannot be combined with
startTimeAfter or startTimeBefore. Only matches executions in terminal
states.
Parameter maxResults :
The maximum number of results to return per request. This is an upper
bound; the actual number of results may be less. Default: 50.
Parameter nextToken :
The token to be used for the next set of paginated results.
Parameter startTimeAfter :
Inclusive lower bound on execution start time (ISO-8601). Only executions
with startTime >= startTimeAfter are returned. Cannot be combined with
endTimeAfter or endTimeBefore.
Parameter startTimeBefore :
Exclusive upper bound on execution start time (ISO-8601). Only executions
with startTime < startTimeBefore are returned. Cannot be combined with
endTimeAfter or endTimeBefore.
Parameter state :
Filter by execution state. If not specified, executions in all states are
returned.
Implementation
Future<ListPipelineExecutionsResponse> listPipelineExecutions({
required String pipelineName,
required String workspaceName,
DateTime? endTimeAfter,
DateTime? endTimeBefore,
int? maxResults,
String? nextToken,
DateTime? startTimeAfter,
DateTime? startTimeBefore,
PipelineExecutionState? state,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
if (endTimeAfter != null)
'endTimeAfter': [_s.iso8601ToJson(endTimeAfter).toString()],
if (endTimeBefore != null)
'endTimeBefore': [_s.iso8601ToJson(endTimeBefore).toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (startTimeAfter != null)
'startTimeAfter': [_s.iso8601ToJson(startTimeAfter).toString()],
if (startTimeBefore != null)
'startTimeBefore': [_s.iso8601ToJson(startTimeBefore).toString()],
if (state != null) 'state': [state.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceName)}/pipelines/${Uri.encodeComponent(pipelineName)}/executions',
queryParams: $query,
hostPrefix: 'data.',
exceptionFnMap: _exceptionFns,
);
return ListPipelineExecutionsResponse.fromJson(response);
}