Class CfnGuardrailProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrock.CfnGuardrailProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGuardrailProps>
- Enclosing interface:
CfnGuardrailProps
@Stability(Stable)
public static final class CfnGuardrailProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnGuardrailProps>
A builder for
CfnGuardrailProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblockedInputMessaging(String blockedInputMessaging) Sets the value ofCfnGuardrailProps.getBlockedInputMessaging()blockedOutputsMessaging(String blockedOutputsMessaging) Sets the value ofCfnGuardrailProps.getBlockedOutputsMessaging()build()Builds the configured instance.contentPolicyConfig(IResolvable contentPolicyConfig) Sets the value ofCfnGuardrailProps.getContentPolicyConfig()contentPolicyConfig(CfnGuardrail.ContentPolicyConfigProperty contentPolicyConfig) Sets the value ofCfnGuardrailProps.getContentPolicyConfig()contextualGroundingPolicyConfig(IResolvable contextualGroundingPolicyConfig) Sets the value ofCfnGuardrailProps.getContextualGroundingPolicyConfig()contextualGroundingPolicyConfig(CfnGuardrail.ContextualGroundingPolicyConfigProperty contextualGroundingPolicyConfig) Sets the value ofCfnGuardrailProps.getContextualGroundingPolicyConfig()description(String description) Sets the value ofCfnGuardrailProps.getDescription()Sets the value ofCfnGuardrailProps.getKmsKeyArn()Sets the value ofCfnGuardrailProps.getName()sensitiveInformationPolicyConfig(IResolvable sensitiveInformationPolicyConfig) Sets the value ofCfnGuardrailProps.getSensitiveInformationPolicyConfig()sensitiveInformationPolicyConfig(CfnGuardrail.SensitiveInformationPolicyConfigProperty sensitiveInformationPolicyConfig) Sets the value ofCfnGuardrailProps.getSensitiveInformationPolicyConfig()Sets the value ofCfnGuardrailProps.getTags()topicPolicyConfig(IResolvable topicPolicyConfig) Sets the value ofCfnGuardrailProps.getTopicPolicyConfig()topicPolicyConfig(CfnGuardrail.TopicPolicyConfigProperty topicPolicyConfig) Sets the value ofCfnGuardrailProps.getTopicPolicyConfig()wordPolicyConfig(IResolvable wordPolicyConfig) Sets the value ofCfnGuardrailProps.getWordPolicyConfig()wordPolicyConfig(CfnGuardrail.WordPolicyConfigProperty wordPolicyConfig) Sets the value ofCfnGuardrailProps.getWordPolicyConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
blockedInputMessaging
@Stability(Stable) public CfnGuardrailProps.Builder blockedInputMessaging(String blockedInputMessaging) Sets the value ofCfnGuardrailProps.getBlockedInputMessaging()- Parameters:
blockedInputMessaging- The message to return when the guardrail blocks a prompt. This parameter is required.- Returns:
this
-
blockedOutputsMessaging
@Stability(Stable) public CfnGuardrailProps.Builder blockedOutputsMessaging(String blockedOutputsMessaging) Sets the value ofCfnGuardrailProps.getBlockedOutputsMessaging()- Parameters:
blockedOutputsMessaging- The message to return when the guardrail blocks a model response. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnGuardrailProps.getName()- Parameters:
name- The name of the guardrail. This parameter is required.- Returns:
this
-
contentPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder contentPolicyConfig(IResolvable contentPolicyConfig) Sets the value ofCfnGuardrailProps.getContentPolicyConfig()- Parameters:
contentPolicyConfig- The content filter policies to configure for the guardrail.- Returns:
this
-
contentPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder contentPolicyConfig(CfnGuardrail.ContentPolicyConfigProperty contentPolicyConfig) Sets the value ofCfnGuardrailProps.getContentPolicyConfig()- Parameters:
contentPolicyConfig- The content filter policies to configure for the guardrail.- Returns:
this
-
contextualGroundingPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder contextualGroundingPolicyConfig(IResolvable contextualGroundingPolicyConfig) Sets the value ofCfnGuardrailProps.getContextualGroundingPolicyConfig()- Parameters:
contextualGroundingPolicyConfig- Contextual grounding policy config for a guardrail.- Returns:
this
-
contextualGroundingPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder contextualGroundingPolicyConfig(CfnGuardrail.ContextualGroundingPolicyConfigProperty contextualGroundingPolicyConfig) Sets the value ofCfnGuardrailProps.getContextualGroundingPolicyConfig()- Parameters:
contextualGroundingPolicyConfig- Contextual grounding policy config for a guardrail.- Returns:
this
-
description
Sets the value ofCfnGuardrailProps.getDescription()- Parameters:
description- A description of the guardrail.- Returns:
this
-
kmsKeyArn
Sets the value ofCfnGuardrailProps.getKmsKeyArn()- Parameters:
kmsKeyArn- The ARN of the AWS KMS key that you use to encrypt the guardrail.- Returns:
this
-
sensitiveInformationPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder sensitiveInformationPolicyConfig(IResolvable sensitiveInformationPolicyConfig) Sets the value ofCfnGuardrailProps.getSensitiveInformationPolicyConfig()- Parameters:
sensitiveInformationPolicyConfig- The sensitive information policy to configure for the guardrail.- Returns:
this
-
sensitiveInformationPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder sensitiveInformationPolicyConfig(CfnGuardrail.SensitiveInformationPolicyConfigProperty sensitiveInformationPolicyConfig) Sets the value ofCfnGuardrailProps.getSensitiveInformationPolicyConfig()- Parameters:
sensitiveInformationPolicyConfig- The sensitive information policy to configure for the guardrail.- Returns:
this
-
tags
Sets the value ofCfnGuardrailProps.getTags()- Parameters:
tags- The tags that you want to attach to the guardrail.- Returns:
this
-
topicPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder topicPolicyConfig(IResolvable topicPolicyConfig) Sets the value ofCfnGuardrailProps.getTopicPolicyConfig()- Parameters:
topicPolicyConfig- The topic policies to configure for the guardrail.- Returns:
this
-
topicPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder topicPolicyConfig(CfnGuardrail.TopicPolicyConfigProperty topicPolicyConfig) Sets the value ofCfnGuardrailProps.getTopicPolicyConfig()- Parameters:
topicPolicyConfig- The topic policies to configure for the guardrail.- Returns:
this
-
wordPolicyConfig
Sets the value ofCfnGuardrailProps.getWordPolicyConfig()- Parameters:
wordPolicyConfig- The word policy you configure for the guardrail.- Returns:
this
-
wordPolicyConfig
@Stability(Stable) public CfnGuardrailProps.Builder wordPolicyConfig(CfnGuardrail.WordPolicyConfigProperty wordPolicyConfig) Sets the value ofCfnGuardrailProps.getWordPolicyConfig()- Parameters:
wordPolicyConfig- The word policy you configure for the guardrail.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnGuardrailProps>- Returns:
- a new instance of
CfnGuardrailProps - Throws:
NullPointerException- if any required attribute was not provided
-