Class CfnGuardrail.RegexConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnGuardrail.RegexConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGuardrail.RegexConfigProperty>
- Enclosing interface:
CfnGuardrail.RegexConfigProperty
@Stability(Stable)
public static final class CfnGuardrail.RegexConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnGuardrail.RegexConfigProperty>
A builder for
CfnGuardrail.RegexConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnGuardrail.RegexConfigProperty.getAction()build()Builds the configured instance.description(String description) Sets the value ofCfnGuardrail.RegexConfigProperty.getDescription()inputAction(String inputAction) Sets the value ofCfnGuardrail.RegexConfigProperty.getInputAction()inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getInputEnabled()inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getInputEnabled()Sets the value ofCfnGuardrail.RegexConfigProperty.getName()outputAction(String outputAction) Sets the value ofCfnGuardrail.RegexConfigProperty.getOutputAction()outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getOutputEnabled()outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getOutputEnabled()Sets the value ofCfnGuardrail.RegexConfigProperty.getPattern()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
Sets the value ofCfnGuardrail.RegexConfigProperty.getAction()- Parameters:
action- The guardrail action to configure when matching regular expression is detected. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnGuardrail.RegexConfigProperty.getName()- Parameters:
name- The name of the regular expression to configure for the guardrail. This parameter is required.- Returns:
this
-
pattern
Sets the value ofCfnGuardrail.RegexConfigProperty.getPattern()- Parameters:
pattern- The regular expression pattern to configure for the guardrail. This parameter is required.- Returns:
this
-
description
Sets the value ofCfnGuardrail.RegexConfigProperty.getDescription()- Parameters:
description- The description of the regular expression to configure for the guardrail.- Returns:
this
-
inputAction
Sets the value ofCfnGuardrail.RegexConfigProperty.getInputAction()- Parameters:
inputAction- Specifies the action to take when harmful content is detected in the input. Supported values include:.BLOCK– Block the content and replace it with blocked messaging.NONE– Take no action but return detection information in the trace response.
- Returns:
this
-
inputEnabled
@Stability(Stable) public CfnGuardrail.RegexConfigProperty.Builder inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getInputEnabled()- Parameters:
inputEnabled- Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
inputEnabled
@Stability(Stable) public CfnGuardrail.RegexConfigProperty.Builder inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getInputEnabled()- Parameters:
inputEnabled- Specifies whether to enable guardrail evaluation on the input. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
outputAction
@Stability(Stable) public CfnGuardrail.RegexConfigProperty.Builder outputAction(String outputAction) Sets the value ofCfnGuardrail.RegexConfigProperty.getOutputAction()- Parameters:
outputAction- Specifies the action to take when harmful content is detected in the output. Supported values include:.BLOCK– Block the content and replace it with blocked messaging.NONE– Take no action but return detection information in the trace response.
- Returns:
this
-
outputEnabled
@Stability(Stable) public CfnGuardrail.RegexConfigProperty.Builder outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getOutputEnabled()- Parameters:
outputEnabled- Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
outputEnabled
@Stability(Stable) public CfnGuardrail.RegexConfigProperty.Builder outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.RegexConfigProperty.getOutputEnabled()- Parameters:
outputEnabled- Specifies whether to enable guardrail evaluation on the output. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnGuardrail.RegexConfigProperty>- Returns:
- a new instance of
CfnGuardrail.RegexConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-