CfnAutomatedReasoningPolicyPropsMixin

class aws_cdk.mixins_preview.aws_bedrock.mixins.CfnAutomatedReasoningPolicyPropsMixin(props, *, strategy=None)

Bases: Mixin

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.

To learn more about creating Automated Reasoning policies, see Minimize AI hallucinations and deliver up to 99% verification accuracy with Automated Reasoning checks: Now available in the AWS News Blog .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-automatedreasoningpolicy.html

CloudformationResource:

AWS::Bedrock::AutomatedReasoningPolicy

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

cfn_automated_reasoning_policy_props_mixin = bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin(bedrock_mixins.CfnAutomatedReasoningPolicyMixinProps(
    description="description",
    force_delete=False,
    kms_key_id="kmsKeyId",
    name="name",
    policy_definition=bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionProperty(
        rules=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionRuleProperty(
            alternate_expression="alternateExpression",
            expression="expression",
            id="id"
        )],
        types=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeProperty(
            description="description",
            name="name",
            values=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeValueProperty(
                description="description",
                value="value"
            )]
        )],
        variables=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionVariableProperty(
            description="description",
            name="name",
            type="type"
        )],
        version="version"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Bedrock::AutomatedReasoningPolicy.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['description', 'forceDelete', 'kmsKeyId', 'name', 'policyDefinition', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

PolicyDefinitionProperty

class CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionProperty(*, rules=None, types=None, variables=None, version=None)

Bases: object

The complete policy definition containing rules, variables, and types.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

policy_definition_property = bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionProperty(
    rules=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionRuleProperty(
        alternate_expression="alternateExpression",
        expression="expression",
        id="id"
    )],
    types=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeProperty(
        description="description",
        name="name",
        values=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeValueProperty(
            description="description",
            value="value"
        )]
    )],
    variables=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionVariableProperty(
        description="description",
        name="name",
        type="type"
    )],
    version="version"
)

Attributes

rules

The collection of rules that define the policy logic.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinition.html#cfn-bedrock-automatedreasoningpolicy-policydefinition-rules

types

The custom types defined within the policy definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinition.html#cfn-bedrock-automatedreasoningpolicy-policydefinition-types

variables

The variables used within the policy definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinition.html#cfn-bedrock-automatedreasoningpolicy-policydefinition-variables

version

The version of the policy definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinition.html#cfn-bedrock-automatedreasoningpolicy-policydefinition-version

PolicyDefinitionRuleProperty

class CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionRuleProperty(*, alternate_expression=None, expression=None, id=None)

Bases: object

A rule within the policy definition that defines logical constraints.

Parameters:
  • alternate_expression (Optional[str]) – An alternative expression for the policy rule.

  • expression (Optional[str]) – The logical expression that defines the rule.

  • id (Optional[str]) – The unique identifier for the policy definition rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionrule.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

policy_definition_rule_property = bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionRuleProperty(
    alternate_expression="alternateExpression",
    expression="expression",
    id="id"
)

Attributes

alternate_expression

An alternative expression for the policy rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionrule.html#cfn-bedrock-automatedreasoningpolicy-policydefinitionrule-alternateexpression

expression

The logical expression that defines the rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionrule.html#cfn-bedrock-automatedreasoningpolicy-policydefinitionrule-expression

id

The unique identifier for the policy definition rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionrule.html#cfn-bedrock-automatedreasoningpolicy-policydefinitionrule-id

PolicyDefinitionTypeProperty

class CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeProperty(*, description=None, name=None, values=None)

Bases: object

A custom type definition within the policy.

Parameters:
  • description (Optional[str]) – A description of the custom type defined in the policy.

  • name (Optional[str]) – The name of a custom type defined in the policy.

  • values (Union[IResolvable, Sequence[Union[IResolvable, PolicyDefinitionTypeValueProperty, Dict[str, Any]]], None]) – The possible values for a custom type defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitiontype.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

policy_definition_type_property = bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeProperty(
    description="description",
    name="name",
    values=[bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeValueProperty(
        description="description",
        value="value"
    )]
)

Attributes

description

A description of the custom type defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitiontype.html#cfn-bedrock-automatedreasoningpolicy-policydefinitiontype-description

name

The name of a custom type defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitiontype.html#cfn-bedrock-automatedreasoningpolicy-policydefinitiontype-name

values

The possible values for a custom type defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitiontype.html#cfn-bedrock-automatedreasoningpolicy-policydefinitiontype-values

PolicyDefinitionTypeValueProperty

class CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeValueProperty(*, description=None, value=None)

Bases: object

A value associated with a custom type in the policy definition.

Parameters:
  • description (Optional[str]) – A description of the policy definition type value.

  • value (Optional[str]) – The value associated with a policy definition type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitiontypevalue.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

policy_definition_type_value_property = bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionTypeValueProperty(
    description="description",
    value="value"
)

Attributes

description

A description of the policy definition type value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitiontypevalue.html#cfn-bedrock-automatedreasoningpolicy-policydefinitiontypevalue-description

value

The value associated with a policy definition type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitiontypevalue.html#cfn-bedrock-automatedreasoningpolicy-policydefinitiontypevalue-value

PolicyDefinitionVariableProperty

class CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionVariableProperty(*, description=None, name=None, type=None)

Bases: object

A variable defined within the policy that can be used in rules.

Parameters:
  • description (Optional[str]) – A description of a variable defined in the policy.

  • name (Optional[str]) – The name of a variable defined in the policy.

  • type (Optional[str]) – The data type of a variable defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionvariable.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins

policy_definition_variable_property = bedrock_mixins.CfnAutomatedReasoningPolicyPropsMixin.PolicyDefinitionVariableProperty(
    description="description",
    name="name",
    type="type"
)

Attributes

description

A description of a variable defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionvariable.html#cfn-bedrock-automatedreasoningpolicy-policydefinitionvariable-description

name

The name of a variable defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionvariable.html#cfn-bedrock-automatedreasoningpolicy-policydefinitionvariable-name

type

The data type of a variable defined in the policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-automatedreasoningpolicy-policydefinitionvariable.html#cfn-bedrock-automatedreasoningpolicy-policydefinitionvariable-type