search method
Obtain high level information and list of Spark Applications corresponding to a batch
Request parameters:
parent
- Required. The fully qualified name of the batch to retrieve in
the format
"projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID"
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/batches/\[^/\]+$
.
applicationStatus
- Optional. Search only applications in the chosen
state.
Possible string values are:
- "APPLICATION_STATUS_UNSPECIFIED"
- "APPLICATION_STATUS_RUNNING"
- "APPLICATION_STATUS_COMPLETED"
maxEndTime
- Optional. Latest end timestamp to list.
maxTime
- Optional. Latest start timestamp to list.
minEndTime
- Optional. Earliest end timestamp to list.
minTime
- Optional. Earliest start timestamp to list.
pageSize
- Optional. Maximum number of applications to return in each
response. The service may return fewer than this. The default page size is
10; the maximum page size is 100.
pageToken
- Optional. A page token received from a previous
SearchSparkApplications call. Provide this token to retrieve the
subsequent page.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SearchSparkApplicationsResponse.
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<SearchSparkApplicationsResponse> search(
core.String parent, {
core.String? applicationStatus,
core.String? maxEndTime,
core.String? maxTime,
core.String? minEndTime,
core.String? minTime,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (applicationStatus != null) 'applicationStatus': [applicationStatus],
if (maxEndTime != null) 'maxEndTime': [maxEndTime],
if (maxTime != null) 'maxTime': [maxTime],
if (minEndTime != null) 'minEndTime': [minEndTime],
if (minTime != null) 'minTime': [minTime],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/sparkApplications:search';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchSparkApplicationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}