@cdklabs/generative-ai-cdk-constructs • Docs
@cdklabs/generative-ai-cdk-constructs / bedrock / RegexFilter
A Regular expression (regex) filter for sensitive information.
const regexFilter: RegexFilter = {
name: "my-custom-filter",
action: SensitiveInfoGuardrailAction.BLOCK,
pattern: "\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b",
};
readonly
action:GuardrailAction
The action to take when a regex match is detected.
readonly
optional
description:string
The description of the regex filter.
readonly
name:string
The name of the regex filter.
readonly
pattern:string
The regular expression pattern to match.