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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forCfnAutomatedReasoningPolicy
.static interface
The complete policy definition containing rules, variables, and types.static interface
A rule within the policy definition that defines logical constraints.static interface
A custom type definition within the policy.static interface
A value associated with a custom type in the policy definition.static interface
A variable defined within the policy that can be used in rules.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrock.IAutomatedReasoningPolicyRef
IAutomatedReasoningPolicyRef.Jsii$Default, IAutomatedReasoningPolicyRef.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnAutomatedReasoningPolicy
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAutomatedReasoningPolicy
(software.amazon.jsii.JsiiObjectRef objRef) CfnAutomatedReasoningPolicy
(software.constructs.Construct scope, String id, CfnAutomatedReasoningPolicyProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe timestamp when the policy was created.A hash of the policy definition used to identify the version.The Amazon Resource Name (ARN) of the policy.The unique identifier of the policy.The timestamp when the policy was last updated.The version of the policy.A reference to a AutomatedReasoningPolicy resource.Tag Manager which manages the tags for this resource.The description of the policy.getName()
The name of the policy.The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.getTags()
The tags associated with the Automated Reasoning policy.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDescription
(String value) The description of the policy.void
The name of the policy.void
setPolicyDefinition
(IResolvable value) The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.void
The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.void
The tags associated with the Automated Reasoning policy.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- 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 classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrCreatedAt
The timestamp when the policy was created. -
getAttrDefinitionHash
A hash of the policy definition used to identify the version. -
getAttrPolicyArn
The Amazon Resource Name (ARN) of the policy. -
getAttrPolicyId
The unique identifier of the policy. -
getAttrUpdatedAt
The timestamp when the policy was last updated. -
getAttrVersion
The version of the policy. -
getAutomatedReasoningPolicyRef
@Stability(Stable) @NotNull public AutomatedReasoningPolicyReference getAutomatedReasoningPolicyRef()A reference to a AutomatedReasoningPolicy resource.- Specified by:
getAutomatedReasoningPolicyRef
in interfaceIAutomatedReasoningPolicyRef
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManager
in interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getName
The name of the policy. -
setName
The name of the policy. -
getDescription
The description of the policy. -
setDescription
The description of the policy. -
getPolicyDefinition
The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents. -
setPolicyDefinition
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
The tags associated with the Automated Reasoning policy. -
setTags
The tags associated with the Automated Reasoning policy.
-