deleteAttachment method
Deletes an attachment associated with a specific Amazon Q Business conversation.
May throw AccessDeniedException.
May throw InternalServerException.
May throw LicenseNotFoundException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The unique identifier for the Amazon Q Business application environment.
Parameter attachmentId :
The unique identifier for the attachment.
Parameter conversationId :
The unique identifier of the conversation.
Parameter userId :
The unique identifier of the user involved in the conversation.
Implementation
Future<void> deleteAttachment({
required String applicationId,
required String attachmentId,
required String conversationId,
String? userId,
}) async {
final $query = <String, List<String>>{
if (userId != null) 'userId': [userId],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/conversations/${Uri.encodeComponent(conversationId)}/attachments/${Uri.encodeComponent(attachmentId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}