userContextPolicy
The user context policy.
If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use ATTRIBUTE_FILTER
to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use USER_TOKEN
to configure user context policy, Amazon Kendra returns a ValidationException
error.
ATTRIBUTE_FILTER
All indexed content is searchable and displayable for all users. If you want to filter search results on user context, you can use the attribute filters of _user_id
and _group_ids
or you can provide user and group information in UserContext
.
USER_TOKEN
Enables token-based user access control to filter search results on user context. All documents with no access control and all documents accessible to the user will be searchable and displayable.