amazonka-kendra-2.0: Amazon KendraFrontendService SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Kendra.Types.UserContext

Description

 
Synopsis

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.

Constructors

UserContext' 

Fields

  • dataSourceGroups :: Maybe (NonEmpty DataSourceGroup)

    The list of data source groups you want to filter search results based on groups' access to documents in that data source.

  • groups :: Maybe (NonEmpty Text)

    The list of groups you want to filter search results based on the groups' access to documents.

  • token :: Maybe Text

    The user context token for filtering search results for a user. It must be a JWT or a JSON token.

  • userId :: Maybe Text

    The identifier of the user you want to filter search results based on their access to documents.

Instances

Instances details
ToJSON UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

Generic UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

Associated Types

type Rep UserContext :: Type -> Type #

Read UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

Show UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

NFData UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

Methods

rnf :: UserContext -> () #

Eq UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

Hashable UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

type Rep UserContext Source # 
Instance details

Defined in Amazonka.Kendra.Types.UserContext

type Rep UserContext = D1 ('MetaData "UserContext" "Amazonka.Kendra.Types.UserContext" "amazonka-kendra-2.0-IHloXAWlYIS8YTp1gXe6J" 'False) (C1 ('MetaCons "UserContext'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dataSourceGroups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty DataSourceGroup))) :*: S1 ('MetaSel ('Just "groups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Text)))) :*: (S1 ('MetaSel ('Just "token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "userId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

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.