Show / Hide Table of Contents

Class CfnPromptProps

Properties for defining a CfnPrompt.

Inheritance
object
CfnPromptProps
Implements
ICfnPromptProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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 CfnPrompt.

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

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-customerencryptionkeyarn

DefaultVariant

The name of the default variant for the prompt.

public string? DefaultVariant { get; set; }
Property Value

string

Remarks

This value must match the name field in the relevant PromptVariant object.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-defaultvariant

Description

The description of the prompt.

public string? Description { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-description

Name

The name of the prompt.

public string Name { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-name

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

IDictionary<string, string>

Remarks

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-tags

    Variants

    A list of objects, each containing details about a variant of the prompt.

    public object? Variants { get; set; }
    Property Value

    object

    Remarks

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-prompt.html#cfn-bedrock-prompt-variants

    Type union: either IResolvable or (either IResolvable or CfnPrompt.IPromptVariantProperty)[]

    Implements

    ICfnPromptProps
    Back to top Generated by DocFX