listTestCaseExecutions method

Future<ListTestCaseExecutionsResponse> listTestCaseExecutions({
  1. required String instanceId,
  2. int? endTime,
  3. int? maxResults,
  4. String? nextToken,
  5. int? startTime,
  6. TestCaseExecutionStatus? status,
  7. String? testCaseId,
  8. String? testCaseName,
})

Lists all test case executions and allows filtering by test case id, test case name, start time, end time or status of the execution for the specified Amazon Connect instance.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter instanceId : The identifier of the Amazon Connect instance.

Parameter endTime : Filter executions that started before this time.

Parameter maxResults : The maximum number of results to return per page.

Parameter nextToken : The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Parameter startTime : Filter executions that started after this time.

Parameter status : Filter executions by status.

Parameter testCaseId : Filter executions by test case identifier.

Parameter testCaseName : Filter executions by test case name.

Implementation

Future<ListTestCaseExecutionsResponse> listTestCaseExecutions({
  required String instanceId,
  int? endTime,
  int? maxResults,
  String? nextToken,
  int? startTime,
  TestCaseExecutionStatus? status,
  String? testCaseId,
  String? testCaseName,
}) async {
  _s.validateNumRange(
    'endTime',
    endTime,
    0,
    1152921504606846976,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateNumRange(
    'startTime',
    startTime,
    0,
    1152921504606846976,
  );
  final $query = <String, List<String>>{
    if (endTime != null) 'endTime': [endTime.toString()],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (startTime != null) 'startTime': [startTime.toString()],
    if (status != null) 'status': [status.value],
    if (testCaseId != null) 'testCaseId': [testCaseId],
    if (testCaseName != null) 'testCaseName': [testCaseName],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/test-case-executions/${Uri.encodeComponent(instanceId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListTestCaseExecutionsResponse.fromJson(response);
}