QBusiness / Client / list_attachments

list_attachments#

QBusiness.Client.list_attachments(**kwargs)#

Gets a list of attachments associated with an Amazon Q Business web experience or a list of attachements associated with a specific Amazon Q Business conversation.

See also: AWS API Documentation

Request Syntax

response = client.list_attachments(
    applicationId='string',
    conversationId='string',
    userId='string',
    nextToken='string',
    maxResults=123
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The unique identifier for the Amazon Q Business application.

  • conversationId (string) – The unique identifier of the Amazon Q Business web experience conversation.

  • userId (string) – The unique identifier of the user involved in the Amazon Q Business web experience conversation.

  • nextToken (string) – If the number of attachments returned exceeds maxResults, Amazon Q Business returns a next token as a pagination token to retrieve the next set of attachments.

  • maxResults (integer) – The maximum number of attachements to return.

Return type:

dict

Returns:

Response Syntax

{
    'attachments': [
        {
            'attachmentId': 'string',
            'conversationId': 'string',
            'name': 'string',
            'copyFrom': {
                'conversation': {
                    'conversationId': 'string',
                    'attachmentId': 'string'
                }
            },
            'fileType': 'string',
            'fileSize': 123,
            'md5chksum': 'string',
            'createdAt': datetime(2015, 1, 1),
            'status': 'FAILED'|'SUCCESS',
            'error': {
                'errorMessage': 'string',
                'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • attachments (list) –

      An array of information on one or more attachments.

      • (dict) –

        An attachment in an Amazon Q Business conversation.

        • attachmentId (string) –

          The identifier of the Amazon Q Business attachment.

        • conversationId (string) –

          The identifier of the Amazon Q Business conversation the attachment is associated with.

        • name (string) –

          Filename of the Amazon Q Business attachment.

        • copyFrom (dict) –

          A CopyFromSource containing a reference to the original source of the Amazon Q Business attachment.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: conversation. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          
          • conversation (dict) –

            A reference to an attachment in an existing conversation.

            • conversationId (string) –

              The unique identifier of the Amazon Q Business conversation.

            • attachmentId (string) –

              The unique identifier of the Amazon Q Business attachment.

        • fileType (string) –

          Filetype of the Amazon Q Business attachment.

        • fileSize (integer) –

          Size in bytes of the Amazon Q Business attachment.

        • md5chksum (string) –

          MD5 checksum of the Amazon Q Business attachment contents.

        • createdAt (datetime) –

          The Unix timestamp when the Amazon Q Business attachment was created.

        • status (string) –

          AttachmentStatus of the Amazon Q Business attachment.

        • error (dict) –

          ErrorDetail providing information about a Amazon Q Business attachment error.

          • errorMessage (string) –

            The message explaining the Amazon Q Business request error.

          • errorCode (string) –

            The code associated with the Amazon Q Business request error.

    • nextToken (string) –

      If the response is truncated, Amazon Q Business returns this token, which you can use in a later request to list the next set of attachments.

Exceptions