Skip to main content

automated_reasoning_policy_test_cases

Creates, updates, deletes, gets or lists an automated_reasoning_policy_test_cases resource.

Overview

Nameautomated_reasoning_policy_test_cases
TypeResource
Idaws.bedrock.automated_reasoning_policy_test_cases

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policy_arnstringThe 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_caseobjectRepresents a test for validating an Automated Reasoning policy. tests contain sample inputs and expected outcomes to verify policy behavior.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_automated_reasoning_policy_test_caseselectpolicy_arn, test_case_id, regionRetrieves details about a specific Automated Reasoning policy test.
list_automated_reasoning_policy_test_casesselectpolicy_arn, regionnextToken, maxResultsLists tests for an Automated Reasoning policy. We recommend using pagination to ensure that the operation returns quickly and successfully.
create_automated_reasoning_policy_test_caseinsertpolicy_arn, region, guardContent, expectedAggregatedFindingsResultCreates 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_caseupdatepolicy_arn, test_case_id, region, guardContent, lastUpdatedAt, expectedAggregatedFindingsResultUpdates an existing Automated Reasoning policy test. You can modify the content, query, expected result, and confidence threshold.
delete_automated_reasoning_policy_test_casedeletepolicy_arn, test_case_id, updatedAt, regionDeletes 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.

NameDatatypeDescription
policy_arnstringThe Amazon Resource Name (ARN) of the Automated Reasoning policy that contains the test.
regionstringAWS region (default: us-east-1)
test_case_idstringThe unique identifier of the test to delete.
updatedAtstring (date-time)The timestamp when the test was last updated. This is used as a concurrency token to prevent conflicting modifications.
maxResultsintegerThe maximum number of tests to return in a single call.
nextTokenstringThe pagination token from a previous request to retrieve the next page of results.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;