class CfnKnowledgeBasePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.Bedrock.Mixins.CfnKnowledgeBasePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsbedrock/mixins#CfnKnowledgeBasePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.bedrock.mixins.CfnKnowledgeBasePropsMixin |
Python | aws_cdk.mixins_preview.aws_bedrock.mixins.CfnKnowledgeBasePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_bedrock » mixins » CfnKnowledgeBasePropsMixin |
Implements
IMixin
Extends
Mixin
Specifies a knowledge base as a resource in a top-level template. Minimally, you must specify the following properties:.
Name – Specify a name for the knowledge base.
RoleArn – Specify the Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base. For more information, see Create a service role for Knowledge base for Amazon Bedrock .
KnowledgeBaseConfiguration – Specify the embeddings configuration of the knowledge base. The following sub-properties are required:
Type – Specify the value
VECTOR.StorageConfiguration – Specify information about the vector store in which the data source is stored. The following sub-properties are required:
Type – Specify the vector store service that you are using.
Redis Enterprise Cloud vector stores are currently unsupported in CloudFormation .
For more information about using knowledge bases in Amazon Bedrock , see Knowledge base for Amazon Bedrock .
See the Properties section below for descriptions of both the required and optional properties.
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';
const cfnKnowledgeBasePropsMixin = new bedrock_mixins.CfnKnowledgeBasePropsMixin({
description: 'description',
knowledgeBaseConfiguration: {
kendraKnowledgeBaseConfiguration: {
kendraIndexArn: 'kendraIndexArn',
},
sqlKnowledgeBaseConfiguration: {
redshiftConfiguration: {
queryEngineConfiguration: {
provisionedConfiguration: {
authConfiguration: {
databaseUser: 'databaseUser',
type: 'type',
usernamePasswordSecretArn: 'usernamePasswordSecretArn',
},
clusterIdentifier: 'clusterIdentifier',
},
serverlessConfiguration: {
authConfiguration: {
type: 'type',
usernamePasswordSecretArn: 'usernamePasswordSecretArn',
},
workgroupArn: 'workgroupArn',
},
type: 'type',
},
queryGenerationConfiguration: {
executionTimeoutSeconds: 123,
generationContext: {
curatedQueries: [{
naturalLanguage: 'naturalLanguage',
sql: 'sql',
}],
tables: [{
columns: [{
description: 'description',
inclusion: 'inclusion',
name: 'name',
}],
description: 'description',
inclusion: 'inclusion',
name: 'name',
}],
},
},
storageConfigurations: [{
awsDataCatalogConfiguration: {
tableNames: ['tableNames'],
},
redshiftConfiguration: {
databaseName: 'databaseName',
},
type: 'type',
}],
},
type: 'type',
},
type: 'type',
vectorKnowledgeBaseConfiguration: {
embeddingModelArn: 'embeddingModelArn',
embeddingModelConfiguration: {
bedrockEmbeddingModelConfiguration: {
audio: [{
segmentationConfiguration: {
fixedLengthDuration: 123,
},
}],
dimensions: 123,
embeddingDataType: 'embeddingDataType',
video: [{
segmentationConfiguration: {
fixedLengthDuration: 123,
},
}],
},
},
supplementalDataStorageConfiguration: {
supplementalDataStorageLocations: [{
s3Location: {
uri: 'uri',
},
supplementalDataStorageLocationType: 'supplementalDataStorageLocationType',
}],
},
},
},
name: 'name',
roleArn: 'roleArn',
storageConfiguration: {
mongoDbAtlasConfiguration: {
collectionName: 'collectionName',
credentialsSecretArn: 'credentialsSecretArn',
databaseName: 'databaseName',
endpoint: 'endpoint',
endpointServiceName: 'endpointServiceName',
fieldMapping: {
metadataField: 'metadataField',
textField: 'textField',
vectorField: 'vectorField',
},
textIndexName: 'textIndexName',
vectorIndexName: 'vectorIndexName',
},
neptuneAnalyticsConfiguration: {
fieldMapping: {
metadataField: 'metadataField',
textField: 'textField',
},
graphArn: 'graphArn',
},
opensearchManagedClusterConfiguration: {
domainArn: 'domainArn',
domainEndpoint: 'domainEndpoint',
fieldMapping: {
metadataField: 'metadataField',
textField: 'textField',
vectorField: 'vectorField',
},
vectorIndexName: 'vectorIndexName',
},
opensearchServerlessConfiguration: {
collectionArn: 'collectionArn',
fieldMapping: {
metadataField: 'metadataField',
textField: 'textField',
vectorField: 'vectorField',
},
vectorIndexName: 'vectorIndexName',
},
pineconeConfiguration: {
connectionString: 'connectionString',
credentialsSecretArn: 'credentialsSecretArn',
fieldMapping: {
metadataField: 'metadataField',
textField: 'textField',
},
namespace: 'namespace',
},
rdsConfiguration: {
credentialsSecretArn: 'credentialsSecretArn',
databaseName: 'databaseName',
fieldMapping: {
customMetadataField: 'customMetadataField',
metadataField: 'metadataField',
primaryKeyField: 'primaryKeyField',
textField: 'textField',
vectorField: 'vectorField',
},
resourceArn: 'resourceArn',
tableName: 'tableName',
},
s3VectorsConfiguration: {
indexArn: 'indexArn',
indexName: 'indexName',
vectorBucketArn: 'vectorBucketArn',
},
type: 'type',
},
tags: {
tagsKey: 'tags',
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnKnowledgeBasePropsMixin(props: CfnKnowledgeBaseMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Knowledge Base Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Bedrock::KnowledgeBase.
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