listJobRunAttempts method

Future<ListJobRunAttemptsResponse> listJobRunAttempts({
  1. required String applicationId,
  2. required String jobRunId,
  3. int? maxResults,
  4. String? nextToken,
})

Lists all attempt of a job run.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter applicationId : The ID of the application for which to list job runs.

Parameter jobRunId : The ID of the job run to list.

Parameter maxResults : The maximum number of job run attempts to list.

Parameter nextToken : The token for the next set of job run attempt results.

Implementation

Future<ListJobRunAttemptsResponse> listJobRunAttempts({
  required String applicationId,
  required String jobRunId,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/jobruns/${Uri.encodeComponent(jobRunId)}/attempts',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListJobRunAttemptsResponse.fromJson(response);
}