listRecommendationsForResource method
List all Trusted Advisor recommendations for a given AWS resource ARN.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter awsResourceArn :
The ARN of the AWS resource to query recommendations for
Parameter checkArn :
The AWS Trusted Advisor Check ARN that relates to 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 that the recommendation belongs to
Parameter status :
The current status of the Recommendation Resource
Implementation
Future<ListRecommendationsForResourceResponse>
listRecommendationsForResource({
required String awsResourceArn,
String? checkArn,
RecommendationLanguage? language,
int? maxResults,
String? nextToken,
RecommendationPillar? pillar,
ResourceStatus? status,
}) async {
final $query = <String, List<String>>{
if (checkArn != null) 'checkArn': [checkArn],
if (language != null) 'language': [language.value],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (pillar != null) 'pillar': [pillar.value],
if (status != null) 'status': [status.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/recommendations-for-resource/${Uri.encodeComponent(awsResourceArn)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListRecommendationsForResourceResponse.fromJson(response);
}