Skip to content

Update Knowledge Base

bedrockagent_update_knowledge_base R Documentation

Updates the configuration of a knowledge base with the fields that you specify

Description

Updates the configuration of a knowledge base with the fields that you specify. Because all fields will be overwritten, you must include the same values for fields that you want to keep the same.

You can change the following fields:

  • name

  • description

  • roleArn

You can't change the knowledgeBaseConfiguration or storageConfiguration fields, so you must specify the same configurations as when you created the knowledge base. You can send a get_knowledge_base request and copy the same configurations.

Usage

bedrockagent_update_knowledge_base(description,
  knowledgeBaseConfiguration, knowledgeBaseId, name, roleArn,
  storageConfiguration)

Arguments

description

Specifies a new description for the knowledge base.

knowledgeBaseConfiguration

[required] Specifies the configuration for the embeddings model used for the knowledge base. You must use the same configuration as when the knowledge base was created.

knowledgeBaseId

[required] The unique identifier of the knowledge base to update.

name

[required] Specifies a new name for the knowledge base.

roleArn

[required] Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.

storageConfiguration

Specifies the configuration for the vector store used for the knowledge base. You must use the same configuration as when the knowledge base was created.

Value

A list with the following syntax:

list(
  knowledgeBase = list(
    createdAt = as.POSIXct(
      "2015-01-01"
    ),
    description = "string",
    failureReasons = list(
      "string"
    ),
    knowledgeBaseArn = "string",
    knowledgeBaseConfiguration = list(
      kendraKnowledgeBaseConfiguration = list(
        kendraIndexArn = "string"
      ),
      sqlKnowledgeBaseConfiguration = list(
        redshiftConfiguration = list(
          queryEngineConfiguration = list(
            provisionedConfiguration = list(
              authConfiguration = list(
                databaseUser = "string",
                type = "IAM"|"USERNAME_PASSWORD"|"USERNAME",
                usernamePasswordSecretArn = "string"
              ),
              clusterIdentifier = "string"
            ),
            serverlessConfiguration = list(
              authConfiguration = list(
                type = "IAM"|"USERNAME_PASSWORD",
                usernamePasswordSecretArn = "string"
              ),
              workgroupArn = "string"
            ),
            type = "SERVERLESS"|"PROVISIONED"
          ),
          queryGenerationConfiguration = list(
            executionTimeoutSeconds = 123,
            generationContext = list(
              curatedQueries = list(
                list(
                  naturalLanguage = "string",
                  sql = "string"
                )
              ),
              tables = list(
                list(
                  columns = list(
                    list(
                      description = "string",
                      inclusion = "INCLUDE"|"EXCLUDE",
                      name = "string"
                    )
                  ),
                  description = "string",
                  inclusion = "INCLUDE"|"EXCLUDE",
                  name = "string"
                )
              )
            )
          ),
          storageConfigurations = list(
            list(
              awsDataCatalogConfiguration = list(
                tableNames = list(
                  "string"
                )
              ),
              redshiftConfiguration = list(
                databaseName = "string"
              ),
              type = "REDSHIFT"|"AWS_DATA_CATALOG"
            )
          )
        ),
        type = "REDSHIFT"
      ),
      type = "VECTOR"|"KENDRA"|"SQL",
      vectorKnowledgeBaseConfiguration = list(
        embeddingModelArn = "string",
        embeddingModelConfiguration = list(
          bedrockEmbeddingModelConfiguration = list(
            dimensions = 123,
            embeddingDataType = "FLOAT32"|"BINARY"
          )
        ),
        supplementalDataStorageConfiguration = list(
          storageLocations = list(
            list(
              s3Location = list(
                uri = "string"
              ),
              type = "S3"
            )
          )
        )
      )
    ),
    knowledgeBaseId = "string",
    name = "string",
    roleArn = "string",
    status = "CREATING"|"ACTIVE"|"DELETING"|"UPDATING"|"FAILED"|"DELETE_UNSUCCESSFUL",
    storageConfiguration = list(
      mongoDbAtlasConfiguration = list(
        collectionName = "string",
        credentialsSecretArn = "string",
        databaseName = "string",
        endpoint = "string",
        endpointServiceName = "string",
        fieldMapping = list(
          metadataField = "string",
          textField = "string",
          vectorField = "string"
        ),
        vectorIndexName = "string"
      ),
      opensearchServerlessConfiguration = list(
        collectionArn = "string",
        fieldMapping = list(
          metadataField = "string",
          textField = "string",
          vectorField = "string"
        ),
        vectorIndexName = "string"
      ),
      pineconeConfiguration = list(
        connectionString = "string",
        credentialsSecretArn = "string",
        fieldMapping = list(
          metadataField = "string",
          textField = "string"
        ),
        namespace = "string"
      ),
      rdsConfiguration = list(
        credentialsSecretArn = "string",
        databaseName = "string",
        fieldMapping = list(
          metadataField = "string",
          primaryKeyField = "string",
          textField = "string",
          vectorField = "string"
        ),
        resourceArn = "string",
        tableName = "string"
      ),
      redisEnterpriseCloudConfiguration = list(
        credentialsSecretArn = "string",
        endpoint = "string",
        fieldMapping = list(
          metadataField = "string",
          textField = "string",
          vectorField = "string"
        ),
        vectorIndexName = "string"
      ),
      type = "OPENSEARCH_SERVERLESS"|"PINECONE"|"REDIS_ENTERPRISE_CLOUD"|"RDS"|"MONGO_DB_ATLAS"
    ),
    updatedAt = as.POSIXct(
      "2015-01-01"
    )
  )
)

Request syntax

svc$update_knowledge_base(
  description = "string",
  knowledgeBaseConfiguration = list(
    kendraKnowledgeBaseConfiguration = list(
      kendraIndexArn = "string"
    ),
    sqlKnowledgeBaseConfiguration = list(
      redshiftConfiguration = list(
        queryEngineConfiguration = list(
          provisionedConfiguration = list(
            authConfiguration = list(
              databaseUser = "string",
              type = "IAM"|"USERNAME_PASSWORD"|"USERNAME",
              usernamePasswordSecretArn = "string"
            ),
            clusterIdentifier = "string"
          ),
          serverlessConfiguration = list(
            authConfiguration = list(
              type = "IAM"|"USERNAME_PASSWORD",
              usernamePasswordSecretArn = "string"
            ),
            workgroupArn = "string"
          ),
          type = "SERVERLESS"|"PROVISIONED"
        ),
        queryGenerationConfiguration = list(
          executionTimeoutSeconds = 123,
          generationContext = list(
            curatedQueries = list(
              list(
                naturalLanguage = "string",
                sql = "string"
              )
            ),
            tables = list(
              list(
                columns = list(
                  list(
                    description = "string",
                    inclusion = "INCLUDE"|"EXCLUDE",
                    name = "string"
                  )
                ),
                description = "string",
                inclusion = "INCLUDE"|"EXCLUDE",
                name = "string"
              )
            )
          )
        ),
        storageConfigurations = list(
          list(
            awsDataCatalogConfiguration = list(
              tableNames = list(
                "string"
              )
            ),
            redshiftConfiguration = list(
              databaseName = "string"
            ),
            type = "REDSHIFT"|"AWS_DATA_CATALOG"
          )
        )
      ),
      type = "REDSHIFT"
    ),
    type = "VECTOR"|"KENDRA"|"SQL",
    vectorKnowledgeBaseConfiguration = list(
      embeddingModelArn = "string",
      embeddingModelConfiguration = list(
        bedrockEmbeddingModelConfiguration = list(
          dimensions = 123,
          embeddingDataType = "FLOAT32"|"BINARY"
        )
      ),
      supplementalDataStorageConfiguration = list(
        storageLocations = list(
          list(
            s3Location = list(
              uri = "string"
            ),
            type = "S3"
          )
        )
      )
    )
  ),
  knowledgeBaseId = "string",
  name = "string",
  roleArn = "string",
  storageConfiguration = list(
    mongoDbAtlasConfiguration = list(
      collectionName = "string",
      credentialsSecretArn = "string",
      databaseName = "string",
      endpoint = "string",
      endpointServiceName = "string",
      fieldMapping = list(
        metadataField = "string",
        textField = "string",
        vectorField = "string"
      ),
      vectorIndexName = "string"
    ),
    opensearchServerlessConfiguration = list(
      collectionArn = "string",
      fieldMapping = list(
        metadataField = "string",
        textField = "string",
        vectorField = "string"
      ),
      vectorIndexName = "string"
    ),
    pineconeConfiguration = list(
      connectionString = "string",
      credentialsSecretArn = "string",
      fieldMapping = list(
        metadataField = "string",
        textField = "string"
      ),
      namespace = "string"
    ),
    rdsConfiguration = list(
      credentialsSecretArn = "string",
      databaseName = "string",
      fieldMapping = list(
        metadataField = "string",
        primaryKeyField = "string",
        textField = "string",
        vectorField = "string"
      ),
      resourceArn = "string",
      tableName = "string"
    ),
    redisEnterpriseCloudConfiguration = list(
      credentialsSecretArn = "string",
      endpoint = "string",
      fieldMapping = list(
        metadataField = "string",
        textField = "string",
        vectorField = "string"
      ),
      vectorIndexName = "string"
    ),
    type = "OPENSEARCH_SERVERLESS"|"PINECONE"|"REDIS_ENTERPRISE_CLOUD"|"RDS"|"MONGO_DB_ATLAS"
  )
)