listRecommendedActionSummaries method

Future<ListRecommendedActionSummariesResponse> listRecommendedActionSummaries({
  1. List<RecommendedActionFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
})

Provides a summary of recommended actions based on 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 : A list of filters to apply when retrieving recommended action summaries. Filters can be based on resource type, action type, account ID, and other criteria.

Parameter maxResults : The maximum number of recommended action summaries 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<ListRecommendedActionSummariesResponse>
    listRecommendedActionSummaries({
  List<RecommendedActionFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'ComputeOptimizerAutomationService.ListRecommendedActionSummaries'
  };
  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 ListRecommendedActionSummariesResponse.fromJson(jsonResponse.body);
}