Interface CreateGuardrailRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,BedrockRequest.Builder
,Buildable
,CopyableBuilder<CreateGuardrailRequest.Builder,
,CreateGuardrailRequest> SdkBuilder<CreateGuardrailRequest.Builder,
,CreateGuardrailRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
CreateGuardrailRequest
-
Method Summary
Modifier and TypeMethodDescriptionblockedInputMessaging
(String blockedInputMessaging) The message to return when the guardrail blocks a prompt.blockedOutputsMessaging
(String blockedOutputsMessaging) The message to return when the guardrail blocks a model response.clientRequestToken
(String clientRequestToken) A unique, case-sensitive identifier to ensure that the API request completes no more than once.default CreateGuardrailRequest.Builder
contentPolicyConfig
(Consumer<GuardrailContentPolicyConfig.Builder> contentPolicyConfig) The content filter policies to configure for the guardrail.contentPolicyConfig
(GuardrailContentPolicyConfig contentPolicyConfig) The content filter policies to configure for the guardrail.default CreateGuardrailRequest.Builder
contextualGroundingPolicyConfig
(Consumer<GuardrailContextualGroundingPolicyConfig.Builder> contextualGroundingPolicyConfig) The contextual grounding policy configuration used to create a guardrail.contextualGroundingPolicyConfig
(GuardrailContextualGroundingPolicyConfig contextualGroundingPolicyConfig) The contextual grounding policy configuration used to create a guardrail.description
(String description) A description of the guardrail.The ARN of the KMS key that you use to encrypt the guardrail.The name to give the guardrail.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.default CreateGuardrailRequest.Builder
sensitiveInformationPolicyConfig
(Consumer<GuardrailSensitiveInformationPolicyConfig.Builder> sensitiveInformationPolicyConfig) The sensitive information policy to configure for the guardrail.sensitiveInformationPolicyConfig
(GuardrailSensitiveInformationPolicyConfig sensitiveInformationPolicyConfig) The sensitive information policy to configure for the guardrail.tags
(Collection<Tag> tags) The tags that you want to attach to the guardrail.tags
(Consumer<Tag.Builder>... tags) The tags that you want to attach to the guardrail.The tags that you want to attach to the guardrail.default CreateGuardrailRequest.Builder
topicPolicyConfig
(Consumer<GuardrailTopicPolicyConfig.Builder> topicPolicyConfig) The topic policies to configure for the guardrail.topicPolicyConfig
(GuardrailTopicPolicyConfig topicPolicyConfig) The topic policies to configure for the guardrail.default CreateGuardrailRequest.Builder
wordPolicyConfig
(Consumer<GuardrailWordPolicyConfig.Builder> wordPolicyConfig) The word policy you configure for the guardrail.wordPolicyConfig
(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 Details
-
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
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
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.Builder
avoiding the need to create one manually viaGuardrailTopicPolicyConfig.builder()
.When the
Consumer
completes,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:
-
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.Builder
avoiding the need to create one manually viaGuardrailContentPolicyConfig.builder()
.When the
Consumer
completes,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:
-
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.Builder
avoiding the need to create one manually viaGuardrailWordPolicyConfig.builder()
.When the
Consumer
completes,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:
-
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.Builder
avoiding the need to create one manually viaGuardrailSensitiveInformationPolicyConfig.builder()
.When the
Consumer
completes,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:
-
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.Builder
avoiding the need to create one manually viaGuardrailContextualGroundingPolicyConfig.builder()
.When the
Consumer
completes,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:
-
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
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
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
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
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
The tags that you want to attach to the guardrail.
This is a convenience method that creates an instance of theTag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totags(List<Tag>)
.- 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:
-
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) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateGuardrailRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-