Class CfnPrompt
Creates a prompt in your prompt library that you can add to a flow.
Inherited Members
Namespace: Amazon.CDK.AWS.Bedrock
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnPrompt : CfnResource, IInspectable, IPromptRef, IConstruct, IDependable, IEnvironmentAware, ITaggableV2
Syntax (vb)
Public Class CfnPrompt Inherits CfnResource Implements IInspectable, IPromptRef, IConstruct, IDependable, IEnvironmentAware, ITaggableV2
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;
var additionalModelRequestFields;
var any;
var auto;
var json;
var cfnPrompt = new CfnPrompt(this, "MyCfnPrompt", new CfnPromptProps {
Name = "name",
// the properties below are optional
CustomerEncryptionKeyArn = "customerEncryptionKeyArn",
DefaultVariant = "defaultVariant",
Description = "description",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
Variants = new [] { new PromptVariantProperty {
Name = "name",
TemplateConfiguration = new PromptTemplateConfigurationProperty {
Chat = new ChatPromptTemplateConfigurationProperty {
Messages = new [] { new MessageProperty {
Content = new [] { new ContentBlockProperty {
CachePoint = new CachePointBlockProperty {
Type = "type"
},
Text = "text"
} },
Role = "role"
} },
// the properties below are optional
InputVariables = new [] { new PromptInputVariableProperty {
Name = "name"
} },
System = new [] { new SystemContentBlockProperty {
CachePoint = new CachePointBlockProperty {
Type = "type"
},
Text = "text"
} },
ToolConfiguration = new ToolConfigurationProperty {
Tools = new [] { new ToolProperty {
CachePoint = new CachePointBlockProperty {
Type = "type"
},
ToolSpec = new ToolSpecificationProperty {
InputSchema = new ToolInputSchemaProperty {
Json = json
},
Name = "name",
// the properties below are optional
Description = "description"
}
} },
// the properties below are optional
ToolChoice = new ToolChoiceProperty {
Any = any,
Auto = auto,
Tool = new SpecificToolChoiceProperty {
Name = "name"
}
}
}
},
Text = new TextPromptTemplateConfigurationProperty {
CachePoint = new CachePointBlockProperty {
Type = "type"
},
InputVariables = new [] { new PromptInputVariableProperty {
Name = "name"
} },
Text = "text",
TextS3Location = new TextS3LocationProperty {
Bucket = "bucket",
Key = "key",
// the properties below are optional
Version = "version"
}
}
},
TemplateType = "templateType",
// the properties below are optional
AdditionalModelRequestFields = additionalModelRequestFields,
GenAiResource = new PromptGenAiResourceProperty {
Agent = new PromptAgentResourceProperty {
AgentIdentifier = "agentIdentifier"
}
},
InferenceConfiguration = new PromptInferenceConfigurationProperty {
Text = new PromptModelInferenceConfigurationProperty {
MaxTokens = 123,
StopSequences = new [] { "stopSequences" },
Temperature = 123,
TopP = 123
}
},
Metadata = new [] { new PromptMetadataEntryProperty {
Key = "key",
Value = "value"
} },
ModelId = "modelId"
} }
});
Synopsis
Constructors
| CfnPrompt(Construct, string, ICfnPromptProps) | Create a new |
Properties
| AttrArn | The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request). |
| AttrCreatedAt | The time at which the prompt was created. |
| AttrId | The unique identifier of the prompt. |
| AttrUpdatedAt | The time at which the prompt was last updated. |
| AttrVersion | The version of the prompt that this summary applies to. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CdkTagManager | Tag Manager which manages the tags for this resource. |
| CfnProperties | Creates a prompt in your prompt library that you can add to a flow. |
| CustomerEncryptionKeyArn | The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with. |
| DefaultVariant | The name of the default variant for the prompt. |
| Description | The description of the prompt. |
| Name | The name of the prompt. |
| PromptRef | A reference to a Prompt resource. |
| Tags | Metadata that you can assign to a resource as key-value pairs. |
| Variants | A list of objects, each containing details about a variant of the prompt. |
Methods
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| RenderProperties(IDictionary<string, object>) | Creates a prompt in your prompt library that you can add to a flow. |
Constructors
CfnPrompt(Construct, string, ICfnPromptProps)
Create a new AWS::Bedrock::Prompt.
public CfnPrompt(Construct scope, string id, ICfnPromptProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnPromptProps
Resource properties.
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
Properties
AttrArn
The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request).
public virtual string AttrArn { get; }
Property Value
Remarks
CloudformationAttribute: Arn
AttrCreatedAt
The time at which the prompt was created.
public virtual string AttrCreatedAt { get; }
Property Value
Remarks
CloudformationAttribute: CreatedAt
AttrId
The unique identifier of the prompt.
public virtual string AttrId { get; }
Property Value
Remarks
CloudformationAttribute: Id
AttrUpdatedAt
The time at which the prompt was last updated.
public virtual string AttrUpdatedAt { get; }
Property Value
Remarks
CloudformationAttribute: UpdatedAt
AttrVersion
The version of the prompt that this summary applies to.
public virtual string AttrVersion { get; }
Property Value
Remarks
CloudformationAttribute: Version
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
CdkTagManager
Tag Manager which manages the tags for this resource.
public virtual TagManager CdkTagManager { get; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
CfnProperties
Creates a prompt in your prompt library that you can add to a flow.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
CustomerEncryptionKeyArn
The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.
public virtual string? CustomerEncryptionKeyArn { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
DefaultVariant
The name of the default variant for the prompt.
public virtual string? DefaultVariant { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
Description
The description of the prompt.
public virtual string? Description { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
Name
The name of the prompt.
public virtual string Name { get; set; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
PromptRef
A reference to a Prompt resource.
public virtual IPromptReference PromptRef { get; }
Property Value
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
Tags
Metadata that you can assign to a resource as key-value pairs.
public virtual IDictionary<string, string>? Tags { get; set; }
Property Value
Remarks
For more information, see the following resources:.
Variants
A list of objects, each containing details about a variant of the prompt.
public virtual object? Variants { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnPrompt.IPromptVariantProperty)[]
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Creates a prompt in your prompt library that you can add to a flow.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
CloudformationResource: AWS::Bedrock::Prompt
ExampleMetadata: fixture=_generated