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.103.1 (build bef2dea)",
date="2024-10-05T03:43:39.618Z")
@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") .templateType("templateType") // the properties below are optional .inferenceConfiguration(PromptInferenceConfigurationProperty.builder() .text(PromptModelInferenceConfigurationProperty.builder() .maxTokens(123) .stopSequences(List.of("stopSequences")) .temperature(123) .topK(123) .topP(123) .build()) .build()) .modelId("modelId") .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()) .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnPrompt
.static interface
Contains inference configurations for the prompt.static interface
Contains information about a variable in the prompt.static interface
Contains inference configurations related to model inference for a prompt.static interface
Contains the message for a prompt.static interface
Contains details about a variant of the prompt.static interface
Contains configurations for a text prompt template.static interface
The Amazon S3 location of the prompt text.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnPrompt
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnPrompt
(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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.void
setDefaultVariant
(String value) The name of the default variant for the prompt.void
setDescription
(String value) The description of the prompt.void
The name of the prompt.void
Metadata that you can assign to a resource as key-value pairs.void
setVariants
(List<Object> value) A list of objects, each containing details about a variant of the prompt.void
setVariants
(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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in 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:
getCdkTagManager
in interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnProperties
in 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.
-