automated_reasoning_policies
Creates, updates, deletes, gets or lists an automated_reasoning_policies resource.
Overview
| Name | automated_reasoning_policies |
| Type | Resource |
| Id | aws.bedrock.automated_reasoning_policies |
Fields
The following fields are returned by SELECT queries:
- get_automated_reasoning_policy
- list_automated_reasoning_policies
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the policy. (pattern: <code>[0-9a-zA-Z-_ ]+</code>) |
created_at | string (date-time) | The timestamp when the policy was created. |
definition_hash | string | The hash of the policy definition used as a concurrency token. (pattern: <code>[0-9a-z]{128}</code>) |
description | string | The description of the policy. (pattern: <code>[\s\S]+</code>) |
kms_key_arn | string | The 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_arn | string | The 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_id | string | The unique identifier of the policy. (pattern: <code>[a-z0-9]{12}</code>) |
updated_at | string (date-time) | The timestamp when the policy was last updated. |
version | string | The version of the policy. (pattern: <code>([1-9][0-9]{0,11})</code>) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the policy. (pattern: <code>[0-9a-zA-Z-_ ]+</code>) |
created_at | string (date-time) | The timestamp when the policy was created. |
description | string | The description of the policy. (pattern: <code>[\s\S]+</code>) |
policy_arn | string | The 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_id | string | The unique identifier of the policy. (pattern: <code>[a-z0-9]{12}</code>) |
updated_at | string (date-time) | The timestamp when the policy was last updated. |
version | string | The version of the policy. (pattern: <code>([1-9][0-9]{0,11})</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_automated_reasoning_policy | select | policy_arn, region | Retrieves details about an Automated Reasoning policy or policy version. Returns information including the policy definition, metadata, and timestamps. | |
list_automated_reasoning_policies | select | region | policyArn, nextToken, maxResults | Lists 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_version | insert | policy_arn, region, lastUpdatedDefinitionHash | 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. | |
create_automated_reasoning_policy | insert | region, name | Creates 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_policy | update | policy_arn, region, policyDefinition | 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. | |
delete_automated_reasoning_policy | delete | policy_arn, region | force | 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. |
cancel_automated_reasoning_policy_build_workflow | exec | policy_arn, build_workflow_id, region | Cancels 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_version | exec | policy_arn, region | Exports 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_workflow | exec | policy_arn, build_workflow_type, region, sourceContent | x-amz-client-token | Starts 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_workflow | exec | policy_arn, build_workflow_id, region | Initiates 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.
| Name | Datatype | Description |
|---|---|---|
build_workflow_id | string | The build workflow identifier. The build workflow must show a COMPLETED status before running tests. |
build_workflow_type | string | The type of build workflow to start (e.g., DOCUMENT_INGESTION for processing new documents, POLICY_REPAIR for fixing existing policies). |
policy_arn | string | The Amazon Resource Name (ARN) of the Automated Reasoning policy to test. |
region | string | AWS region (default: us-east-1) |
force | boolean | Specifies 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. |
maxResults | integer | The maximum number of policies to return in a single call. |
nextToken | string | The pagination token from a previous request to retrieve the next page of results. |
policyArn | string | Optional 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-token | string | A 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
- get_automated_reasoning_policy
- list_automated_reasoning_policies
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
;
Lists all Automated Reasoning policies in your account, with optional filtering by policy ARN. This helps you manage and discover existing policies.
SELECT
name,
created_at,
description,
policy_arn,
policy_id,
updated_at,
version
FROM aws.bedrock.automated_reasoning_policies
WHERE region = '{{ region }}' -- required
AND policyArn = '{{ policyArn }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_automated_reasoning_policy_version
- create_automated_reasoning_policy
- Manifest
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
;
Creates 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.
INSERT INTO aws.bedrock.automated_reasoning_policies (
name,
description,
clientRequestToken,
policyDefinition,
kmsKeyId,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ clientRequestToken }}',
'{{ policyDefinition }}',
'{{ kmsKeyId }}',
'{{ tags }}',
'{{ region }}'
RETURNING
name,
created_at,
definition_hash,
description,
policy_arn,
updated_at,
version
;
# Description fields are for documentation purposes
- name: automated_reasoning_policies
props:
- name: policy_arn
value: "{{ policy_arn }}"
description: Required parameter for the automated_reasoning_policies resource.
- name: region
value: "{{ region }}"
description: Required parameter for the automated_reasoning_policies resource.
- name: clientRequestToken
value: "{{ clientRequestToken }}"
- name: lastUpdatedDefinitionHash
value: "{{ lastUpdatedDefinitionHash }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: policyDefinition
description: |
Contains the formal logic rules, variables, and custom variable types that define an Automated Reasoning policy. The policy definition specifies the constraints used to validate foundation model responses for accuracy and logical consistency.
value:
version: "{{ version }}"
types:
- name: "{{ name }}"
description: "{{ description }}"
values: "{{ values }}"
rules:
- id: "{{ id }}"
expression: "{{ expression }}"
alternateExpression: "{{ alternateExpression }}"
variables:
- name: "{{ name }}"
type_: "{{ type_ }}"
description: "{{ description }}"
- name: kmsKeyId
value: "{{ kmsKeyId }}"
UPDATE examples
- update_automated_reasoning_policy
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
- delete_automated_reasoning_policy
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
- cancel_automated_reasoning_policy_build_workflow
- export_automated_reasoning_policy_version
- start_automated_reasoning_policy_build_workflow
- start_automated_reasoning_policy_test_workflow
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
;
Exports 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.
EXEC aws.bedrock.automated_reasoning_policies.export_automated_reasoning_policy_version
@policy_arn='{{ policy_arn }}' --required,
@region='{{ region }}' --required
;
Starts a new build workflow for an Automated Reasoning policy. This initiates the process of analyzing source documents and generating policy rules, variables, and types.
EXEC aws.bedrock.automated_reasoning_policies.start_automated_reasoning_policy_build_workflow
@policy_arn='{{ policy_arn }}' --required,
@build_workflow_type='{{ build_workflow_type }}' --required,
@region='{{ region }}' --required,
@x-amz-client-token='{{ x-amz-client-token }}'
@@json=
'{
"sourceContent": "{{ sourceContent }}"
}'
;
Initiates a test workflow to validate Automated Reasoning policy tests. The workflow executes the specified tests against the policy and generates validation results.
EXEC aws.bedrock.automated_reasoning_policies.start_automated_reasoning_policy_test_workflow
@policy_arn='{{ policy_arn }}' --required,
@build_workflow_id='{{ build_workflow_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"testCaseIds": "{{ testCaseIds }}",
"clientRequestToken": "{{ clientRequestToken }}"
}'
;