listTestRuns method
Lists the runs of a test, or all test runs for a service.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter serviceArn :
The ARN of the service to list test runs for.
Parameter testId :
Filter test runs by test identifier.
Implementation
Future<ListTestRunsResponse> listTestRuns({
required String serviceArn,
int? maxResults,
String? nextToken,
String? testId,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
'serviceArn': [serviceArn],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (testId != null) 'testId': [testId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/v2/list-test-runs',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListTestRunsResponse.fromJson(response);
}