updateThesaurus method
Updates a thesaurus for an index.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter id :
The identifier of the thesaurus you want to update.
Parameter indexId :
The identifier of the index for the thesaurus.
Parameter description :
A new description for the thesaurus.
Parameter name :
A new name for the thesaurus.
Parameter roleArn :
An IAM role that gives Amazon Kendra permissions to access thesaurus file
specified in SourceS3Path.
Implementation
Future<void> updateThesaurus({
required String id,
required String indexId,
String? description,
String? name,
String? roleArn,
S3Path? sourceS3Path,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSKendraFrontendService.UpdateThesaurus'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Id': id,
'IndexId': indexId,
if (description != null) 'Description': description,
if (name != null) 'Name': name,
if (roleArn != null) 'RoleArn': roleArn,
if (sourceS3Path != null) 'SourceS3Path': sourceS3Path,
},
);
}