Skip to content

Qbusiness  >  Operations  >  check_document_access

check_document_access

Operation

check_document_access async

check_document_access(input: CheckDocumentAccessInput, plugins: list[Plugin] | None = None) -> CheckDocumentAccessOutput

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:

Name Type Description Default
input CheckDocumentAccessInput

An instance of CheckDocumentAccessInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CheckDocumentAccessOutput

An instance of CheckDocumentAccessOutput.

Input

CheckDocumentAccessInput dataclass

Dataclass for CheckDocumentAccessInput structure.

Attributes

application_id class-attribute instance-attribute
application_id: str | None = None

The unique identifier of the application. This is required to identify the specific Amazon Q Business application context for the document access check.

data_source_id class-attribute instance-attribute
data_source_id: str | None = 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.

document_id class-attribute instance-attribute
document_id: str | None = None

The unique identifier of the document. Specifies which document's access permissions are being checked.

index_id class-attribute instance-attribute
index_id: str | None = None

The unique identifier of the index. Used to locate the correct index within the application where the document is stored.

user_id class-attribute instance-attribute
user_id: str | None = None

The unique identifier of the user. Used to check the access permissions for this specific user against the document's ACL.

Output

CheckDocumentAccessOutput dataclass

Dataclass for CheckDocumentAccessOutput structure.

Attributes

document_acl class-attribute instance-attribute
document_acl: DocumentAcl | None = None

The Access Control List (ACL) associated with the document. Includes allowlist and denylist conditions that determine user access.

has_access class-attribute instance-attribute
has_access: bool | None = None

A boolean value indicating whether the specified user has access to the document, either direct access or transitive access via groups and aliases attached to the document.

user_aliases class-attribute instance-attribute
user_aliases: list[AssociatedUser] | None = None

An array of aliases associated with the user. This includes both global and local aliases, each with a name and type.

user_groups class-attribute instance-attribute
user_groups: list[AssociatedGroup] | None = None

An array of groups the user is part of for the specified data source. Each group has a name and type.