create_faq
async
¶
create_faq(
index_id: IndexId,
name: FaqName,
s3_path: S3Path,
role_arn: RoleArn,
*,
config_overrides: Optional[AsynckendraClientConfig] = None,
description: Optional[Description] = None,
tags: Optional[TagList] = None,
file_format: Optional[FaqFileFormat] = None,
client_token: Optional[ClientTokenName] = None,
language_code: Optional[LanguageCode] = None,
) -> CreateFaqResponse
Creates a set of frequently ask questions (FAQs) using a specified FAQ file stored in an Amazon S3 bucket.
Adding FAQs to an index is an asynchronous operation.
For an example of adding an FAQ to an index using Python and Java SDKs, see Using your FAQ file.
Parameters:
-
index_id(IndexId) –The identifier of the index for the FAQ.
-
name(FaqName) –A name for the FAQ.
-
description(Optional[Description], default:None) –A description for the FAQ.
-
s3_path(S3Path) –The path to the FAQ file in S3.
-
role_arn(RoleArn) –The Amazon Resource Name (ARN) of an IAM role with permission to access the S3 bucket that contains the FAQ file. For more information, see IAM access roles for Amazon Kendra.
-
tags(Optional[TagList], default:None) –A list of key-value pairs that identify the FAQ. You can use the tags to identify and organize your resources and to control access to resources.
-
file_format(Optional[FaqFileFormat], default:None) –The format of the FAQ input file. You can choose between a basic CSV format, a CSV format that includes customs attributes in a header, and a JSON format that includes custom attributes.
The default format is CSV.
The format must match the format of the file stored in the S3 bucket identified in the
S3Pathparameter.For more information, see Adding questions and answers.
-
client_token(Optional[ClientTokenName], default:None) –A token that you provide to identify the request to create a FAQ. Multiple calls to the
CreateFaqRequestAPI with the same client token will create only one FAQ. -
language_code(Optional[LanguageCode], default:None) –The code for a language. This allows you to support a language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English.
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
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 | |