Class CfnAIGuardrailProps.Builder
java.lang.Object
software.amazon.awscdk.services.wisdom.CfnAIGuardrailProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAIGuardrailProps>
- Enclosing interface:
CfnAIGuardrailProps
@Stability(Stable)
public static final class CfnAIGuardrailProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAIGuardrailProps>
A builder for
CfnAIGuardrailProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassistantId
(String assistantId) Sets the value ofCfnAIGuardrailProps.getAssistantId()
blockedInputMessaging
(String blockedInputMessaging) Sets the value ofCfnAIGuardrailProps.getBlockedInputMessaging()
blockedOutputsMessaging
(String blockedOutputsMessaging) Sets the value ofCfnAIGuardrailProps.getBlockedOutputsMessaging()
build()
Builds the configured instance.contentPolicyConfig
(IResolvable contentPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContentPolicyConfig()
contentPolicyConfig
(CfnAIGuardrail.AIGuardrailContentPolicyConfigProperty contentPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContentPolicyConfig()
contextualGroundingPolicyConfig
(IResolvable contextualGroundingPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContextualGroundingPolicyConfig()
contextualGroundingPolicyConfig
(CfnAIGuardrail.AIGuardrailContextualGroundingPolicyConfigProperty contextualGroundingPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContextualGroundingPolicyConfig()
description
(String description) Sets the value ofCfnAIGuardrailProps.getDescription()
Sets the value ofCfnAIGuardrailProps.getName()
sensitiveInformationPolicyConfig
(IResolvable sensitiveInformationPolicyConfig) Sets the value ofCfnAIGuardrailProps.getSensitiveInformationPolicyConfig()
sensitiveInformationPolicyConfig
(CfnAIGuardrail.AIGuardrailSensitiveInformationPolicyConfigProperty sensitiveInformationPolicyConfig) Sets the value ofCfnAIGuardrailProps.getSensitiveInformationPolicyConfig()
Sets the value ofCfnAIGuardrailProps.getTags()
topicPolicyConfig
(IResolvable topicPolicyConfig) Sets the value ofCfnAIGuardrailProps.getTopicPolicyConfig()
topicPolicyConfig
(CfnAIGuardrail.AIGuardrailTopicPolicyConfigProperty topicPolicyConfig) Sets the value ofCfnAIGuardrailProps.getTopicPolicyConfig()
wordPolicyConfig
(IResolvable wordPolicyConfig) Sets the value ofCfnAIGuardrailProps.getWordPolicyConfig()
wordPolicyConfig
(CfnAIGuardrail.AIGuardrailWordPolicyConfigProperty wordPolicyConfig) Sets the value ofCfnAIGuardrailProps.getWordPolicyConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
assistantId
Sets the value ofCfnAIGuardrailProps.getAssistantId()
- Parameters:
assistantId
- The identifier of the Amazon Q in Connect assistant. This parameter is required. Can be either the ID or the ARN. URLs cannot contain the ARN.- Returns:
this
-
blockedInputMessaging
@Stability(Stable) public CfnAIGuardrailProps.Builder blockedInputMessaging(String blockedInputMessaging) Sets the value ofCfnAIGuardrailProps.getBlockedInputMessaging()
- Parameters:
blockedInputMessaging
- The message to return when the AI Guardrail blocks a prompt. This parameter is required.- Returns:
this
-
blockedOutputsMessaging
@Stability(Stable) public CfnAIGuardrailProps.Builder blockedOutputsMessaging(String blockedOutputsMessaging) Sets the value ofCfnAIGuardrailProps.getBlockedOutputsMessaging()
- Parameters:
blockedOutputsMessaging
- The message to return when the AI Guardrail blocks a model response. This parameter is required.- Returns:
this
-
contentPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder contentPolicyConfig(IResolvable contentPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContentPolicyConfig()
- Parameters:
contentPolicyConfig
- Contains details about how to handle harmful content.- Returns:
this
-
contentPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder contentPolicyConfig(CfnAIGuardrail.AIGuardrailContentPolicyConfigProperty contentPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContentPolicyConfig()
- Parameters:
contentPolicyConfig
- Contains details about how to handle harmful content.- Returns:
this
-
contextualGroundingPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder contextualGroundingPolicyConfig(IResolvable contextualGroundingPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContextualGroundingPolicyConfig()
- Parameters:
contextualGroundingPolicyConfig
- The policy configuration details for the AI Guardrail's contextual grounding policy.- Returns:
this
-
contextualGroundingPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder contextualGroundingPolicyConfig(CfnAIGuardrail.AIGuardrailContextualGroundingPolicyConfigProperty contextualGroundingPolicyConfig) Sets the value ofCfnAIGuardrailProps.getContextualGroundingPolicyConfig()
- Parameters:
contextualGroundingPolicyConfig
- The policy configuration details for the AI Guardrail's contextual grounding policy.- Returns:
this
-
description
Sets the value ofCfnAIGuardrailProps.getDescription()
- Parameters:
description
- A description of the AI Guardrail.- Returns:
this
-
name
Sets the value ofCfnAIGuardrailProps.getName()
- Parameters:
name
- The name of the AI Guardrail.- Returns:
this
-
sensitiveInformationPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder sensitiveInformationPolicyConfig(IResolvable sensitiveInformationPolicyConfig) Sets the value ofCfnAIGuardrailProps.getSensitiveInformationPolicyConfig()
- Parameters:
sensitiveInformationPolicyConfig
- Contains details about PII entities and regular expressions to configure for the AI Guardrail.- Returns:
this
-
sensitiveInformationPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder sensitiveInformationPolicyConfig(CfnAIGuardrail.AIGuardrailSensitiveInformationPolicyConfigProperty sensitiveInformationPolicyConfig) Sets the value ofCfnAIGuardrailProps.getSensitiveInformationPolicyConfig()
- Parameters:
sensitiveInformationPolicyConfig
- Contains details about PII entities and regular expressions to configure for the AI Guardrail.- Returns:
this
-
tags
Sets the value ofCfnAIGuardrailProps.getTags()
- Parameters:
tags
- The tags used to organize, track, or control access for this resource.- Returns:
this
-
topicPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder topicPolicyConfig(IResolvable topicPolicyConfig) Sets the value ofCfnAIGuardrailProps.getTopicPolicyConfig()
- Parameters:
topicPolicyConfig
- Contains details about topics that the AI Guardrail should identify and deny.- Returns:
this
-
topicPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder topicPolicyConfig(CfnAIGuardrail.AIGuardrailTopicPolicyConfigProperty topicPolicyConfig) Sets the value ofCfnAIGuardrailProps.getTopicPolicyConfig()
- Parameters:
topicPolicyConfig
- Contains details about topics that the AI Guardrail should identify and deny.- Returns:
this
-
wordPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder wordPolicyConfig(IResolvable wordPolicyConfig) Sets the value ofCfnAIGuardrailProps.getWordPolicyConfig()
- Parameters:
wordPolicyConfig
- Contains details about the word policy to configured for the AI Guardrail.- Returns:
this
-
wordPolicyConfig
@Stability(Stable) public CfnAIGuardrailProps.Builder wordPolicyConfig(CfnAIGuardrail.AIGuardrailWordPolicyConfigProperty wordPolicyConfig) Sets the value ofCfnAIGuardrailProps.getWordPolicyConfig()
- Parameters:
wordPolicyConfig
- Contains details about the word policy to configured for the AI Guardrail.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAIGuardrailProps>
- Returns:
- a new instance of
CfnAIGuardrailProps
- Throws:
NullPointerException
- if any required attribute was not provided
-