diff --git a/clients/client-bedrock-agent/src/commands/CreateKnowledgeBaseCommand.ts b/clients/client-bedrock-agent/src/commands/CreateKnowledgeBaseCommand.ts index 8fbe43e435908..9ae43c7e28c15 100644 --- a/clients/client-bedrock-agent/src/commands/CreateKnowledgeBaseCommand.ts +++ b/clients/client-bedrock-agent/src/commands/CreateKnowledgeBaseCommand.ts @@ -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 @@ -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 * "": "STRING_VALUE", @@ -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 @@ -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 diff --git a/clients/client-bedrock-agent/src/commands/GetKnowledgeBaseCommand.ts b/clients/client-bedrock-agent/src/commands/GetKnowledgeBaseCommand.ts index 9d91164233061..bc3d620d755e4 100644 --- a/clients/client-bedrock-agent/src/commands/GetKnowledgeBaseCommand.ts +++ b/clients/client-bedrock-agent/src/commands/GetKnowledgeBaseCommand.ts @@ -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 @@ -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 diff --git a/clients/client-bedrock-agent/src/commands/UpdateKnowledgeBaseCommand.ts b/clients/client-bedrock-agent/src/commands/UpdateKnowledgeBaseCommand.ts index 1990d6b569a93..9fb79f76dccd6 100644 --- a/clients/client-bedrock-agent/src/commands/UpdateKnowledgeBaseCommand.ts +++ b/clients/client-bedrock-agent/src/commands/UpdateKnowledgeBaseCommand.ts @@ -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 @@ -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); @@ -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 @@ -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 diff --git a/clients/client-bedrock-agent/src/models/models_0.ts b/clients/client-bedrock-agent/src/models/models_0.ts index afc889937d10d..8df5297fe2965 100644 --- a/clients/client-bedrock-agent/src/models/models_0.ts +++ b/clients/client-bedrock-agent/src/models/models_0.ts @@ -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 @@ -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; @@ -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; } /** diff --git a/clients/client-bedrock-agent/src/protocols/Aws_restJson1.ts b/clients/client-bedrock-agent/src/protocols/Aws_restJson1.ts index c679601723234..44f752c625e33 100644 --- a/clients/client-bedrock-agent/src/protocols/Aws_restJson1.ts +++ b/clients/client-bedrock-agent/src/protocols/Aws_restJson1.ts @@ -146,6 +146,8 @@ import { PineconeFieldMapping, PromptConfiguration, PromptOverrideConfiguration, + RdsConfiguration, + RdsFieldMapping, RedisEnterpriseCloudConfiguration, RedisEnterpriseCloudFieldMapping, ResourceNotFoundException, @@ -3719,6 +3721,10 @@ const se_PromptOverrideConfiguration = (input: PromptOverrideConfiguration, cont }); }; +// se_RdsConfiguration omitted. + +// se_RdsFieldMapping omitted. + // se_RedisEnterpriseCloudConfiguration omitted. // se_RedisEnterpriseCloudFieldMapping omitted. @@ -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. diff --git a/codegen/sdk-codegen/aws-models/bedrock-agent.json b/codegen/sdk-codegen/aws-models/bedrock-agent.json index ba7588844aca8..dde14320e1262 100644 --- a/codegen/sdk-codegen/aws-models/bedrock-agent.json +++ b/codegen/sdk-codegen/aws-models/bedrock-agent.json @@ -1811,6 +1811,16 @@ "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$" } }, + "com.amazonaws.bedrockagent#ColumnName": { + "type": "string", + "traits": { + "smithy.api#documentation": "Name of the column", + "smithy.api#length": { + "max": 63 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-]+$" + } + }, "com.amazonaws.bedrockagent#ConflictException": { "type": "structure", "members": { @@ -4431,6 +4441,12 @@ "traits": { "smithy.api#enumValue": "REDIS_ENTERPRISE_CLOUD" } + }, + "RDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RDS" + } } }, "traits": { @@ -5639,6 +5655,103 @@ "smithy.api#documentation": "Prompt Type." } }, + "com.amazonaws.bedrockagent#RdsArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "Arn of a RDS Resource.", + "smithy.api#pattern": "^arn:aws(|-cn|-us-gov):rds:[a-zA-Z0-9-]*:[0-9]{12}:cluster:[a-zA-Z0-9-]{1,63}$" + } + }, + "com.amazonaws.bedrockagent#RdsConfiguration": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.bedrockagent#RdsArn", + "traits": { + "smithy.api#required": {} + } + }, + "credentialsSecretArn": { + "target": "com.amazonaws.bedrockagent#SecretArn", + "traits": { + "smithy.api#required": {} + } + }, + "databaseName": { + "target": "com.amazonaws.bedrockagent#RdsDatabaseName", + "traits": { + "smithy.api#required": {} + } + }, + "tableName": { + "target": "com.amazonaws.bedrockagent#RdsTableName", + "traits": { + "smithy.api#required": {} + } + }, + "fieldMapping": { + "target": "com.amazonaws.bedrockagent#RdsFieldMapping", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains the configurations to use RDS to store knowledge base data." + } + }, + "com.amazonaws.bedrockagent#RdsDatabaseName": { + "type": "string", + "traits": { + "smithy.api#documentation": "Name of the database within RDS", + "smithy.api#length": { + "max": 63 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-]+$" + } + }, + "com.amazonaws.bedrockagent#RdsFieldMapping": { + "type": "structure", + "members": { + "primaryKeyField": { + "target": "com.amazonaws.bedrockagent#ColumnName", + "traits": { + "smithy.api#required": {} + } + }, + "vectorField": { + "target": "com.amazonaws.bedrockagent#ColumnName", + "traits": { + "smithy.api#required": {} + } + }, + "textField": { + "target": "com.amazonaws.bedrockagent#ColumnName", + "traits": { + "smithy.api#required": {} + } + }, + "metadataField": { + "target": "com.amazonaws.bedrockagent#ColumnName", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A mapping of Bedrock Knowledge Base fields to RDS column names" + } + }, + "com.amazonaws.bedrockagent#RdsTableName": { + "type": "string", + "traits": { + "smithy.api#documentation": "Name of the table within RDS", + "smithy.api#length": { + "max": 63 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\.\\-]+$" + } + }, "com.amazonaws.bedrockagent#RecommendedAction": { "type": "string", "traits": { @@ -5842,7 +5955,7 @@ "type": "string", "traits": { "smithy.api#documentation": "Arn of a SecretsManager Secret.", - "smithy.api#pattern": "^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9/_+=.@-]{1,63}$" + "smithy.api#pattern": "^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9!/_+=.@-]{1,512}$" } }, "com.amazonaws.bedrockagent#ServerSideEncryptionConfiguration": { @@ -6016,6 +6129,9 @@ }, "redisEnterpriseCloudConfiguration": { "target": "com.amazonaws.bedrockagent#RedisEnterpriseCloudConfiguration" + }, + "rdsConfiguration": { + "target": "com.amazonaws.bedrockagent#RdsConfiguration" } }, "traits": {