@cdklabs/generative-ai-cdk-constructs
@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
optional
inputAction:GuardrailAction
The action to take when a regex match is detected in the input.
readonly
optional
inputEnabled:boolean
Whether the regex filter is enabled for input.
readonly
name:string
The name of the regex filter.
readonly
optional
outputAction:GuardrailAction
The action to take when a regex match is detected in the output.
readonly
optional
outputEnabled:boolean
Whether the regex filter is enabled for output.
readonly
pattern:string
The regular expression pattern to match.