create_thesaurus
async
¶
create_thesaurus(
index_id: IndexId,
name: ThesaurusName,
role_arn: RoleArn,
source_s3_path: S3Path,
*,
config_overrides: Optional[AsynckendraClientConfig] = None,
description: Optional[Description] = None,
tags: Optional[TagList] = None,
client_token: Optional[ClientTokenName] = None,
) -> CreateThesaurusResponse
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.
Parameters:
-
index_id(IndexId) –The identifier of the index for the thesaurus.
-
name(ThesaurusName) –A name for the thesaurus.
-
description(Optional[Description], default:None) –A description for the thesaurus.
-
role_arn(RoleArn) –The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket that contains the thesaurus file. For more information, see IAM access roles for Amazon Kendra.
-
tags(Optional[TagList], default:None) –A list of key-value pairs that identify or categorize the thesaurus. You can also use tags to help control access to the thesaurus. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
-
source_s3_path(S3Path) –The path to the thesaurus file in S3.
-
client_token(Optional[ClientTokenName], default:None) –A token that you provide to identify the request to create a thesaurus. Multiple calls to the
CreateThesaurusAPI with the same client token will create only one thesaurus.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action. Please ensure you have the required permission policies and user accounts and try again.
-
ConflictException–A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
-
InternalServerException–An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes and try again, or contact Support for help.
-
ResourceNotFoundException–The resource you want to use doesn’t exist. Please check you have provided the correct resource and try again.
-
ServiceQuotaExceededException– -
ThrottlingException–The request was denied due to request throttling. Please reduce the number of requests and try again.
-
ValidationException–The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct input and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_kendra/_services/async_kendra.py
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 | |