Class: Aws::Kendra::Types::UserContext

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb

Overview

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.

If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can use UserId, Groups, and DataSourceGroups to filter content. If you set the UserId to a particular user ID, it also includes all public documents.

Amazon Kendra Gen AI Enterprise Edition indices don't support token based document filtering. If you're using an Amazon Kendra Gen AI Enterprise Edition index, Amazon Kendra returns a ValidationException error if the Token field has a non-null value.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#data_source_groupsArray<Types::DataSourceGroup>

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

Returns:



11111
11112
11113
11114
11115
11116
11117
11118
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 11111

class UserContext < Struct.new(
  :token,
  :user_id,
  :groups,
  :data_source_groups)
  SENSITIVE = []
  include Aws::Structure
end

#groupsArray<String>

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

Returns:

  • (Array<String>)


11111
11112
11113
11114
11115
11116
11117
11118
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 11111

class UserContext < Struct.new(
  :token,
  :user_id,
  :groups,
  :data_source_groups)
  SENSITIVE = []
  include Aws::Structure
end

#tokenString

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

Returns:

  • (String)


11111
11112
11113
11114
11115
11116
11117
11118
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 11111

class UserContext < Struct.new(
  :token,
  :user_id,
  :groups,
  :data_source_groups)
  SENSITIVE = []
  include Aws::Structure
end

#user_idString

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

Returns:

  • (String)


11111
11112
11113
11114
11115
11116
11117
11118
# File 'gems/aws-sdk-kendra/lib/aws-sdk-kendra/types.rb', line 11111

class UserContext < Struct.new(
  :token,
  :user_id,
  :groups,
  :data_source_groups)
  SENSITIVE = []
  include Aws::Structure
end