searchBackgroundJobs method
Searches/lists the background jobs for a specific conversion workspace.
The background jobs are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are a way to expose the data plane jobs log.
Request parameters:
conversionWorkspace
- Required. Name of the conversion workspace
resource whose jobs are listed, in the form of:
projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/conversionWorkspaces/\[^/\]+$
.
completedUntilTime
- Optional. If provided, only returns jobs that
completed until (not including) the given timestamp.
maxSize
- Optional. The maximum number of jobs to return. The service
may return fewer than this value. If unspecified, at most 100 jobs are
returned. The maximum value is 100; values above 100 are coerced to 100.
returnMostRecentPerJobType
- Optional. Whether or not to return just the
most recent job per job type,
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SearchBackgroundJobsResponse.
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<SearchBackgroundJobsResponse> searchBackgroundJobs(
core.String conversionWorkspace, {
core.String? completedUntilTime,
core.int? maxSize,
core.bool? returnMostRecentPerJobType,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (completedUntilTime != null)
'completedUntilTime': [completedUntilTime],
if (maxSize != null) 'maxSize': ['${maxSize}'],
if (returnMostRecentPerJobType != null)
'returnMostRecentPerJobType': ['${returnMostRecentPerJobType}'],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' +
core.Uri.encodeFull('$conversionWorkspace') +
':searchBackgroundJobs';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchBackgroundJobsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}