listAttachments method
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.
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.
Parameter conversationId :
The unique identifier of the Amazon Q Business web experience
conversation.
Parameter maxResults :
The maximum number of attachements to return.
Parameter nextToken :
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.
Parameter userId :
The unique identifier of the user involved in the Amazon Q Business web
experience conversation.
Implementation
Future<ListAttachmentsResponse> listAttachments({
required String applicationId,
String? conversationId,
int? maxResults,
String? nextToken,
String? userId,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (conversationId != null) 'conversationId': [conversationId],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (userId != null) 'userId': [userId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/attachments',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListAttachmentsResponse.fromJson(response);
}