automated_reasoning_policy_test_cases
Creates, updates, deletes, gets or lists an automated_reasoning_policy_test_cases resource.
Overview
| Name | automated_reasoning_policy_test_cases |
| Type | Resource |
| Id | aws.bedrock.automated_reasoning_policy_test_cases |
Fields
The following fields are returned by SELECT queries:
- get_automated_reasoning_policy_test_case
- list_automated_reasoning_policy_test_cases
| Name | Datatype | Description |
|---|---|---|
policy_arn | string | The Amazon Resource Name (ARN) of the policy that contains the test. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:automated-reasoning-policy/[a-z0-9]{12}(:([1-9][0-9]{0,11}))?</code>) |
test_case | object | Represents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior. |
| Name | Datatype | Description |
|---|---|---|
confidence_threshold | number (double) | The minimum confidence level for logic validation. Content meeting this threshold is considered high-confidence and can be validated. |
created_at | string (date-time) | The timestamp when the test was created. |
expected_aggregated_findings_result | string | The expected result of the Automated Reasoning check for this test. (VALID, INVALID, SATISFIABLE, IMPOSSIBLE, TRANSLATION_AMBIGUOUS, TOO_COMPLEX, NO_TRANSLATION) |
guard_content | string | The output content to be validated by the policy, typically representing a foundation model response. |
query_content | string | The input query or prompt that generated the content. This provides context for the validation. |
test_case_id | string | The unique identifier of the test. (pattern: <code>[0-9A-Z]{12}</code>) |
updated_at | string (date-time) | The timestamp when the test was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_automated_reasoning_policy_test_case | select | policy_arn, test_case_id, region | Retrieves details about a specific Automated Reasoning policy test. | |
list_automated_reasoning_policy_test_cases | select | policy_arn, region | nextToken, maxResults | Lists tests for an Automated Reasoning policy. We recommend using pagination to ensure that the operation returns quickly and successfully. |
create_automated_reasoning_policy_test_case | insert | policy_arn, region, guardContent, expectedAggregatedFindingsResult | Creates a test for an Automated Reasoning policy. Tests validate that your policy works as expected by providing sample inputs and expected outcomes. Use tests to verify policy behavior before deploying to production. | |
update_automated_reasoning_policy_test_case | update | policy_arn, test_case_id, region, guardContent, lastUpdatedAt, expectedAggregatedFindingsResult | Updates an existing Automated Reasoning policy test. You can modify the content, query, expected result, and confidence threshold. | |
delete_automated_reasoning_policy_test_case | delete | policy_arn, test_case_id, updatedAt, region | Deletes an Automated Reasoning policy test. This operation is idempotent; if you delete a test more than once, each call succeeds. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
policy_arn | string | The Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test. |
region | string | AWS region (default: us-east-1) |
test_case_id | string | The unique identifier of the test to delete. |
updatedAt | string (date-time) | The timestamp when the test was last updated. This is used as a concurrency token to prevent conflicting modifications. |
maxResults | integer | The maximum number of tests to return in a single call. |
nextToken | string | The pagination token from a previous request to retrieve the next page of results. |
SELECT examples
- get_automated_reasoning_policy_test_case
- list_automated_reasoning_policy_test_cases
Retrieves details about a specific Automated Reasoning policy test.
SELECT
policy_arn,
test_case
FROM aws.bedrock.automated_reasoning_policy_test_cases
WHERE policy_arn = '{{ policy_arn }}' -- required
AND test_case_id = '{{ test_case_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists tests for an Automated Reasoning policy. We recommend using pagination to ensure that the operation returns quickly and successfully.
SELECT
confidence_threshold,
created_at,
expected_aggregated_findings_result,
guard_content,
query_content,
test_case_id,
updated_at
FROM aws.bedrock.automated_reasoning_policy_test_cases
WHERE policy_arn = '{{ policy_arn }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_automated_reasoning_policy_test_case
- Manifest
Creates a test for an Automated Reasoning policy. Tests validate that your policy works as expected by providing sample inputs and expected outcomes. Use tests to verify policy behavior before deploying to production.
INSERT INTO aws.bedrock.automated_reasoning_policy_test_cases (
guardContent,
queryContent,
expectedAggregatedFindingsResult,
clientRequestToken,
confidenceThreshold,
policy_arn,
region
)
SELECT
'{{ guardContent }}' /* required */,
'{{ queryContent }}',
'{{ expectedAggregatedFindingsResult }}' /* required */,
'{{ clientRequestToken }}',
{{ confidenceThreshold }},
'{{ policy_arn }}',
'{{ region }}'
RETURNING
policy_arn,
test_case_id
;
# Description fields are for documentation purposes
- name: automated_reasoning_policy_test_cases
props:
- name: policy_arn
value: "{{ policy_arn }}"
description: Required parameter for the automated_reasoning_policy_test_cases resource.
- name: region
value: "{{ region }}"
description: Required parameter for the automated_reasoning_policy_test_cases resource.
- name: guardContent
value: "{{ guardContent }}"
- name: queryContent
value: "{{ queryContent }}"
- name: expectedAggregatedFindingsResult
value: "{{ expectedAggregatedFindingsResult }}"
valid_values: ['VALID', 'INVALID', 'SATISFIABLE', 'IMPOSSIBLE', 'TRANSLATION_AMBIGUOUS', 'TOO_COMPLEX', 'NO_TRANSLATION']
- name: clientRequestToken
value: "{{ clientRequestToken }}"
- name: confidenceThreshold
value: {{ confidenceThreshold }}
UPDATE examples
- update_automated_reasoning_policy_test_case
Updates an existing Automated Reasoning policy test. You can modify the content, query, expected result, and confidence threshold.
UPDATE aws.bedrock.automated_reasoning_policy_test_cases
SET
guardContent = '{{ guardContent }}',
queryContent = '{{ queryContent }}',
lastUpdatedAt = '{{ lastUpdatedAt }}',
expectedAggregatedFindingsResult = '{{ expectedAggregatedFindingsResult }}',
confidenceThreshold = {{ confidenceThreshold }},
clientRequestToken = '{{ clientRequestToken }}'
WHERE
policy_arn = '{{ policy_arn }}' --required
AND test_case_id = '{{ test_case_id }}' --required
AND region = '{{ region }}' --required
AND guardContent = '{{ guardContent }}' --required
AND lastUpdatedAt = '{{ lastUpdatedAt }}' --required
AND expectedAggregatedFindingsResult = '{{ expectedAggregatedFindingsResult }}' --required
RETURNING
policy_arn,
test_case_id;
DELETE examples
- delete_automated_reasoning_policy_test_case
Deletes an Automated Reasoning policy test. This operation is idempotent; if you delete a test more than once, each call succeeds.
DELETE FROM aws.bedrock.automated_reasoning_policy_test_cases
WHERE policy_arn = '{{ policy_arn }}' --required
AND test_case_id = '{{ test_case_id }}' --required
AND updatedAt = '{{ updatedAt }}' --required
AND region = '{{ region }}' --required
;