listJobs method

Future<ListJobsResponse> listJobs({
  1. String? dataSetId,
  2. int? maxResults,
  3. String? nextToken,
  4. String? revisionId,
})

This operation lists your jobs sorted by CreatedAt in descending order.

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

Parameter dataSetId : The unique identifier for a data set.

Parameter maxResults : The maximum number of results returned by a single call.

Parameter nextToken : The token value retrieved from a previous call to access the next page of results.

Parameter revisionId : The unique identifier for a revision.

Implementation

Future<ListJobsResponse> listJobs({
  String? dataSetId,
  int? maxResults,
  String? nextToken,
  String? revisionId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    25,
  );
  final $query = <String, List<String>>{
    if (dataSetId != null) 'dataSetId': [dataSetId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (revisionId != null) 'revisionId': [revisionId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/jobs',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListJobsResponse.fromJson(response);
}