listResourceGroupingRecommendations method

Future<ListResourceGroupingRecommendationsResponse> listResourceGroupingRecommendations({
  1. String? appArn,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the resource grouping recommendations suggested by Resilience Hub for your application.

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

Parameter appArn : Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

Parameter maxResults : Maximum number of grouping recommendations to be displayed per Resilience Hub application.

Parameter nextToken : Null, or the token from a previous call to get the next set of results.

Implementation

Future<ListResourceGroupingRecommendationsResponse>
    listResourceGroupingRecommendations({
  String? appArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (appArn != null) 'appArn': [appArn],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/list-resource-grouping-recommendations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListResourceGroupingRecommendationsResponse.fromJson(response);
}