Class CfnAutomatedReasoningPolicy
- All Implemented Interfaces:
IInspectable,IAutomatedReasoningPolicyRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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")
.forceDelete(false)
.kmsKeyId("kmsKeyId")
.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 classA fluent builder forCfnAutomatedReasoningPolicy.static interfaceThe complete policy definition containing rules, variables, and types.static interfaceA rule within the policy definition that defines logical constraints.static interfaceA custom type definition within the policy.static interfaceA value associated with a custom type in the policy definition.static interfaceA 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.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.bedrock.IAutomatedReasoningPolicyRef
IAutomatedReasoningPolicyRef.Jsii$Default, IAutomatedReasoningPolicyRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAutomatedReasoningPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAutomatedReasoningPolicy(software.amazon.jsii.JsiiObjectRef objRef) CfnAutomatedReasoningPolicy(software.constructs.Construct scope, String id, CfnAutomatedReasoningPolicyProps props) Create a newAWS::Bedrock::AutomatedReasoningPolicy. -
Method Summary
Modifier and TypeMethodDescriptionThe timestamp when the policy was created.A hash of the policy definition used to identify the version.The KMS key with which the Policy's assets will be encrypted at rest.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.Specifies whether to force delete the automated reasoning policy even if it has active resources.The KMS key with which the Policy's assets will be encrypted at rest.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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnAutomatedReasoningPolicy.renderProperties(Map<String, Object> props) voidsetDescription(String value) The description of the policy.voidsetForceDelete(Boolean value) Specifies whether to force delete the automated reasoning policy even if it has active resources.voidsetForceDelete(IResolvable value) Specifies whether to force delete the automated reasoning policy even if it has active resources.voidsetKmsKeyId(String value) The KMS key with which the Policy's assets will be encrypted at rest.voidThe name of the policy.voidsetPolicyDefinition(IResolvable value) The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.voidThe complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.voidThe 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, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods 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) Create a newAWS::Bedrock::AutomatedReasoningPolicy.- 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
-
isCfnAutomatedReasoningPolicy
Checks whether the given object is a CfnAutomatedReasoningPolicy.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin 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:
renderPropertiesin 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. -
getAttrKmsKeyArn
The KMS key with which the Policy's assets will be encrypted at rest. -
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:
getAutomatedReasoningPolicyRefin interfaceIAutomatedReasoningPolicyRef
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin 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. -
getForceDelete
Specifies whether to force delete the automated reasoning policy even if it has active resources.Returns union: either
BooleanorIResolvable -
setForceDelete
Specifies whether to force delete the automated reasoning policy even if it has active resources. -
setForceDelete
Specifies whether to force delete the automated reasoning policy even if it has active resources. -
getKmsKeyId
The KMS key with which the Policy's assets will be encrypted at rest. -
setKmsKeyId
The KMS key with which the Policy's assets will be encrypted at rest. -
getPolicyDefinition
The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.Returns union: either
IResolvableorCfnAutomatedReasoningPolicy.PolicyDefinitionProperty -
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.
-