Skip to content

BedrockClient.create_automated_reasoning_policy_test_case

rboto-bedrock==0.4.0 · Service index · Types

Model summary (excerpt): 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.

Install and imports

python -m pip install "rboto[bedrock]==0.4.0"
from rboto import BedrockClient
from rboto_bedrock.types import (
    AutomatedReasoningCheckResult,
    CreateAutomatedReasoningPolicyTestCaseOutput,
)

Signature

async def create_automated_reasoning_policy_test_case(
    *,
    policy_arn: str,
    guard_content: str,
    expected_aggregated_findings_result: AutomatedReasoningCheckResult,
    query_content: str | None = None,
    client_request_token: str | None = None,
    confidence_threshold: float | None = None,
) -> CreateAutomatedReasoningPolicyTestCaseOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
policy_arn Yes The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to create the test.
guard_content Yes The output content that's validated by the Automated Reasoning policy. This represents the foundation model response that will be checked for accuracy.
expected_aggregated_findings_result Yes The expected result of the Automated Reasoning check. Valid values include: , TOO_COMPLEX, and NO_TRANSLATIONS. VALID - The claims are true. The claims are implied by the premises and the Automated Reasoning policy. Given the Automated Reasoning policy and premises, it is not possible for these claims to be false. In other words, there are no alternative answers that are true that contradict...
query_content No The input query or prompt that generated the content. This provides context for the validation.
client_request_token No A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error.
confidence_threshold No The minimum confidence level for logic validation. Content that meets the threshold is considered a high-confidence finding that can be validated.

Output

CreateAutomatedReasoningPolicyTestCaseOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
policy_arn str Always present —
test_case_id str Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

AutomatedReasoningCheckResult, CreateAutomatedReasoningPolicyTestCaseOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_bedrock.exceptions:

AccessDeniedError, ConflictError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model