Skip to main content

attachments

Creates, updates, deletes, gets or lists an attachments resource.

Overview

Nameattachments
TypeResource
Idaws.qbusiness.attachments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringFilename of the Amazon Q Business attachment. (pattern: <code>\P{C}*</code>)
attachment_idstringThe identifier of the Amazon Q Business attachment. (pattern: <code>[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}</code>)
conversation_idstringThe identifier of the Amazon Q Business conversation the attachment is associated with. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>)
copy_fromobjectA CopyFromSource containing a reference to the original source of the Amazon Q Business attachment.
created_atstring (date-time)The Unix timestamp when the Amazon Q Business attachment was created.
errorobjectProvides information about a Amazon Q Business request error.
file_sizeintegerSize in bytes of the Amazon Q Business attachment.
file_typestringFiletype of the Amazon Q Business attachment.
md_5chksumstringMD5 checksum of the Amazon Q Business attachment contents.
statusstringAttachmentStatus of the Amazon Q Business attachment. (FAILED, SUCCESS)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_attachmentsselectapplication_id, regionconversationId, userId, nextToken, maxResultsGets 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.
delete_attachmentdeleteapplication_id, conversation_id, attachment_id, regionuserIdDeletes an attachment associated with a specific Amazon Q Business conversation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
application_idstringThe unique identifier for the Amazon Q Business application environment.
attachment_idstringThe unique identifier for the attachment.
conversation_idstringThe unique identifier of the conversation.
regionstringAWS region (default: us-east-1)
conversationIdstringThe unique identifier of the Amazon Q Business web experience conversation.
maxResultsintegerThe maximum number of attachements to return.
nextTokenstringIf 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.
userIdstringThe unique identifier of the user involved in the conversation.

SELECT examples

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.

SELECT
name,
attachment_id,
conversation_id,
copy_from,
created_at,
error,
file_size,
file_type,
md_5chksum,
status
FROM aws.qbusiness.attachments
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
AND conversationId = '{{ conversationId }}'
AND userId = '{{ userId }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

DELETE examples

Deletes an attachment associated with a specific Amazon Q Business conversation.

DELETE FROM aws.qbusiness.attachments
WHERE application_id = '{{ application_id }}' --required
AND conversation_id = '{{ conversation_id }}' --required
AND attachment_id = '{{ attachment_id }}' --required
AND region = '{{ region }}' --required
AND userId = '{{ userId }}'
;