listAutomatedReasoningPolicyTestResults method

Future<ListAutomatedReasoningPolicyTestResultsResponse> listAutomatedReasoningPolicyTestResults({
  1. required String buildWorkflowId,
  2. required String policyArn,
  3. int? maxResults,
  4. String? nextToken,
})

Lists test results for an Automated Reasoning policy, showing how the policy performed against various test scenarios and validation checks.

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

Parameter buildWorkflowId : The unique identifier of the build workflow whose test results you want to list.

Parameter policyArn : The Amazon Resource Name (ARN) of the Automated Reasoning policy whose test results you want to list.

Parameter maxResults : The maximum number of test results to return in a single response. Valid range is 1-100.

Parameter nextToken : A pagination token from a previous request to continue listing test results from where the previous request left off.

Implementation

Future<ListAutomatedReasoningPolicyTestResultsResponse>
    listAutomatedReasoningPolicyTestResults({
  required String buildWorkflowId,
  required String policyArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  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:
        '/automated-reasoning-policies/${Uri.encodeComponent(policyArn)}/build-workflows/${Uri.encodeComponent(buildWorkflowId)}/test-results',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAutomatedReasoningPolicyTestResultsResponse.fromJson(response);
}