Skip to content

check_document_access

Operation

check_document_access

check_document_access(request: CheckDocumentAccessInput | CheckDocumentAccessInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CheckDocumentAccessInputDict]) -> 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
request CheckDocumentAccessInput | CheckDocumentAccessInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[CheckDocumentAccessInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CheckDocumentAccessOutput

An instance of CheckDocumentAccessOutput.

check_document_access async

check_document_access(request: CheckDocumentAccessInput | CheckDocumentAccessInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CheckDocumentAccessInputDict]) -> 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
request CheckDocumentAccessInput | CheckDocumentAccessInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[CheckDocumentAccessInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CheckDocumentAccessOutput

An instance of CheckDocumentAccessOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CheckDocumentAccessInputDict

Bases: TypedDict

Dictionary form of CheckDocumentAccessInput.

Attributes

application_id instance-attribute
application_id: Required[str]

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 instance-attribute
data_source_id: str | 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 instance-attribute
document_id: Required[str]

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

index_id instance-attribute
index_id: Required[str]

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

user_id instance-attribute
user_id: Required[str]

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

CheckDocumentAccessInput dataclass

Bases: _SerdeShape

Dataclass for CheckDocumentAccessInput structure.

Attributes

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

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 = ...

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 = ...

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 = ...

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

Output

CheckDocumentAccessOutput dataclass

Bases: _SerdeShape

Dataclass for CheckDocumentAccessOutput structure.

Attributes

document_acl class-attribute instance-attribute
document_acl: DocumentAcl | 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 = ...

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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

user_aliases class-attribute instance-attribute
user_aliases: list[AssociatedUser] | 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 = ...

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