Class CfnPromptPropsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.bedrock.CfnPromptPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-11T13:19:56.637Z")
@Stability(Stable)
public class CfnPromptPropsMixin
extends Mixin
implements software.constructs.IMixin
Creates a prompt in your prompt library that you can add to a flow.
For more information, see Prompt management in Amazon Bedrock , Create a prompt using Prompt management and Prompt flows in Amazon Bedrock in the Amazon Bedrock User Guide.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.bedrock.*;
import software.amazon.awscdk.*;
Object additionalModelRequestFields;
Object any;
Object auto;
Object json;
IMergeStrategy mergeStrategy;
CfnPromptPropsMixin cfnPromptPropsMixin = CfnPromptPropsMixin.Builder.create(CfnPromptMixinProps.builder()
.customerEncryptionKeyArn("customerEncryptionKeyArn")
.defaultVariant("defaultVariant")
.description("description")
.name("name")
.tags(Map.of(
"tagsKey", "tags"))
.variants(List.of(PromptVariantProperty.builder()
.additionalModelRequestFields(additionalModelRequestFields)
.genAiResource(PromptGenAiResourceProperty.builder()
.agent(PromptAgentResourceProperty.builder()
.agentIdentifier("agentIdentifier")
.build())
.build())
.inferenceConfiguration(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.metadata(List.of(PromptMetadataEntryProperty.builder()
.key("key")
.value("value")
.build()))
.modelId("modelId")
.name("name")
.templateConfiguration(PromptTemplateConfigurationProperty.builder()
.chat(ChatPromptTemplateConfigurationProperty.builder()
.inputVariables(List.of(PromptInputVariableProperty.builder()
.name("name")
.build()))
.messages(List.of(MessageProperty.builder()
.content(List.of(ContentBlockProperty.builder()
.cachePoint(CachePointBlockProperty.builder()
.type("type")
.build())
.text("text")
.build()))
.role("role")
.build()))
.system(List.of(SystemContentBlockProperty.builder()
.cachePoint(CachePointBlockProperty.builder()
.type("type")
.build())
.text("text")
.build()))
.toolConfiguration(ToolConfigurationProperty.builder()
.toolChoice(ToolChoiceProperty.builder()
.any(any)
.auto(auto)
.tool(SpecificToolChoiceProperty.builder()
.name("name")
.build())
.build())
.tools(List.of(ToolProperty.builder()
.cachePoint(CachePointBlockProperty.builder()
.type("type")
.build())
.toolSpec(ToolSpecificationProperty.builder()
.description("description")
.inputSchema(ToolInputSchemaProperty.builder()
.json(json)
.build())
.name("name")
.build())
.build()))
.build())
.build())
.text(TextPromptTemplateConfigurationProperty.builder()
.cachePoint(CachePointBlockProperty.builder()
.type("type")
.build())
.inputVariables(List.of(PromptInputVariableProperty.builder()
.name("name")
.build()))
.text("text")
.textS3Location(TextS3LocationProperty.builder()
.bucket("bucket")
.key("key")
.version("version")
.build())
.build())
.build())
.templateType("templateType")
.build()))
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnPromptPropsMixin.static interfaceDefines a section of content to be cached for reuse in subsequent API calls.static interfaceContains configurations to use a prompt in a conversational format.static interfaceA block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.static interfaceA message input, or returned from, a call to Converse or ConverseStream .static interfaceContains specifications for an Amazon Bedrock agent with which to use the prompt.static interfaceContains specifications for a generative AI resource with which to use the prompt.static interfaceContains inference configurations for the prompt.static interfaceContains information about a variable in the prompt.static interfaceContains a key-value pair that defines a metadata tag and value to attach to a prompt variant.static interfaceContains inference configurations related to model inference for a prompt.static interfaceContains the message for a prompt.static interfaceContains details about a variant of the prompt.static interfaceThe model must request a specific tool.static interfaceContains configurations for instructions to provide the model for how to handle input.static interfaceContains configurations for a text prompt template.static interfaceThe Amazon S3 location of the prompt text.static interfaceDetermines which tools the model should request in a call toConverseorConverseStream.static interfaceConfiguration information for the tools that you pass to a model.static interfaceThe schema for the tool.static interfaceInformation about a tool that you can use with the Converse API.static interfaceThe specification for the tool.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::Bedrock::Prompt.CfnPromptPropsMixin(CfnPromptMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::Bedrock::Prompt.protectedCfnPromptPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPromptPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnPromptMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnPromptPropsMixin
protected CfnPromptPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnPromptPropsMixin
protected CfnPromptPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnPromptPropsMixin
@Stability(Stable) public CfnPromptPropsMixin(@NotNull CfnPromptMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::Bedrock::Prompt.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnPromptPropsMixin
Create a mixin to apply properties toAWS::Bedrock::Prompt.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-