search method

Future<SearchSessionSparkApplicationsResponse> search(
  1. String parent, {
  2. String? applicationStatus,
  3. String? maxEndTime,
  4. String? maxTime,
  5. String? minEndTime,
  6. String? minTime,
  7. int? pageSize,
  8. String? pageToken,
  9. String? $fields,
})

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>>{
    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 SearchSessionSparkApplicationsResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}