Skip to content

Commit 93917f7

Browse files
author
awstools
committed
feat(client-bedrock-agent): This release adds support for using MongoDB Atlas as a vector store when creating a knowledge base.
1 parent 56df20c commit 93917f7

File tree

6 files changed

+312
-15
lines changed

6 files changed

+312
-15
lines changed

clients/client-bedrock-agent/src/commands/CreateKnowledgeBaseCommand.ts

+28-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
7777
* },
7878
* },
7979
* storageConfiguration: { // StorageConfiguration
80-
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
80+
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS" || "MONGO_DB_ATLAS", // required
8181
* opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
8282
* collectionArn: "STRING_VALUE", // required
8383
* vectorIndexName: "STRING_VALUE", // required
@@ -118,6 +118,19 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
118118
* metadataField: "STRING_VALUE", // required
119119
* },
120120
* },
121+
* mongoDbAtlasConfiguration: { // MongoDbAtlasConfiguration
122+
* endpoint: "STRING_VALUE", // required
123+
* databaseName: "STRING_VALUE", // required
124+
* collectionName: "STRING_VALUE", // required
125+
* vectorIndexName: "STRING_VALUE", // required
126+
* credentialsSecretArn: "STRING_VALUE", // required
127+
* fieldMapping: { // MongoDbAtlasFieldMapping
128+
* vectorField: "STRING_VALUE", // required
129+
* textField: "STRING_VALUE", // required
130+
* metadataField: "STRING_VALUE", // required
131+
* },
132+
* endpointServiceName: "STRING_VALUE",
133+
* },
121134
* },
122135
* tags: { // TagsMap
123136
* "<keys>": "STRING_VALUE",
@@ -139,7 +152,7 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
139152
* // },
140153
* // },
141154
* // storageConfiguration: { // StorageConfiguration
142-
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
155+
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS" || "MONGO_DB_ATLAS", // required
143156
* // opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
144157
* // collectionArn: "STRING_VALUE", // required
145158
* // vectorIndexName: "STRING_VALUE", // required
@@ -180,6 +193,19 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
180193
* // metadataField: "STRING_VALUE", // required
181194
* // },
182195
* // },
196+
* // mongoDbAtlasConfiguration: { // MongoDbAtlasConfiguration
197+
* // endpoint: "STRING_VALUE", // required
198+
* // databaseName: "STRING_VALUE", // required
199+
* // collectionName: "STRING_VALUE", // required
200+
* // vectorIndexName: "STRING_VALUE", // required
201+
* // credentialsSecretArn: "STRING_VALUE", // required
202+
* // fieldMapping: { // MongoDbAtlasFieldMapping
203+
* // vectorField: "STRING_VALUE", // required
204+
* // textField: "STRING_VALUE", // required
205+
* // metadataField: "STRING_VALUE", // required
206+
* // },
207+
* // endpointServiceName: "STRING_VALUE",
208+
* // },
183209
* // },
184210
* // status: "CREATING" || "ACTIVE" || "DELETING" || "UPDATING" || "FAILED" || "DELETE_UNSUCCESSFUL", // required
185211
* // createdAt: new Date("TIMESTAMP"), // required

clients/client-bedrock-agent/src/commands/GetKnowledgeBaseCommand.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface GetKnowledgeBaseCommandOutput extends GetKnowledgeBaseResponse,
5353
* // },
5454
* // },
5555
* // storageConfiguration: { // StorageConfiguration
56-
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
56+
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS" || "MONGO_DB_ATLAS", // required
5757
* // opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
5858
* // collectionArn: "STRING_VALUE", // required
5959
* // vectorIndexName: "STRING_VALUE", // required
@@ -94,6 +94,19 @@ export interface GetKnowledgeBaseCommandOutput extends GetKnowledgeBaseResponse,
9494
* // metadataField: "STRING_VALUE", // required
9595
* // },
9696
* // },
97+
* // mongoDbAtlasConfiguration: { // MongoDbAtlasConfiguration
98+
* // endpoint: "STRING_VALUE", // required
99+
* // databaseName: "STRING_VALUE", // required
100+
* // collectionName: "STRING_VALUE", // required
101+
* // vectorIndexName: "STRING_VALUE", // required
102+
* // credentialsSecretArn: "STRING_VALUE", // required
103+
* // fieldMapping: { // MongoDbAtlasFieldMapping
104+
* // vectorField: "STRING_VALUE", // required
105+
* // textField: "STRING_VALUE", // required
106+
* // metadataField: "STRING_VALUE", // required
107+
* // },
108+
* // endpointServiceName: "STRING_VALUE",
109+
* // },
97110
* // },
98111
* // status: "CREATING" || "ACTIVE" || "DELETING" || "UPDATING" || "FAILED" || "DELETE_UNSUCCESSFUL", // required
99112
* // createdAt: new Date("TIMESTAMP"), // required

clients/client-bedrock-agent/src/commands/UpdateKnowledgeBaseCommand.ts

+28-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
6565
* },
6666
* },
6767
* storageConfiguration: { // StorageConfiguration
68-
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
68+
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS" || "MONGO_DB_ATLAS", // required
6969
* opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
7070
* collectionArn: "STRING_VALUE", // required
7171
* vectorIndexName: "STRING_VALUE", // required
@@ -106,6 +106,19 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
106106
* metadataField: "STRING_VALUE", // required
107107
* },
108108
* },
109+
* mongoDbAtlasConfiguration: { // MongoDbAtlasConfiguration
110+
* endpoint: "STRING_VALUE", // required
111+
* databaseName: "STRING_VALUE", // required
112+
* collectionName: "STRING_VALUE", // required
113+
* vectorIndexName: "STRING_VALUE", // required
114+
* credentialsSecretArn: "STRING_VALUE", // required
115+
* fieldMapping: { // MongoDbAtlasFieldMapping
116+
* vectorField: "STRING_VALUE", // required
117+
* textField: "STRING_VALUE", // required
118+
* metadataField: "STRING_VALUE", // required
119+
* },
120+
* endpointServiceName: "STRING_VALUE",
121+
* },
109122
* },
110123
* };
111124
* const command = new UpdateKnowledgeBaseCommand(input);
@@ -124,7 +137,7 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
124137
* // },
125138
* // },
126139
* // storageConfiguration: { // StorageConfiguration
127-
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
140+
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS" || "MONGO_DB_ATLAS", // required
128141
* // opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
129142
* // collectionArn: "STRING_VALUE", // required
130143
* // vectorIndexName: "STRING_VALUE", // required
@@ -165,6 +178,19 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
165178
* // metadataField: "STRING_VALUE", // required
166179
* // },
167180
* // },
181+
* // mongoDbAtlasConfiguration: { // MongoDbAtlasConfiguration
182+
* // endpoint: "STRING_VALUE", // required
183+
* // databaseName: "STRING_VALUE", // required
184+
* // collectionName: "STRING_VALUE", // required
185+
* // vectorIndexName: "STRING_VALUE", // required
186+
* // credentialsSecretArn: "STRING_VALUE", // required
187+
* // fieldMapping: { // MongoDbAtlasFieldMapping
188+
* // vectorField: "STRING_VALUE", // required
189+
* // textField: "STRING_VALUE", // required
190+
* // metadataField: "STRING_VALUE", // required
191+
* // },
192+
* // endpointServiceName: "STRING_VALUE",
193+
* // },
168194
* // },
169195
* // status: "CREATING" || "ACTIVE" || "DELETING" || "UPDATING" || "FAILED" || "DELETE_UNSUCCESSFUL", // required
170196
* // createdAt: new Date("TIMESTAMP"), // required

clients/client-bedrock-agent/src/models/models_0.ts

+84-5
Original file line numberDiff line numberDiff line change
@@ -2222,7 +2222,7 @@ export interface S3DataSourceConfiguration {
22222222
inclusionPrefixes?: string[];
22232223

22242224
/**
2225-
* <p>The account ID for the owner of the S3 bucket.</p>
2225+
* <p>The bucket account owner ID for the S3 bucket.</p>
22262226
* @public
22272227
*/
22282228
bucketOwnerAccountId?: string;
@@ -2379,7 +2379,7 @@ export interface CreateDataSourceRequest {
23792379
dataSourceConfiguration: DataSourceConfiguration | undefined;
23802380

23812381
/**
2382-
* <p>The deletion policy for the requested data source</p>
2382+
* <p>The data deletion policy assigned to the data source.</p>
23832383
* @public
23842384
*/
23852385
dataDeletionPolicy?: DataDeletionPolicy;
@@ -2474,7 +2474,7 @@ export interface DataSource {
24742474
vectorIngestionConfiguration?: VectorIngestionConfiguration;
24752475

24762476
/**
2477-
* <p>The deletion policy for the data source.</p>
2477+
* <p>The data deletion policy for a data source.</p>
24782478
* @public
24792479
*/
24802480
dataDeletionPolicy?: DataDeletionPolicy;
@@ -2492,7 +2492,7 @@ export interface DataSource {
24922492
updatedAt: Date | undefined;
24932493

24942494
/**
2495-
* <p>The details of the failure reasons related to the data source.</p>
2495+
* <p>The detailed reasons on the failure to delete a data source.</p>
24962496
* @public
24972497
*/
24982498
failureReasons?: string[];
@@ -2694,7 +2694,7 @@ export interface UpdateDataSourceRequest {
26942694
dataSourceConfiguration: DataSourceConfiguration | undefined;
26952695

26962696
/**
2697-
* <p>The data deletion policy of the updated data source.</p>
2697+
* <p>The data deletion policy assigned to the data source.</p>
26982698
* @public
26992699
*/
27002700
dataDeletionPolicy?: DataDeletionPolicy;
@@ -3239,6 +3239,78 @@ export interface KnowledgeBaseConfiguration {
32393239
vectorKnowledgeBaseConfiguration?: VectorKnowledgeBaseConfiguration;
32403240
}
32413241

3242+
/**
3243+
* <p>Contains the names of the fields to which to map information about the vector store.</p>
3244+
* @public
3245+
*/
3246+
export interface MongoDbAtlasFieldMapping {
3247+
/**
3248+
* <p>The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.</p>
3249+
* @public
3250+
*/
3251+
vectorField: string | undefined;
3252+
3253+
/**
3254+
* <p>The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.</p>
3255+
* @public
3256+
*/
3257+
textField: string | undefined;
3258+
3259+
/**
3260+
* <p>The name of the field in which Amazon Bedrock stores metadata about the vector store.</p>
3261+
* @public
3262+
*/
3263+
metadataField: string | undefined;
3264+
}
3265+
3266+
/**
3267+
* <p>Contains details about the storage configuration of the knowledge base in MongoDB Atlas. </p>
3268+
* @public
3269+
*/
3270+
export interface MongoDbAtlasConfiguration {
3271+
/**
3272+
* <p>The endpoint URL of your MongoDB Atlas cluster for your knowledge base.</p>
3273+
* @public
3274+
*/
3275+
endpoint: string | undefined;
3276+
3277+
/**
3278+
* <p>The database name in your MongoDB Atlas cluster for your knowledge base.</p>
3279+
* @public
3280+
*/
3281+
databaseName: string | undefined;
3282+
3283+
/**
3284+
* <p>The collection name of the knowledge base in MongoDB Atlas.</p>
3285+
* @public
3286+
*/
3287+
collectionName: string | undefined;
3288+
3289+
/**
3290+
* <p>The name of the MongoDB Atlas vector search index.</p>
3291+
* @public
3292+
*/
3293+
vectorIndexName: string | undefined;
3294+
3295+
/**
3296+
* <p>The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster.</p>
3297+
* @public
3298+
*/
3299+
credentialsSecretArn: string | undefined;
3300+
3301+
/**
3302+
* <p>Contains the names of the fields to which to map information about the vector store.</p>
3303+
* @public
3304+
*/
3305+
fieldMapping: MongoDbAtlasFieldMapping | undefined;
3306+
3307+
/**
3308+
* <p>The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.</p>
3309+
* @public
3310+
*/
3311+
endpointServiceName?: string;
3312+
}
3313+
32423314
/**
32433315
* <p>Contains the names of the fields to which to map information about the vector store.</p>
32443316
* @public
@@ -3460,6 +3532,7 @@ export interface RedisEnterpriseCloudConfiguration {
34603532
* @enum
34613533
*/
34623534
export const KnowledgeBaseStorageType = {
3535+
MONGO_DB_ATLAS: "MONGO_DB_ATLAS",
34633536
OPENSEARCH_SERVERLESS: "OPENSEARCH_SERVERLESS",
34643537
PINECONE: "PINECONE",
34653538
RDS: "RDS",
@@ -3505,6 +3578,12 @@ export interface StorageConfiguration {
35053578
* @public
35063579
*/
35073580
rdsConfiguration?: RdsConfiguration;
3581+
3582+
/**
3583+
* <p>Contains the storage configuration of the knowledge base in MongoDB Atlas.</p>
3584+
* @public
3585+
*/
3586+
mongoDbAtlasConfiguration?: MongoDbAtlasConfiguration;
35083587
}
35093588

35103589
/**

clients/client-bedrock-agent/src/protocols/Aws_restJson1.ts

+10
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ import {
147147
KnowledgeBase,
148148
KnowledgeBaseConfiguration,
149149
KnowledgeBaseSummary,
150+
MongoDbAtlasConfiguration,
151+
MongoDbAtlasFieldMapping,
150152
OpenSearchServerlessConfiguration,
151153
OpenSearchServerlessFieldMapping,
152154
ParameterDetail,
@@ -2133,6 +2135,10 @@ const se_InferenceConfiguration = (input: InferenceConfiguration, context: __Ser
21332135

21342136
// se_KnowledgeBaseConfiguration omitted.
21352137

2138+
// se_MongoDbAtlasConfiguration omitted.
2139+
2140+
// se_MongoDbAtlasFieldMapping omitted.
2141+
21362142
// se_OpenSearchServerlessConfiguration omitted.
21372143

21382144
// se_OpenSearchServerlessFieldMapping omitted.
@@ -2636,6 +2642,10 @@ const de_KnowledgeBaseSummary = (output: any, context: __SerdeContext): Knowledg
26362642
}) as any;
26372643
};
26382644

2645+
// de_MongoDbAtlasConfiguration omitted.
2646+
2647+
// de_MongoDbAtlasFieldMapping omitted.
2648+
26392649
// de_OpenSearchServerlessConfiguration omitted.
26402650

26412651
// de_OpenSearchServerlessFieldMapping omitted.

0 commit comments

Comments
 (0)