listRecommendedActions method

Future<ListRecommendedActionsResponse> listRecommendedActions({
  1. RequestFilter? filter,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of recommended actions that match the filter criteria.

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

Parameter filter : The criteria that you want all returned recommended actions to match.

Parameter maxResults : The maximum number of results to return in the response.

Parameter nextToken : The pagination token that indicates the next set of results that you want to retrieve.

Implementation

Future<ListRecommendedActionsResponse> listRecommendedActions({
  RequestFilter? filter,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'AWSBillingAndCostManagementRecommendedActions.ListRecommendedActions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filter != null) 'filter': filter,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListRecommendedActionsResponse.fromJson(jsonResponse.body);
}