Class CfnAutomatedReasoningPolicy

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.bedrock.CfnAutomatedReasoningPolicy
All Implemented Interfaces:
IInspectable, ITaggableV2, IAutomatedReasoningPolicyRef, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-15T14:51:52.781Z") @Stability(Stable) public class CfnAutomatedReasoningPolicy extends CfnResource implements IInspectable, IAutomatedReasoningPolicyRef, ITaggableV2
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 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.bedrock.*;
 CfnAutomatedReasoningPolicy cfnAutomatedReasoningPolicy = CfnAutomatedReasoningPolicy.Builder.create(this, "MyCfnAutomatedReasoningPolicy")
         .name("name")
         // the properties below are optional
         .description("description")
         .policyDefinition(PolicyDefinitionProperty.builder()
                 .rules(List.of(PolicyDefinitionRuleProperty.builder()
                         .expression("expression")
                         .id("id")
                         // the properties below are optional
                         .alternateExpression("alternateExpression")
                         .build()))
                 .types(List.of(PolicyDefinitionTypeProperty.builder()
                         .name("name")
                         .values(List.of(PolicyDefinitionTypeValueProperty.builder()
                                 .value("value")
                                 // the properties below are optional
                                 .description("description")
                                 .build()))
                         // the properties below are optional
                         .description("description")
                         .build()))
                 .variables(List.of(PolicyDefinitionVariableProperty.builder()
                         .description("description")
                         .name("name")
                         .type("type")
                         .build()))
                 .version("version")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnAutomatedReasoningPolicy

      protected CfnAutomatedReasoningPolicy(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAutomatedReasoningPolicy

      protected CfnAutomatedReasoningPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAutomatedReasoningPolicy

      @Stability(Stable) public CfnAutomatedReasoningPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAutomatedReasoningPolicyProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The timestamp when the policy was created.
    • getAttrDefinitionHash

      @Stability(Stable) @NotNull public String getAttrDefinitionHash()
      A hash of the policy definition used to identify the version.
    • getAttrPolicyArn

      @Stability(Stable) @NotNull public String getAttrPolicyArn()
      The Amazon Resource Name (ARN) of the policy.
    • getAttrPolicyId

      @Stability(Stable) @NotNull public String getAttrPolicyId()
      The unique identifier of the policy.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The timestamp when the policy was last updated.
    • getAttrVersion

      @Stability(Stable) @NotNull public String getAttrVersion()
      The version of the policy.
    • getAutomatedReasoningPolicyRef

      @Stability(Stable) @NotNull public AutomatedReasoningPolicyReference getAutomatedReasoningPolicyRef()
      A reference to a AutomatedReasoningPolicy resource.
      Specified by:
      getAutomatedReasoningPolicyRef in interface IAutomatedReasoningPolicyRef
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the policy.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the policy.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the policy.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the policy.
    • getPolicyDefinition

      @Stability(Stable) @Nullable public Object getPolicyDefinition()
      The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.
    • setPolicyDefinition

      @Stability(Stable) public void setPolicyDefinition(@Nullable IResolvable value)
      The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.
    • setPolicyDefinition

      @Stability(Stable) public void setPolicyDefinition(@Nullable CfnAutomatedReasoningPolicy.PolicyDefinitionProperty value)
      The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags associated with the Automated Reasoning policy.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags associated with the Automated Reasoning policy.