getRecommendation method
Future<GetRecommendationResponse>
getRecommendation({
- required String recommendationIdentifier,
- RecommendationLanguage? language,
Get a specific Recommendation. This API provides global recommendations, eliminating the need to call the API in each AWS Region.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter recommendationIdentifier :
The Recommendation identifier
Parameter language :
The ISO 639-1 code for the language that you want your recommendations to
appear in.
Implementation
Future<GetRecommendationResponse> getRecommendation({
required String recommendationIdentifier,
RecommendationLanguage? language,
}) async {
final $query = <String, List<String>>{
if (language != null) 'language': [language.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/recommendations/${Uri.encodeComponent(recommendationIdentifier)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetRecommendationResponse.fromJson(response);
}