listActionExecutions method

Future<ListActionExecutionsOutput> listActionExecutions({
  1. required String pipelineName,
  2. ActionExecutionFilter? filter,
  3. int? maxResults,
  4. String? nextToken,
})

Lists the action executions that have occurred in a pipeline.

May throw ValidationException. May throw PipelineNotFoundException. May throw InvalidNextTokenException. May throw PipelineExecutionNotFoundException.

Parameter pipelineName : The name of the pipeline for which you want to list action execution history.

Parameter filter : Input information used to filter action execution history.

Parameter maxResults : The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Action execution history is retained for up to 12 months, based on action execution start times. Default value is 100.

Parameter nextToken : The token that was returned from the previous ListActionExecutions call, which can be used to return the next set of action executions in the list.

Implementation

Future<ListActionExecutionsOutput> listActionExecutions({
  required String pipelineName,
  ActionExecutionFilter? filter,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(pipelineName, 'pipelineName');
  _s.validateStringLength(
    'pipelineName',
    pipelineName,
    1,
    100,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    2048,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.ListActionExecutions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'pipelineName': pipelineName,
      if (filter != null) 'filter': filter,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListActionExecutionsOutput.fromJson(jsonResponse.body);
}