Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data UserContext = UserContext' {}
- newUserContext :: UserContext
- userContext_dataSourceGroups :: Lens' UserContext (Maybe (NonEmpty DataSourceGroup))
- userContext_groups :: Lens' UserContext (Maybe (NonEmpty Text))
- userContext_token :: Lens' UserContext (Maybe Text)
- userContext_userId :: Lens' UserContext (Maybe Text)
Documentation
data UserContext Source #
Provides information about the user context for an Amazon Kendra index.
User context filtering is a kind of personalized search with the benefit of controlling access to documents. For example, not all teams that search the company portal for information should access top-secret company documents, nor are these documents relevant to all users. Only specific users or groups of teams given access to top-secret documents should see these documents in their search results.
You provide one of the following:
- User token
- User ID, the groups the user belongs to, and any data sources the groups can access.
If you provide both, an exception is thrown.
See: newUserContext
smart constructor.
UserContext' | |
|
Instances
newUserContext :: UserContext Source #
Create a value of UserContext
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dataSourceGroups:UserContext'
, userContext_dataSourceGroups
- The list of data source groups you want to filter search results based
on groups' access to documents in that data source.
$sel:groups:UserContext'
, userContext_groups
- The list of groups you want to filter search results based on the
groups' access to documents.
$sel:token:UserContext'
, userContext_token
- The user context token for filtering search results for a user. It must
be a JWT or a JSON token.
$sel:userId:UserContext'
, userContext_userId
- The identifier of the user you want to filter search results based on
their access to documents.
userContext_dataSourceGroups :: Lens' UserContext (Maybe (NonEmpty DataSourceGroup)) Source #
The list of data source groups you want to filter search results based on groups' access to documents in that data source.
userContext_groups :: Lens' UserContext (Maybe (NonEmpty Text)) Source #
The list of groups you want to filter search results based on the groups' access to documents.
userContext_token :: Lens' UserContext (Maybe Text) Source #
The user context token for filtering search results for a user. It must be a JWT or a JSON token.
userContext_userId :: Lens' UserContext (Maybe Text) Source #
The identifier of the user you want to filter search results based on their access to documents.