# CfnKnowledgeBaseProps

Properties for defining a `CfnKnowledgeBase`.

Extends: CfnKnowledgeBaseProps
Used as props by: CfnKnowledgeBase

- Source: Generated code
- Type last changed: v2.174.0 · 4 Jan 2025

## 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

- `description`: string — The description of the knowledge base associated with the inline agent.

- `knowledgeBaseConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnKnowledgeBase.KnowledgeBaseConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnKnowledgeBase.KnowledgeBaseConfigurationProperty.html) (required) — Contains details about the embeddings configuration of the knowledge base.

- `name`: string (required) — The name of the knowledge base.

- `roleArn`: string (required) — The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.

- `storageConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnKnowledgeBase.StorageConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnKnowledgeBase.StorageConfigurationProperty.html) — Contains details about the storage configuration of the knowledge base.

- `tags`: { [key: string]: string } — Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:.

  - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
  - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
