listAutomatedReasoningPolicyTestCases method

Future<ListAutomatedReasoningPolicyTestCasesResponse> listAutomatedReasoningPolicyTestCases({
  1. required String policyArn,
  2. int? maxResults,
  3. String? nextToken,
})

Lists tests for an Automated Reasoning policy. We recommend using pagination to ensure that the operation returns quickly and successfully.

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

Parameter policyArn : The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to list tests.

Parameter maxResults : The maximum number of tests to return in a single call.

Parameter nextToken : The pagination token from a previous request to retrieve the next page of results.

Implementation

Future<ListAutomatedReasoningPolicyTestCasesResponse>
    listAutomatedReasoningPolicyTestCases({
  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)}/test-cases',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAutomatedReasoningPolicyTestCasesResponse.fromJson(response);
}