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:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> 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 to AWS::Bedrock::Prompt.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnPromptPropsMixin

      @Stability(Stable) public CfnPromptPropsMixin(@NotNull CfnPromptMixinProps props)
      Create a mixin to apply properties to AWS::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.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnPromptMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()