Class Prompt.Builder

java.lang.Object
software.amazon.awscdk.services.bedrock.alpha.Prompt.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Prompt>
Enclosing class:
Prompt

@Stability(Experimental) public static final class Prompt.Builder extends Object implements software.amazon.jsii.Builder<Prompt>
(experimental) A fluent builder for Prompt.
  • Method Details

    • create

      @Stability(Experimental) public static Prompt.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Prompt.Builder.
    • promptName

      @Stability(Experimental) public Prompt.Builder promptName(String promptName)
      (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}$

      Parameters:
      promptName - The name of the prompt. This parameter is required.
      Returns:
      this
    • defaultVariant

      @Stability(Experimental) public Prompt.Builder defaultVariant(IPromptVariant defaultVariant)
      (experimental) The Prompt Variant that will be used by default.

      Default: - No default variant provided.

      Parameters:
      defaultVariant - The Prompt Variant that will be used by default. This parameter is required.
      Returns:
      this
    • description

      @Stability(Experimental) public Prompt.Builder description(String description)
      (experimental) A description of what the prompt does.

      Default: - No description provided. Maximum Length: 200

      Parameters:
      description - A description of what the prompt does. This parameter is required.
      Returns:
      this
    • kmsKey

      @Stability(Experimental) public Prompt.Builder kmsKey(IKey kmsKey)
      (experimental) The KMS key that the prompt is encrypted with.

      Default: - AWS owned and managed key.

      Parameters:
      kmsKey - The KMS key that the prompt is encrypted with. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Experimental) public Prompt.Builder tags(Map<String,String> tags)
      (experimental) Tags to apply to the prompt.

      Default: - No tags applied.

      Parameters:
      tags - Tags to apply to the prompt. This parameter is required.
      Returns:
      this
    • variants

      @Stability(Experimental) public Prompt.Builder variants(List<? extends IPromptVariant> variants)
      (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.

      Parameters:
      variants - The variants of your prompt. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public Prompt build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Prompt>
      Returns:
      a newly built instance of Prompt.