Interface: CustomTopicProps
March 19, 2026 ยท View on GitHub
@cdklabs/generative-ai-cdk-constructs
@cdklabs/generative-ai-cdk-constructs / bedrock / CustomTopicProps
Interface: CustomTopicProps
Interface for creating a custom Topic
Properties
definition
readonlydefinition:string
Provide a clear definition to detect and block user inputs and FM responses that fall into this topic. Avoid starting with "don't".
Example
`Investment advice refers to inquiries, guidance, or recommendations
regarding the management or allocation of funds or assets with the goal of
generating returns or achieving specific financial objectives.`
examples
readonlyexamples:string[]
Representative phrases that refer to the topic. These phrases can represent a user input or a model response. Add up to 5 phrases, up to 100 characters each.
Example
"Where should I invest my money?"
inputAction?
readonlyoptionalinputAction?:GuardrailAction
The action to take when a topic is detected in the input.
inputEnabled?
readonlyoptionalinputEnabled?:boolean
Whether the topic filter is enabled for input.
name
readonlyname:string
The name of the topic to deny.
outputAction?
readonlyoptionaloutputAction?:GuardrailAction
The action to take when a topic is detected in the output.
outputEnabled?
readonlyoptionaloutputEnabled?:boolean
Whether the topic filter is enabled for output.