Skip to main content

automated_reasoning_policies

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

Overview

Nameautomated_reasoning_policies
TypeResource
Idaws.bedrock.automated_reasoning_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the policy. (pattern: <code>[0-9a-zA-Z-_ ]+</code>)
created_atstring (date-time)The timestamp when the policy was created.
definition_hashstringThe hash of the policy definition used as a concurrency token. (pattern: <code>[0-9a-z]{128}</code>)
descriptionstringThe description of the policy. (pattern: <code>[\s\S]+</code>)
kms_key_arnstringThe Amazon Resource Name (ARN) of the KMS key used to encrypt the automated reasoning policy and its associated artifacts. If a KMS key is not provided during the initial CreateAutomatedReasoningPolicyRequest, the kmsKeyArn won't be included in the GetAutomatedReasoningPolicyResponse. (pattern: <code>arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>)
policy_arnstringThe Amazon Resource Name (ARN) of the policy. (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>)
policy_idstringThe unique identifier of the policy. (pattern: <code>[a-z0-9]{12}</code>)
updated_atstring (date-time)The timestamp when the policy was last updated.
versionstringThe version of the policy. (pattern: <code>([1-9][0-9]{0,11})</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_automated_reasoning_policyselectpolicy_arn, regionRetrieves details about an Automated Reasoning policy or policy version. Returns information including the policy definition, metadata, and timestamps.
list_automated_reasoning_policiesselectregionpolicyArn, nextToken, maxResultsLists all Automated Reasoning policies in your account, with optional filtering by policy ARN. This helps you manage and discover existing policies.
create_automated_reasoning_policy_versioninsertpolicy_arn, region, lastUpdatedDefinitionHashCreates a new version of an existing Automated Reasoning policy. This allows you to iterate on your policy rules while maintaining previous versions for rollback or comparison purposes.
create_automated_reasoning_policyinsertregion, nameCreates an Automated Reasoning policy for Amazon Bedrock Guardrails. Automated Reasoning policies use mathematical techniques to detect hallucinations, suggest corrections, and highlight unstated assumptions in the responses of your GenAI application. To create a policy, you upload a source document that describes the rules that you're encoding. Automated Reasoning extracts important concepts from the source document that will become variables in the policy and infers policy rules.
update_automated_reasoning_policyupdatepolicy_arn, region, policyDefinitionUpdates an existing Automated Reasoning policy with new rules, variables, or configuration. This creates a new version of the policy while preserving the previous version.
delete_automated_reasoning_policydeletepolicy_arn, regionforceDeletes an Automated Reasoning policy or policy version. This operation is idempotent. If you delete a policy more than once, each call succeeds. Deleting a policy removes it permanently and cannot be undone.
cancel_automated_reasoning_policy_build_workflowexecpolicy_arn, build_workflow_id, regionCancels a running Automated Reasoning policy build workflow. This stops the policy generation process and prevents further processing of the source documents.
export_automated_reasoning_policy_versionexecpolicy_arn, regionExports the policy definition for an Automated Reasoning policy version. Returns the complete policy definition including rules, variables, and custom variable types in a structured format.
start_automated_reasoning_policy_build_workflowexecpolicy_arn, build_workflow_type, region, sourceContentx-amz-client-tokenStarts a new build workflow for an Automated Reasoning policy. This initiates the process of analyzing source documents and generating policy rules, variables, and types.
start_automated_reasoning_policy_test_workflowexecpolicy_arn, build_workflow_id, regionInitiates a test workflow to validate Automated Reasoning policy tests. The workflow executes the specified tests against the policy and generates validation results.

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
build_workflow_idstringThe build workflow identifier. The build workflow must show a COMPLETED status before running tests.
build_workflow_typestringThe type of build workflow to start (e.g., DOCUMENT_INGESTION for processing new documents, POLICY_REPAIR for fixing existing policies).
policy_arnstringThe Amazon Resource Name (ARN) of the Automated Reasoning policy to test.
regionstringAWS region (default: us-east-1)
forcebooleanSpecifies whether to force delete the automated reasoning policy even if it has active resources. When false, Amazon Bedrock validates if all artifacts have been deleted (e.g. policy version, test case, test result) for a policy before deletion. When true, Amazon Bedrock will delete the policy and all its artifacts without validation. Default is false.
maxResultsintegerThe maximum number of policies to return in a single call.
nextTokenstringThe pagination token from a previous request to retrieve the next page of results.
policyArnstringOptional filter to list only the policy versions with the specified Amazon Resource Name (ARN). If not provided, the DRAFT versions for all policies are listed.
x-amz-client-tokenstringA unique, case-sensitive identifier to ensure that the operation completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request but doesn't return an error.

SELECT examples

Retrieves details about an Automated Reasoning policy or policy version. Returns information including the policy definition, metadata, and timestamps.

SELECT
name,
created_at,
definition_hash,
description,
kms_key_arn,
policy_arn,
policy_id,
updated_at,
version
FROM aws.bedrock.automated_reasoning_policies
WHERE policy_arn = '{{ policy_arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new version of an existing Automated Reasoning policy. This allows you to iterate on your policy rules while maintaining previous versions for rollback or comparison purposes.

INSERT INTO aws.bedrock.automated_reasoning_policies (
clientRequestToken,
lastUpdatedDefinitionHash,
tags,
policy_arn,
region
)
SELECT
'{{ clientRequestToken }}',
'{{ lastUpdatedDefinitionHash }}' /* required */,
'{{ tags }}',
'{{ policy_arn }}',
'{{ region }}'
RETURNING
name,
created_at,
definition_hash,
description,
policy_arn,
version
;

UPDATE examples

Updates an existing Automated Reasoning policy with new rules, variables, or configuration. This creates a new version of the policy while preserving the previous version.

UPDATE aws.bedrock.automated_reasoning_policies
SET
policyDefinition = '{{ policyDefinition }}',
name = '{{ name }}',
description = '{{ description }}'
WHERE
policy_arn = '{{ policy_arn }}' --required
AND region = '{{ region }}' --required
AND policyDefinition = '{{ policyDefinition }}' --required
RETURNING
name,
definition_hash,
policy_arn,
updated_at;

DELETE examples

Deletes an Automated Reasoning policy or policy version. This operation is idempotent. If you delete a policy more than once, each call succeeds. Deleting a policy removes it permanently and cannot be undone.

DELETE FROM aws.bedrock.automated_reasoning_policies
WHERE policy_arn = '{{ policy_arn }}' --required
AND region = '{{ region }}' --required
AND force = '{{ force }}'
;

Lifecycle Methods

Cancels a running Automated Reasoning policy build workflow. This stops the policy generation process and prevents further processing of the source documents.

EXEC aws.bedrock.automated_reasoning_policies.cancel_automated_reasoning_policy_build_workflow
@policy_arn='{{ policy_arn }}' --required,
@build_workflow_id='{{ build_workflow_id }}' --required,
@region='{{ region }}' --required
;