listJobs method

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

Lists all of the DataBrew jobs that are defined.

May throw ValidationException.

Parameter datasetName : The name of a dataset. Using this parameter indicates to return only those jobs that act on the specified dataset.

Parameter maxResults : The maximum number of results to return in this request.

Parameter nextToken : A token generated by DataBrew that specifies where to continue pagination if a previous request was truncated. To get the next set of pages, pass in the NextToken value from the response object of the previous page call.

Parameter projectName : The name of a project. Using this parameter indicates to return only those jobs that are associated with the specified project.

Implementation

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