Interface PromptProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
PromptProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:17.951Z")
@Stability(Experimental)
public interface PromptProps
extends software.amazon.jsii.JsiiSerializable
(experimental) Properties for creating a CDK managed Bedrock Prompt.
Example:
Key cmk = Key.Builder.create(this, "cmk").build();
BedrockFoundationModel claudeModel = BedrockFoundationModel.ANTHROPIC_CLAUDE_SONNET_V1_0;
IPromptVariant variant1 = PromptVariant.text(TextPromptVariantProps.builder()
.variantName("variant1")
.model(claudeModel)
.promptVariables(List.of("topic"))
.promptText("This is my first text prompt. Please summarize our conversation on: {{topic}}.")
.inferenceConfiguration(PromptInferenceConfiguration.text(PromptInferenceConfigurationProps.builder()
.temperature(1)
.topP(0.999)
.maxTokens(2000)
.build()))
.build());
Prompt prompt1 = Prompt.Builder.create(this, "prompt1")
.promptName("prompt1")
.description("my first prompt")
.defaultVariant(variant1)
.variants(List.of(variant1))
.kmsKey(cmk)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forPromptPropsstatic final classAn implementation forPromptProps -
Method Summary
Modifier and TypeMethodDescriptionstatic PromptProps.Builderbuilder()default IPromptVariant(experimental) The Prompt Variant that will be used by default.default String(experimental) A description of what the prompt does.default IKey(experimental) The KMS key that the prompt is encrypted with.(experimental) The name of the prompt.getTags()(experimental) Tags to apply to the prompt.default List<IPromptVariant> (experimental) The variants of your prompt.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPromptName
(experimental) The name of the prompt.This will be used as the physical name of the prompt. Allowed Pattern: ^([0-9a-zA-Z][_-]?){1,100}$
-
getDefaultVariant
(experimental) The Prompt Variant that will be used by default.Default: - No default variant provided.
-
getDescription
(experimental) A description of what the prompt does.Default: - No description provided. Maximum Length: 200
-
getKmsKey
(experimental) The KMS key that the prompt is encrypted with.Default: - AWS owned and managed key.
-
getTags
(experimental) Tags to apply to the prompt.Default: - No tags applied.
-
getVariants
(experimental) The variants of your prompt.Variants can use different messages, models, or configurations so that you can compare their outputs to decide the best variant for your use case. Maximum of 1 variants.
Default: - No additional variants provided.
-
builder
- Returns:
- a
PromptProps.BuilderofPromptProps
-