Table of Contents
A low-level client representing AWSKendraFrontendService:
import boto3
client = boto3.client('kendra')
These are the available methods:
Removes one or more documents from an index. The documents must have been added with the BatchPutDocument operation.
The documents are deleted asynchronously. You can see the progress of the deletion by using AWS CloudWatch. Any error messages releated to the processing of the batch are sent to you CloudWatch log.
See also: AWS API Documentation
Request Syntax
response = client.batch_delete_document(
IndexId='string',
DocumentIdList=[
'string',
]
)
[REQUIRED]
The identifier of the index that contains the documents to delete.
[REQUIRED]
One or more identifiers for documents to delete from the index.
dict
Response Syntax
{
'FailedDocuments': [
{
'Id': 'string',
'ErrorCode': 'InternalError'|'InvalidRequest',
'ErrorMessage': 'string'
},
]
}
Response Structure
(dict) --
FailedDocuments (list) --
A list of documents that could not be removed from the index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
(dict) --
Provides information about documents that could not be removed from an index by the BatchDeleteDocument operation.
Id (string) --
The identifier of the document that couldn't be removed from the index.
ErrorCode (string) --
The error code for why the document couldn't be removed from the index.
ErrorMessage (string) --
An explanation for why the document couldn't be removed from the index.
Adds one or more documents to an index.
The BatchPutDocument operation enables you to ingest inline documents or a set of documents stored in an Amazon S3 bucket. Use this operation to ingest your text and unstructured text into an index, add custom attributes to the documents, and to attach an access control list to the documents added to the index.
The documents are indexed asynchronously. You can see the progress of the batch using AWS CloudWatch. Any error messages related to processing the batch are sent to your AWS CloudWatch log.
See also: AWS API Documentation
Request Syntax
response = client.batch_put_document(
IndexId='string',
RoleArn='string',
Documents=[
{
'Id': 'string',
'Title': 'string',
'Blob': b'bytes',
'S3Path': {
'Bucket': 'string',
'Key': 'string'
},
'Attributes': [
{
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
],
'AccessControlList': [
{
'Name': 'string',
'Type': 'USER'|'GROUP',
'Access': 'ALLOW'|'DENY'
},
],
'ContentType': 'PDF'|'HTML'|'MS_WORD'|'PLAIN_TEXT'|'PPT'
},
]
)
[REQUIRED]
The identifier of the index to add the documents to. You need to create the index first using the CreateIndex operation.
[REQUIRED]
One or more documents to add to the index.
Each document is limited to 5 Mb, the total size of the list is limited to 50 Mb.
A document in an index.
A unique identifier of the document in the index.
The title of the document.
The contents of the document as a base-64 encoded string.
Information required to find a specific file in an Amazon S3 bucket.
The name of the S3 bucket that contains the file.
The name of the file.
Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.
A custom attribute value assigned to a document.
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
Information to use for user context filtering.
Provides user and group information for document access filtering.
The name of the user or group.
The type of principal.
Whether to allow or deny access to the principal.
The file type of the document in the Blob field.
dict
Response Syntax
{
'FailedDocuments': [
{
'Id': 'string',
'ErrorCode': 'InternalError'|'InvalidRequest',
'ErrorMessage': 'string'
},
]
}
Response Structure
(dict) --
FailedDocuments (list) --
A list of documents that were not added to the index because the document failed a validation check. Each document contains an error message that indicates why the document couldn't be added to the index.
If there was an error adding a document to an index the error is reported in your AWS CloudWatch log.
(dict) --
Provides information about a document that could not be indexed.
Id (string) --
The unique identifier of the document.
ErrorCode (string) --
The type of error that caused the document to fail to be indexed.
ErrorMessage (string) --
A description of the reason why the document could not be indexed.
Check if an operation can be paginated.
Creates a data source that you use to with an Amazon Kendra index.
You specify a name, connector type and description for your data source. You can choose between an S3 connector, a SharePoint Online connector, and a database connector.
You also specify configuration information such as document metadata (author, source URI, and so on) and user context information.
CreateDataSource is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised.
See also: AWS API Documentation
Request Syntax
response = client.create_data_source(
Name='string',
IndexId='string',
Type='S3'|'SHAREPOINT'|'DATABASE',
Configuration={
'S3Configuration': {
'BucketName': 'string',
'InclusionPrefixes': [
'string',
],
'ExclusionPatterns': [
'string',
],
'DocumentsMetadataConfiguration': {
'S3Prefix': 'string'
},
'AccessControlListConfiguration': {
'KeyPath': 'string'
}
},
'SharePointConfiguration': {
'SharePointVersion': 'SHAREPOINT_ONLINE',
'Urls': [
'string',
],
'SecretArn': 'string',
'CrawlAttachments': True|False,
'VpcConfiguration': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'FieldMappings': [
{
'DataSourceFieldName': 'string',
'DateFieldFormat': 'string',
'IndexFieldName': 'string'
},
]
},
'DatabaseConfiguration': {
'DatabaseEngineType': 'RDS_AURORA_MYSQL'|'RDS_AURORA_POSTGRESQL'|'RDS_MYSQL'|'RDS_POSTGRESQL',
'ConnectionConfiguration': {
'DatabaseHost': 'string',
'DatabasePort': 123,
'DatabaseName': 'string',
'TableName': 'string',
'SecretArn': 'string'
},
'VpcConfiguration': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'ColumnConfiguration': {
'DocumentIdColumnName': 'string',
'DocumentDataColumnName': 'string',
'DocumentTitleColumnName': 'string',
'FieldMappings': [
{
'DataSourceFieldName': 'string',
'DateFieldFormat': 'string',
'IndexFieldName': 'string'
},
],
'ChangeDetectingColumns': [
'string',
]
},
'AclConfiguration': {
'AllowedGroupsColumnName': 'string'
}
}
},
Description='string',
Schedule='string',
RoleArn='string'
)
[REQUIRED]
A unique name for the data source. A data source name can't be changed without deleting and recreating the data source.
[REQUIRED]
The identifier of the index that should be associated with this data source.
[REQUIRED]
The type of repository that contains the data source.
[REQUIRED]
The connector configuration information that is required to access the repository.
Provides information to create a connector for a document repository in an Amazon S3 bucket.
The name of the bucket that contains the documents.
A list of S3 prefixes for the documents that should be included in the index.
A list of glob patterns for documents that should not be indexed. If a document that matches an inclusion prefix also matches an exclusion pattern, the document is not indexed.
For more information about glob patterns, see glob (programming) in Wikipedia .
Document metadata files that contain information such as the document access control information, source URI, document author, and custom attributes. Each metadata file contains metadata about a single document.
A prefix used to filter metadata configuration files in the AWS S3 bucket. The S3 bucket might contain multiple metadata files. Use S3Prefix to include only the desired metadata files.
Provides the path to the S3 bucket that contains the user context filtering files for the data source.
Path to the AWS S3 bucket that contains the ACL files.
Provides information necessary to create a connector for a Microsoft SharePoint site.
The version of Microsoft SharePoint that you are using as a data source.
The URLs of the Microsoft SharePoint site that contains the documents that should be indexed.
The Amazon Resource Name (ARN) of credentials stored in AWS Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Microsoft SharePoint Data Source . For more information about AWS Secrets Manager, see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.
TRUE to include attachments to documents stored in your Microsoft SharePoint site in the index; otherwise, FALSE .
Provides information for connecting to an Amazon VPC.
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
A list of DataSourceToIndexFieldMapping objects that map Microsoft SharePoint attributes to custom fields in the Amazon Kendra index. You must first create the index fields using the operation before you map SharePoint attributes. For more information, see Mapping Data Source Fields .
Maps a column or attribute in the data source to an index field. You must first create the fields in the index using the UpdateIndex operation.
The name of the column or attribute in the data source.
The type of data stored in the column or attribute.
The name of the field in the index.
Provides information necessary to create a connector for a database.
The type of database engine that runs the database.
The information necessary to connect to a database.
The name of the host for the database. Can be either a string (host.subdomain.domain.tld) or an IPv4 or IPv6 address.
The port that the database uses for connections.
The name of the database containing the document data.
The name of the table that contains the document data.
The Amazon Resource Name (ARN) of credentials stored in AWS Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Database Data Source . For more information about AWS Secrets Manager, see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.
Provides information for connecting to an Amazon VPC.
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
Information about where the index should get the document information from the database.
The column that provides the document's unique identifier.
The column that contains the contents of the document.
The column that contains the title of the document.
An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the UpdateIndex operation.
Maps a column or attribute in the data source to an index field. You must first create the fields in the index using the UpdateIndex operation.
The name of the column or attribute in the data source.
The type of data stored in the column or attribute.
The name of the field in the index.
One to five columns that indicate when a document in the database has changed.
Information about the database column that provides information for user context filtering.
A list of groups, separated by semi-colons, that filters a query response based on user context. The document is only returned to users that are in one of the groups specified in the UserContext field of the Query operation.
[REQUIRED]
The Amazon Resource Name (ARN) of a role with permission to access the data source. For more information, see IAM Roles for Amazon Kendra .
dict
Response Syntax
{
'Id': 'string'
}
Response Structure
(dict) --
Id (string) --
A unique identifier for the data source.
Creates an new set of frequently asked question (FAQ) questions and answers.
See also: AWS API Documentation
Request Syntax
response = client.create_faq(
IndexId='string',
Name='string',
Description='string',
S3Path={
'Bucket': 'string',
'Key': 'string'
},
RoleArn='string'
)
[REQUIRED]
The identifier of the index that contains the FAQ.
[REQUIRED]
The name that should be associated with the FAQ.
[REQUIRED]
The S3 location of the FAQ input data.
The name of the S3 bucket that contains the file.
The name of the file.
[REQUIRED]
The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQs. For more information, see IAM Roles for Amazon Kendra .
dict
Response Syntax
{
'Id': 'string'
}
Response Structure
(dict) --
Id (string) --
The unique identifier of the FAQ.
Creates a new Amazon Kendra index. Index creation is an asynchronous operation. To determine if index creation has completed, check the Status field returned from a call to . The Status field is set to ACTIVE when the index is ready to use.
Once the index is active you can index your documents using the operation or using one of the supported data sources.
See also: AWS API Documentation
Request Syntax
response = client.create_index(
Name='string',
RoleArn='string',
ServerSideEncryptionConfiguration={
'KmsKeyId': 'string'
},
Description='string'
)
[REQUIRED]
The name for the new index.
[REQUIRED]
An IAM role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role used when you use the BatchPutDocument operation to index documents from an Amazon S3 bucket.
The identifier of the KMS key to use to encrypt data indexed by Amazon Kendra.
The identifier of the KMS key.
dict
Response Syntax
{
'Id': 'string'
}
Response Structure
(dict) --
Id (string) --
The unique identifier of the index. Use this identifier when you query an index, set up a data source, or index a document.
Removes an FAQ from an index.
See also: AWS API Documentation
Request Syntax
response = client.delete_faq(
Id='string',
IndexId='string'
)
[REQUIRED]
The identifier of the FAQ to remove.
[REQUIRED]
The index to remove the FAQ from.
None
Deletes an existing Amazon Kendra index. An exception is not thrown if the index is already being deleted. While the index is being deleted, the Status field returned by a call to the DescribeIndex operation is set to DELETING .
See also: AWS API Documentation
Request Syntax
response = client.delete_index(
Id='string'
)
[REQUIRED]
The identifier of the index to delete.
Gets information about a Amazon Kendra data source.
See also: AWS API Documentation
Request Syntax
response = client.describe_data_source(
Id='string',
IndexId='string'
)
[REQUIRED]
The unique identifier of the data source to describe.
[REQUIRED]
The identifier of the index that contains the data source.
dict
Response Syntax
{
'Id': 'string',
'IndexId': 'string',
'Name': 'string',
'Type': 'S3'|'SHAREPOINT'|'DATABASE',
'Configuration': {
'S3Configuration': {
'BucketName': 'string',
'InclusionPrefixes': [
'string',
],
'ExclusionPatterns': [
'string',
],
'DocumentsMetadataConfiguration': {
'S3Prefix': 'string'
},
'AccessControlListConfiguration': {
'KeyPath': 'string'
}
},
'SharePointConfiguration': {
'SharePointVersion': 'SHAREPOINT_ONLINE',
'Urls': [
'string',
],
'SecretArn': 'string',
'CrawlAttachments': True|False,
'VpcConfiguration': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'FieldMappings': [
{
'DataSourceFieldName': 'string',
'DateFieldFormat': 'string',
'IndexFieldName': 'string'
},
]
},
'DatabaseConfiguration': {
'DatabaseEngineType': 'RDS_AURORA_MYSQL'|'RDS_AURORA_POSTGRESQL'|'RDS_MYSQL'|'RDS_POSTGRESQL',
'ConnectionConfiguration': {
'DatabaseHost': 'string',
'DatabasePort': 123,
'DatabaseName': 'string',
'TableName': 'string',
'SecretArn': 'string'
},
'VpcConfiguration': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'ColumnConfiguration': {
'DocumentIdColumnName': 'string',
'DocumentDataColumnName': 'string',
'DocumentTitleColumnName': 'string',
'FieldMappings': [
{
'DataSourceFieldName': 'string',
'DateFieldFormat': 'string',
'IndexFieldName': 'string'
},
],
'ChangeDetectingColumns': [
'string',
]
},
'AclConfiguration': {
'AllowedGroupsColumnName': 'string'
}
}
},
'CreatedAt': datetime(2015, 1, 1),
'UpdatedAt': datetime(2015, 1, 1),
'Description': 'string',
'Status': 'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'ACTIVE',
'Schedule': 'string',
'RoleArn': 'string',
'ErrorMessage': 'string'
}
Response Structure
(dict) --
Id (string) --
The identifier of the data source.
IndexId (string) --
The identifier of the index that contains the data source.
Name (string) --
The name that you gave the data source when it was created.
Type (string) --
The type of the data source.
Configuration (dict) --
Information that describes where the data source is located and how the data source is configured. The specific information in the description depends on the data source provider.
S3Configuration (dict) --
Provides information to create a connector for a document repository in an Amazon S3 bucket.
BucketName (string) --
The name of the bucket that contains the documents.
InclusionPrefixes (list) --
A list of S3 prefixes for the documents that should be included in the index.
ExclusionPatterns (list) --
A list of glob patterns for documents that should not be indexed. If a document that matches an inclusion prefix also matches an exclusion pattern, the document is not indexed.
For more information about glob patterns, see glob (programming) in Wikipedia .
DocumentsMetadataConfiguration (dict) --
Document metadata files that contain information such as the document access control information, source URI, document author, and custom attributes. Each metadata file contains metadata about a single document.
S3Prefix (string) --
A prefix used to filter metadata configuration files in the AWS S3 bucket. The S3 bucket might contain multiple metadata files. Use S3Prefix to include only the desired metadata files.
AccessControlListConfiguration (dict) --
Provides the path to the S3 bucket that contains the user context filtering files for the data source.
KeyPath (string) --
Path to the AWS S3 bucket that contains the ACL files.
SharePointConfiguration (dict) --
Provides information necessary to create a connector for a Microsoft SharePoint site.
SharePointVersion (string) --
The version of Microsoft SharePoint that you are using as a data source.
Urls (list) --
The URLs of the Microsoft SharePoint site that contains the documents that should be indexed.
SecretArn (string) --
The Amazon Resource Name (ARN) of credentials stored in AWS Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Microsoft SharePoint Data Source . For more information about AWS Secrets Manager, see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.
CrawlAttachments (boolean) --
TRUE to include attachments to documents stored in your Microsoft SharePoint site in the index; otherwise, FALSE .
VpcConfiguration (dict) --
Provides information for connecting to an Amazon VPC.
SubnetIds (list) --
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
SecurityGroupIds (list) --
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
FieldMappings (list) --
A list of DataSourceToIndexFieldMapping objects that map Microsoft SharePoint attributes to custom fields in the Amazon Kendra index. You must first create the index fields using the operation before you map SharePoint attributes. For more information, see Mapping Data Source Fields .
(dict) --
Maps a column or attribute in the data source to an index field. You must first create the fields in the index using the UpdateIndex operation.
DataSourceFieldName (string) --
The name of the column or attribute in the data source.
DateFieldFormat (string) --
The type of data stored in the column or attribute.
IndexFieldName (string) --
The name of the field in the index.
DatabaseConfiguration (dict) --
Provides information necessary to create a connector for a database.
DatabaseEngineType (string) --
The type of database engine that runs the database.
ConnectionConfiguration (dict) --
The information necessary to connect to a database.
DatabaseHost (string) --
The name of the host for the database. Can be either a string (host.subdomain.domain.tld) or an IPv4 or IPv6 address.
DatabasePort (integer) --
The port that the database uses for connections.
DatabaseName (string) --
The name of the database containing the document data.
TableName (string) --
The name of the table that contains the document data.
SecretArn (string) --
The Amazon Resource Name (ARN) of credentials stored in AWS Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Database Data Source . For more information about AWS Secrets Manager, see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.
VpcConfiguration (dict) --
Provides information for connecting to an Amazon VPC.
SubnetIds (list) --
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
SecurityGroupIds (list) --
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
ColumnConfiguration (dict) --
Information about where the index should get the document information from the database.
DocumentIdColumnName (string) --
The column that provides the document's unique identifier.
DocumentDataColumnName (string) --
The column that contains the contents of the document.
DocumentTitleColumnName (string) --
The column that contains the title of the document.
FieldMappings (list) --
An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the UpdateIndex operation.
(dict) --
Maps a column or attribute in the data source to an index field. You must first create the fields in the index using the UpdateIndex operation.
DataSourceFieldName (string) --
The name of the column or attribute in the data source.
DateFieldFormat (string) --
The type of data stored in the column or attribute.
IndexFieldName (string) --
The name of the field in the index.
ChangeDetectingColumns (list) --
One to five columns that indicate when a document in the database has changed.
AclConfiguration (dict) --
Information about the database column that provides information for user context filtering.
AllowedGroupsColumnName (string) --
A list of groups, separated by semi-colons, that filters a query response based on user context. The document is only returned to users that are in one of the groups specified in the UserContext field of the Query operation.
CreatedAt (datetime) --
The Unix timestamp of when the data source was created.
UpdatedAt (datetime) --
The Unix timestamp of when the data source was last updated.
Description (string) --
The description of the data source.
Status (string) --
The current status of the data source. When the status is ACTIVE the data source is ready to use. When the status is FAILED , the ErrorMessage field contains the reason that the data source failed.
Schedule (string) --
The schedule that Amazon Kendra will update the data source.
RoleArn (string) --
The Amazon Resource Name (ARN) of the role that enables the data source to access its resources.
ErrorMessage (string) --
When the Status field value is FAILED , the ErrorMessage field contains a description of the error that caused the data source to fail.
Gets information about an FAQ list.
See also: AWS API Documentation
Request Syntax
response = client.describe_faq(
Id='string',
IndexId='string'
)
[REQUIRED]
The unique identifier of the FAQ.
[REQUIRED]
The identifier of the index that contains the FAQ.
dict
Response Syntax
{
'Id': 'string',
'IndexId': 'string',
'Name': 'string',
'Description': 'string',
'CreatedAt': datetime(2015, 1, 1),
'UpdatedAt': datetime(2015, 1, 1),
'S3Path': {
'Bucket': 'string',
'Key': 'string'
},
'Status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'FAILED',
'RoleArn': 'string',
'ErrorMessage': 'string'
}
Response Structure
(dict) --
Id (string) --
The identifier of the FAQ.
IndexId (string) --
The identifier of the index that contains the FAQ.
Name (string) --
The name that you gave the FAQ when it was created.
Description (string) --
The description of the FAQ that you provided when it was created.
CreatedAt (datetime) --
The date and time that the FAQ was created.
UpdatedAt (datetime) --
The date and time that the FAQ was last updated.
S3Path (dict) --
Information required to find a specific file in an Amazon S3 bucket.
Bucket (string) --
The name of the S3 bucket that contains the file.
Key (string) --
The name of the file.
Status (string) --
The status of the FAQ. It is ready to use when the status is ACTIVE .
RoleArn (string) --
The Amazon Resource Name (ARN) of the role that provides access to the S3 bucket containing the input files for the FAQ.
ErrorMessage (string) --
If the Status field is FAILED , the ErrorMessage field contains the reason why the FAQ failed.
Describes an existing Amazon Kendra index
See also: AWS API Documentation
Request Syntax
response = client.describe_index(
Id='string'
)
[REQUIRED]
The name of the index to describe.
{
'Name': 'string',
'Id': 'string',
'RoleArn': 'string',
'ServerSideEncryptionConfiguration': {
'KmsKeyId': 'string'
},
'Status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'SYSTEM_UPDATING',
'Description': 'string',
'CreatedAt': datetime(2015, 1, 1),
'UpdatedAt': datetime(2015, 1, 1),
'DocumentMetadataConfigurations': [
{
'Name': 'string',
'Type': 'STRING_VALUE'|'STRING_LIST_VALUE'|'LONG_VALUE'|'DATE_VALUE',
'Relevance': {
'Freshness': True|False,
'Importance': 123,
'Duration': 'string',
'RankOrder': 'ASCENDING'|'DESCENDING',
'ValueImportanceMap': {
'string': 123
}
},
'Search': {
'Facetable': True|False,
'Searchable': True|False,
'Displayable': True|False
}
},
],
'IndexStatistics': {
'FaqStatistics': {
'IndexedQuestionAnswersCount': 123
},
'TextDocumentStatistics': {
'IndexedTextDocumentsCount': 123
}
},
'ErrorMessage': 'string'
}
Response Structure
The name of the index.
the name of the index.
The Amazon Resource Name (ARN) of the IAM role that gives Amazon Kendra permission to write to your Amazon Cloudwatch logs.
The identifier of the KMS key used to encrypt your data.
The identifier of the KMS key.
The current status of the index. When the value is ACTIVE , the index is ready for use. If the Status field value is FAILED , the ErrorMessage field contains a message that explains why.
The description of the index.
The Unix datetime that the index was created.
The Unix datetime that the index was last updated.
Configuration settings for any metadata applied to the documents in the index.
Specifies the properties of a custom index field.
The name of the index field.
The data type of the index field.
Provides manual tuning parameters to determine how the field affects the search results.
Indicates that this field determines how "fresh" a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is "fresher" than document 2. You can only set the Freshness field on one DATE type field. Only applies to DATE fields.
The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.
Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use "2628000s". Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don't specify a value, the default is 3 months. The value of the field is a numeric string followed by the character "s", for example "86400s" for one day, or "604800s" for one week.
Only applies to DATE fields.
Determines how values should be interpreted.
When the RankOrder field is ASCENDING , higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1.
When the RankOrder field is DESCENDING , lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task.
Only applies to LONG and DOUBLE fields.
A list of values that should be given a different boost when they appear in the result list. For example, if you are boosting a field called "department," query terms that match the department field are boosted in the result. However, you can add entries from the department field to boost documents with those values higher.
For example, you can add entries to the map with names of departments. If you add "HR",5 and "Legal",3 those departments are given special attention when they appear in the metadata of a document. When those terms appear they are given the specified importance instead of the regular importance for the boost.
Provides information about how the field is used during a search.
Indicates that the field can be used to create search facets, a count of results for each value in the field. The default is false .
Determines whether the field is used in the search. If the Searchable field is true , you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default is true for string fields and false for number and date fields.
Determines whether the field is returned in the query response. The default is true .
Provides information about the number of FAQ questions and answers and the number of text documents indexed.
The number of question and answer topics in the index.
The total number of FAQ questions and answers contained in the index.
The number of text documents indexed.
The number of text documents indexed.
When th e``Status`` field value is FAILED , the ErrorMessage field contains a message that explains why.
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
Gets statistics about synchronizing Amazon Kendra with a data source.
See also: AWS API Documentation
Request Syntax
response = client.list_data_source_sync_jobs(
Id='string',
IndexId='string',
NextToken='string',
MaxResults=123,
StartTimeFilter={
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1)
},
StatusFilter='FAILED'|'SUCCEEDED'|'SYNCING'|'INCOMPLETE'|'STOPPING'|'ABORTED'
)
[REQUIRED]
The identifier of the data source.
[REQUIRED]
The identifier of the index that contains the data source.
When specified, the synchronization jobs returned in the list are limited to jobs between the specified dates.
The UNIX datetime of the beginning of the time range.
The UNIX datetime of the end of the time range.
dict
Response Syntax
{
'History': [
{
'ExecutionId': 'string',
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'Status': 'FAILED'|'SUCCEEDED'|'SYNCING'|'INCOMPLETE'|'STOPPING'|'ABORTED',
'ErrorMessage': 'string',
'ErrorCode': 'InternalError'|'InvalidRequest',
'DataSourceErrorCode': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
History (list) --
A history of synchronization jobs for the data source.
(dict) --
Provides information about a synchronization job.
ExecutionId (string) --
A unique identifier for the synchronization job.
StartTime (datetime) --
The UNIX datetime that the synchronization job was started.
EndTime (datetime) --
The UNIX datetime that the synchronization job was completed.
Status (string) --
The execution status of the synchronization job. When the Status field is set to SUCCEEDED , the synchronization job is done. If the status code is set to FAILED , the ErrorCode and ErrorMessage fields give you the reason for the failure.
ErrorMessage (string) --
If the Status field is set to ERROR , the ErrorMessage field contains a description of the error that caused the synchronization to fail.
ErrorCode (string) --
If the Status field is set to FAILED , the ErrorCode field contains a the reason that the synchronization failed.
DataSourceErrorCode (string) --
If the reason that the synchronization failed is due to an error with the underlying data source, this field contains a code that identifies the error.
NextToken (string) --
The GetDataSourceSyncJobHistory operation returns a page of vocabularies at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Kendra returns the NextPage token. Include the token in the next request to the GetDataSourceSyncJobHistory operation to return in the next page of jobs.
Lists the data sources that you have created.
See also: AWS API Documentation
Request Syntax
response = client.list_data_sources(
IndexId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The identifier of the index that contains the data source.
dict
Response Syntax
{
'SummaryItems': [
{
'Name': 'string',
'Id': 'string',
'Type': 'S3'|'SHAREPOINT'|'DATABASE',
'CreatedAt': datetime(2015, 1, 1),
'UpdatedAt': datetime(2015, 1, 1),
'Status': 'CREATING'|'DELETING'|'FAILED'|'UPDATING'|'ACTIVE'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
SummaryItems (list) --
An array of summary information for one or more data sources.
(dict) --
Summary information for a Amazon Kendra data source. Returned in a call to .
Name (string) --
The name of the data source.
Id (string) --
The unique identifier for the data source.
Type (string) --
The type of the data source.
CreatedAt (datetime) --
The UNIX datetime that the data source was created.
UpdatedAt (datetime) --
The UNIX datetime that the data source was lasted updated.
Status (string) --
The status of the data source. When the status is ATIVE the data source is ready to use.
NextToken (string) --
If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of data sources.
Gets a list of FAQ lists associated with an index.
See also: AWS API Documentation
Request Syntax
response = client.list_faqs(
IndexId='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The index that contains the FAQ lists.
dict
Response Syntax
{
'NextToken': 'string',
'FaqSummaryItems': [
{
'Id': 'string',
'Name': 'string',
'Status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'FAILED',
'CreatedAt': datetime(2015, 1, 1),
'UpdatedAt': datetime(2015, 1, 1)
},
]
}
Response Structure
(dict) --
NextToken (string) --
The ListFaqs operation returns a page of FAQs at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Kendra returns the NextPage token. Include the token in the next request to the ListFaqs operation to return the next page of FAQs.
FaqSummaryItems (list) --
information about the FAQs associated with the specified index.
(dict) --
Provides information about a frequently asked questions and answer contained in an index.
Id (string) --
The unique identifier of the FAQ.
Name (string) --
The name that you assigned the FAQ when you created or updated the FAQ.
Status (string) --
The current status of the FAQ. When the status is ACTIVE the FAQ is ready for use.
CreatedAt (datetime) --
The UNIX datetime that the FAQ was added to the index.
UpdatedAt (datetime) --
The UNIX datetime that the FAQ was last updated.
Lists the Amazon Kendra indexes that you have created.
See also: AWS API Documentation
Request Syntax
response = client.list_indices(
NextToken='string',
MaxResults=123
)
dict
Response Syntax
{
'IndexConfigurationSummaryItems': [
{
'Name': 'string',
'Id': 'string',
'CreatedAt': datetime(2015, 1, 1),
'UpdatedAt': datetime(2015, 1, 1),
'Status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'SYSTEM_UPDATING'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
IndexConfigurationSummaryItems (list) --
An array of summary information for one or more indexes.
(dict) --
A summary of information about an index.
Name (string) --
The name of the index.
Id (string) --
A unique identifier for the index. Use this to identify the index when you are using operations such as Query , DescribeIndex , UpdateIndex , and DeleteIndex .
CreatedAt (datetime) --
The Unix timestamp when the index was created.
UpdatedAt (datetime) --
The Unix timestamp when the index was last updated by the UpdateIndex operation.
Status (string) --
The current status of the index. When the status is ACTIVE , the index is ready to search.
NextToken (string) --
If the response is truncated, Amazon Kendra returns this token that you can use in the subsequent request to retrieve the next set of indexes.
Searches an active index. Use this API to search your documents using query. The Query operation enables to do faceted search and to filter results based on document attributes.
It also enables you to provide user context that Amazon Kendra uses to enforce document access control in the search results.
Amazon Kendra searches your index for text content and question and answer (FAQ) content. By default the response contains three types of results.
You can specify that the query return only one type of result using the QueryResultTypeConfig parameter.
See also: AWS API Documentation
Request Syntax
response = client.query(
IndexId='string',
QueryText='string',
AttributeFilter={
'AndAllFilters': [
{'... recursive ...'},
],
'OrAllFilters': [
{'... recursive ...'},
],
'NotFilter': {'... recursive ...'},
'EqualsTo': {
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
'ContainsAll': {
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
'ContainsAny': {
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
'GreaterThan': {
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
'GreaterThanOrEquals': {
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
'LessThan': {
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
'LessThanOrEquals': {
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
}
},
Facets=[
{
'DocumentAttributeKey': 'string'
},
],
RequestedDocumentAttributes=[
'string',
],
QueryResultTypeFilter='DOCUMENT'|'QUESTION_ANSWER'|'ANSWER',
PageNumber=123,
PageSize=123
)
[REQUIRED]
The unique identifier of the index to search. The identifier is returned in the response from the operation.
[REQUIRED]
The text to search for.
Enables filtered searches based on document attributes. You can only provide one attribute filter; however, the AndAllFilters , NotFilter , and OrAllFilters parameters contain a list of other filters.
The AttributeFilter parameter enables you to create a set of filtering rules that a document must satisfy to be included in the query results.
Performs a logical AND operation on all supplied filters.
Provides filtering the query results based on document attributes.
Performs a logical OR operation on all supplied filters.
Provides filtering the query results based on document attributes.
Performs a logical NOT operation on all supplied filters.
Performs an equals operation on two document attributes.
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
Returns true when a document contains all of the specified document attributes.
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
Returns true when a document contains any of the specified document attributes.
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
Performs a greater than operation on two document attributes. Use with a document attribute of type Integer or Long .
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
Performs a greater or equals than operation on two document attributes. Use with a document attribute of type Integer or Long .
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
Performs a less than operation on two document attributes. Use with a document attribute of type Integer or Long .
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
Performs a less than or equals operation on two document attributes. Use with a document attribute of type Integer or Long .
The identifier for the attribute.
The value of the attribute.
A string, such as "department".
A list of strings.
A long integer value.
A date value expressed as seconds from the Unix epoch.
An array of documents attributes. Amazon Kendra returns a count for each attribute key specified. You can use this information to help narrow the search for your user.
Information a document attribute
The unique key for the document attribute.
An array of document attributes to include in the response. No other document attributes are included in the response. By default all document attributes are included in the response.
dict
Response Syntax
{
'QueryId': 'string',
'ResultItems': [
{
'Id': 'string',
'Type': 'DOCUMENT'|'QUESTION_ANSWER'|'ANSWER',
'AdditionalAttributes': [
{
'Key': 'string',
'ValueType': 'TEXT_WITH_HIGHLIGHTS_VALUE',
'Value': {
'TextWithHighlightsValue': {
'Text': 'string',
'Highlights': [
{
'BeginOffset': 123,
'EndOffset': 123,
'TopAnswer': True|False
},
]
}
}
},
],
'DocumentId': 'string',
'DocumentTitle': {
'Text': 'string',
'Highlights': [
{
'BeginOffset': 123,
'EndOffset': 123,
'TopAnswer': True|False
},
]
},
'DocumentExcerpt': {
'Text': 'string',
'Highlights': [
{
'BeginOffset': 123,
'EndOffset': 123,
'TopAnswer': True|False
},
]
},
'DocumentURI': 'string',
'DocumentAttributes': [
{
'Key': 'string',
'Value': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
}
},
]
},
],
'FacetResults': [
{
'DocumentAttributeKey': 'string',
'DocumentAttributeValueCountPairs': [
{
'DocumentAttributeValue': {
'StringValue': 'string',
'StringListValue': [
'string',
],
'LongValue': 123,
'DateValue': datetime(2015, 1, 1)
},
'Count': 123
},
]
},
],
'TotalNumberOfResults': 123
}
Response Structure
(dict) --
QueryId (string) --
The unique identifier for the search. You use QueryId to identify the search when using the feedback API.
ResultItems (list) --
The results of the search.
(dict) --
A single query result.
A query result contains information about a document returned by the query. This includes the original location of the document, a list of attributes assigned to the document, and relevant text from the document that satisfies the query.
Id (string) --
The unique identifier for the query result.
Type (string) --
The type of document.
AdditionalAttributes (list) --
(dict) --
Key (string) --
ValueType (string) --
Value (dict) --
TextWithHighlightsValue (dict) --
The text associated with the attribute and information about the highlight to apply to the text.
Text (string) --
The text to display to the user.
Highlights (list) --
The beginning and end of the text that should be highlighted.
(dict) --
Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.
BeginOffset (integer) --
The zero-based location in the response string where the highlight starts.
EndOffset (integer) --
The zero-based location in the response string where the highlight ends.
TopAnswer (boolean) --
Indicates whether the response is the best response. True if this is the best response; otherwise, false.
DocumentId (string) --
The unique identifier for the document.
DocumentTitle (dict) --
The title of the document. Contains the text of the title and information for highlighting the relevant terms in the title.
Text (string) --
The text to display to the user.
Highlights (list) --
The beginning and end of the text that should be highlighted.
(dict) --
Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.
BeginOffset (integer) --
The zero-based location in the response string where the highlight starts.
EndOffset (integer) --
The zero-based location in the response string where the highlight ends.
TopAnswer (boolean) --
Indicates whether the response is the best response. True if this is the best response; otherwise, false.
DocumentExcerpt (dict) --
An extract of the text in the document. Contains information about highlighting the relevant terms in the excerpt.
Text (string) --
The text to display to the user.
Highlights (list) --
The beginning and end of the text that should be highlighted.
(dict) --
Provides information that you can use to highlight a search result so that your users can quickly identify terms in the response.
BeginOffset (integer) --
The zero-based location in the response string where the highlight starts.
EndOffset (integer) --
The zero-based location in the response string where the highlight ends.
TopAnswer (boolean) --
Indicates whether the response is the best response. True if this is the best response; otherwise, false.
DocumentURI (string) --
The URI of the original location of the document.
DocumentAttributes (list) --
An array of document attributes for the document that the query result maps to. For example, the document author (Author) or the source URI (SourceUri) of the document.
(dict) --
A custom attribute value assigned to a document.
Key (string) --
The identifier for the attribute.
Value (dict) --
The value of the attribute.
StringValue (string) --
A string, such as "department".
StringListValue (list) --
A list of strings.
LongValue (integer) --
A long integer value.
DateValue (datetime) --
A date value expressed as seconds from the Unix epoch.
FacetResults (list) --
Contains the facet results. A FacetResult contains the counts for each attribute key that was specified in the Facets input parameter.
(dict) --
The facet values for the documents in the response.
DocumentAttributeKey (string) --
The key for the facet values. This is the same as the DocumentAttributeKey provided in the query.
DocumentAttributeValueCountPairs (list) --
An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.
(dict) --
Provides the count of documents that match a particular attribute when doing a faceted search.
DocumentAttributeValue (dict) --
The value of the attribute. For example, "HR."
StringValue (string) --
A string, such as "department".
StringListValue (list) --
A list of strings.
LongValue (integer) --
A long integer value.
DateValue (datetime) --
A date value expressed as seconds from the Unix epoch.
Count (integer) --
The number of documents in the response that have the attribute value for the key.
TotalNumberOfResults (integer) --
The number of items returned by the search. Use this to determine when you have requested the last set of results.
Starts a synchronization job for a data source. If a synchronization job is already in progress, Amazon Kendra returns a ResourceInUseException exception.
See also: AWS API Documentation
Request Syntax
response = client.start_data_source_sync_job(
Id='string',
IndexId='string'
)
[REQUIRED]
The identifier of the data source to synchronize.
[REQUIRED]
The identifier of the index that contains the data source.
dict
Response Syntax
{
'ExecutionId': 'string'
}
Response Structure
(dict) --
ExecutionId (string) --
Identifies a particular synchronization job.
Stops a running synchronization job. You can't stop a scheduled synchronization job.
See also: AWS API Documentation
Request Syntax
response = client.stop_data_source_sync_job(
Id='string',
IndexId='string'
)
[REQUIRED]
The identifier of the data source for which to stop the synchronization jobs.
[REQUIRED]
The identifier of the index that contains the data source.
None
Enables you to provide feedback to Amazon Kendra to improve the performance of the service.
See also: AWS API Documentation
Request Syntax
response = client.submit_feedback(
IndexId='string',
QueryId='string',
ClickFeedbackItems=[
{
'ResultId': 'string',
'ClickTime': datetime(2015, 1, 1)
},
],
RelevanceFeedbackItems=[
{
'ResultId': 'string',
'RelevanceValue': 'RELEVANT'|'NOT_RELEVANT'
},
]
)
[REQUIRED]
The identifier of the index that was queried.
[REQUIRED]
The identifier of the specific query for which you are submitting feedback. The query ID is returned in the response to the operation.
Tells Amazon Kendra that a particular search result link was chosen by the user.
Gathers information about when a particular result was clicked by a user. Your application uses the SubmitFeedback operation to provide click information.
The unique identifier of the search result that was clicked.
The Unix timestamp of the data and time that the result was clicked.
Provides Amazon Kendra with relevant or not relevant feedback for whether a particular item was relevant to the search.
Provides feedback on how relevant a document is to a search. Your application uses the SubmitFeedback operation to provide relevance information.
The unique identifier of the search result that the user provided relevance feedback for.
Whether to document was relevant or not relevant to the search.
None
Updates an existing Amazon Kendra data source.
See also: AWS API Documentation
Request Syntax
response = client.update_data_source(
Id='string',
Name='string',
IndexId='string',
Configuration={
'S3Configuration': {
'BucketName': 'string',
'InclusionPrefixes': [
'string',
],
'ExclusionPatterns': [
'string',
],
'DocumentsMetadataConfiguration': {
'S3Prefix': 'string'
},
'AccessControlListConfiguration': {
'KeyPath': 'string'
}
},
'SharePointConfiguration': {
'SharePointVersion': 'SHAREPOINT_ONLINE',
'Urls': [
'string',
],
'SecretArn': 'string',
'CrawlAttachments': True|False,
'VpcConfiguration': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'FieldMappings': [
{
'DataSourceFieldName': 'string',
'DateFieldFormat': 'string',
'IndexFieldName': 'string'
},
]
},
'DatabaseConfiguration': {
'DatabaseEngineType': 'RDS_AURORA_MYSQL'|'RDS_AURORA_POSTGRESQL'|'RDS_MYSQL'|'RDS_POSTGRESQL',
'ConnectionConfiguration': {
'DatabaseHost': 'string',
'DatabasePort': 123,
'DatabaseName': 'string',
'TableName': 'string',
'SecretArn': 'string'
},
'VpcConfiguration': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
'ColumnConfiguration': {
'DocumentIdColumnName': 'string',
'DocumentDataColumnName': 'string',
'DocumentTitleColumnName': 'string',
'FieldMappings': [
{
'DataSourceFieldName': 'string',
'DateFieldFormat': 'string',
'IndexFieldName': 'string'
},
],
'ChangeDetectingColumns': [
'string',
]
},
'AclConfiguration': {
'AllowedGroupsColumnName': 'string'
}
}
},
Description='string',
Schedule='string',
RoleArn='string'
)
[REQUIRED]
The unique identifier of the data source to update.
[REQUIRED]
The identifier of the index that contains the data source to update.
Configuration information for a Amazon Kendra data source.
Provides information to create a connector for a document repository in an Amazon S3 bucket.
The name of the bucket that contains the documents.
A list of S3 prefixes for the documents that should be included in the index.
A list of glob patterns for documents that should not be indexed. If a document that matches an inclusion prefix also matches an exclusion pattern, the document is not indexed.
For more information about glob patterns, see glob (programming) in Wikipedia .
Document metadata files that contain information such as the document access control information, source URI, document author, and custom attributes. Each metadata file contains metadata about a single document.
A prefix used to filter metadata configuration files in the AWS S3 bucket. The S3 bucket might contain multiple metadata files. Use S3Prefix to include only the desired metadata files.
Provides the path to the S3 bucket that contains the user context filtering files for the data source.
Path to the AWS S3 bucket that contains the ACL files.
Provides information necessary to create a connector for a Microsoft SharePoint site.
The version of Microsoft SharePoint that you are using as a data source.
The URLs of the Microsoft SharePoint site that contains the documents that should be indexed.
The Amazon Resource Name (ARN) of credentials stored in AWS Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Microsoft SharePoint Data Source . For more information about AWS Secrets Manager, see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.
TRUE to include attachments to documents stored in your Microsoft SharePoint site in the index; otherwise, FALSE .
Provides information for connecting to an Amazon VPC.
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
A list of DataSourceToIndexFieldMapping objects that map Microsoft SharePoint attributes to custom fields in the Amazon Kendra index. You must first create the index fields using the operation before you map SharePoint attributes. For more information, see Mapping Data Source Fields .
Maps a column or attribute in the data source to an index field. You must first create the fields in the index using the UpdateIndex operation.
The name of the column or attribute in the data source.
The type of data stored in the column or attribute.
The name of the field in the index.
Provides information necessary to create a connector for a database.
The type of database engine that runs the database.
The information necessary to connect to a database.
The name of the host for the database. Can be either a string (host.subdomain.domain.tld) or an IPv4 or IPv6 address.
The port that the database uses for connections.
The name of the database containing the document data.
The name of the table that contains the document data.
The Amazon Resource Name (ARN) of credentials stored in AWS Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Database Data Source . For more information about AWS Secrets Manager, see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.
Provides information for connecting to an Amazon VPC.
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
Information about where the index should get the document information from the database.
The column that provides the document's unique identifier.
The column that contains the contents of the document.
The column that contains the title of the document.
An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the UpdateIndex operation.
Maps a column or attribute in the data source to an index field. You must first create the fields in the index using the UpdateIndex operation.
The name of the column or attribute in the data source.
The type of data stored in the column or attribute.
The name of the field in the index.
One to five columns that indicate when a document in the database has changed.
Information about the database column that provides information for user context filtering.
A list of groups, separated by semi-colons, that filters a query response based on user context. The document is only returned to users that are in one of the groups specified in the UserContext field of the Query operation.
None
Updates an existing Amazon Kendra index.
See also: AWS API Documentation
Request Syntax
response = client.update_index(
Id='string',
Name='string',
RoleArn='string',
Description='string',
DocumentMetadataConfigurationUpdates=[
{
'Name': 'string',
'Type': 'STRING_VALUE'|'STRING_LIST_VALUE'|'LONG_VALUE'|'DATE_VALUE',
'Relevance': {
'Freshness': True|False,
'Importance': 123,
'Duration': 'string',
'RankOrder': 'ASCENDING'|'DESCENDING',
'ValueImportanceMap': {
'string': 123
}
},
'Search': {
'Facetable': True|False,
'Searchable': True|False,
'Displayable': True|False
}
},
]
)
[REQUIRED]
The identifier of the index to update.
The document metadata to update.
Specifies the properties of a custom index field.
The name of the index field.
The data type of the index field.
Provides manual tuning parameters to determine how the field affects the search results.
Indicates that this field determines how "fresh" a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is "fresher" than document 2. You can only set the Freshness field on one DATE type field. Only applies to DATE fields.
The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.
Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use "2628000s". Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don't specify a value, the default is 3 months. The value of the field is a numeric string followed by the character "s", for example "86400s" for one day, or "604800s" for one week.
Only applies to DATE fields.
Determines how values should be interpreted.
When the RankOrder field is ASCENDING , higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1.
When the RankOrder field is DESCENDING , lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task.
Only applies to LONG and DOUBLE fields.
A list of values that should be given a different boost when they appear in the result list. For example, if you are boosting a field called "department," query terms that match the department field are boosted in the result. However, you can add entries from the department field to boost documents with those values higher.
For example, you can add entries to the map with names of departments. If you add "HR",5 and "Legal",3 those departments are given special attention when they appear in the metadata of a document. When those terms appear they are given the specified importance instead of the regular importance for the boost.
Provides information about how the field is used during a search.
Indicates that the field can be used to create search facets, a count of results for each value in the field. The default is false .
Determines whether the field is used in the search. If the Searchable field is true , you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default is true for string fields and false for number and date fields.
Determines whether the field is returned in the query response. The default is true .
None
The available paginators are: