AgentsforBedrockRuntime / Client / check_ingested_document_acl

check_ingested_document_acl

AgentsforBedrockRuntime.Client.check_ingested_document_acl(**kwargs)

Checks whether a user has access to a specific document by verifying against the ingested access control list (ACL) in a knowledge base. Use this operation to validate that document-level access control is working as expected after ingestion. To use this operation, you must have the bedrock:CheckIngestedDocumentAcl permission.

See also: AWS API Documentation

Request Syntax

response = client.check_ingested_document_acl(
    dataSourceId='string',
    documentId='string',
    knowledgeBaseId='string',
    userContext={
        'userId': 'string'
    }
)
Parameters:
  • dataSourceId (string) –

    [REQUIRED]

    The unique identifier of the data source that contains the document.

  • documentId (string) –

    [REQUIRED]

    The unique identifier of the document to check access for.

  • knowledgeBaseId (string) –

    [REQUIRED]

    The unique identifier of the knowledge base that contains the document.

  • userContext (dict) –

    [REQUIRED]

    The context object containing identity information for access control filtering, including user ID and optional group memberships used to evaluate the document access control list (ACL).

    • userId (string) – [REQUIRED]

      The identifier of the user making the retrieval request.

Return type:

dict

Returns:

Response Syntax

{
    'hasAccess': True|False
}

Response Structure

  • (dict) –

    • hasAccess (boolean) –

      Specifies whether the user has access to the document based on the ingested access control list (ACL). Returns true if the user is allowed access, and false otherwise.

Exceptions

  • AgentsforBedrockRuntime.Client.exceptions.ResourceNotFoundException

  • AgentsforBedrockRuntime.Client.exceptions.ValidationException

  • AgentsforBedrockRuntime.Client.exceptions.InternalServerException

  • AgentsforBedrockRuntime.Client.exceptions.ThrottlingException

  • AgentsforBedrockRuntime.Client.exceptions.AccessDeniedException