listLibraryItems method
Lists the library items for Amazon Q Apps that are published and available for users in your Amazon Web Services account.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter instanceId :
The unique identifier of the Amazon Q Business application environment
instance.
Parameter categoryId :
Optional category to filter the library items by.
Parameter limit :
The maximum number of library items to return in the response.
Parameter nextToken :
The token to request the next page of results.
Implementation
Future<ListLibraryItemsOutput> listLibraryItems({
required String instanceId,
String? categoryId,
int? limit,
String? nextToken,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
100,
);
final headers = <String, String>{
'instance-id': instanceId.toString(),
};
final $query = <String, List<String>>{
if (categoryId != null) 'categoryId': [categoryId],
if (limit != null) 'limit': [limit.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/catalog.list',
queryParams: $query,
headers: headers,
exceptionFnMap: _exceptionFns,
);
return ListLibraryItemsOutput.fromJson(response);
}