check_document_access
¶
check_document_access(
application_id: ApplicationId,
index_id: IndexId,
user_id: String,
document_id: DocumentId,
*,
config_overrides: Optional[QBusinessClientConfig] = None,
data_source_id: Optional[DataSourceId] = None,
) -> CheckDocumentAccessResponse
Verifies if a user has access permissions for a specified document and returns the actual ACL attached to the document. Resolves user access on the document via user aliases and groups when verifying user access.
Parameters:
-
application_id(ApplicationId) –The unique identifier of the application. This is required to identify the specific Amazon Q Business application context for the document access check.
-
index_id(IndexId) –The unique identifier of the index. Used to locate the correct index within the application where the document is stored.
-
user_id(String) –The unique identifier of the user. Used to check the access permissions for this specific user against the document's ACL.
-
document_id(DocumentId) –The unique identifier of the document. Specifies which document's access permissions are being checked.
-
data_source_id(Optional[DataSourceId], default:None) –The unique identifier of the data source. Identifies the specific data source from which the document originates. Should not be used when a document is uploaded directly with BatchPutDocument, as no dataSourceId is available or necessary.
Raises:
-
AccessDeniedException–You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.
-
InternalServerException–An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact Support for help.
-
ResourceNotFoundException–The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.
-
ThrottlingException–The request was denied due to throttling. Reduce the number of requests and try again.
-
ValidationException–The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.
-
UnknownServiceError–The service returned an error code this client does not model.