kendra / Client / update_access_control_configuration
update_access_control_configuration#
- kendra.Client.update_access_control_configuration(**kwargs)#
Updates an access control configuration for your documents in 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.
You can update an access control configuration you created without indexing all of your documents again. For example, your index contains top-secret company documents that only certain employees or users should access. You created an ‘allow’ access control configuration for one user who recently joined the ‘top-secret’ team, switching from a team with ‘deny’ access to top-secret documents. However, the user suddenly returns to their previous team and should no longer have access to top secret documents. You can update the access control configuration to re-configure access control for your documents as circumstances change.
You call the BatchPutDocument API to apply the updated access control configuration, with the
AccessControlConfigurationId
included in the Document object. If you use an S3 bucket as a data source, you synchronize your data source to apply theAccessControlConfigurationId
in the.metadata.json
file. Amazon Kendra currently only supports access control configuration for S3 data sources and documents indexed using theBatchPutDocument
API.Warning
You can’t configure access control using
CreateAccessControlConfiguration
for an Amazon Kendra Gen AI Enterprise Edition index. Amazon Kendra will return aValidationException
error for aGen_AI_ENTERPRISE_EDITION
index.See also: AWS API Documentation
Request Syntax
response = client.update_access_control_configuration( IndexId='string', Id='string', Name='string', Description='string', AccessControlList=[ { 'Name': 'string', 'Type': 'USER'|'GROUP', 'Access': 'ALLOW'|'DENY', 'DataSourceId': 'string' }, ], HierarchicalAccessControlList=[ { 'PrincipalList': [ { 'Name': 'string', 'Type': 'USER'|'GROUP', 'Access': 'ALLOW'|'DENY', 'DataSourceId': 'string' }, ] }, ] )
- Parameters:
IndexId (string) –
[REQUIRED]
The identifier of the index for an access control configuration.
Id (string) –
[REQUIRED]
The identifier of the access control configuration you want to update.
Name (string) – A new name for the access control configuration.
Description (string) – A new description for the access control configuration.
AccessControlList (list) –
Information you want to update on principals (users and/or groups) and which documents they should have access to. This is useful for user context filtering, where search results are filtered based on the user or their group access to documents.
(dict) –
Provides user and group information for user context filtering.
Name (string) – [REQUIRED]
The name of the user or group.
Type (string) – [REQUIRED]
The type of principal.
Access (string) – [REQUIRED]
Whether to allow or deny document access to the principal.
DataSourceId (string) –
The identifier of the data source the principal should access documents from.
HierarchicalAccessControlList (list) –
The updated list of principal lists that define the hierarchy for which documents users should have access to.
(dict) –
Information to define the hierarchy for which documents users should have access to.
PrincipalList (list) – [REQUIRED]
A list of principal lists that define the hierarchy for which documents users should have access to. Each hierarchical list specifies which user or group has allow or deny access for each document.
(dict) –
Provides user and group information for user context filtering.
Name (string) – [REQUIRED]
The name of the user or group.
Type (string) – [REQUIRED]
The type of principal.
Access (string) – [REQUIRED]
Whether to allow or deny document access to the principal.
DataSourceId (string) –
The identifier of the data source the principal should access documents from.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
kendra.Client.exceptions.ValidationException
kendra.Client.exceptions.ThrottlingException
kendra.Client.exceptions.ConflictException
kendra.Client.exceptions.ResourceNotFoundException
kendra.Client.exceptions.AccessDeniedException
kendra.Client.exceptions.ServiceQuotaExceededException
kendra.Client.exceptions.InternalServerException