create_thesaurus
(**kwargs)¶Creates a thesaurus for an index. The thesaurus contains a list of synonyms in Solr format.
For an example of adding a thesaurus file to an index, see Adding custom synonyms to an index.
See also: AWS API Documentation
Request Syntax
response = client.create_thesaurus(
IndexId='string',
Name='string',
Description='string',
RoleArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
SourceS3Path={
'Bucket': 'string',
'Key': 'string'
},
ClientToken='string'
)
[REQUIRED]
The identifier of the index for the thesaurus.
[REQUIRED]
A name for the thesaurus.
[REQUIRED]
An IAM role that gives Amazon Kendra permissions to access thesaurus file specified in SourceS3Path
.
A list of key-value pairs that identify the thesaurus. You can use the tags to identify and organize your resources and to control access to resources.
A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ, or data source.
The value associated with the tag. The value may be an empty string but it can't be null.
[REQUIRED]
The path to the thesaurus file in S3.
The name of the S3 bucket that contains the file.
The name of the file.
A token that you provide to identify the request to create a thesaurus. Multiple calls to the CreateThesaurus
API with the same client token will create only one thesaurus.
This field is autopopulated if not provided.
dict
Response Syntax
{
'Id': 'string'
}
Response Structure
(dict) --
Id (string) --
The identifier of the thesaurus.
Exceptions
kendra.Client.exceptions.ValidationException
kendra.Client.exceptions.ConflictException
kendra.Client.exceptions.ResourceNotFoundException
kendra.Client.exceptions.ThrottlingException
kendra.Client.exceptions.ServiceQuotaExceededException
kendra.Client.exceptions.AccessDeniedException
kendra.Client.exceptions.InternalServerException