Class CfnPrompt
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.bedrock.CfnPrompt
- All Implemented Interfaces:
IInspectable,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:04.330Z")
@Stability(Stable)
public class CfnPrompt
extends CfnResource
implements IInspectable, ITaggableV2
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.services.bedrock.*;
CfnPrompt cfnPrompt = CfnPrompt.Builder.create(this, "MyCfnPrompt")
.name("name")
// the properties below are optional
.customerEncryptionKeyArn("customerEncryptionKeyArn")
.defaultVariant("defaultVariant")
.description("description")
.tags(Map.of(
"tagsKey", "tags"))
.variants(List.of(PromptVariantProperty.builder()
.name("name")
.templateConfiguration(PromptTemplateConfigurationProperty.builder()
.text(TextPromptTemplateConfigurationProperty.builder()
.inputVariables(List.of(PromptInputVariableProperty.builder()
.name("name")
.build()))
.text("text")
.textS3Location(TextS3LocationProperty.builder()
.bucket("bucket")
.key("key")
// the properties below are optional
.version("version")
.build())
.build())
.build())
.templateType("templateType")
// the properties below are optional
.inferenceConfiguration(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.modelId("modelId")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnPrompt.static interfaceContains inference configurations for the prompt.static interfaceContains information about a variable in the prompt.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 interfaceContains configurations for a text prompt template.static interfaceThe Amazon S3 location of the prompt text.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnPrompt(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPrompt(software.amazon.jsii.JsiiObjectRef objRef) CfnPrompt(software.constructs.Construct scope, String id, CfnPromptProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request).The time at which the prompt was created.The unique identifier of the prompt.The time at which the prompt was last updated.The version of the prompt that this summary applies to.Tag Manager which manages the tags for this resource.The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.The name of the default variant for the prompt.The description of the prompt.getName()The name of the prompt.getTags()Metadata that you can assign to a resource as key-value pairs.A list of objects, each containing details about a variant of the prompt.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.voidsetDefaultVariant(String value) The name of the default variant for the prompt.voidsetDescription(String value) The description of the prompt.voidThe name of the prompt.voidMetadata that you can assign to a resource as key-value pairs.voidsetVariants(List<Object> value) A list of objects, each containing details about a variant of the prompt.voidsetVariants(IResolvable value) A list of objects, each containing details about a variant of the prompt.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnPrompt
protected CfnPrompt(software.amazon.jsii.JsiiObjectRef objRef) -
CfnPrompt
protected CfnPrompt(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnPrompt
@Stability(Stable) public CfnPrompt(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPromptProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request). -
getAttrCreatedAt
The time at which the prompt was created. -
getAttrId
The unique identifier of the prompt. -
getAttrUpdatedAt
The time at which the prompt was last updated. -
getAttrVersion
The version of the prompt that this summary applies to. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getName
The name of the prompt. -
setName
The name of the prompt. -
getCustomerEncryptionKeyArn
The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with. -
setCustomerEncryptionKeyArn
The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with. -
getDefaultVariant
The name of the default variant for the prompt. -
setDefaultVariant
The name of the default variant for the prompt. -
getDescription
The description of the prompt. -
setDescription
The description of the prompt. -
getTags
Metadata that you can assign to a resource as key-value pairs.For more information, see the following resources:.
-
setTags
Metadata that you can assign to a resource as key-value pairs.For more information, see the following resources:.
-
getVariants
A list of objects, each containing details about a variant of the prompt. -
setVariants
A list of objects, each containing details about a variant of the prompt. -
setVariants
A list of objects, each containing details about a variant of the prompt.
-