Interface: GuardrailProps
March 19, 2026 ยท View on GitHub
@cdklabs/generative-ai-cdk-constructs
@cdklabs/generative-ai-cdk-constructs / bedrock / GuardrailProps
Interface: GuardrailProps
Properties for creating a Guardrail.
Properties
blockedInputMessaging?
readonlyoptionalblockedInputMessaging?:string
The message to return when the guardrail blocks a prompt.
Default
"Sorry, your query violates our usage policy."
blockedOutputsMessaging?
readonlyoptionalblockedOutputsMessaging?:string
The message to return when the guardrail blocks a model response.
Default
"Sorry, I am unable to answer your question because of our usage policy."
contentFilters?
readonlyoptionalcontentFilters?:ContentFilter[]
The content filters to apply to the guardrail. Note, if one of
contextualGroundingFilters?
readonlyoptionalcontextualGroundingFilters?:ContextualGroundingFilter[]
The contextual grounding filters to apply to the guardrail.
deniedTopics?
readonlyoptionaldeniedTopics?:Topic[]
Up to 30 denied topics to block user inputs or model responses associated with the topic.
description?
readonlyoptionaldescription?:string
The description of the guardrail.
kmsKey?
readonlyoptionalkmsKey?:IKey
A custom KMS key to use for encrypting data.
Default
"Your data is encrypted by default with a key that AWS owns and manages for you."
managedWordListFilters?
readonlyoptionalmanagedWordListFilters?:ManagedWordFilter[]
The managed word filters to apply to the guardrail.
name
readonlyname:string
The name of the guardrail.
piiFilters?
readonlyoptionalpiiFilters?:PIIFilter[]
The PII filters to apply to the guardrail.
regexFilters?
readonlyoptionalregexFilters?:RegexFilter[]
The regular expression (regex) filters to apply to the guardrail.
wordFilters?
readonlyoptionalwordFilters?:WordFilter[]
The word filters to apply to the guardrail.