updateLibraryItem method
Updates the library item for an Amazon Q App.
May throw AccessDeniedException.
May throw ConflictException.
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 libraryItemId :
The unique identifier of the library item to update.
Parameter categories :
The new categories to associate with the library item.
Parameter status :
The new status to set for the library item, such as "Published" or
"Hidden".
Implementation
Future<UpdateLibraryItemOutput> updateLibraryItem({
required String instanceId,
required String libraryItemId,
List<String>? categories,
LibraryItemStatus? status,
}) async {
final headers = <String, String>{
'instance-id': instanceId.toString(),
};
final $payload = <String, dynamic>{
'libraryItemId': libraryItemId,
if (categories != null) 'categories': categories,
if (status != null) 'status': status.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/catalog.updateItem',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return UpdateLibraryItemOutput.fromJson(response);
}