class CfnPromptPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.Bedrock.Mixins.CfnPromptPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsbedrock/mixins#CfnPromptPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.bedrock.mixins.CfnPromptPropsMixin |
Python | aws_cdk.mixins_preview.aws_bedrock.mixins.CfnPromptPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_bedrock » mixins » CfnPromptPropsMixin |
Implements
IMixin
Extends
Mixin
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.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as bedrock_mixins } from '@aws-cdk/mixins-preview/aws-bedrock';
declare const additionalModelRequestFields: any;
declare const any: any;
declare const auto: any;
declare const json: any;
const cfnPromptPropsMixin = new bedrock_mixins.CfnPromptPropsMixin({
customerEncryptionKeyArn: 'customerEncryptionKeyArn',
defaultVariant: 'defaultVariant',
description: 'description',
name: 'name',
tags: {
tagsKey: 'tags',
},
variants: [{
additionalModelRequestFields: additionalModelRequestFields,
genAiResource: {
agent: {
agentIdentifier: 'agentIdentifier',
},
},
inferenceConfiguration: {
text: {
maxTokens: 123,
stopSequences: ['stopSequences'],
temperature: 123,
topP: 123,
},
},
metadata: [{
key: 'key',
value: 'value',
}],
modelId: 'modelId',
name: 'name',
templateConfiguration: {
chat: {
inputVariables: [{
name: 'name',
}],
messages: [{
content: [{
cachePoint: {
type: 'type',
},
text: 'text',
}],
role: 'role',
}],
system: [{
cachePoint: {
type: 'type',
},
text: 'text',
}],
toolConfiguration: {
toolChoice: {
any: any,
auto: auto,
tool: {
name: 'name',
},
},
tools: [{
cachePoint: {
type: 'type',
},
toolSpec: {
description: 'description',
inputSchema: {
json: json,
},
name: 'name',
},
}],
},
},
text: {
cachePoint: {
type: 'type',
},
inputVariables: [{
name: 'name',
}],
text: 'text',
textS3Location: {
bucket: 'bucket',
key: 'key',
version: 'version',
},
},
},
templateType: 'templateType',
}],
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnPromptPropsMixin(props: CfnPromptMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Prompt Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Bedrock::Prompt.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript