list method

Future<GoogleCloudMlV1ListJobsResponse> list(
  1. String parent, {
  2. String? filter,
  3. int? pageSize,
  4. String? pageToken,
  5. String? $fields,
})

Lists the jobs in the project.

If there are no jobs that match the request parameters, the list request returns an empty response body: {}.

Request parameters:

parent - Required. The name of the project for which to list jobs. Value must have pattern ^projects/\[^/\]+$.

filter - Optional. Specifies the subset of jobs to retrieve. You can filter on the value of one or more attributes of the job object. For example, retrieve jobs with a job identifier that starts with 'census': gcloud ai-platform jobs list --filter='jobId:census*' List all failed jobs with names that start with 'rnn': gcloud ai-platform jobs list --filter='jobId:rnn* AND state:FAILED' For more examples, see the guide to monitoring jobs.

pageSize - Optional. The number of jobs to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the next_page_token field. The default value is 20, and the maximum page size is 100.

pageToken - Optional. A page token to request the next page of results. You get the token from the next_page_token field of the response from the previous call.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleCloudMlV1ListJobsResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GoogleCloudMlV1ListJobsResponse> list(
  core.String parent, {
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/jobs';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GoogleCloudMlV1ListJobsResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}