Interface CreateGuardrailRequest.Builder
-
- All Superinterfaces:
AwsRequest.Builder,BedrockRequest.Builder,Buildable,CopyableBuilder<CreateGuardrailRequest.Builder,CreateGuardrailRequest>,SdkBuilder<CreateGuardrailRequest.Builder,CreateGuardrailRequest>,SdkPojo,SdkRequest.Builder
- Enclosing class:
- CreateGuardrailRequest
public static interface CreateGuardrailRequest.Builder extends BedrockRequest.Builder, SdkPojo, CopyableBuilder<CreateGuardrailRequest.Builder,CreateGuardrailRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CreateGuardrailRequest.BuilderblockedInputMessaging(String blockedInputMessaging)The message to return when the guardrail blocks a prompt.CreateGuardrailRequest.BuilderblockedOutputsMessaging(String blockedOutputsMessaging)The message to return when the guardrail blocks a model response.CreateGuardrailRequest.BuilderclientRequestToken(String clientRequestToken)A unique, case-sensitive identifier to ensure that the API request completes no more than once.default CreateGuardrailRequest.BuildercontentPolicyConfig(Consumer<GuardrailContentPolicyConfig.Builder> contentPolicyConfig)The content filter policies to configure for the guardrail.CreateGuardrailRequest.BuildercontentPolicyConfig(GuardrailContentPolicyConfig contentPolicyConfig)The content filter policies to configure for the guardrail.default CreateGuardrailRequest.BuildercontextualGroundingPolicyConfig(Consumer<GuardrailContextualGroundingPolicyConfig.Builder> contextualGroundingPolicyConfig)The contextual grounding policy configuration used to create a guardrail.CreateGuardrailRequest.BuildercontextualGroundingPolicyConfig(GuardrailContextualGroundingPolicyConfig contextualGroundingPolicyConfig)The contextual grounding policy configuration used to create a guardrail.CreateGuardrailRequest.Builderdescription(String description)A description of the guardrail.CreateGuardrailRequest.BuilderkmsKeyId(String kmsKeyId)The ARN of the KMS key that you use to encrypt the guardrail.CreateGuardrailRequest.Buildername(String name)The name to give the guardrail.CreateGuardrailRequest.BuilderoverrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)CreateGuardrailRequest.BuilderoverrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)default CreateGuardrailRequest.BuildersensitiveInformationPolicyConfig(Consumer<GuardrailSensitiveInformationPolicyConfig.Builder> sensitiveInformationPolicyConfig)The sensitive information policy to configure for the guardrail.CreateGuardrailRequest.BuildersensitiveInformationPolicyConfig(GuardrailSensitiveInformationPolicyConfig sensitiveInformationPolicyConfig)The sensitive information policy to configure for the guardrail.CreateGuardrailRequest.Buildertags(Collection<Tag> tags)The tags that you want to attach to the guardrail.CreateGuardrailRequest.Buildertags(Consumer<Tag.Builder>... tags)The tags that you want to attach to the guardrail.CreateGuardrailRequest.Buildertags(Tag... tags)The tags that you want to attach to the guardrail.default CreateGuardrailRequest.BuildertopicPolicyConfig(Consumer<GuardrailTopicPolicyConfig.Builder> topicPolicyConfig)The topic policies to configure for the guardrail.CreateGuardrailRequest.BuildertopicPolicyConfig(GuardrailTopicPolicyConfig topicPolicyConfig)The topic policies to configure for the guardrail.default CreateGuardrailRequest.BuilderwordPolicyConfig(Consumer<GuardrailWordPolicyConfig.Builder> wordPolicyConfig)The word policy you configure for the guardrail.CreateGuardrailRequest.BuilderwordPolicyConfig(GuardrailWordPolicyConfig wordPolicyConfig)The word policy you configure for the guardrail.-
Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
-
Methods inherited from interface software.amazon.awssdk.services.bedrock.model.BedrockRequest.Builder
build
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
name
CreateGuardrailRequest.Builder name(String name)
The name to give the guardrail.
- Parameters:
name- The name to give the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
CreateGuardrailRequest.Builder description(String description)
A description of the guardrail.
- Parameters:
description- A description of the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
topicPolicyConfig
CreateGuardrailRequest.Builder topicPolicyConfig(GuardrailTopicPolicyConfig topicPolicyConfig)
The topic policies to configure for the guardrail.
- Parameters:
topicPolicyConfig- The topic policies to configure for the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
topicPolicyConfig
default CreateGuardrailRequest.Builder topicPolicyConfig(Consumer<GuardrailTopicPolicyConfig.Builder> topicPolicyConfig)
The topic policies to configure for the guardrail.
This is a convenience method that creates an instance of theGuardrailTopicPolicyConfig.Builderavoiding the need to create one manually viaGuardrailTopicPolicyConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totopicPolicyConfig(GuardrailTopicPolicyConfig).- Parameters:
topicPolicyConfig- a consumer that will call methods onGuardrailTopicPolicyConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
topicPolicyConfig(GuardrailTopicPolicyConfig)
-
contentPolicyConfig
CreateGuardrailRequest.Builder contentPolicyConfig(GuardrailContentPolicyConfig contentPolicyConfig)
The content filter policies to configure for the guardrail.
- Parameters:
contentPolicyConfig- The content filter policies to configure for the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contentPolicyConfig
default CreateGuardrailRequest.Builder contentPolicyConfig(Consumer<GuardrailContentPolicyConfig.Builder> contentPolicyConfig)
The content filter policies to configure for the guardrail.
This is a convenience method that creates an instance of theGuardrailContentPolicyConfig.Builderavoiding the need to create one manually viaGuardrailContentPolicyConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocontentPolicyConfig(GuardrailContentPolicyConfig).- Parameters:
contentPolicyConfig- a consumer that will call methods onGuardrailContentPolicyConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
contentPolicyConfig(GuardrailContentPolicyConfig)
-
wordPolicyConfig
CreateGuardrailRequest.Builder wordPolicyConfig(GuardrailWordPolicyConfig wordPolicyConfig)
The word policy you configure for the guardrail.
- Parameters:
wordPolicyConfig- The word policy you configure for the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
wordPolicyConfig
default CreateGuardrailRequest.Builder wordPolicyConfig(Consumer<GuardrailWordPolicyConfig.Builder> wordPolicyConfig)
The word policy you configure for the guardrail.
This is a convenience method that creates an instance of theGuardrailWordPolicyConfig.Builderavoiding the need to create one manually viaGuardrailWordPolicyConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed towordPolicyConfig(GuardrailWordPolicyConfig).- Parameters:
wordPolicyConfig- a consumer that will call methods onGuardrailWordPolicyConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
wordPolicyConfig(GuardrailWordPolicyConfig)
-
sensitiveInformationPolicyConfig
CreateGuardrailRequest.Builder sensitiveInformationPolicyConfig(GuardrailSensitiveInformationPolicyConfig sensitiveInformationPolicyConfig)
The sensitive information policy to configure for the guardrail.
- Parameters:
sensitiveInformationPolicyConfig- The sensitive information policy to configure for the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sensitiveInformationPolicyConfig
default CreateGuardrailRequest.Builder sensitiveInformationPolicyConfig(Consumer<GuardrailSensitiveInformationPolicyConfig.Builder> sensitiveInformationPolicyConfig)
The sensitive information policy to configure for the guardrail.
This is a convenience method that creates an instance of theGuardrailSensitiveInformationPolicyConfig.Builderavoiding the need to create one manually viaGuardrailSensitiveInformationPolicyConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosensitiveInformationPolicyConfig(GuardrailSensitiveInformationPolicyConfig).- Parameters:
sensitiveInformationPolicyConfig- a consumer that will call methods onGuardrailSensitiveInformationPolicyConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
sensitiveInformationPolicyConfig(GuardrailSensitiveInformationPolicyConfig)
-
contextualGroundingPolicyConfig
CreateGuardrailRequest.Builder contextualGroundingPolicyConfig(GuardrailContextualGroundingPolicyConfig contextualGroundingPolicyConfig)
The contextual grounding policy configuration used to create a guardrail.
- Parameters:
contextualGroundingPolicyConfig- The contextual grounding policy configuration used to create a guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contextualGroundingPolicyConfig
default CreateGuardrailRequest.Builder contextualGroundingPolicyConfig(Consumer<GuardrailContextualGroundingPolicyConfig.Builder> contextualGroundingPolicyConfig)
The contextual grounding policy configuration used to create a guardrail.
This is a convenience method that creates an instance of theGuardrailContextualGroundingPolicyConfig.Builderavoiding the need to create one manually viaGuardrailContextualGroundingPolicyConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocontextualGroundingPolicyConfig(GuardrailContextualGroundingPolicyConfig).- Parameters:
contextualGroundingPolicyConfig- a consumer that will call methods onGuardrailContextualGroundingPolicyConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
contextualGroundingPolicyConfig(GuardrailContextualGroundingPolicyConfig)
-
blockedInputMessaging
CreateGuardrailRequest.Builder blockedInputMessaging(String blockedInputMessaging)
The message to return when the guardrail blocks a prompt.
- Parameters:
blockedInputMessaging- The message to return when the guardrail blocks a prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
blockedOutputsMessaging
CreateGuardrailRequest.Builder blockedOutputsMessaging(String blockedOutputsMessaging)
The message to return when the guardrail blocks a model response.
- Parameters:
blockedOutputsMessaging- The message to return when the guardrail blocks a model response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
kmsKeyId
CreateGuardrailRequest.Builder kmsKeyId(String kmsKeyId)
The ARN of the KMS key that you use to encrypt the guardrail.
- Parameters:
kmsKeyId- The ARN of the KMS key that you use to encrypt the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CreateGuardrailRequest.Builder tags(Collection<Tag> tags)
The tags that you want to attach to the guardrail.
- Parameters:
tags- The tags that you want to attach to the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CreateGuardrailRequest.Builder tags(Tag... tags)
The tags that you want to attach to the guardrail.
- Parameters:
tags- The tags that you want to attach to the guardrail.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CreateGuardrailRequest.Builder tags(Consumer<Tag.Builder>... tags)
The tags that you want to attach to the guardrail.
This is a convenience method that creates an instance of theTag.Builderavoiding the need to create one manually viaTag.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#tags(List.) - Parameters:
tags- a consumer that will call methods onTag.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#tags(java.util.Collection)
-
clientRequestToken
CreateGuardrailRequest.Builder clientRequestToken(String clientRequestToken)
A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.
- Parameters:
clientRequestToken- A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
CreateGuardrailRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
overrideConfiguration
CreateGuardrailRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder
-
-