attachments
Creates, updates, deletes, gets or lists an attachments resource.
Overview
| Name | attachments |
| Type | Resource |
| Id | aws.qbusiness.attachments |
Fields
The following fields are returned by SELECT queries:
- list_attachments
| Name | Datatype | Description |
|---|---|---|
name | string | Filename of the Amazon Q Business attachment. (pattern: <code>\P{C}*</code>) |
attachment_id | string | The 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_id | string | The 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_from | object | A CopyFromSource containing a reference to the original source of the Amazon Q Business attachment. |
created_at | string (date-time) | The Unix timestamp when the Amazon Q Business attachment was created. |
error | object | Provides information about a Amazon Q Business request error. |
file_size | integer | Size in bytes of the Amazon Q Business attachment. |
file_type | string | Filetype of the Amazon Q Business attachment. |
md_5chksum | string | MD5 checksum of the Amazon Q Business attachment contents. |
status | string | AttachmentStatus of the Amazon Q Business attachment. (FAILED, SUCCESS) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_attachments | select | application_id, region | conversationId, userId, nextToken, maxResults | 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. |
delete_attachment | delete | application_id, conversation_id, attachment_id, region | userId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The unique identifier for the Amazon Q Business application environment. |
attachment_id | string | The unique identifier for the attachment. |
conversation_id | string | The unique identifier of the conversation. |
region | string | AWS region (default: us-east-1) |
conversationId | string | The unique identifier of the Amazon Q Business web experience conversation. |
maxResults | integer | The maximum number of attachements to return. |
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. |
userId | string | The unique identifier of the user involved in the conversation. |
SELECT examples
- list_attachments
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
- delete_attachment
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 }}'
;