Bedrock / Client / list_automated_reasoning_policy_test_cases

list_automated_reasoning_policy_test_cases

Bedrock.Client.list_automated_reasoning_policy_test_cases(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.list_automated_reasoning_policy_test_cases(
    policyArn='string',
    nextToken='string',
    maxResults=123
)
Parameters:
  • policyArn (string) –

    [REQUIRED]

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

  • nextToken (string) – The pagination token from a previous request to retrieve the next page of results.

  • maxResults (integer) – The maximum number of tests to return in a single call.

Return type:

dict

Returns:

Response Syntax

{
    'testCases': [
        {
            'testCaseId': 'string',
            'guardContent': 'string',
            'queryContent': 'string',
            'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'confidenceThreshold': 123.0
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • testCases (list) –

      A list of tests for the specified policy.

      • (dict) –

        Represents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior.

        • testCaseId (string) –

          The unique identifier of the test.

        • guardContent (string) –

          The output content to be validated by the policy, typically representing a foundation model response.

        • queryContent (string) –

          The input query or prompt that generated the content. This provides context for the validation.

        • expectedAggregatedFindingsResult (string) –

          The expected result of the Automated Reasoning check for this test.

        • createdAt (datetime) –

          The timestamp when the test was created.

        • updatedAt (datetime) –

          The timestamp when the test was last updated.

        • confidenceThreshold (float) –

          The minimum confidence level for logic validation. Content meeting this threshold is considered high-confidence and can be validated.

    • nextToken (string) –

      The pagination token to use in a subsequent request to retrieve the next page of results.

Exceptions

  • Bedrock.Client.exceptions.ResourceNotFoundException

  • Bedrock.Client.exceptions.AccessDeniedException

  • Bedrock.Client.exceptions.ValidationException

  • Bedrock.Client.exceptions.InternalServerException

  • Bedrock.Client.exceptions.ThrottlingException