listJobsByPipeline method

Future<ListJobsByPipelineResponse> listJobsByPipeline({
  1. required String pipelineId,
  2. String? ascending,
  3. String? pageToken,
})

The ListJobsByPipeline operation gets a list of the jobs currently in a pipeline.

Elastic Transcoder returns all of the jobs currently in the specified pipeline. The response body contains one element for each job that satisfies the search criteria.

May throw ValidationException. May throw IncompatibleVersionException. May throw ResourceNotFoundException. May throw AccessDeniedException. May throw InternalServiceException.

Parameter pipelineId : The ID of the pipeline for which you want to get job information.

Parameter ascending : To list jobs in chronological order by the date and time that they were submitted, enter true. To list jobs in reverse chronological order, enter false.

Parameter pageToken : When Elastic Transcoder returns more than one page of results, use pageToken in subsequent GET requests to get each successive page of results.

Implementation

Future<ListJobsByPipelineResponse> listJobsByPipeline({
  required String pipelineId,
  String? ascending,
  String? pageToken,
}) async {
  ArgumentError.checkNotNull(pipelineId, 'pipelineId');
  final $query = <String, List<String>>{
    if (ascending != null) 'Ascending': [ascending],
    if (pageToken != null) 'PageToken': [pageToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2012-09-25/jobsByPipeline/${Uri.encodeComponent(pipelineId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListJobsByPipelineResponse.fromJson(response);
}