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 session to retrieve
in the format
"projects/PROJECT_ID/locations/DATAPROC_REGION/sessions/SESSION_ID"
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/sessions/\[^/\]+$.
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
SearchSessionSparkApplications call. Provide this token to retrieve the
subsequent page.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a SearchSessionSparkApplicationsResponse.
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<SearchSessionSparkApplicationsResponse> 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>>{
'applicationStatus': ?applicationStatus == null
? null
: [applicationStatus],
'maxEndTime': ?maxEndTime == null ? null : [maxEndTime],
'maxTime': ?maxTime == null ? null : [maxTime],
'minEndTime': ?minEndTime == null ? null : [minEndTime],
'minTime': ?minTime == null ? null : [minTime],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/sparkApplications:search';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchSessionSparkApplicationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}