notifyRecommendationsReceived method
Removes the specified recommendations from the specified assistant's queue
of newly available recommendations. You can use this API in conjunction
with GetRecommendations
and a waitTimeSeconds input for long-polling behavior and
avoiding duplicate recommendations.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter assistantId :
The identifier of the Wisdom assistant. Can be either the ID or the ARN.
URLs cannot contain the ARN.
Parameter recommendationIds :
The identifiers of the recommendations.
Parameter sessionId :
The identifier of the session. Can be either the ID or the ARN. URLs
cannot contain the ARN.
Implementation
Future<NotifyRecommendationsReceivedResponse> notifyRecommendationsReceived({
required String assistantId,
required List<String> recommendationIds,
required String sessionId,
}) async {
final $payload = <String, dynamic>{
'recommendationIds': recommendationIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/assistants/${Uri.encodeComponent(assistantId)}/sessions/${Uri.encodeComponent(sessionId)}/recommendations/notify',
exceptionFnMap: _exceptionFns,
);
return NotifyRecommendationsReceivedResponse.fromJson(response);
}