Skip to content

create_automated_reasoning_policy

Operation

create_automated_reasoning_policy

create_automated_reasoning_policy(request: CreateAutomatedReasoningPolicyInput | CreateAutomatedReasoningPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateAutomatedReasoningPolicyInputDict]) -> CreateAutomatedReasoningPolicyOutput

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.

Parameters:

Name Type Description Default
request CreateAutomatedReasoningPolicyInput | CreateAutomatedReasoningPolicyInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateAutomatedReasoningPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateAutomatedReasoningPolicyOutput

An instance of CreateAutomatedReasoningPolicyOutput.

create_automated_reasoning_policy async

create_automated_reasoning_policy(request: CreateAutomatedReasoningPolicyInput | CreateAutomatedReasoningPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateAutomatedReasoningPolicyInputDict]) -> CreateAutomatedReasoningPolicyOutput

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.

Parameters:

Name Type Description Default
request CreateAutomatedReasoningPolicyInput | CreateAutomatedReasoningPolicyInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateAutomatedReasoningPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateAutomatedReasoningPolicyOutput

An instance of CreateAutomatedReasoningPolicyOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateAutomatedReasoningPolicyInputDict

Bases: TypedDict

Dictionary form of CreateAutomatedReasoningPolicyInput.

Attributes

client_request_token instance-attribute
client_request_token: str | None

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.

This field is autopopulated if not provided.

description instance-attribute
description: str | None

A description of the Automated Reasoning policy. Use this to provide context about the policy's purpose and the types of validations it performs.

kms_key_id instance-attribute
kms_key_id: str | None

The identifier of the KMS key to use for encrypting the automated reasoning policy and its associated artifacts. If you don't specify a KMS key, Amazon Bedrock uses an KMS managed key for encryption. For enhanced security and control, you can specify a customer managed KMS key.

name instance-attribute
name: Required[str]

A unique name for the Automated Reasoning policy. The name must be between 1 and 63 characters and can contain letters, numbers, hyphens, and underscores.

policy_definition instance-attribute

The policy definition that contains the formal logic rules, variables, and custom variable types used to validate foundation model responses in your application.

tags instance-attribute
tags: Sequence[Tag | TagDict] | None

A list of tags to associate with the Automated Reasoning policy. Tags help you organize and manage your policies.

CreateAutomatedReasoningPolicyInput dataclass

Bases: _SerdeShape

Dataclass for CreateAutomatedReasoningPolicyInput structure.

Attributes

client_request_token class-attribute instance-attribute
client_request_token: str | None = ...

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.

This field is autopopulated if not provided.

description class-attribute instance-attribute
description: str | None = ...

A description of the Automated Reasoning policy. Use this to provide context about the policy's purpose and the types of validations it performs.

kms_key_id class-attribute instance-attribute
kms_key_id: str | None = ...

The identifier of the KMS key to use for encrypting the automated reasoning policy and its associated artifacts. If you don't specify a KMS key, Amazon Bedrock uses an KMS managed key for encryption. For enhanced security and control, you can specify a customer managed KMS key.

name class-attribute instance-attribute
name: str | None = ...

A unique name for the Automated Reasoning policy. The name must be between 1 and 63 characters and can contain letters, numbers, hyphens, and underscores.

policy_definition class-attribute instance-attribute
policy_definition: AutomatedReasoningPolicyDefinition | None = ...

The policy definition that contains the formal logic rules, variables, and custom variable types used to validate foundation model responses in your application.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

A list of tags to associate with the Automated Reasoning policy. Tags help you organize and manage your policies.

Output

CreateAutomatedReasoningPolicyOutput dataclass

Bases: _SerdeShape

Dataclass for CreateAutomatedReasoningPolicyOutput structure.

Attributes

created_at instance-attribute
created_at: datetime

The timestamp when the policy was created.

definition_hash class-attribute instance-attribute
definition_hash: str | None = ...

The hash of the policy definition. This is used as a concurrency token for creating policy versions that you can use in your application.

description class-attribute instance-attribute
description: str | None = ...

The description of the Automated Reasoning policy.

name instance-attribute
name: str

The name of the Automated Reasoning policy.

policy_arn instance-attribute
policy_arn: str

The Amazon Resource Name (ARN) of the Automated Reasoning policy that you created.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

updated_at instance-attribute
updated_at: datetime

The timestamp when the policy was last updated.

version instance-attribute
version: str

The version number of the newly created Automated Reasoning policy. The initial version is always DRAFT.