list method

Future<ListTransferRunsResponse> list (
  1. String parent,
  2. {int pageSize,
  3. List<String> states,
  4. String pageToken,
  5. String runAttempt,
  6. String $fields}
)

Returns information about running and completed jobs.

Request parameters:

parent - Required. Name of transfer configuration for which transfer runs should be retrieved. Format of transfer configuration resource name is: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}. Value must have pattern "^projects/^/+/transferConfigs/^/+$".

pageSize - Page size. The default page size is the maximum value of 1000 results.

states - When specified, only transfer runs with requested states are returned.

pageToken - Pagination token, which can be used to request a specific page of ListTransferRunsRequest list results. For multiple-page results, ListTransferRunsResponse outputs a next_page token, which can be used as the page_token value to request the next page of list results.

runAttempt - Indicates how run attempts are to be pulled. Possible string values are:

  • "RUN_ATTEMPT_UNSPECIFIED" : All runs should be returned.
  • "LATEST" : Only latest run per day should be returned.

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

Completes with a ListTransferRunsResponse.

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<ListTransferRunsResponse> list(core.String parent,
    {core.int pageSize,
    core.List<core.String> states,
    core.String pageToken,
    core.String runAttempt,
    core.String $fields}) {
  var _url;
  var _queryParams = new core.Map<core.String, core.List<core.String>>();
  var _uploadMedia;
  var _uploadOptions;
  var _downloadOptions = commons.DownloadOptions.Metadata;
  var _body;

  if (parent == null) {
    throw new core.ArgumentError("Parameter parent is required.");
  }
  if (pageSize != null) {
    _queryParams["pageSize"] = ["${pageSize}"];
  }
  if (states != null) {
    _queryParams["states"] = states;
  }
  if (pageToken != null) {
    _queryParams["pageToken"] = [pageToken];
  }
  if (runAttempt != null) {
    _queryParams["runAttempt"] = [runAttempt];
  }
  if ($fields != null) {
    _queryParams["fields"] = [$fields];
  }

  _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/runs';

  var _response = _requester.request(_url, "GET",
      body: _body,
      queryParams: _queryParams,
      uploadOptions: _uploadOptions,
      uploadMedia: _uploadMedia,
      downloadOptions: _downloadOptions);
  return _response
      .then((data) => new ListTransferRunsResponse.fromJson(data));
}