listRecommendedActions method
Lists the recommended actions based that match specified filters.
May throw AccessDeniedException.
May throw ForbiddenException.
May throw InternalServerException.
May throw InvalidParameterValueException.
May throw OptInRequiredException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter filters :
The filters to apply to the list of recommended actions.
Parameter maxResults :
The maximum number of recommended actions to return in a single response.
Valid range is 1-1000.
Parameter nextToken :
A token used for pagination to retrieve the next set of results when the
response is truncated.
Implementation
Future<ListRecommendedActionsResponse> listRecommendedActions({
List<RecommendedActionFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'ComputeOptimizerAutomationService.ListRecommendedActions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'filters': filters,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListRecommendedActionsResponse.fromJson(jsonResponse.body);
}