associatePersonasToEntities method
Defines the specific permissions of users or groups in your IAM Identity Center identity source with access to your Amazon Kendra experience. You can create an Amazon Kendra experience such as a search application. For more information on creating a search application experience, see Building a search experience with no code.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceAlreadyExistException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter id :
The identifier of your Amazon Kendra experience.
Parameter indexId :
The identifier of the index for your Amazon Kendra experience.
Parameter personas :
The personas that define the specific permissions of users or groups in
your IAM Identity Center identity source. The available personas or access
roles are Owner and Viewer. For more information
on these personas, see Providing
access to your search page.
Implementation
Future<AssociatePersonasToEntitiesResponse> associatePersonasToEntities({
required String id,
required String indexId,
required List<EntityPersonaConfiguration> personas,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSKendraFrontendService.AssociatePersonasToEntities'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Id': id,
'IndexId': indexId,
'Personas': personas,
},
);
return AssociatePersonasToEntitiesResponse.fromJson(jsonResponse.body);
}