listRecommendations method

Future<ListRecommendationsResponse> listRecommendations({
  1. DateTime? afterLastUpdatedAt,
  2. String? awsService,
  3. DateTime? beforeLastUpdatedAt,
  4. String? checkIdentifier,
  5. RecommendationLanguage? language,
  6. int? maxResults,
  7. String? nextToken,
  8. RecommendationPillar? pillar,
  9. RecommendationSource? source,
  10. RecommendationStatus? status,
  11. RecommendationType? type,
})

List a filterable set of Recommendations. This API provides global recommendations, eliminating the need to call the API in each AWS Region.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter afterLastUpdatedAt : After the last update of the Recommendation

Parameter awsService : The aws service associated with the Recommendation

Parameter beforeLastUpdatedAt : Before the last update of the Recommendation

Parameter checkIdentifier : The check identifier of the Recommendation

Parameter language : The ISO 639-1 code for the language that you want your recommendations to appear in.

Parameter maxResults : The maximum number of results to return per page.

Parameter nextToken : The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Parameter pillar : The pillar of the Recommendation

Parameter source : The source of the Recommendation

Parameter status : The status of the Recommendation

Parameter type : The type of the Recommendation

Implementation

Future<ListRecommendationsResponse> listRecommendations({
  DateTime? afterLastUpdatedAt,
  String? awsService,
  DateTime? beforeLastUpdatedAt,
  String? checkIdentifier,
  RecommendationLanguage? language,
  int? maxResults,
  String? nextToken,
  RecommendationPillar? pillar,
  RecommendationSource? source,
  RecommendationStatus? status,
  RecommendationType? type,
}) async {
  final $query = <String, List<String>>{
    if (afterLastUpdatedAt != null)
      'afterLastUpdatedAt': [_s.iso8601ToJson(afterLastUpdatedAt).toString()],
    if (awsService != null) 'awsService': [awsService],
    if (beforeLastUpdatedAt != null)
      'beforeLastUpdatedAt': [
        _s.iso8601ToJson(beforeLastUpdatedAt).toString()
      ],
    if (checkIdentifier != null) 'checkIdentifier': [checkIdentifier],
    if (language != null) 'language': [language.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (pillar != null) 'pillar': [pillar.value],
    if (source != null) 'source': [source.value],
    if (status != null) 'status': [status.value],
    if (type != null) 'type': [type.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/recommendations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRecommendationsResponse.fromJson(response);
}