Interface CreatePromptRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,BedrockAgentRequest.Builder
,Buildable
,CopyableBuilder<CreatePromptRequest.Builder,
,CreatePromptRequest> SdkBuilder<CreatePromptRequest.Builder,
,CreatePromptRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
CreatePromptRequest
-
Method Summary
Modifier and TypeMethodDescriptionclientToken
(String clientToken) A unique, case-sensitive identifier to ensure that the API request completes no more than one time.customerEncryptionKeyArn
(String customerEncryptionKeyArn) The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.defaultVariant
(String defaultVariant) The name of the default variant for the prompt.description
(String description) A description for the prompt.A name for the prompt.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.Any tags that you want to attach to the prompt.variants
(Collection<PromptVariant> variants) A list of objects, each containing details about a variant of the prompt.variants
(Consumer<PromptVariant.Builder>... variants) A list of objects, each containing details about a variant of the prompt.variants
(PromptVariant... variants) A list of objects, each containing details about a variant of the prompt.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.services.bedrockagent.model.BedrockAgentRequest.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, sdkFieldNameToField, sdkFields
-
Method Details
-
clientToken
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
- Parameters:
clientToken
- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
customerEncryptionKeyArn
The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
- Parameters:
customerEncryptionKeyArn
- The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
defaultVariant
The name of the default variant for the prompt. This value must match the
name
field in the relevant PromptVariant object.- Parameters:
defaultVariant
- The name of the default variant for the prompt. This value must match thename
field in the relevant PromptVariant object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
A description for the prompt.
- Parameters:
description
- A description for the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
name
A name for the prompt.
- Parameters:
name
- A name for the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Any tags that you want to attach to the prompt. For more information, see Tagging resources in Amazon Bedrock.
- Parameters:
tags
- Any tags that you want to attach to the prompt. For more information, see Tagging resources in Amazon Bedrock.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
variants
A list of objects, each containing details about a variant of the prompt.
- Parameters:
variants
- A list of objects, each containing details about a variant of the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
variants
A list of objects, each containing details about a variant of the prompt.
- Parameters:
variants
- A list of objects, each containing details about a variant of the prompt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
variants
A list of objects, each containing details about a variant of the prompt.
This is a convenience method that creates an instance of thePromptVariant.Builder
avoiding the need to create one manually viaPromptVariant.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tovariants(List<PromptVariant>)
.- Parameters:
variants
- a consumer that will call methods onPromptVariant.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
CreatePromptRequest.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
CreatePromptRequest.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.
-