Class CfnGuardrail.WordConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnGuardrail.WordConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGuardrail.WordConfigProperty>
- Enclosing interface:
CfnGuardrail.WordConfigProperty
@Stability(Stable)
public static final class CfnGuardrail.WordConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnGuardrail.WordConfigProperty>
A builder for
CfnGuardrail.WordConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.inputAction(String inputAction) Sets the value ofCfnGuardrail.WordConfigProperty.getInputAction()inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.getInputEnabled()inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.getInputEnabled()outputAction(String outputAction) Sets the value ofCfnGuardrail.WordConfigProperty.getOutputAction()outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.getOutputEnabled()outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.getOutputEnabled()Sets the value ofCfnGuardrail.WordConfigProperty.getText()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
text
Sets the value ofCfnGuardrail.WordConfigProperty.getText()- Parameters:
text- Text of the word configured for the guardrail to block. This parameter is required.- Returns:
this
-
inputAction
Sets the value ofCfnGuardrail.WordConfigProperty.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.WordConfigProperty.Builder inputEnabled(Boolean inputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.getInputEnabled()- Parameters:
inputEnabled- Specifies whether to enable guardrail evaluation on the intput. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
inputEnabled
@Stability(Stable) public CfnGuardrail.WordConfigProperty.Builder inputEnabled(IResolvable inputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.getInputEnabled()- Parameters:
inputEnabled- Specifies whether to enable guardrail evaluation on the intput. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.- Returns:
this
-
outputAction
Sets the value ofCfnGuardrail.WordConfigProperty.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.WordConfigProperty.Builder outputEnabled(Boolean outputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.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.WordConfigProperty.Builder outputEnabled(IResolvable outputEnabled) Sets the value ofCfnGuardrail.WordConfigProperty.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.WordConfigProperty>- Returns:
- a new instance of
CfnGuardrail.WordConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-