Class CfnAIGuardrail
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.wisdom.CfnAIGuardrail
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IAIGuardrailRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:16.021Z")
@Stability(Stable)
public class CfnAIGuardrail
extends CfnResource
implements IInspectable, IAIGuardrailRef, ITaggableV2
Creates an Amazon Q in Connect AI Guardrail.
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.wisdom.*;
CfnAIGuardrail cfnAIGuardrail = CfnAIGuardrail.Builder.create(this, "MyCfnAIGuardrail")
.assistantId("assistantId")
.blockedInputMessaging("blockedInputMessaging")
.blockedOutputsMessaging("blockedOutputsMessaging")
// the properties below are optional
.contentPolicyConfig(AIGuardrailContentPolicyConfigProperty.builder()
.filtersConfig(List.of(GuardrailContentFilterConfigProperty.builder()
.inputStrength("inputStrength")
.outputStrength("outputStrength")
.type("type")
.build()))
.build())
.contextualGroundingPolicyConfig(AIGuardrailContextualGroundingPolicyConfigProperty.builder()
.filtersConfig(List.of(GuardrailContextualGroundingFilterConfigProperty.builder()
.threshold(123)
.type("type")
.build()))
.build())
.description("description")
.name("name")
.sensitiveInformationPolicyConfig(AIGuardrailSensitiveInformationPolicyConfigProperty.builder()
.piiEntitiesConfig(List.of(GuardrailPiiEntityConfigProperty.builder()
.action("action")
.type("type")
.build()))
.regexesConfig(List.of(GuardrailRegexConfigProperty.builder()
.action("action")
.name("name")
.pattern("pattern")
// the properties below are optional
.description("description")
.build()))
.build())
.tags(Map.of(
"tagsKey", "tags"))
.topicPolicyConfig(AIGuardrailTopicPolicyConfigProperty.builder()
.topicsConfig(List.of(GuardrailTopicConfigProperty.builder()
.definition("definition")
.name("name")
.type("type")
// the properties below are optional
.examples(List.of("examples"))
.build()))
.build())
.wordPolicyConfig(AIGuardrailWordPolicyConfigProperty.builder()
.managedWordListsConfig(List.of(GuardrailManagedWordsConfigProperty.builder()
.type("type")
.build()))
.wordsConfig(List.of(GuardrailWordConfigProperty.builder()
.text("text")
.build()))
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceContent policy config for a guardrail.static interfaceContextual grounding policy config for a guardrail.static interfaceSensitive information policy configuration for a guardrail.static interfaceTopic policy configuration for a guardrail.static interfaceWord policy config for a guardrail.static final classA fluent builder forCfnAIGuardrail.static interfaceContent filter configuration in content policy.static interfaceA configuration for grounding filter.static interfaceA managed words config.static interfacePII entity configuration.static interfaceA regex configuration.static interfaceTopic configuration in topic policy.static interfaceA custom word config.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.wisdom.IAIGuardrailRef
IAIGuardrailRef.Jsii$Default, IAIGuardrailRef.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
ConstructorsModifierConstructorDescriptionprotectedCfnAIGuardrail(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAIGuardrail(software.amazon.jsii.JsiiObjectRef objRef) CfnAIGuardrail(software.constructs.Construct scope, String id, CfnAIGuardrailProps props) Create a newAWS::Wisdom::AIGuardrail. -
Method Summary
Modifier and TypeMethodDescriptionA reference to a AIGuardrail resource.The identifier of the Amazon Q in Connect assistant.The Amazon Resource Name (ARN) of the AI Guardrail.The identifier of the Amazon Q in Connect AI Guardrail.The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.The message to return when the AI Guardrail blocks a prompt.The message to return when the AI Guardrail blocks a model response.Tag Manager which manages the tags for this resource.Contains details about how to handle harmful content.The policy configuration details for the AI Guardrail's contextual grounding policy.A description of the AI Guardrail.getName()The name of the AI Guardrail.Contains details about PII entities and regular expressions to configure for the AI Guardrail.getTags()The tags used to organize, track, or control access for this resource.Contains details about topics that the AI Guardrail should identify and deny.Contains details about the word policy to configured for the AI Guardrail.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAssistantId(String value) The identifier of the Amazon Q in Connect assistant.voidsetBlockedInputMessaging(String value) The message to return when the AI Guardrail blocks a prompt.voidsetBlockedOutputsMessaging(String value) The message to return when the AI Guardrail blocks a model response.voidContains details about how to handle harmful content.voidContains details about how to handle harmful content.voidThe policy configuration details for the AI Guardrail's contextual grounding policy.voidsetContextualGroundingPolicyConfig(CfnAIGuardrail.AIGuardrailContextualGroundingPolicyConfigProperty value) The policy configuration details for the AI Guardrail's contextual grounding policy.voidsetDescription(String value) A description of the AI Guardrail.voidThe name of the AI Guardrail.voidContains details about PII entities and regular expressions to configure for the AI Guardrail.voidsetSensitiveInformationPolicyConfig(CfnAIGuardrail.AIGuardrailSensitiveInformationPolicyConfigProperty value) Contains details about PII entities and regular expressions to configure for the AI Guardrail.voidThe tags used to organize, track, or control access for this resource.voidsetTopicPolicyConfig(IResolvable value) Contains details about topics that the AI Guardrail should identify and deny.voidContains details about topics that the AI Guardrail should identify and deny.voidsetWordPolicyConfig(IResolvable value) Contains details about the word policy to configured for the AI Guardrail.voidContains details about the word policy to configured for the AI Guardrail.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
-
CfnAIGuardrail
protected CfnAIGuardrail(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAIGuardrail
protected CfnAIGuardrail(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAIGuardrail
@Stability(Stable) public CfnAIGuardrail(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAIGuardrailProps props) Create a newAWS::Wisdom::AIGuardrail.- 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:
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.
-
getAiGuardrailRef
A reference to a AIGuardrail resource.- Specified by:
getAiGuardrailRefin interfaceIAIGuardrailRef
-
getAttrAiGuardrailArn
The Amazon Resource Name (ARN) of the AI Guardrail. -
getAttrAiGuardrailId
The identifier of the Amazon Q in Connect AI Guardrail. -
getAttrAssistantArn
The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getAssistantId
The identifier of the Amazon Q in Connect assistant. -
setAssistantId
The identifier of the Amazon Q in Connect assistant. -
getBlockedInputMessaging
The message to return when the AI Guardrail blocks a prompt. -
setBlockedInputMessaging
The message to return when the AI Guardrail blocks a prompt. -
getBlockedOutputsMessaging
The message to return when the AI Guardrail blocks a model response. -
setBlockedOutputsMessaging
The message to return when the AI Guardrail blocks a model response. -
getContentPolicyConfig
Contains details about how to handle harmful content.Returns union: either
IResolvableorCfnAIGuardrail.AIGuardrailContentPolicyConfigProperty -
setContentPolicyConfig
Contains details about how to handle harmful content. -
setContentPolicyConfig
@Stability(Stable) public void setContentPolicyConfig(@Nullable CfnAIGuardrail.AIGuardrailContentPolicyConfigProperty value) Contains details about how to handle harmful content. -
getContextualGroundingPolicyConfig
The policy configuration details for the AI Guardrail's contextual grounding policy.Returns union: either
IResolvableorCfnAIGuardrail.AIGuardrailContextualGroundingPolicyConfigProperty -
setContextualGroundingPolicyConfig
The policy configuration details for the AI Guardrail's contextual grounding policy. -
setContextualGroundingPolicyConfig
@Stability(Stable) public void setContextualGroundingPolicyConfig(@Nullable CfnAIGuardrail.AIGuardrailContextualGroundingPolicyConfigProperty value) The policy configuration details for the AI Guardrail's contextual grounding policy. -
getDescription
A description of the AI Guardrail. -
setDescription
A description of the AI Guardrail. -
getName
The name of the AI Guardrail. -
setName
The name of the AI Guardrail. -
getSensitiveInformationPolicyConfig
Contains details about PII entities and regular expressions to configure for the AI Guardrail.Returns union: either
IResolvableorCfnAIGuardrail.AIGuardrailSensitiveInformationPolicyConfigProperty -
setSensitiveInformationPolicyConfig
Contains details about PII entities and regular expressions to configure for the AI Guardrail. -
setSensitiveInformationPolicyConfig
@Stability(Stable) public void setSensitiveInformationPolicyConfig(@Nullable CfnAIGuardrail.AIGuardrailSensitiveInformationPolicyConfigProperty value) Contains details about PII entities and regular expressions to configure for the AI Guardrail. -
getTags
The tags used to organize, track, or control access for this resource. -
setTags
The tags used to organize, track, or control access for this resource. -
getTopicPolicyConfig
Contains details about topics that the AI Guardrail should identify and deny.Returns union: either
IResolvableorCfnAIGuardrail.AIGuardrailTopicPolicyConfigProperty -
setTopicPolicyConfig
Contains details about topics that the AI Guardrail should identify and deny. -
setTopicPolicyConfig
@Stability(Stable) public void setTopicPolicyConfig(@Nullable CfnAIGuardrail.AIGuardrailTopicPolicyConfigProperty value) Contains details about topics that the AI Guardrail should identify and deny. -
getWordPolicyConfig
Contains details about the word policy to configured for the AI Guardrail.Returns union: either
IResolvableorCfnAIGuardrail.AIGuardrailWordPolicyConfigProperty -
setWordPolicyConfig
Contains details about the word policy to configured for the AI Guardrail. -
setWordPolicyConfig
@Stability(Stable) public void setWordPolicyConfig(@Nullable CfnAIGuardrail.AIGuardrailWordPolicyConfigProperty value) Contains details about the word policy to configured for the AI Guardrail.
-