listJobRuns method
Lists job runs based on a set of parameters. A job run is a unit of work, such as a Spark jar, PySpark script, or SparkSQL query, that you submit to Amazon EMR on EKS.
May throw InternalServerException.
May throw ValidationException.
Parameter virtualClusterId :
The ID of the virtual cluster for which to list the job run.
Parameter createdAfter :
The date and time after which the job runs were submitted.
Parameter createdBefore :
The date and time before which the job runs were submitted.
Parameter maxResults :
The maximum number of job runs that can be listed.
Parameter name :
The name of the job run.
Parameter nextToken :
The token for the next set of job runs to return.
Parameter states :
The states of the job run.
Implementation
Future<ListJobRunsResponse> listJobRuns({
required String virtualClusterId,
DateTime? createdAfter,
DateTime? createdBefore,
int? maxResults,
String? name,
String? nextToken,
List<JobRunState>? states,
}) async {
final $query = <String, List<String>>{
if (createdAfter != null)
'createdAfter': [_s.iso8601ToJson(createdAfter).toString()],
if (createdBefore != null)
'createdBefore': [_s.iso8601ToJson(createdBefore).toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (name != null) 'name': [name],
if (nextToken != null) 'nextToken': [nextToken],
if (states != null) 'states': states.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/virtualclusters/${Uri.encodeComponent(virtualClusterId)}/jobruns',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListJobRunsResponse.fromJson(response);
}