Skip to content
v2.274.0

CfnKnowledgeBaseProps Struct ​

Properties for defining a CfnKnowledgeBase.

Example ​

ts
declare const collection: opensearchserverless.ICollectionRef;
declare const role: iam.Role;

new aws_bedrock_cfn.CfnKnowledgeBase(this, 'KnowledgeBase', {
  name: 'product-documentation',
  roleArn: role.roleArn,
  knowledgeBaseConfiguration: {
    type: 'VECTOR',
    vectorKnowledgeBaseConfiguration: {
      embeddingModelArn: bedrock.BedrockFoundationModel.TITAN_EMBED_TEXT_V2_1024.modelArn,
    },
  },
}).with(new bedrock.mixins.KnowledgeBaseOpenSearchServerlessStorage({
  collection,
  vectorIndexName: 'bedrock-knowledge-base-default-index',
  vectorField: 'bedrock-knowledge-base-default-vector',
  textField: 'AMAZON_BEDROCK_TEXT_CHUNK',
  metadataField: 'AMAZON_BEDROCK_METADATA',
}));

Properties ​

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string#
The description of the knowledge base associated with the inline agent.
knowledgeBaseConfigurationIResolvable | CfnKnowledgeBase.KnowledgeBaseConfigurationPropertyknowledge_base_configurationtyping.Union[IResolvable, KnowledgeBaseConfigurationProperty]knowledgeBaseConfigurationIResolvableKnowledgeBaseConfigurationIResolvableKnowledgeBaseConfigurationinterface{}required#
Contains details about the embeddings configuration of the knowledge base.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the knowledge base.
roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*stringrequired#
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
storageConfigurationIResolvable | CfnKnowledgeBase.StorageConfigurationPropertystorage_configurationtyping.Union[IResolvable, StorageConfigurationProperty]storageConfigurationIResolvableStorageConfigurationIResolvableStorageConfigurationinterface{}#
Contains details about the storage configuration of the knowledge base.
tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string#
Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.