Class CfnPromptProps
Properties for defining a CfnPrompt.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Bedrock
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnPromptProps : ICfnPromptProps
Syntax (vb)
Public Class CfnPromptProps Implements ICfnPromptProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
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 cfnPromptProps = 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
| CfnPromptProps() | Properties for defining a |
Properties
| 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. |
| Tags | Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. |
| Variants | A list of objects, each containing details about a variant of the prompt. |
Constructors
CfnPromptProps()
Properties for defining a CfnPrompt.
public CfnPromptProps()
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html
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 cfnPromptProps = 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"
} }
};
Properties
CustomerEncryptionKeyArn
The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with.
public string? CustomerEncryptionKeyArn { get; set; }
Property Value
Remarks
DefaultVariant
The name of the default variant for the prompt.
public string? DefaultVariant { get; set; }
Property Value
Remarks
This value must match the name field in the relevant PromptVariant object.
Description
The description of the prompt.
public string? Description { get; set; }
Property Value
Remarks
Name
The name of the prompt.
public string Name { get; set; }
Property Value
Remarks
Tags
Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.
public IDictionary<string, string>? Tags { get; set; }
Property Value
Remarks
Variants
A list of objects, each containing details about a variant of the prompt.
public object? Variants { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnPrompt.IPromptVariantProperty)[]