Skip to content

Commit

Permalink
feat(client-bedrock-agent): This release introduces Amazon Aurora as …
Browse files Browse the repository at this point in the history
…a vector store on Knowledge Bases for Amazon Bedrock
  • Loading branch information
awstools committed Dec 21, 2023
1 parent d7c4e6f commit b7416af
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
* },
* },
* storageConfiguration: { // StorageConfiguration
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD", // required
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
* opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
* collectionArn: "STRING_VALUE", // required
* vectorIndexName: "STRING_VALUE", // required
Expand Down Expand Up @@ -85,6 +85,18 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
* metadataField: "STRING_VALUE", // required
* },
* },
* rdsConfiguration: { // RdsConfiguration
* resourceArn: "STRING_VALUE", // required
* credentialsSecretArn: "STRING_VALUE", // required
* databaseName: "STRING_VALUE", // required
* tableName: "STRING_VALUE", // required
* fieldMapping: { // RdsFieldMapping
* primaryKeyField: "STRING_VALUE", // required
* vectorField: "STRING_VALUE", // required
* textField: "STRING_VALUE", // required
* metadataField: "STRING_VALUE", // required
* },
* },
* },
* tags: { // TagsMap
* "<keys>": "STRING_VALUE",
Expand All @@ -106,7 +118,7 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
* // },
* // },
* // storageConfiguration: { // StorageConfiguration
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD", // required
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
* // opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
* // collectionArn: "STRING_VALUE", // required
* // vectorIndexName: "STRING_VALUE", // required
Expand Down Expand Up @@ -135,6 +147,18 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
* // metadataField: "STRING_VALUE", // required
* // },
* // },
* // rdsConfiguration: { // RdsConfiguration
* // resourceArn: "STRING_VALUE", // required
* // credentialsSecretArn: "STRING_VALUE", // required
* // databaseName: "STRING_VALUE", // required
* // tableName: "STRING_VALUE", // required
* // fieldMapping: { // RdsFieldMapping
* // primaryKeyField: "STRING_VALUE", // required
* // vectorField: "STRING_VALUE", // required
* // textField: "STRING_VALUE", // required
* // metadataField: "STRING_VALUE", // required
* // },
* // },
* // },
* // status: "CREATING" || "ACTIVE" || "DELETING" || "UPDATING" || "FAILED", // required
* // createdAt: new Date("TIMESTAMP"), // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface GetKnowledgeBaseCommandOutput extends GetKnowledgeBaseResponse,
* // },
* // },
* // storageConfiguration: { // StorageConfiguration
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD", // required
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
* // opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
* // collectionArn: "STRING_VALUE", // required
* // vectorIndexName: "STRING_VALUE", // required
Expand Down Expand Up @@ -92,6 +92,18 @@ export interface GetKnowledgeBaseCommandOutput extends GetKnowledgeBaseResponse,
* // metadataField: "STRING_VALUE", // required
* // },
* // },
* // rdsConfiguration: { // RdsConfiguration
* // resourceArn: "STRING_VALUE", // required
* // credentialsSecretArn: "STRING_VALUE", // required
* // databaseName: "STRING_VALUE", // required
* // tableName: "STRING_VALUE", // required
* // fieldMapping: { // RdsFieldMapping
* // primaryKeyField: "STRING_VALUE", // required
* // vectorField: "STRING_VALUE", // required
* // textField: "STRING_VALUE", // required
* // metadataField: "STRING_VALUE", // required
* // },
* // },
* // },
* // status: "CREATING" || "ACTIVE" || "DELETING" || "UPDATING" || "FAILED", // required
* // createdAt: new Date("TIMESTAMP"), // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
* },
* },
* storageConfiguration: { // StorageConfiguration
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD", // required
* type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
* opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
* collectionArn: "STRING_VALUE", // required
* vectorIndexName: "STRING_VALUE", // required
Expand Down Expand Up @@ -85,6 +85,18 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
* metadataField: "STRING_VALUE", // required
* },
* },
* rdsConfiguration: { // RdsConfiguration
* resourceArn: "STRING_VALUE", // required
* credentialsSecretArn: "STRING_VALUE", // required
* databaseName: "STRING_VALUE", // required
* tableName: "STRING_VALUE", // required
* fieldMapping: { // RdsFieldMapping
* primaryKeyField: "STRING_VALUE", // required
* vectorField: "STRING_VALUE", // required
* textField: "STRING_VALUE", // required
* metadataField: "STRING_VALUE", // required
* },
* },
* },
* };
* const command = new UpdateKnowledgeBaseCommand(input);
Expand All @@ -103,7 +115,7 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
* // },
* // },
* // storageConfiguration: { // StorageConfiguration
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD", // required
* // type: "OPENSEARCH_SERVERLESS" || "PINECONE" || "REDIS_ENTERPRISE_CLOUD" || "RDS", // required
* // opensearchServerlessConfiguration: { // OpenSearchServerlessConfiguration
* // collectionArn: "STRING_VALUE", // required
* // vectorIndexName: "STRING_VALUE", // required
Expand Down Expand Up @@ -132,6 +144,18 @@ export interface UpdateKnowledgeBaseCommandOutput extends UpdateKnowledgeBaseRes
* // metadataField: "STRING_VALUE", // required
* // },
* // },
* // rdsConfiguration: { // RdsConfiguration
* // resourceArn: "STRING_VALUE", // required
* // credentialsSecretArn: "STRING_VALUE", // required
* // databaseName: "STRING_VALUE", // required
* // tableName: "STRING_VALUE", // required
* // fieldMapping: { // RdsFieldMapping
* // primaryKeyField: "STRING_VALUE", // required
* // vectorField: "STRING_VALUE", // required
* // textField: "STRING_VALUE", // required
* // metadataField: "STRING_VALUE", // required
* // },
* // },
* // },
* // status: "CREATING" || "ACTIVE" || "DELETING" || "UPDATING" || "FAILED", // required
* // createdAt: new Date("TIMESTAMP"), // required
Expand Down
73 changes: 73 additions & 0 deletions clients/client-bedrock-agent/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2962,6 +2962,72 @@ export interface PineconeConfiguration {
fieldMapping: PineconeFieldMapping | undefined;
}

/**
* @public
* A mapping of Bedrock Knowledge Base fields to RDS column names
*/
export interface RdsFieldMapping {
/**
* @public
* Name of the column
*/
primaryKeyField: string | undefined;

/**
* @public
* Name of the column
*/
vectorField: string | undefined;

/**
* @public
* Name of the column
*/
textField: string | undefined;

/**
* @public
* Name of the column
*/
metadataField: string | undefined;
}

/**
* @public
* Contains the configurations to use RDS to store knowledge base data.
*/
export interface RdsConfiguration {
/**
* @public
* Arn of a RDS Resource.
*/
resourceArn: string | undefined;

/**
* @public
* Arn of a SecretsManager Secret.
*/
credentialsSecretArn: string | undefined;

/**
* @public
* Name of the database within RDS
*/
databaseName: string | undefined;

/**
* @public
* Name of the table within RDS
*/
tableName: string | undefined;

/**
* @public
* A mapping of Bedrock Knowledge Base fields to RDS column names
*/
fieldMapping: RdsFieldMapping | undefined;
}

/**
* @public
* A mapping of Bedrock Knowledge Base fields to Redis Cloud field names
Expand Down Expand Up @@ -3023,6 +3089,7 @@ export interface RedisEnterpriseCloudConfiguration {
export const KnowledgeBaseStorageType = {
OPENSEARCH_SERVERLESS: "OPENSEARCH_SERVERLESS",
PINECONE: "PINECONE",
RDS: "RDS",
REDIS_ENTERPRISE_CLOUD: "REDIS_ENTERPRISE_CLOUD",
} as const;

Expand Down Expand Up @@ -3059,6 +3126,12 @@ export interface StorageConfiguration {
* Contains the configurations to use Redis Enterprise Cloud to store knowledge base data.
*/
redisEnterpriseCloudConfiguration?: RedisEnterpriseCloudConfiguration;

/**
* @public
* Contains the configurations to use RDS to store knowledge base data.
*/
rdsConfiguration?: RdsConfiguration;
}

/**
Expand Down
10 changes: 10 additions & 0 deletions clients/client-bedrock-agent/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ import {
PineconeFieldMapping,
PromptConfiguration,
PromptOverrideConfiguration,
RdsConfiguration,
RdsFieldMapping,
RedisEnterpriseCloudConfiguration,
RedisEnterpriseCloudFieldMapping,
ResourceNotFoundException,
Expand Down Expand Up @@ -3719,6 +3721,10 @@ const se_PromptOverrideConfiguration = (input: PromptOverrideConfiguration, cont
});
};

// se_RdsConfiguration omitted.

// se_RdsFieldMapping omitted.

// se_RedisEnterpriseCloudConfiguration omitted.

// se_RedisEnterpriseCloudFieldMapping omitted.
Expand Down Expand Up @@ -4206,6 +4212,10 @@ const de_PromptOverrideConfiguration = (output: any, context: __SerdeContext): P
}) as any;
};

// de_RdsConfiguration omitted.

// de_RdsFieldMapping omitted.

// de_RecommendedActions omitted.

// de_RedisEnterpriseCloudConfiguration omitted.
Expand Down
Loading

0 comments on commit b7416af

Please sign in to comment.