2024/12/04 - Agents for Amazon Bedrock - 6 updated api methods
Changes Introduced two APIs ListPromptRouters and GetPromptRouter for Intelligent Prompt Router feature. Add support for Bedrock Guardrails image content filter. New Bedrock Marketplace feature enabling a wider range of bedrock compatible models with self-hosted capability.
{'dataSourceConfiguration': {'type': {'REDSHIFT_METADATA'}}, 'vectorIngestionConfiguration': {'parsingConfiguration': {'bedrockDataAutomationConfiguration': {'parsingModality': 'MULTIMODAL'}, 'bedrockFoundationModelConfiguration': {'parsingModality': 'MULTIMODAL'}, 'parsingStrategy': {'BEDROCK_DATA_AUTOMATION'}}}}Response
{'dataSource': {'dataSourceConfiguration': {'type': {'REDSHIFT_METADATA'}}, 'vectorIngestionConfiguration': {'parsingConfiguration': {'bedrockDataAutomationConfiguration': {'parsingModality': 'MULTIMODAL'}, 'bedrockFoundationModelConfiguration': {'parsingModality': 'MULTIMODAL'}, 'parsingStrategy': {'BEDROCK_DATA_AUTOMATION'}}}}}
Connects a knowledge base to a data source. You specify the configuration for the specific data source service in the dataSourceConfiguration field.
See also: AWS API Documentation
Request Syntax
client.create_data_source( clientToken='string', dataDeletionPolicy='RETAIN'|'DELETE', dataSourceConfiguration={ 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, description='string', knowledgeBaseId='string', name='string', serverSideEncryptionConfiguration={ 'kmsKeyArn': 'string' }, vectorIngestionConfiguration={ 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } )
string
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
This field is autopopulated if not provided.
string
The data deletion policy for the data source.
You can set the data deletion policy to:
DELETE: Deletes all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the vector store itself is not deleted, only the data. This flag is ignored if an Amazon Web Services account is deleted.
RETAIN: Retains all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the vector store itself is not deleted if you delete a knowledge base or data source resource.
dict
[REQUIRED]
The connection configuration for the data source.
confluenceConfiguration (dict) --
The configuration information to connect to Confluence as your data source.
crawlerConfiguration (dict) --
The configuration of the Confluence content. For example, configuring specific types of Confluence content.
filterConfiguration (dict) --
The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) -- [REQUIRED]
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) -- [REQUIRED]
The supported object type or content type of the data source.
type (string) -- [REQUIRED]
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) -- [REQUIRED]
The endpoint information to connect to your Confluence data source.
authType (string) -- [REQUIRED]
The supported authentication type to authenticate and connect to your Confluence instance.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration.
hostType (string) -- [REQUIRED]
The supported host type, whether online/cloud or server/on-premises.
hostUrl (string) -- [REQUIRED]
The Confluence host URL or instance URL.
s3Configuration (dict) --
The configuration information to connect to Amazon S3 as your data source.
bucketArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
bucketOwnerAccountId (string) --
The account ID for the owner of the S3 bucket.
inclusionPrefixes (list) --
A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes.
(string) --
salesforceConfiguration (dict) --
The configuration information to connect to Salesforce as your data source.
crawlerConfiguration (dict) --
The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.
filterConfiguration (dict) --
The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) -- [REQUIRED]
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) -- [REQUIRED]
The supported object type or content type of the data source.
type (string) -- [REQUIRED]
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) -- [REQUIRED]
The endpoint information to connect to your Salesforce data source.
authType (string) -- [REQUIRED]
The supported authentication type to authenticate and connect to your Salesforce instance.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration.
hostUrl (string) -- [REQUIRED]
The Salesforce host URL or instance URL.
sharePointConfiguration (dict) --
The configuration information to connect to SharePoint as your data source.
crawlerConfiguration (dict) --
The configuration of the SharePoint content. For example, configuring specific types of SharePoint content.
filterConfiguration (dict) --
The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) -- [REQUIRED]
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) -- [REQUIRED]
The supported object type or content type of the data source.
type (string) -- [REQUIRED]
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) -- [REQUIRED]
The endpoint information to connect to your SharePoint data source.
authType (string) -- [REQUIRED]
The supported authentication type to authenticate and connect to your SharePoint site/sites.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration.
domain (string) -- [REQUIRED]
The domain of your SharePoint instance or site URL/URLs.
hostType (string) -- [REQUIRED]
The supported host type, whether online/cloud or server/on-premises.
siteUrls (list) -- [REQUIRED]
A list of one or more SharePoint site URLs.
(string) --
tenantId (string) --
The identifier of your Microsoft 365 tenant.
type (string) -- [REQUIRED]
The type of data source.
webConfiguration (dict) --
The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs.
crawlerConfiguration (dict) --
The Web Crawler configuration details for the web data source.
crawlerLimits (dict) --
The configuration of crawl limits for the web URLs.
rateLimit (integer) --
The max rate at which pages are crawled, up to 300 per minute per host.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
scope (string) --
The scope of what is crawled for your URLs.
You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://docs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com".
sourceConfiguration (dict) -- [REQUIRED]
The source configuration details for the web data source.
urlConfiguration (dict) -- [REQUIRED]
The configuration of the URL/URLs.
seedUrls (list) --
One or more seed or starting point URLs.
(dict) --
The seed or starting point URL. You should be authorized to crawl the URL.
url (string) --
A seed or starting point URL.
string
A description of the data source.
string
[REQUIRED]
The unique identifier of the knowledge base to which to add the data source.
string
[REQUIRED]
The name of the data source.
dict
Contains details about the server-side encryption for the data source.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource.
dict
Contains details about how to ingest the documents in the data source.
chunkingConfiguration (dict) --
Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
chunkingStrategy (string) -- [REQUIRED]
Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
FIXED_SIZE – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the fixedSizeChunkingConfiguration.
HIERARCHICAL – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
SEMANTIC – Split documents into chunks based on groups of similar content derived with natural language processing.
NONE – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
fixedSizeChunkingConfiguration (dict) --
Configurations for when you choose fixed-size chunking. If you set the chunkingStrategy as NONE, exclude this field.
maxTokens (integer) -- [REQUIRED]
The maximum number of tokens to include in a chunk.
overlapPercentage (integer) -- [REQUIRED]
The percentage of overlap between adjacent chunks of a data source.
hierarchicalChunkingConfiguration (dict) --
Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
levelConfigurations (list) -- [REQUIRED]
Token settings for each layer.
(dict) --
Token settings for a layer in a hierarchical chunking configuration.
maxTokens (integer) -- [REQUIRED]
The maximum number of tokens that a chunk can contain in this layer.
overlapTokens (integer) -- [REQUIRED]
The number of tokens to repeat across chunks in the same layer.
semanticChunkingConfiguration (dict) --
Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
breakpointPercentileThreshold (integer) -- [REQUIRED]
The dissimilarity threshold for splitting chunks.
bufferSize (integer) -- [REQUIRED]
The buffer size.
maxTokens (integer) -- [REQUIRED]
The maximum number of tokens that a chunk can contain.
customTransformationConfiguration (dict) --
A custom document transformer for parsed data source documents.
intermediateStorage (dict) -- [REQUIRED]
An S3 bucket path for input and output objects.
s3Location (dict) -- [REQUIRED]
An S3 bucket path.
uri (string) -- [REQUIRED]
The location's URI. For example, s3://my-bucket/chunk-processor/.
transformations (list) -- [REQUIRED]
A Lambda function that processes documents.
(dict) --
A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to POST_CHUNKING.
stepToApply (string) -- [REQUIRED]
When the service applies the transformation.
transformationFunction (dict) -- [REQUIRED]
A Lambda function that processes documents.
transformationLambdaConfiguration (dict) -- [REQUIRED]
The Lambda function.
lambdaArn (string) -- [REQUIRED]
The function's ARN identifier.
parsingConfiguration (dict) --
Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used.
bedrockDataAutomationConfiguration (dict) --
If you specify BEDROCK_DATA_AUTOMATION as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
bedrockFoundationModelConfiguration (dict) --
If you specify BEDROCK_FOUNDATION_MODEL as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents.
modelArn (string) -- [REQUIRED]
The ARN of the foundation model or inference profile to use for parsing.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
parsingPrompt (dict) --
Instructions for interpreting the contents of a document.
parsingPromptText (string) -- [REQUIRED]
Instructions for interpreting the contents of a document.
parsingStrategy (string) -- [REQUIRED]
The parsing strategy for the data source.
dict
Response Syntax
{ 'dataSource': { 'createdAt': datetime(2015, 1, 1), 'dataDeletionPolicy': 'RETAIN'|'DELETE', 'dataSourceConfiguration': { 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseId': 'string', 'name': 'string', 'serverSideEncryptionConfiguration': { 'kmsKeyArn': 'string' }, 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1), 'vectorIngestionConfiguration': { 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } } }
Response Structure
(dict) --
dataSource (dict) --
Contains details about the data source.
createdAt (datetime) --
The time at which the data source was created.
dataDeletionPolicy (string) --
The data deletion policy for the data source.
dataSourceConfiguration (dict) --
The connection configuration for the data source.
confluenceConfiguration (dict) --
The configuration information to connect to Confluence as your data source.
crawlerConfiguration (dict) --
The configuration of the Confluence content. For example, configuring specific types of Confluence content.
filterConfiguration (dict) --
The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your Confluence data source.
authType (string) --
The supported authentication type to authenticate and connect to your Confluence instance.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration.
hostType (string) --
The supported host type, whether online/cloud or server/on-premises.
hostUrl (string) --
The Confluence host URL or instance URL.
s3Configuration (dict) --
The configuration information to connect to Amazon S3 as your data source.
bucketArn (string) --
The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
bucketOwnerAccountId (string) --
The account ID for the owner of the S3 bucket.
inclusionPrefixes (list) --
A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes.
(string) --
salesforceConfiguration (dict) --
The configuration information to connect to Salesforce as your data source.
crawlerConfiguration (dict) --
The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.
filterConfiguration (dict) --
The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your Salesforce data source.
authType (string) --
The supported authentication type to authenticate and connect to your Salesforce instance.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration.
hostUrl (string) --
The Salesforce host URL or instance URL.
sharePointConfiguration (dict) --
The configuration information to connect to SharePoint as your data source.
crawlerConfiguration (dict) --
The configuration of the SharePoint content. For example, configuring specific types of SharePoint content.
filterConfiguration (dict) --
The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your SharePoint data source.
authType (string) --
The supported authentication type to authenticate and connect to your SharePoint site/sites.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration.
domain (string) --
The domain of your SharePoint instance or site URL/URLs.
hostType (string) --
The supported host type, whether online/cloud or server/on-premises.
siteUrls (list) --
A list of one or more SharePoint site URLs.
(string) --
tenantId (string) --
The identifier of your Microsoft 365 tenant.
type (string) --
The type of data source.
webConfiguration (dict) --
The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs.
crawlerConfiguration (dict) --
The Web Crawler configuration details for the web data source.
crawlerLimits (dict) --
The configuration of crawl limits for the web URLs.
rateLimit (integer) --
The max rate at which pages are crawled, up to 300 per minute per host.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
scope (string) --
The scope of what is crawled for your URLs.
You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://docs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com".
sourceConfiguration (dict) --
The source configuration details for the web data source.
urlConfiguration (dict) --
The configuration of the URL/URLs.
seedUrls (list) --
One or more seed or starting point URLs.
(dict) --
The seed or starting point URL. You should be authorized to crawl the URL.
url (string) --
A seed or starting point URL.
dataSourceId (string) --
The unique identifier of the data source.
description (string) --
The description of the data source.
failureReasons (list) --
The detailed reasons on the failure to delete a data source.
(string) --
knowledgeBaseId (string) --
The unique identifier of the knowledge base to which the data source belongs.
name (string) --
The name of the data source.
serverSideEncryptionConfiguration (dict) --
Contains details about the configuration of the server-side encryption.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource.
status (string) --
The status of the data source. The following statuses are possible:
Available – The data source has been created and is ready for ingestion into the knowledge base.
Deleting – The data source is being deleted.
updatedAt (datetime) --
The time at which the data source was last updated.
vectorIngestionConfiguration (dict) --
Contains details about how to ingest the documents in the data source.
chunkingConfiguration (dict) --
Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
chunkingStrategy (string) --
Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
FIXED_SIZE – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the fixedSizeChunkingConfiguration.
HIERARCHICAL – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
SEMANTIC – Split documents into chunks based on groups of similar content derived with natural language processing.
NONE – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
fixedSizeChunkingConfiguration (dict) --
Configurations for when you choose fixed-size chunking. If you set the chunkingStrategy as NONE, exclude this field.
maxTokens (integer) --
The maximum number of tokens to include in a chunk.
overlapPercentage (integer) --
The percentage of overlap between adjacent chunks of a data source.
hierarchicalChunkingConfiguration (dict) --
Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
levelConfigurations (list) --
Token settings for each layer.
(dict) --
Token settings for a layer in a hierarchical chunking configuration.
maxTokens (integer) --
The maximum number of tokens that a chunk can contain in this layer.
overlapTokens (integer) --
The number of tokens to repeat across chunks in the same layer.
semanticChunkingConfiguration (dict) --
Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
breakpointPercentileThreshold (integer) --
The dissimilarity threshold for splitting chunks.
bufferSize (integer) --
The buffer size.
maxTokens (integer) --
The maximum number of tokens that a chunk can contain.
customTransformationConfiguration (dict) --
A custom document transformer for parsed data source documents.
intermediateStorage (dict) --
An S3 bucket path for input and output objects.
s3Location (dict) --
An S3 bucket path.
uri (string) --
The location's URI. For example, s3://my-bucket/chunk-processor/.
transformations (list) --
A Lambda function that processes documents.
(dict) --
A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to POST_CHUNKING.
stepToApply (string) --
When the service applies the transformation.
transformationFunction (dict) --
A Lambda function that processes documents.
transformationLambdaConfiguration (dict) --
The Lambda function.
lambdaArn (string) --
The function's ARN identifier.
parsingConfiguration (dict) --
Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used.
bedrockDataAutomationConfiguration (dict) --
If you specify BEDROCK_DATA_AUTOMATION as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
bedrockFoundationModelConfiguration (dict) --
If you specify BEDROCK_FOUNDATION_MODEL as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents.
modelArn (string) --
The ARN of the foundation model or inference profile to use for parsing.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
parsingPrompt (dict) --
Instructions for interpreting the contents of a document.
parsingPromptText (string) --
Instructions for interpreting the contents of a document.
parsingStrategy (string) --
The parsing strategy for the data source.
{'knowledgeBaseConfiguration': {'kendraKnowledgeBaseConfiguration': {'kendraIndexArn': 'string'}, 'sqlKnowledgeBaseConfiguration': {'redshiftConfiguration': {'queryEngineConfiguration': {'provisionedConfiguration': {'authConfiguration': {'databaseUser': 'string', 'type': 'IAM ' '| ' 'USERNAME_PASSWORD ' '| ' 'USERNAME', 'usernamePasswordSecretArn': 'string'}, 'clusterIdentifier': 'string'}, 'serverlessConfiguration': {'authConfiguration': {'type': 'IAM ' '| ' 'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string'}, 'workgroupArn': 'string'}, 'type': 'SERVERLESS ' '| ' 'PROVISIONED'}, 'queryGenerationConfiguration': {'executionTimeoutSeconds': 'integer', 'generationContext': {'curatedQueries': [{'naturalLanguage': 'string', 'sql': 'string'}], 'tables': [{'columns': [{'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}], 'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}]}}, 'storageConfigurations': [{'awsDataCatalogConfiguration': {'tableNames': ['string']}, 'redshiftConfiguration': {'databaseName': 'string'}, 'type': 'REDSHIFT ' '| ' 'AWS_DATA_CATALOG'}]}, 'type': 'REDSHIFT'}, 'type': {'KENDRA', 'SQL'}, 'vectorKnowledgeBaseConfiguration': {'supplementalDataStorageConfiguration': {'storageLocations': [{'s3Location': {'uri': 'string'}, 'type': 'S3'}]}}}}Response
{'knowledgeBase': {'knowledgeBaseConfiguration': {'kendraKnowledgeBaseConfiguration': {'kendraIndexArn': 'string'}, 'sqlKnowledgeBaseConfiguration': {'redshiftConfiguration': {'queryEngineConfiguration': {'provisionedConfiguration': {'authConfiguration': {'databaseUser': 'string', 'type': 'IAM ' '| ' 'USERNAME_PASSWORD ' '| ' 'USERNAME', 'usernamePasswordSecretArn': 'string'}, 'clusterIdentifier': 'string'}, 'serverlessConfiguration': {'authConfiguration': {'type': 'IAM ' '| ' 'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string'}, 'workgroupArn': 'string'}, 'type': 'SERVERLESS ' '| ' 'PROVISIONED'}, 'queryGenerationConfiguration': {'executionTimeoutSeconds': 'integer', 'generationContext': {'curatedQueries': [{'naturalLanguage': 'string', 'sql': 'string'}], 'tables': [{'columns': [{'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}], 'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}]}}, 'storageConfigurations': [{'awsDataCatalogConfiguration': {'tableNames': ['string']}, 'redshiftConfiguration': {'databaseName': 'string'}, 'type': 'REDSHIFT ' '| ' 'AWS_DATA_CATALOG'}]}, 'type': 'REDSHIFT'}, 'type': {'KENDRA', 'SQL'}, 'vectorKnowledgeBaseConfiguration': {'supplementalDataStorageConfiguration': {'storageLocations': [{'s3Location': {'uri': 'string'}, 'type': 'S3'}]}}}}}
Creates a knowledge base. A knowledge base contains your data sources so that Large Language Models (LLMs) can use your data. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up a knowledge base.
Provide the name and an optional description.
Provide the Amazon Resource Name (ARN) with permissions to create a knowledge base in the roleArn field.
Provide the embedding model to use in the embeddingModelArn field in the knowledgeBaseConfiguration object.
Provide the configuration for your vector store in the storageConfiguration object.
For an Amazon OpenSearch Service database, use the opensearchServerlessConfiguration object. For more information, see Create a vector store in Amazon OpenSearch Service.
For an Amazon Aurora database, use the RdsConfiguration object. For more information, see Create a vector store in Amazon Aurora.
For a Pinecone database, use the pineconeConfiguration object. For more information, see Create a vector store in Pinecone.
For a Redis Enterprise Cloud database, use the redisEnterpriseCloudConfiguration object. For more information, see Create a vector store in Redis Enterprise Cloud.
See also: AWS API Documentation
Request Syntax
client.create_knowledge_base( clientToken='string', description='string', knowledgeBaseConfiguration={ 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, name='string', roleArn='string', storageConfiguration={ 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS' }, tags={ 'string': 'string' } )
string
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
This field is autopopulated if not provided.
string
A description of the knowledge base.
dict
[REQUIRED]
Contains details about the embeddings model used for the knowledge base.
kendraKnowledgeBaseConfiguration (dict) --
Settings for an Amazon Kendra knowledge base.
kendraIndexArn (string) -- [REQUIRED]
The ARN of the Amazon Kendra index.
sqlKnowledgeBaseConfiguration (dict) --
Specifies configurations for a knowledge base connected to an SQL database.
redshiftConfiguration (dict) --
Specifies configurations for a knowledge base connected to an Amazon Redshift database.
queryEngineConfiguration (dict) -- [REQUIRED]
Specifies configurations for an Amazon Redshift query engine.
provisionedConfiguration (dict) --
Specifies configurations for a provisioned Amazon Redshift query engine.
authConfiguration (dict) -- [REQUIRED]
Specifies configurations for authentication to Amazon Redshift.
databaseUser (string) --
The database username for authentication to an Amazon Redshift provisioned data warehouse.
type (string) -- [REQUIRED]
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
clusterIdentifier (string) -- [REQUIRED]
The ID of the Amazon Redshift cluster.
serverlessConfiguration (dict) --
Specifies configurations for a serverless Amazon Redshift query engine.
authConfiguration (dict) -- [REQUIRED]
Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse.
type (string) -- [REQUIRED]
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
workgroupArn (string) -- [REQUIRED]
The ARN of the Amazon Redshift workgroup.
type (string) -- [REQUIRED]
The type of query engine.
queryGenerationConfiguration (dict) --
Specifies configurations for generating queries.
executionTimeoutSeconds (integer) --
The time after which query generation will time out.
generationContext (dict) --
Specifies configurations for context to use during query generation.
curatedQueries (list) --
An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
(dict) --
Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
naturalLanguage (string) -- [REQUIRED]
An example natural language query.
sql (string) -- [REQUIRED]
The SQL equivalent of the natural language query.
tables (list) --
An array of objects, each of which defines information about a table in the database.
(dict) --
Contains information about a table for the query engine to consider.
columns (list) --
An array of objects, each of which defines information about a column in the table.
(dict) --
Contains information about a column in the current table for the query engine to consider.
description (string) --
A description of the column that helps the query engine understand the contents of the column.
inclusion (string) --
Specifies whether to include or exclude the column during query generation. If you specify EXCLUDE, the column will be ignored. If you specify INCLUDE, all other columns in the table will be ignored.
name (string) --
The name of the column for which the other fields in this object apply.
description (string) --
A description of the table that helps the query engine understand the contents of the table.
inclusion (string) --
Specifies whether to include or exclude the table during query generation. If you specify EXCLUDE, the table will be ignored. If you specify INCLUDE, all other tables will be ignored.
name (string) -- [REQUIRED]
The name of the table for which the other fields in this object apply.
storageConfigurations (list) -- [REQUIRED]
Specifies configurations for Amazon Redshift database storage.
(dict) --
Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the type field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.
awsDataCatalogConfiguration (dict) --
Specifies configurations for storage in Glue Data Catalog.
tableNames (list) -- [REQUIRED]
A list of names of the tables to use.
(string) --
redshiftConfiguration (dict) --
Specifies configurations for storage in Amazon Redshift.
databaseName (string) -- [REQUIRED]
The name of the Amazon Redshift database.
type (string) -- [REQUIRED]
The data storage service to use.
type (string) -- [REQUIRED]
The type of SQL database to connect to the knowledge base.
type (string) -- [REQUIRED]
The type of data that the data source is converted into for the knowledge base.
vectorKnowledgeBaseConfiguration (dict) --
Contains details about the model that's used to convert the data source into vector embeddings.
embeddingModelArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base.
embeddingModelConfiguration (dict) --
The embeddings model configuration details for the vector model used in Knowledge Base.
bedrockEmbeddingModelConfiguration (dict) --
The vector configuration details on the Bedrock embeddings model.
dimensions (integer) --
The dimensions details for the vector configuration used on the Bedrock embeddings model.
embeddingDataType (string) --
The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types.
supplementalDataStorageConfiguration (dict) --
If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate.
storageLocations (list) -- [REQUIRED]
A list of objects specifying storage locations for images extracted from multimodal documents in your data source.
(dict) --
Contains information about a storage location for images extracted from multimodal documents in your data source.
s3Location (dict) --
Contains information about the Amazon S3 location for the extracted images.
uri (string) -- [REQUIRED]
The location's URI. For example, s3://my-bucket/chunk-processor/.
type (string) -- [REQUIRED]
Specifies the storage service used for this location.
string
[REQUIRED]
A name for the knowledge base.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
dict
Contains details about the configuration of the vector database used for the knowledge base.
mongoDbAtlasConfiguration (dict) --
Contains the storage configuration of the knowledge base in MongoDB Atlas.
collectionName (string) -- [REQUIRED]
The collection name of the knowledge base in MongoDB Atlas.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster.
databaseName (string) -- [REQUIRED]
The database name in your MongoDB Atlas cluster for your knowledge base.
endpoint (string) -- [REQUIRED]
The endpoint URL of your MongoDB Atlas cluster for your knowledge base.
endpointServiceName (string) --
The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) -- [REQUIRED]
The name of the MongoDB Atlas vector search index.
opensearchServerlessConfiguration (dict) --
Contains the storage configuration of the knowledge base in Amazon OpenSearch Service.
collectionArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the OpenSearch Service vector store.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) -- [REQUIRED]
The name of the vector store.
pineconeConfiguration (dict) --
Contains the storage configuration of the knowledge base in Pinecone.
connectionString (string) -- [REQUIRED]
The endpoint URL for your index management page.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
namespace (string) --
The namespace to be used to write new data to your database.
rdsConfiguration (dict) --
Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database.
databaseName (string) -- [REQUIRED]
The name of your Amazon RDS database.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
primaryKeyField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the ID for each entry.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
resourceArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the vector store.
tableName (string) -- [REQUIRED]
The name of the table in the database.
redisEnterpriseCloudConfiguration (dict) --
Contains the storage configuration of the knowledge base in Redis Enterprise Cloud.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database.
endpoint (string) -- [REQUIRED]
The endpoint URL of the Redis Enterprise Cloud database.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) -- [REQUIRED]
The name of the vector index.
type (string) -- [REQUIRED]
The vector store service in which the knowledge base is stored.
dict
Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object.
(string) --
(string) --
dict
Response Syntax
{ 'knowledgeBase': { 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseArn': 'string', 'knowledgeBaseConfiguration': { 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, 'knowledgeBaseId': 'string', 'name': 'string', 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'storageConfiguration': { 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS' }, 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) --
knowledgeBase (dict) --
Contains details about the knowledge base.
createdAt (datetime) --
The time the knowledge base was created.
description (string) --
The description of the knowledge base.
failureReasons (list) --
A list of reasons that the API operation on the knowledge base failed.
(string) --
knowledgeBaseArn (string) --
The Amazon Resource Name (ARN) of the knowledge base.
knowledgeBaseConfiguration (dict) --
Contains details about the embeddings configuration of the knowledge base.
kendraKnowledgeBaseConfiguration (dict) --
Settings for an Amazon Kendra knowledge base.
kendraIndexArn (string) --
The ARN of the Amazon Kendra index.
sqlKnowledgeBaseConfiguration (dict) --
Specifies configurations for a knowledge base connected to an SQL database.
redshiftConfiguration (dict) --
Specifies configurations for a knowledge base connected to an Amazon Redshift database.
queryEngineConfiguration (dict) --
Specifies configurations for an Amazon Redshift query engine.
provisionedConfiguration (dict) --
Specifies configurations for a provisioned Amazon Redshift query engine.
authConfiguration (dict) --
Specifies configurations for authentication to Amazon Redshift.
databaseUser (string) --
The database username for authentication to an Amazon Redshift provisioned data warehouse.
type (string) --
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
clusterIdentifier (string) --
The ID of the Amazon Redshift cluster.
serverlessConfiguration (dict) --
Specifies configurations for a serverless Amazon Redshift query engine.
authConfiguration (dict) --
Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse.
type (string) --
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
workgroupArn (string) --
The ARN of the Amazon Redshift workgroup.
type (string) --
The type of query engine.
queryGenerationConfiguration (dict) --
Specifies configurations for generating queries.
executionTimeoutSeconds (integer) --
The time after which query generation will time out.
generationContext (dict) --
Specifies configurations for context to use during query generation.
curatedQueries (list) --
An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
(dict) --
Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
naturalLanguage (string) --
An example natural language query.
sql (string) --
The SQL equivalent of the natural language query.
tables (list) --
An array of objects, each of which defines information about a table in the database.
(dict) --
Contains information about a table for the query engine to consider.
columns (list) --
An array of objects, each of which defines information about a column in the table.
(dict) --
Contains information about a column in the current table for the query engine to consider.
description (string) --
A description of the column that helps the query engine understand the contents of the column.
inclusion (string) --
Specifies whether to include or exclude the column during query generation. If you specify EXCLUDE, the column will be ignored. If you specify INCLUDE, all other columns in the table will be ignored.
name (string) --
The name of the column for which the other fields in this object apply.
description (string) --
A description of the table that helps the query engine understand the contents of the table.
inclusion (string) --
Specifies whether to include or exclude the table during query generation. If you specify EXCLUDE, the table will be ignored. If you specify INCLUDE, all other tables will be ignored.
name (string) --
The name of the table for which the other fields in this object apply.
storageConfigurations (list) --
Specifies configurations for Amazon Redshift database storage.
(dict) --
Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the type field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.
awsDataCatalogConfiguration (dict) --
Specifies configurations for storage in Glue Data Catalog.
tableNames (list) --
A list of names of the tables to use.
(string) --
redshiftConfiguration (dict) --
Specifies configurations for storage in Amazon Redshift.
databaseName (string) --
The name of the Amazon Redshift database.
type (string) --
The data storage service to use.
type (string) --
The type of SQL database to connect to the knowledge base.
type (string) --
The type of data that the data source is converted into for the knowledge base.
vectorKnowledgeBaseConfiguration (dict) --
Contains details about the model that's used to convert the data source into vector embeddings.
embeddingModelArn (string) --
The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base.
embeddingModelConfiguration (dict) --
The embeddings model configuration details for the vector model used in Knowledge Base.
bedrockEmbeddingModelConfiguration (dict) --
The vector configuration details on the Bedrock embeddings model.
dimensions (integer) --
The dimensions details for the vector configuration used on the Bedrock embeddings model.
embeddingDataType (string) --
The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types.
supplementalDataStorageConfiguration (dict) --
If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate.
storageLocations (list) --
A list of objects specifying storage locations for images extracted from multimodal documents in your data source.
(dict) --
Contains information about a storage location for images extracted from multimodal documents in your data source.
s3Location (dict) --
Contains information about the Amazon S3 location for the extracted images.
uri (string) --
The location's URI. For example, s3://my-bucket/chunk-processor/.
type (string) --
Specifies the storage service used for this location.
knowledgeBaseId (string) --
The unique identifier of the knowledge base.
name (string) --
The name of the knowledge base.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
status (string) --
The status of the knowledge base. The following statuses are possible:
CREATING – The knowledge base is being created.
ACTIVE – The knowledge base is ready to be queried.
DELETING – The knowledge base is being deleted.
UPDATING – The knowledge base is being updated.
FAILED – The knowledge base API operation failed.
storageConfiguration (dict) --
Contains details about the storage configuration of the knowledge base.
mongoDbAtlasConfiguration (dict) --
Contains the storage configuration of the knowledge base in MongoDB Atlas.
collectionName (string) --
The collection name of the knowledge base in MongoDB Atlas.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster.
databaseName (string) --
The database name in your MongoDB Atlas cluster for your knowledge base.
endpoint (string) --
The endpoint URL of your MongoDB Atlas cluster for your knowledge base.
endpointServiceName (string) --
The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the MongoDB Atlas vector search index.
opensearchServerlessConfiguration (dict) --
Contains the storage configuration of the knowledge base in Amazon OpenSearch Service.
collectionArn (string) --
The Amazon Resource Name (ARN) of the OpenSearch Service vector store.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the vector store.
pineconeConfiguration (dict) --
Contains the storage configuration of the knowledge base in Pinecone.
connectionString (string) --
The endpoint URL for your index management page.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
namespace (string) --
The namespace to be used to write new data to your database.
rdsConfiguration (dict) --
Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database.
databaseName (string) --
The name of your Amazon RDS database.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
primaryKeyField (string) --
The name of the field in which Amazon Bedrock stores the ID for each entry.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
resourceArn (string) --
The Amazon Resource Name (ARN) of the vector store.
tableName (string) --
The name of the table in the database.
redisEnterpriseCloudConfiguration (dict) --
Contains the storage configuration of the knowledge base in Redis Enterprise Cloud.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database.
endpoint (string) --
The endpoint URL of the Redis Enterprise Cloud database.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the vector index.
type (string) --
The vector store service in which the knowledge base is stored.
updatedAt (datetime) --
The time the knowledge base was last updated.
{'dataSource': {'dataSourceConfiguration': {'type': {'REDSHIFT_METADATA'}}, 'vectorIngestionConfiguration': {'parsingConfiguration': {'bedrockDataAutomationConfiguration': {'parsingModality': 'MULTIMODAL'}, 'bedrockFoundationModelConfiguration': {'parsingModality': 'MULTIMODAL'}, 'parsingStrategy': {'BEDROCK_DATA_AUTOMATION'}}}}}
Gets information about a data source.
See also: AWS API Documentation
Request Syntax
client.get_data_source( dataSourceId='string', knowledgeBaseId='string' )
string
[REQUIRED]
The unique identifier of the data source.
string
[REQUIRED]
The unique identifier of the knowledge base for the data source.
dict
Response Syntax
{ 'dataSource': { 'createdAt': datetime(2015, 1, 1), 'dataDeletionPolicy': 'RETAIN'|'DELETE', 'dataSourceConfiguration': { 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseId': 'string', 'name': 'string', 'serverSideEncryptionConfiguration': { 'kmsKeyArn': 'string' }, 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1), 'vectorIngestionConfiguration': { 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } } }
Response Structure
(dict) --
dataSource (dict) --
Contains details about the data source.
createdAt (datetime) --
The time at which the data source was created.
dataDeletionPolicy (string) --
The data deletion policy for the data source.
dataSourceConfiguration (dict) --
The connection configuration for the data source.
confluenceConfiguration (dict) --
The configuration information to connect to Confluence as your data source.
crawlerConfiguration (dict) --
The configuration of the Confluence content. For example, configuring specific types of Confluence content.
filterConfiguration (dict) --
The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your Confluence data source.
authType (string) --
The supported authentication type to authenticate and connect to your Confluence instance.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration.
hostType (string) --
The supported host type, whether online/cloud or server/on-premises.
hostUrl (string) --
The Confluence host URL or instance URL.
s3Configuration (dict) --
The configuration information to connect to Amazon S3 as your data source.
bucketArn (string) --
The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
bucketOwnerAccountId (string) --
The account ID for the owner of the S3 bucket.
inclusionPrefixes (list) --
A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes.
(string) --
salesforceConfiguration (dict) --
The configuration information to connect to Salesforce as your data source.
crawlerConfiguration (dict) --
The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.
filterConfiguration (dict) --
The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your Salesforce data source.
authType (string) --
The supported authentication type to authenticate and connect to your Salesforce instance.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration.
hostUrl (string) --
The Salesforce host URL or instance URL.
sharePointConfiguration (dict) --
The configuration information to connect to SharePoint as your data source.
crawlerConfiguration (dict) --
The configuration of the SharePoint content. For example, configuring specific types of SharePoint content.
filterConfiguration (dict) --
The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your SharePoint data source.
authType (string) --
The supported authentication type to authenticate and connect to your SharePoint site/sites.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration.
domain (string) --
The domain of your SharePoint instance or site URL/URLs.
hostType (string) --
The supported host type, whether online/cloud or server/on-premises.
siteUrls (list) --
A list of one or more SharePoint site URLs.
(string) --
tenantId (string) --
The identifier of your Microsoft 365 tenant.
type (string) --
The type of data source.
webConfiguration (dict) --
The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs.
crawlerConfiguration (dict) --
The Web Crawler configuration details for the web data source.
crawlerLimits (dict) --
The configuration of crawl limits for the web URLs.
rateLimit (integer) --
The max rate at which pages are crawled, up to 300 per minute per host.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
scope (string) --
The scope of what is crawled for your URLs.
You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://docs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com".
sourceConfiguration (dict) --
The source configuration details for the web data source.
urlConfiguration (dict) --
The configuration of the URL/URLs.
seedUrls (list) --
One or more seed or starting point URLs.
(dict) --
The seed or starting point URL. You should be authorized to crawl the URL.
url (string) --
A seed or starting point URL.
dataSourceId (string) --
The unique identifier of the data source.
description (string) --
The description of the data source.
failureReasons (list) --
The detailed reasons on the failure to delete a data source.
(string) --
knowledgeBaseId (string) --
The unique identifier of the knowledge base to which the data source belongs.
name (string) --
The name of the data source.
serverSideEncryptionConfiguration (dict) --
Contains details about the configuration of the server-side encryption.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource.
status (string) --
The status of the data source. The following statuses are possible:
Available – The data source has been created and is ready for ingestion into the knowledge base.
Deleting – The data source is being deleted.
updatedAt (datetime) --
The time at which the data source was last updated.
vectorIngestionConfiguration (dict) --
Contains details about how to ingest the documents in the data source.
chunkingConfiguration (dict) --
Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
chunkingStrategy (string) --
Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
FIXED_SIZE – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the fixedSizeChunkingConfiguration.
HIERARCHICAL – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
SEMANTIC – Split documents into chunks based on groups of similar content derived with natural language processing.
NONE – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
fixedSizeChunkingConfiguration (dict) --
Configurations for when you choose fixed-size chunking. If you set the chunkingStrategy as NONE, exclude this field.
maxTokens (integer) --
The maximum number of tokens to include in a chunk.
overlapPercentage (integer) --
The percentage of overlap between adjacent chunks of a data source.
hierarchicalChunkingConfiguration (dict) --
Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
levelConfigurations (list) --
Token settings for each layer.
(dict) --
Token settings for a layer in a hierarchical chunking configuration.
maxTokens (integer) --
The maximum number of tokens that a chunk can contain in this layer.
overlapTokens (integer) --
The number of tokens to repeat across chunks in the same layer.
semanticChunkingConfiguration (dict) --
Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
breakpointPercentileThreshold (integer) --
The dissimilarity threshold for splitting chunks.
bufferSize (integer) --
The buffer size.
maxTokens (integer) --
The maximum number of tokens that a chunk can contain.
customTransformationConfiguration (dict) --
A custom document transformer for parsed data source documents.
intermediateStorage (dict) --
An S3 bucket path for input and output objects.
s3Location (dict) --
An S3 bucket path.
uri (string) --
The location's URI. For example, s3://my-bucket/chunk-processor/.
transformations (list) --
A Lambda function that processes documents.
(dict) --
A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to POST_CHUNKING.
stepToApply (string) --
When the service applies the transformation.
transformationFunction (dict) --
A Lambda function that processes documents.
transformationLambdaConfiguration (dict) --
The Lambda function.
lambdaArn (string) --
The function's ARN identifier.
parsingConfiguration (dict) --
Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used.
bedrockDataAutomationConfiguration (dict) --
If you specify BEDROCK_DATA_AUTOMATION as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
bedrockFoundationModelConfiguration (dict) --
If you specify BEDROCK_FOUNDATION_MODEL as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents.
modelArn (string) --
The ARN of the foundation model or inference profile to use for parsing.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
parsingPrompt (dict) --
Instructions for interpreting the contents of a document.
parsingPromptText (string) --
Instructions for interpreting the contents of a document.
parsingStrategy (string) --
The parsing strategy for the data source.
{'knowledgeBase': {'knowledgeBaseConfiguration': {'kendraKnowledgeBaseConfiguration': {'kendraIndexArn': 'string'}, 'sqlKnowledgeBaseConfiguration': {'redshiftConfiguration': {'queryEngineConfiguration': {'provisionedConfiguration': {'authConfiguration': {'databaseUser': 'string', 'type': 'IAM ' '| ' 'USERNAME_PASSWORD ' '| ' 'USERNAME', 'usernamePasswordSecretArn': 'string'}, 'clusterIdentifier': 'string'}, 'serverlessConfiguration': {'authConfiguration': {'type': 'IAM ' '| ' 'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string'}, 'workgroupArn': 'string'}, 'type': 'SERVERLESS ' '| ' 'PROVISIONED'}, 'queryGenerationConfiguration': {'executionTimeoutSeconds': 'integer', 'generationContext': {'curatedQueries': [{'naturalLanguage': 'string', 'sql': 'string'}], 'tables': [{'columns': [{'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}], 'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}]}}, 'storageConfigurations': [{'awsDataCatalogConfiguration': {'tableNames': ['string']}, 'redshiftConfiguration': {'databaseName': 'string'}, 'type': 'REDSHIFT ' '| ' 'AWS_DATA_CATALOG'}]}, 'type': 'REDSHIFT'}, 'type': {'KENDRA', 'SQL'}, 'vectorKnowledgeBaseConfiguration': {'supplementalDataStorageConfiguration': {'storageLocations': [{'s3Location': {'uri': 'string'}, 'type': 'S3'}]}}}}}
Gets information about a knoweldge base.
See also: AWS API Documentation
Request Syntax
client.get_knowledge_base( knowledgeBaseId='string' )
string
[REQUIRED]
The unique identifier of the knowledge base you want to get information on.
dict
Response Syntax
{ 'knowledgeBase': { 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseArn': 'string', 'knowledgeBaseConfiguration': { 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, 'knowledgeBaseId': 'string', 'name': 'string', 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'storageConfiguration': { 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS' }, 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) --
knowledgeBase (dict) --
Contains details about the knowledge base.
createdAt (datetime) --
The time the knowledge base was created.
description (string) --
The description of the knowledge base.
failureReasons (list) --
A list of reasons that the API operation on the knowledge base failed.
(string) --
knowledgeBaseArn (string) --
The Amazon Resource Name (ARN) of the knowledge base.
knowledgeBaseConfiguration (dict) --
Contains details about the embeddings configuration of the knowledge base.
kendraKnowledgeBaseConfiguration (dict) --
Settings for an Amazon Kendra knowledge base.
kendraIndexArn (string) --
The ARN of the Amazon Kendra index.
sqlKnowledgeBaseConfiguration (dict) --
Specifies configurations for a knowledge base connected to an SQL database.
redshiftConfiguration (dict) --
Specifies configurations for a knowledge base connected to an Amazon Redshift database.
queryEngineConfiguration (dict) --
Specifies configurations for an Amazon Redshift query engine.
provisionedConfiguration (dict) --
Specifies configurations for a provisioned Amazon Redshift query engine.
authConfiguration (dict) --
Specifies configurations for authentication to Amazon Redshift.
databaseUser (string) --
The database username for authentication to an Amazon Redshift provisioned data warehouse.
type (string) --
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
clusterIdentifier (string) --
The ID of the Amazon Redshift cluster.
serverlessConfiguration (dict) --
Specifies configurations for a serverless Amazon Redshift query engine.
authConfiguration (dict) --
Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse.
type (string) --
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
workgroupArn (string) --
The ARN of the Amazon Redshift workgroup.
type (string) --
The type of query engine.
queryGenerationConfiguration (dict) --
Specifies configurations for generating queries.
executionTimeoutSeconds (integer) --
The time after which query generation will time out.
generationContext (dict) --
Specifies configurations for context to use during query generation.
curatedQueries (list) --
An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
(dict) --
Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
naturalLanguage (string) --
An example natural language query.
sql (string) --
The SQL equivalent of the natural language query.
tables (list) --
An array of objects, each of which defines information about a table in the database.
(dict) --
Contains information about a table for the query engine to consider.
columns (list) --
An array of objects, each of which defines information about a column in the table.
(dict) --
Contains information about a column in the current table for the query engine to consider.
description (string) --
A description of the column that helps the query engine understand the contents of the column.
inclusion (string) --
Specifies whether to include or exclude the column during query generation. If you specify EXCLUDE, the column will be ignored. If you specify INCLUDE, all other columns in the table will be ignored.
name (string) --
The name of the column for which the other fields in this object apply.
description (string) --
A description of the table that helps the query engine understand the contents of the table.
inclusion (string) --
Specifies whether to include or exclude the table during query generation. If you specify EXCLUDE, the table will be ignored. If you specify INCLUDE, all other tables will be ignored.
name (string) --
The name of the table for which the other fields in this object apply.
storageConfigurations (list) --
Specifies configurations for Amazon Redshift database storage.
(dict) --
Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the type field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.
awsDataCatalogConfiguration (dict) --
Specifies configurations for storage in Glue Data Catalog.
tableNames (list) --
A list of names of the tables to use.
(string) --
redshiftConfiguration (dict) --
Specifies configurations for storage in Amazon Redshift.
databaseName (string) --
The name of the Amazon Redshift database.
type (string) --
The data storage service to use.
type (string) --
The type of SQL database to connect to the knowledge base.
type (string) --
The type of data that the data source is converted into for the knowledge base.
vectorKnowledgeBaseConfiguration (dict) --
Contains details about the model that's used to convert the data source into vector embeddings.
embeddingModelArn (string) --
The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base.
embeddingModelConfiguration (dict) --
The embeddings model configuration details for the vector model used in Knowledge Base.
bedrockEmbeddingModelConfiguration (dict) --
The vector configuration details on the Bedrock embeddings model.
dimensions (integer) --
The dimensions details for the vector configuration used on the Bedrock embeddings model.
embeddingDataType (string) --
The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types.
supplementalDataStorageConfiguration (dict) --
If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate.
storageLocations (list) --
A list of objects specifying storage locations for images extracted from multimodal documents in your data source.
(dict) --
Contains information about a storage location for images extracted from multimodal documents in your data source.
s3Location (dict) --
Contains information about the Amazon S3 location for the extracted images.
uri (string) --
The location's URI. For example, s3://my-bucket/chunk-processor/.
type (string) --
Specifies the storage service used for this location.
knowledgeBaseId (string) --
The unique identifier of the knowledge base.
name (string) --
The name of the knowledge base.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
status (string) --
The status of the knowledge base. The following statuses are possible:
CREATING – The knowledge base is being created.
ACTIVE – The knowledge base is ready to be queried.
DELETING – The knowledge base is being deleted.
UPDATING – The knowledge base is being updated.
FAILED – The knowledge base API operation failed.
storageConfiguration (dict) --
Contains details about the storage configuration of the knowledge base.
mongoDbAtlasConfiguration (dict) --
Contains the storage configuration of the knowledge base in MongoDB Atlas.
collectionName (string) --
The collection name of the knowledge base in MongoDB Atlas.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster.
databaseName (string) --
The database name in your MongoDB Atlas cluster for your knowledge base.
endpoint (string) --
The endpoint URL of your MongoDB Atlas cluster for your knowledge base.
endpointServiceName (string) --
The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the MongoDB Atlas vector search index.
opensearchServerlessConfiguration (dict) --
Contains the storage configuration of the knowledge base in Amazon OpenSearch Service.
collectionArn (string) --
The Amazon Resource Name (ARN) of the OpenSearch Service vector store.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the vector store.
pineconeConfiguration (dict) --
Contains the storage configuration of the knowledge base in Pinecone.
connectionString (string) --
The endpoint URL for your index management page.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
namespace (string) --
The namespace to be used to write new data to your database.
rdsConfiguration (dict) --
Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database.
databaseName (string) --
The name of your Amazon RDS database.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
primaryKeyField (string) --
The name of the field in which Amazon Bedrock stores the ID for each entry.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
resourceArn (string) --
The Amazon Resource Name (ARN) of the vector store.
tableName (string) --
The name of the table in the database.
redisEnterpriseCloudConfiguration (dict) --
Contains the storage configuration of the knowledge base in Redis Enterprise Cloud.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database.
endpoint (string) --
The endpoint URL of the Redis Enterprise Cloud database.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the vector index.
type (string) --
The vector store service in which the knowledge base is stored.
updatedAt (datetime) --
The time the knowledge base was last updated.
{'dataSourceConfiguration': {'type': {'REDSHIFT_METADATA'}}, 'vectorIngestionConfiguration': {'parsingConfiguration': {'bedrockDataAutomationConfiguration': {'parsingModality': 'MULTIMODAL'}, 'bedrockFoundationModelConfiguration': {'parsingModality': 'MULTIMODAL'}, 'parsingStrategy': {'BEDROCK_DATA_AUTOMATION'}}}}Response
{'dataSource': {'dataSourceConfiguration': {'type': {'REDSHIFT_METADATA'}}, 'vectorIngestionConfiguration': {'parsingConfiguration': {'bedrockDataAutomationConfiguration': {'parsingModality': 'MULTIMODAL'}, 'bedrockFoundationModelConfiguration': {'parsingModality': 'MULTIMODAL'}, 'parsingStrategy': {'BEDROCK_DATA_AUTOMATION'}}}}}
Updates the configurations for a data source connector.
See also: AWS API Documentation
Request Syntax
client.update_data_source( dataDeletionPolicy='RETAIN'|'DELETE', dataSourceConfiguration={ 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, dataSourceId='string', description='string', knowledgeBaseId='string', name='string', serverSideEncryptionConfiguration={ 'kmsKeyArn': 'string' }, vectorIngestionConfiguration={ 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } )
string
The data deletion policy for the data source that you want to update.
dict
[REQUIRED]
The connection configuration for the data source that you want to update.
confluenceConfiguration (dict) --
The configuration information to connect to Confluence as your data source.
crawlerConfiguration (dict) --
The configuration of the Confluence content. For example, configuring specific types of Confluence content.
filterConfiguration (dict) --
The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) -- [REQUIRED]
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) -- [REQUIRED]
The supported object type or content type of the data source.
type (string) -- [REQUIRED]
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) -- [REQUIRED]
The endpoint information to connect to your Confluence data source.
authType (string) -- [REQUIRED]
The supported authentication type to authenticate and connect to your Confluence instance.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration.
hostType (string) -- [REQUIRED]
The supported host type, whether online/cloud or server/on-premises.
hostUrl (string) -- [REQUIRED]
The Confluence host URL or instance URL.
s3Configuration (dict) --
The configuration information to connect to Amazon S3 as your data source.
bucketArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
bucketOwnerAccountId (string) --
The account ID for the owner of the S3 bucket.
inclusionPrefixes (list) --
A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes.
(string) --
salesforceConfiguration (dict) --
The configuration information to connect to Salesforce as your data source.
crawlerConfiguration (dict) --
The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.
filterConfiguration (dict) --
The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) -- [REQUIRED]
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) -- [REQUIRED]
The supported object type or content type of the data source.
type (string) -- [REQUIRED]
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) -- [REQUIRED]
The endpoint information to connect to your Salesforce data source.
authType (string) -- [REQUIRED]
The supported authentication type to authenticate and connect to your Salesforce instance.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration.
hostUrl (string) -- [REQUIRED]
The Salesforce host URL or instance URL.
sharePointConfiguration (dict) --
The configuration information to connect to SharePoint as your data source.
crawlerConfiguration (dict) --
The configuration of the SharePoint content. For example, configuring specific types of SharePoint content.
filterConfiguration (dict) --
The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) -- [REQUIRED]
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) -- [REQUIRED]
The supported object type or content type of the data source.
type (string) -- [REQUIRED]
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) -- [REQUIRED]
The endpoint information to connect to your SharePoint data source.
authType (string) -- [REQUIRED]
The supported authentication type to authenticate and connect to your SharePoint site/sites.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration.
domain (string) -- [REQUIRED]
The domain of your SharePoint instance or site URL/URLs.
hostType (string) -- [REQUIRED]
The supported host type, whether online/cloud or server/on-premises.
siteUrls (list) -- [REQUIRED]
A list of one or more SharePoint site URLs.
(string) --
tenantId (string) --
The identifier of your Microsoft 365 tenant.
type (string) -- [REQUIRED]
The type of data source.
webConfiguration (dict) --
The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs.
crawlerConfiguration (dict) --
The Web Crawler configuration details for the web data source.
crawlerLimits (dict) --
The configuration of crawl limits for the web URLs.
rateLimit (integer) --
The max rate at which pages are crawled, up to 300 per minute per host.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
scope (string) --
The scope of what is crawled for your URLs.
You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://docs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com".
sourceConfiguration (dict) -- [REQUIRED]
The source configuration details for the web data source.
urlConfiguration (dict) -- [REQUIRED]
The configuration of the URL/URLs.
seedUrls (list) --
One or more seed or starting point URLs.
(dict) --
The seed or starting point URL. You should be authorized to crawl the URL.
url (string) --
A seed or starting point URL.
string
[REQUIRED]
The unique identifier of the data source.
string
Specifies a new description for the data source.
string
[REQUIRED]
The unique identifier of the knowledge base for the data source.
string
[REQUIRED]
Specifies a new name for the data source.
dict
Contains details about server-side encryption of the data source.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource.
dict
Contains details about how to ingest the documents in the data source.
chunkingConfiguration (dict) --
Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
chunkingStrategy (string) -- [REQUIRED]
Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
FIXED_SIZE – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the fixedSizeChunkingConfiguration.
HIERARCHICAL – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
SEMANTIC – Split documents into chunks based on groups of similar content derived with natural language processing.
NONE – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
fixedSizeChunkingConfiguration (dict) --
Configurations for when you choose fixed-size chunking. If you set the chunkingStrategy as NONE, exclude this field.
maxTokens (integer) -- [REQUIRED]
The maximum number of tokens to include in a chunk.
overlapPercentage (integer) -- [REQUIRED]
The percentage of overlap between adjacent chunks of a data source.
hierarchicalChunkingConfiguration (dict) --
Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
levelConfigurations (list) -- [REQUIRED]
Token settings for each layer.
(dict) --
Token settings for a layer in a hierarchical chunking configuration.
maxTokens (integer) -- [REQUIRED]
The maximum number of tokens that a chunk can contain in this layer.
overlapTokens (integer) -- [REQUIRED]
The number of tokens to repeat across chunks in the same layer.
semanticChunkingConfiguration (dict) --
Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
breakpointPercentileThreshold (integer) -- [REQUIRED]
The dissimilarity threshold for splitting chunks.
bufferSize (integer) -- [REQUIRED]
The buffer size.
maxTokens (integer) -- [REQUIRED]
The maximum number of tokens that a chunk can contain.
customTransformationConfiguration (dict) --
A custom document transformer for parsed data source documents.
intermediateStorage (dict) -- [REQUIRED]
An S3 bucket path for input and output objects.
s3Location (dict) -- [REQUIRED]
An S3 bucket path.
uri (string) -- [REQUIRED]
The location's URI. For example, s3://my-bucket/chunk-processor/.
transformations (list) -- [REQUIRED]
A Lambda function that processes documents.
(dict) --
A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to POST_CHUNKING.
stepToApply (string) -- [REQUIRED]
When the service applies the transformation.
transformationFunction (dict) -- [REQUIRED]
A Lambda function that processes documents.
transformationLambdaConfiguration (dict) -- [REQUIRED]
The Lambda function.
lambdaArn (string) -- [REQUIRED]
The function's ARN identifier.
parsingConfiguration (dict) --
Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used.
bedrockDataAutomationConfiguration (dict) --
If you specify BEDROCK_DATA_AUTOMATION as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
bedrockFoundationModelConfiguration (dict) --
If you specify BEDROCK_FOUNDATION_MODEL as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents.
modelArn (string) -- [REQUIRED]
The ARN of the foundation model or inference profile to use for parsing.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
parsingPrompt (dict) --
Instructions for interpreting the contents of a document.
parsingPromptText (string) -- [REQUIRED]
Instructions for interpreting the contents of a document.
parsingStrategy (string) -- [REQUIRED]
The parsing strategy for the data source.
dict
Response Syntax
{ 'dataSource': { 'createdAt': datetime(2015, 1, 1), 'dataDeletionPolicy': 'RETAIN'|'DELETE', 'dataSourceConfiguration': { 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseId': 'string', 'name': 'string', 'serverSideEncryptionConfiguration': { 'kmsKeyArn': 'string' }, 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1), 'vectorIngestionConfiguration': { 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } } }
Response Structure
(dict) --
dataSource (dict) --
Contains details about the data source.
createdAt (datetime) --
The time at which the data source was created.
dataDeletionPolicy (string) --
The data deletion policy for the data source.
dataSourceConfiguration (dict) --
The connection configuration for the data source.
confluenceConfiguration (dict) --
The configuration information to connect to Confluence as your data source.
crawlerConfiguration (dict) --
The configuration of the Confluence content. For example, configuring specific types of Confluence content.
filterConfiguration (dict) --
The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your Confluence data source.
authType (string) --
The supported authentication type to authenticate and connect to your Confluence instance.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration.
hostType (string) --
The supported host type, whether online/cloud or server/on-premises.
hostUrl (string) --
The Confluence host URL or instance URL.
s3Configuration (dict) --
The configuration information to connect to Amazon S3 as your data source.
bucketArn (string) --
The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
bucketOwnerAccountId (string) --
The account ID for the owner of the S3 bucket.
inclusionPrefixes (list) --
A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes.
(string) --
salesforceConfiguration (dict) --
The configuration information to connect to Salesforce as your data source.
crawlerConfiguration (dict) --
The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.
filterConfiguration (dict) --
The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your Salesforce data source.
authType (string) --
The supported authentication type to authenticate and connect to your Salesforce instance.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration.
hostUrl (string) --
The Salesforce host URL or instance URL.
sharePointConfiguration (dict) --
The configuration information to connect to SharePoint as your data source.
crawlerConfiguration (dict) --
The configuration of the SharePoint content. For example, configuring specific types of SharePoint content.
filterConfiguration (dict) --
The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content.
patternObjectFilter (dict) --
The configuration of filtering certain objects or content types of the data source.
filters (list) --
The configuration of specific filters applied to your data source content. You can filter out or include certain content.
(dict) --
The specific filters applied to your data source content. You can filter out or include certain content.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
(string) --
objectType (string) --
The supported object type or content type of the data source.
type (string) --
The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.
sourceConfiguration (dict) --
The endpoint information to connect to your SharePoint data source.
authType (string) --
The supported authentication type to authenticate and connect to your SharePoint site/sites.
credentialsSecretArn (string) --
The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration.
domain (string) --
The domain of your SharePoint instance or site URL/URLs.
hostType (string) --
The supported host type, whether online/cloud or server/on-premises.
siteUrls (list) --
A list of one or more SharePoint site URLs.
(string) --
tenantId (string) --
The identifier of your Microsoft 365 tenant.
type (string) --
The type of data source.
webConfiguration (dict) --
The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs.
crawlerConfiguration (dict) --
The Web Crawler configuration details for the web data source.
crawlerLimits (dict) --
The configuration of crawl limits for the web URLs.
rateLimit (integer) --
The max rate at which pages are crawled, up to 300 per minute per host.
exclusionFilters (list) --
A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
inclusionFilters (list) --
A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
(string) --
scope (string) --
The scope of what is crawled for your URLs.
You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://docs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com".
sourceConfiguration (dict) --
The source configuration details for the web data source.
urlConfiguration (dict) --
The configuration of the URL/URLs.
seedUrls (list) --
One or more seed or starting point URLs.
(dict) --
The seed or starting point URL. You should be authorized to crawl the URL.
url (string) --
A seed or starting point URL.
dataSourceId (string) --
The unique identifier of the data source.
description (string) --
The description of the data source.
failureReasons (list) --
The detailed reasons on the failure to delete a data source.
(string) --
knowledgeBaseId (string) --
The unique identifier of the knowledge base to which the data source belongs.
name (string) --
The name of the data source.
serverSideEncryptionConfiguration (dict) --
Contains details about the configuration of the server-side encryption.
kmsKeyArn (string) --
The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource.
status (string) --
The status of the data source. The following statuses are possible:
Available – The data source has been created and is ready for ingestion into the knowledge base.
Deleting – The data source is being deleted.
updatedAt (datetime) --
The time at which the data source was last updated.
vectorIngestionConfiguration (dict) --
Contains details about how to ingest the documents in the data source.
chunkingConfiguration (dict) --
Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
chunkingStrategy (string) --
Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
FIXED_SIZE – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the fixedSizeChunkingConfiguration.
HIERARCHICAL – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
SEMANTIC – Split documents into chunks based on groups of similar content derived with natural language processing.
NONE – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
fixedSizeChunkingConfiguration (dict) --
Configurations for when you choose fixed-size chunking. If you set the chunkingStrategy as NONE, exclude this field.
maxTokens (integer) --
The maximum number of tokens to include in a chunk.
overlapPercentage (integer) --
The percentage of overlap between adjacent chunks of a data source.
hierarchicalChunkingConfiguration (dict) --
Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
levelConfigurations (list) --
Token settings for each layer.
(dict) --
Token settings for a layer in a hierarchical chunking configuration.
maxTokens (integer) --
The maximum number of tokens that a chunk can contain in this layer.
overlapTokens (integer) --
The number of tokens to repeat across chunks in the same layer.
semanticChunkingConfiguration (dict) --
Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
breakpointPercentileThreshold (integer) --
The dissimilarity threshold for splitting chunks.
bufferSize (integer) --
The buffer size.
maxTokens (integer) --
The maximum number of tokens that a chunk can contain.
customTransformationConfiguration (dict) --
A custom document transformer for parsed data source documents.
intermediateStorage (dict) --
An S3 bucket path for input and output objects.
s3Location (dict) --
An S3 bucket path.
uri (string) --
The location's URI. For example, s3://my-bucket/chunk-processor/.
transformations (list) --
A Lambda function that processes documents.
(dict) --
A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to POST_CHUNKING.
stepToApply (string) --
When the service applies the transformation.
transformationFunction (dict) --
A Lambda function that processes documents.
transformationLambdaConfiguration (dict) --
The Lambda function.
lambdaArn (string) --
The function's ARN identifier.
parsingConfiguration (dict) --
Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used.
bedrockDataAutomationConfiguration (dict) --
If you specify BEDROCK_DATA_AUTOMATION as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
bedrockFoundationModelConfiguration (dict) --
If you specify BEDROCK_FOUNDATION_MODEL as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents.
modelArn (string) --
The ARN of the foundation model or inference profile to use for parsing.
parsingModality (string) --
Specifies whether to enable parsing of multimodal data, including both text and/or images.
parsingPrompt (dict) --
Instructions for interpreting the contents of a document.
parsingPromptText (string) --
Instructions for interpreting the contents of a document.
parsingStrategy (string) --
The parsing strategy for the data source.
{'knowledgeBaseConfiguration': {'kendraKnowledgeBaseConfiguration': {'kendraIndexArn': 'string'}, 'sqlKnowledgeBaseConfiguration': {'redshiftConfiguration': {'queryEngineConfiguration': {'provisionedConfiguration': {'authConfiguration': {'databaseUser': 'string', 'type': 'IAM ' '| ' 'USERNAME_PASSWORD ' '| ' 'USERNAME', 'usernamePasswordSecretArn': 'string'}, 'clusterIdentifier': 'string'}, 'serverlessConfiguration': {'authConfiguration': {'type': 'IAM ' '| ' 'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string'}, 'workgroupArn': 'string'}, 'type': 'SERVERLESS ' '| ' 'PROVISIONED'}, 'queryGenerationConfiguration': {'executionTimeoutSeconds': 'integer', 'generationContext': {'curatedQueries': [{'naturalLanguage': 'string', 'sql': 'string'}], 'tables': [{'columns': [{'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}], 'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}]}}, 'storageConfigurations': [{'awsDataCatalogConfiguration': {'tableNames': ['string']}, 'redshiftConfiguration': {'databaseName': 'string'}, 'type': 'REDSHIFT ' '| ' 'AWS_DATA_CATALOG'}]}, 'type': 'REDSHIFT'}, 'type': {'KENDRA', 'SQL'}, 'vectorKnowledgeBaseConfiguration': {'supplementalDataStorageConfiguration': {'storageLocations': [{'s3Location': {'uri': 'string'}, 'type': 'S3'}]}}}}Response
{'knowledgeBase': {'knowledgeBaseConfiguration': {'kendraKnowledgeBaseConfiguration': {'kendraIndexArn': 'string'}, 'sqlKnowledgeBaseConfiguration': {'redshiftConfiguration': {'queryEngineConfiguration': {'provisionedConfiguration': {'authConfiguration': {'databaseUser': 'string', 'type': 'IAM ' '| ' 'USERNAME_PASSWORD ' '| ' 'USERNAME', 'usernamePasswordSecretArn': 'string'}, 'clusterIdentifier': 'string'}, 'serverlessConfiguration': {'authConfiguration': {'type': 'IAM ' '| ' 'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string'}, 'workgroupArn': 'string'}, 'type': 'SERVERLESS ' '| ' 'PROVISIONED'}, 'queryGenerationConfiguration': {'executionTimeoutSeconds': 'integer', 'generationContext': {'curatedQueries': [{'naturalLanguage': 'string', 'sql': 'string'}], 'tables': [{'columns': [{'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}], 'description': 'string', 'inclusion': 'INCLUDE ' '| ' 'EXCLUDE', 'name': 'string'}]}}, 'storageConfigurations': [{'awsDataCatalogConfiguration': {'tableNames': ['string']}, 'redshiftConfiguration': {'databaseName': 'string'}, 'type': 'REDSHIFT ' '| ' 'AWS_DATA_CATALOG'}]}, 'type': 'REDSHIFT'}, 'type': {'KENDRA', 'SQL'}, 'vectorKnowledgeBaseConfiguration': {'supplementalDataStorageConfiguration': {'storageLocations': [{'s3Location': {'uri': 'string'}, 'type': 'S3'}]}}}}}
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 GetKnowledgeBase request and copy the same configurations.
See also: AWS API Documentation
Request Syntax
client.update_knowledge_base( description='string', knowledgeBaseConfiguration={ 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, knowledgeBaseId='string', name='string', roleArn='string', storageConfiguration={ 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS' } )
string
Specifies a new description for the knowledge base.
dict
[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.
kendraKnowledgeBaseConfiguration (dict) --
Settings for an Amazon Kendra knowledge base.
kendraIndexArn (string) -- [REQUIRED]
The ARN of the Amazon Kendra index.
sqlKnowledgeBaseConfiguration (dict) --
Specifies configurations for a knowledge base connected to an SQL database.
redshiftConfiguration (dict) --
Specifies configurations for a knowledge base connected to an Amazon Redshift database.
queryEngineConfiguration (dict) -- [REQUIRED]
Specifies configurations for an Amazon Redshift query engine.
provisionedConfiguration (dict) --
Specifies configurations for a provisioned Amazon Redshift query engine.
authConfiguration (dict) -- [REQUIRED]
Specifies configurations for authentication to Amazon Redshift.
databaseUser (string) --
The database username for authentication to an Amazon Redshift provisioned data warehouse.
type (string) -- [REQUIRED]
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
clusterIdentifier (string) -- [REQUIRED]
The ID of the Amazon Redshift cluster.
serverlessConfiguration (dict) --
Specifies configurations for a serverless Amazon Redshift query engine.
authConfiguration (dict) -- [REQUIRED]
Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse.
type (string) -- [REQUIRED]
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
workgroupArn (string) -- [REQUIRED]
The ARN of the Amazon Redshift workgroup.
type (string) -- [REQUIRED]
The type of query engine.
queryGenerationConfiguration (dict) --
Specifies configurations for generating queries.
executionTimeoutSeconds (integer) --
The time after which query generation will time out.
generationContext (dict) --
Specifies configurations for context to use during query generation.
curatedQueries (list) --
An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
(dict) --
Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
naturalLanguage (string) -- [REQUIRED]
An example natural language query.
sql (string) -- [REQUIRED]
The SQL equivalent of the natural language query.
tables (list) --
An array of objects, each of which defines information about a table in the database.
(dict) --
Contains information about a table for the query engine to consider.
columns (list) --
An array of objects, each of which defines information about a column in the table.
(dict) --
Contains information about a column in the current table for the query engine to consider.
description (string) --
A description of the column that helps the query engine understand the contents of the column.
inclusion (string) --
Specifies whether to include or exclude the column during query generation. If you specify EXCLUDE, the column will be ignored. If you specify INCLUDE, all other columns in the table will be ignored.
name (string) --
The name of the column for which the other fields in this object apply.
description (string) --
A description of the table that helps the query engine understand the contents of the table.
inclusion (string) --
Specifies whether to include or exclude the table during query generation. If you specify EXCLUDE, the table will be ignored. If you specify INCLUDE, all other tables will be ignored.
name (string) -- [REQUIRED]
The name of the table for which the other fields in this object apply.
storageConfigurations (list) -- [REQUIRED]
Specifies configurations for Amazon Redshift database storage.
(dict) --
Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the type field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.
awsDataCatalogConfiguration (dict) --
Specifies configurations for storage in Glue Data Catalog.
tableNames (list) -- [REQUIRED]
A list of names of the tables to use.
(string) --
redshiftConfiguration (dict) --
Specifies configurations for storage in Amazon Redshift.
databaseName (string) -- [REQUIRED]
The name of the Amazon Redshift database.
type (string) -- [REQUIRED]
The data storage service to use.
type (string) -- [REQUIRED]
The type of SQL database to connect to the knowledge base.
type (string) -- [REQUIRED]
The type of data that the data source is converted into for the knowledge base.
vectorKnowledgeBaseConfiguration (dict) --
Contains details about the model that's used to convert the data source into vector embeddings.
embeddingModelArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base.
embeddingModelConfiguration (dict) --
The embeddings model configuration details for the vector model used in Knowledge Base.
bedrockEmbeddingModelConfiguration (dict) --
The vector configuration details on the Bedrock embeddings model.
dimensions (integer) --
The dimensions details for the vector configuration used on the Bedrock embeddings model.
embeddingDataType (string) --
The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types.
supplementalDataStorageConfiguration (dict) --
If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate.
storageLocations (list) -- [REQUIRED]
A list of objects specifying storage locations for images extracted from multimodal documents in your data source.
(dict) --
Contains information about a storage location for images extracted from multimodal documents in your data source.
s3Location (dict) --
Contains information about the Amazon S3 location for the extracted images.
uri (string) -- [REQUIRED]
The location's URI. For example, s3://my-bucket/chunk-processor/.
type (string) -- [REQUIRED]
Specifies the storage service used for this location.
string
[REQUIRED]
The unique identifier of the knowledge base to update.
string
[REQUIRED]
Specifies a new name for the knowledge base.
string
[REQUIRED]
Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
dict
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.
mongoDbAtlasConfiguration (dict) --
Contains the storage configuration of the knowledge base in MongoDB Atlas.
collectionName (string) -- [REQUIRED]
The collection name of the knowledge base in MongoDB Atlas.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster.
databaseName (string) -- [REQUIRED]
The database name in your MongoDB Atlas cluster for your knowledge base.
endpoint (string) -- [REQUIRED]
The endpoint URL of your MongoDB Atlas cluster for your knowledge base.
endpointServiceName (string) --
The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) -- [REQUIRED]
The name of the MongoDB Atlas vector search index.
opensearchServerlessConfiguration (dict) --
Contains the storage configuration of the knowledge base in Amazon OpenSearch Service.
collectionArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the OpenSearch Service vector store.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) -- [REQUIRED]
The name of the vector store.
pineconeConfiguration (dict) --
Contains the storage configuration of the knowledge base in Pinecone.
connectionString (string) -- [REQUIRED]
The endpoint URL for your index management page.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
namespace (string) --
The namespace to be used to write new data to your database.
rdsConfiguration (dict) --
Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database.
databaseName (string) -- [REQUIRED]
The name of your Amazon RDS database.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
primaryKeyField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the ID for each entry.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
resourceArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the vector store.
tableName (string) -- [REQUIRED]
The name of the table in the database.
redisEnterpriseCloudConfiguration (dict) --
Contains the storage configuration of the knowledge base in Redis Enterprise Cloud.
credentialsSecretArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database.
endpoint (string) -- [REQUIRED]
The endpoint URL of the Redis Enterprise Cloud database.
fieldMapping (dict) -- [REQUIRED]
Contains the names of the fields to which to map information about the vector store.
metadataField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) -- [REQUIRED]
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.
vectorField (string) -- [REQUIRED]
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) -- [REQUIRED]
The name of the vector index.
type (string) -- [REQUIRED]
The vector store service in which the knowledge base is stored.
dict
Response Syntax
{ 'knowledgeBase': { 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseArn': 'string', 'knowledgeBaseConfiguration': { 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, 'knowledgeBaseId': 'string', 'name': 'string', 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'storageConfiguration': { 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS' }, 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) --
knowledgeBase (dict) --
Contains details about the knowledge base.
createdAt (datetime) --
The time the knowledge base was created.
description (string) --
The description of the knowledge base.
failureReasons (list) --
A list of reasons that the API operation on the knowledge base failed.
(string) --
knowledgeBaseArn (string) --
The Amazon Resource Name (ARN) of the knowledge base.
knowledgeBaseConfiguration (dict) --
Contains details about the embeddings configuration of the knowledge base.
kendraKnowledgeBaseConfiguration (dict) --
Settings for an Amazon Kendra knowledge base.
kendraIndexArn (string) --
The ARN of the Amazon Kendra index.
sqlKnowledgeBaseConfiguration (dict) --
Specifies configurations for a knowledge base connected to an SQL database.
redshiftConfiguration (dict) --
Specifies configurations for a knowledge base connected to an Amazon Redshift database.
queryEngineConfiguration (dict) --
Specifies configurations for an Amazon Redshift query engine.
provisionedConfiguration (dict) --
Specifies configurations for a provisioned Amazon Redshift query engine.
authConfiguration (dict) --
Specifies configurations for authentication to Amazon Redshift.
databaseUser (string) --
The database username for authentication to an Amazon Redshift provisioned data warehouse.
type (string) --
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
clusterIdentifier (string) --
The ID of the Amazon Redshift cluster.
serverlessConfiguration (dict) --
Specifies configurations for a serverless Amazon Redshift query engine.
authConfiguration (dict) --
Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse.
type (string) --
The type of authentication to use.
usernamePasswordSecretArn (string) --
The ARN of an Secrets Manager secret for authentication.
workgroupArn (string) --
The ARN of the Amazon Redshift workgroup.
type (string) --
The type of query engine.
queryGenerationConfiguration (dict) --
Specifies configurations for generating queries.
executionTimeoutSeconds (integer) --
The time after which query generation will time out.
generationContext (dict) --
Specifies configurations for context to use during query generation.
curatedQueries (list) --
An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
(dict) --
Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
naturalLanguage (string) --
An example natural language query.
sql (string) --
The SQL equivalent of the natural language query.
tables (list) --
An array of objects, each of which defines information about a table in the database.
(dict) --
Contains information about a table for the query engine to consider.
columns (list) --
An array of objects, each of which defines information about a column in the table.
(dict) --
Contains information about a column in the current table for the query engine to consider.
description (string) --
A description of the column that helps the query engine understand the contents of the column.
inclusion (string) --
Specifies whether to include or exclude the column during query generation. If you specify EXCLUDE, the column will be ignored. If you specify INCLUDE, all other columns in the table will be ignored.
name (string) --
The name of the column for which the other fields in this object apply.
description (string) --
A description of the table that helps the query engine understand the contents of the table.
inclusion (string) --
Specifies whether to include or exclude the table during query generation. If you specify EXCLUDE, the table will be ignored. If you specify INCLUDE, all other tables will be ignored.
name (string) --
The name of the table for which the other fields in this object apply.
storageConfigurations (list) --
Specifies configurations for Amazon Redshift database storage.
(dict) --
Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the type field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.
awsDataCatalogConfiguration (dict) --
Specifies configurations for storage in Glue Data Catalog.
tableNames (list) --
A list of names of the tables to use.
(string) --
redshiftConfiguration (dict) --
Specifies configurations for storage in Amazon Redshift.
databaseName (string) --
The name of the Amazon Redshift database.
type (string) --
The data storage service to use.
type (string) --
The type of SQL database to connect to the knowledge base.
type (string) --
The type of data that the data source is converted into for the knowledge base.
vectorKnowledgeBaseConfiguration (dict) --
Contains details about the model that's used to convert the data source into vector embeddings.
embeddingModelArn (string) --
The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base.
embeddingModelConfiguration (dict) --
The embeddings model configuration details for the vector model used in Knowledge Base.
bedrockEmbeddingModelConfiguration (dict) --
The vector configuration details on the Bedrock embeddings model.
dimensions (integer) --
The dimensions details for the vector configuration used on the Bedrock embeddings model.
embeddingDataType (string) --
The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types.
supplementalDataStorageConfiguration (dict) --
If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate.
storageLocations (list) --
A list of objects specifying storage locations for images extracted from multimodal documents in your data source.
(dict) --
Contains information about a storage location for images extracted from multimodal documents in your data source.
s3Location (dict) --
Contains information about the Amazon S3 location for the extracted images.
uri (string) --
The location's URI. For example, s3://my-bucket/chunk-processor/.
type (string) --
Specifies the storage service used for this location.
knowledgeBaseId (string) --
The unique identifier of the knowledge base.
name (string) --
The name of the knowledge base.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
status (string) --
The status of the knowledge base. The following statuses are possible:
CREATING – The knowledge base is being created.
ACTIVE – The knowledge base is ready to be queried.
DELETING – The knowledge base is being deleted.
UPDATING – The knowledge base is being updated.
FAILED – The knowledge base API operation failed.
storageConfiguration (dict) --
Contains details about the storage configuration of the knowledge base.
mongoDbAtlasConfiguration (dict) --
Contains the storage configuration of the knowledge base in MongoDB Atlas.
collectionName (string) --
The collection name of the knowledge base in MongoDB Atlas.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster.
databaseName (string) --
The database name in your MongoDB Atlas cluster for your knowledge base.
endpoint (string) --
The endpoint URL of your MongoDB Atlas cluster for your knowledge base.
endpointServiceName (string) --
The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the MongoDB Atlas vector search index.
opensearchServerlessConfiguration (dict) --
Contains the storage configuration of the knowledge base in Amazon OpenSearch Service.
collectionArn (string) --
The Amazon Resource Name (ARN) of the OpenSearch Service vector store.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the vector store.
pineconeConfiguration (dict) --
Contains the storage configuration of the knowledge base in Pinecone.
connectionString (string) --
The endpoint URL for your index management page.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
namespace (string) --
The namespace to be used to write new data to your database.
rdsConfiguration (dict) --
Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database.
databaseName (string) --
The name of your Amazon RDS database.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
primaryKeyField (string) --
The name of the field in which Amazon Bedrock stores the ID for each entry.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
resourceArn (string) --
The Amazon Resource Name (ARN) of the vector store.
tableName (string) --
The name of the table in the database.
redisEnterpriseCloudConfiguration (dict) --
Contains the storage configuration of the knowledge base in Redis Enterprise Cloud.
credentialsSecretArn (string) --
The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database.
endpoint (string) --
The endpoint URL of the Redis Enterprise Cloud database.
fieldMapping (dict) --
Contains the names of the fields to which to map information about the vector store.
metadataField (string) --
The name of the field in which Amazon Bedrock stores metadata about the vector store.
textField (string) --
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.
vectorField (string) --
The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
vectorIndexName (string) --
The name of the vector index.
type (string) --
The vector store service in which the knowledge base is stored.
updatedAt (datetime) --
The time the knowledge base was last updated.