listTaskExecutions method

Future<ListTaskExecutionsResponse> listTaskExecutions({
  1. int? maxResults,
  2. String? nextToken,
  3. String? taskArn,
})

Returns a list of executed tasks.

May throw InvalidRequestException. May throw InternalException.

Parameter maxResults : The maximum number of executed tasks to list.

Parameter nextToken : An opaque string that indicates the position at which to begin the next list of the executed tasks.

Parameter taskArn : The Amazon Resource Name (ARN) of the task whose tasks you want to list.

Implementation

Future<ListTaskExecutionsResponse> listTaskExecutions({
  int? maxResults,
  String? nextToken,
  String? taskArn,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    65535,
  );
  _s.validateStringLength(
    'taskArn',
    taskArn,
    0,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.ListTaskExecutions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (taskArn != null) 'TaskArn': taskArn,
    },
  );

  return ListTaskExecutionsResponse.fromJson(jsonResponse.body);
}