listRecommendationResources method

Future<ListRecommendationResourcesResponse> listRecommendationResources({
  1. required String recommendationIdentifier,
  2. ExclusionStatus? exclusionStatus,
  3. RecommendationLanguage? language,
  4. int? maxResults,
  5. String? nextToken,
  6. String? regionCode,
  7. ResourceStatus? status,
})

List Resources of a 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 exclusionStatus : The exclusion status of the resource

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 regionCode : The AWS Region code of the resource

Parameter status : The status of the resource

Implementation

Future<ListRecommendationResourcesResponse> listRecommendationResources({
  required String recommendationIdentifier,
  ExclusionStatus? exclusionStatus,
  RecommendationLanguage? language,
  int? maxResults,
  String? nextToken,
  String? regionCode,
  ResourceStatus? status,
}) async {
  final $query = <String, List<String>>{
    if (exclusionStatus != null) 'exclusionStatus': [exclusionStatus.value],
    if (language != null) 'language': [language.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (regionCode != null) 'regionCode': [regionCode],
    if (status != null) 'status': [status.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/recommendations/${Uri.encodeComponent(recommendationIdentifier)}/resources',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRecommendationResourcesResponse.fromJson(response);
}