listAccessControlConfigurations method
Lists one or more access control configurations for an index. This includes user and group access information for your documents. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter indexId :
The identifier of the index for the access control configuration.
Parameter maxResults :
The maximum number of access control configurations to return.
Parameter nextToken :
If the previous response was incomplete (because there's more data to
retrieve), Amazon Kendra returns a pagination token in the response. You
can use this pagination token to retrieve the next set of access control
configurations.
Implementation
Future<ListAccessControlConfigurationsResponse>
listAccessControlConfigurations({
required String indexId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSKendraFrontendService.ListAccessControlConfigurations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'IndexId': indexId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListAccessControlConfigurationsResponse.fromJson(jsonResponse.body);
}