QApps / Client / import_document

import_document#

QApps.Client.import_document(**kwargs)#

Uploads a file that can then be used either as a default in a FileUploadCard from Q App definition or as a file that is used inside a single Q App run. The purpose of the document is determined by a scope parameter that indicates whether it is at the app definition level or at the app session level.

See also: AWS API Documentation

Request Syntax

response = client.import_document(
    instanceId='string',
    cardId='string',
    appId='string',
    fileContentsBase64='string',
    fileName='string',
    scope='APPLICATION'|'SESSION',
    sessionId='string'
)
Parameters:
  • instanceId (string) –

    [REQUIRED]

    The unique identifier of the Amazon Q Business application environment instance.

  • cardId (string) –

    [REQUIRED]

    The unique identifier of the card the file is associated with, if applicable.

  • appId (string) –

    [REQUIRED]

    The unique identifier of the Q App the file is associated with.

  • fileContentsBase64 (string) –

    [REQUIRED]

    The base64-encoded contents of the file to upload.

  • fileName (string) –

    [REQUIRED]

    The name of the file being uploaded.

  • scope (string) –

    [REQUIRED]

    Whether the file is associated with an Q App definition or a specific Q App session.

  • sessionId (string) – The unique identifier of the Q App session the file is associated with, if applicable.

Return type:

dict

Returns:

Response Syntax

{
    'fileId': 'string'
}

Response Structure

  • (dict) –

    • fileId (string) –

      The unique identifier assigned to the uploaded file.

Exceptions