listRuns method

Future<ListRunsResponse> listRuns({
  1. String? batchId,
  2. int? maxResults,
  3. String? name,
  4. String? runGroupId,
  5. String? startingToken,
  6. RunStatus? status,
})

Retrieves a list of runs and returns each run's metadata and status.

Amazon Web Services HealthOmics stores a configurable number of runs, as determined by service limits, that are available to the console and API. If the ListRuns response doesn't include specific runs that you expected, you can find all run logs in the CloudWatch logs. For more information about viewing the run logs, see CloudWatch logs in the Amazon Web Services HealthOmics User Guide.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw RequestTimeoutException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter batchId : Filter by batch ID.

Parameter maxResults : The maximum number of runs to return in one page of results.

Parameter name : Filter the list by run name.

Parameter runGroupId : Filter the list by run group ID.

Parameter startingToken : Specify the pagination token from a previous request to retrieve the next page of results.

Parameter status : The status of a run.

Implementation

Future<ListRunsResponse> listRuns({
  String? batchId,
  int? maxResults,
  String? name,
  String? runGroupId,
  String? startingToken,
  RunStatus? status,
}) async {
  final $query = <String, List<String>>{
    if (batchId != null) 'batchId': [batchId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (name != null) 'name': [name],
    if (runGroupId != null) 'runGroupId': [runGroupId],
    if (startingToken != null) 'startingToken': [startingToken],
    if (status != null) 'status': [status.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/run',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRunsResponse.fromJson(response);
}