MongoDbAtlasConfigurationProperty Struct
Contains details about the storage configuration of the knowledge base in MongoDB Atlas.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const mongoDbAtlasConfigurationProperty: bedrock.CfnKnowledgeBase.MongoDbAtlasConfigurationProperty = {
collectionName: 'collectionName',
credentialsSecretArn: 'credentialsSecretArn',
databaseName: 'databaseName',
endpoint: 'endpoint',
fieldMapping: {
metadataField: 'metadataField',
textField: 'textField',
vectorField: 'vectorField',
},
vectorIndexName: 'vectorIndexName',
// the properties below are optional
endpointServiceName: 'endpointServiceName',
textIndexName: 'textIndexName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock
mongo_db_atlas_configuration_property = bedrock.CfnKnowledgeBase.MongoDbAtlasConfigurationProperty(
collection_name="collectionName",
credentials_secret_arn="credentialsSecretArn",
database_name="databaseName",
endpoint="endpoint",
field_mapping=bedrock.CfnKnowledgeBase.MongoDbAtlasFieldMappingProperty(
metadata_field="metadataField",
text_field="textField",
vector_field="vectorField"
),
vector_index_name="vectorIndexName",
# the properties below are optional
endpoint_service_name="endpointServiceName",
text_index_name="textIndexName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.*;
MongoDbAtlasConfigurationProperty mongoDbAtlasConfigurationProperty = MongoDbAtlasConfigurationProperty.builder()
.collectionName("collectionName")
.credentialsSecretArn("credentialsSecretArn")
.databaseName("databaseName")
.endpoint("endpoint")
.fieldMapping(MongoDbAtlasFieldMappingProperty.builder()
.metadataField("metadataField")
.textField("textField")
.vectorField("vectorField")
.build())
.vectorIndexName("vectorIndexName")
// the properties below are optional
.endpointServiceName("endpointServiceName")
.textIndexName("textIndexName")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 mongoDbAtlasConfigurationProperty = new MongoDbAtlasConfigurationProperty {
CollectionName = "collectionName",
CredentialsSecretArn = "credentialsSecretArn",
DatabaseName = "databaseName",
Endpoint = "endpoint",
FieldMapping = new MongoDbAtlasFieldMappingProperty {
MetadataField = "metadataField",
TextField = "textField",
VectorField = "vectorField"
},
VectorIndexName = "vectorIndexName",
// the properties below are optional
EndpointServiceName = "endpointServiceName",
TextIndexName = "textIndexName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
mongoDbAtlasConfigurationProperty := &MongoDbAtlasConfigurationProperty{
CollectionName: jsii.String("collectionName"),
CredentialsSecretArn: jsii.String("credentialsSecretArn"),
DatabaseName: jsii.String("databaseName"),
Endpoint: jsii.String("endpoint"),
FieldMapping: &MongoDbAtlasFieldMappingProperty{
MetadataField: jsii.String("metadataField"),
TextField: jsii.String("textField"),
VectorField: jsii.String("vectorField"),
},
VectorIndexName: jsii.String("vectorIndexName"),
// the properties below are optional
EndpointServiceName: jsii.String("endpointServiceName"),
TextIndexName: jsii.String("textIndexName"),
}
Properties
collectionNamestringcollection_namestrcollectionNameStringCollectionNamestringCollectionName*string required #The collection name of the knowledge base in MongoDB Atlas.
credentialsSecretArnstringcredentials_secret_arnstrcredentialsSecretArnStringCredentialsSecretArnstringCredentialsSecretArn*string required #The Amazon Resource Name (ARN) of the secret that you created in AWS Secrets Manager that contains user credentials for your MongoDB Atlas cluster.
databaseNamestringdatabase_namestrdatabaseNameStringDatabaseNamestringDatabaseName*string required #The database name in your MongoDB Atlas cluster for your knowledge base.
The endpoint URL of your MongoDB Atlas cluster for your knowledge base.
endpointServiceNameoptionalstringendpoint_service_nameoptionalstrendpointServiceNameoptionalStringEndpointServiceNameoptionalstringEndpointServiceNameoptional*string #The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.
fieldMappingIResolvable | CfnKnowledgeBase.field_mappingtyping.Union[IResolvable, MongoDbAtlasFieldMappingProperty]fieldMappingIResolvableFieldMappingIResolvableFieldMappinginterface{} required #Contains the names of the fields to which to map information about the vector store.
textIndexNameoptionalstringtext_index_nameoptionalstrtextIndexNameoptionalStringTextIndexNameoptionalstringTextIndexNameoptional*string #The name of the text search index in the MongoDB collection.
This is required for using the hybrid search feature.
vectorIndexNamestringvector_index_namestrvectorIndexNameStringVectorIndexNamestringVectorIndexName*string required #The name of the MongoDB Atlas vector search index.