getRecommendationSummaries method
Returns the optimization findings for an account.
It returns the number of:
-
Amazon EC2 instances in an account that are
Underprovisioned,Overprovisioned, orOptimized. -
EC2Auto Scaling groups in an account that are
NotOptimized, orOptimized. -
Amazon EBS volumes in an account that are
NotOptimized, orOptimized. -
Lambda functions in an account that are
NotOptimized, orOptimized. -
Amazon ECS services in an account that are
Underprovisioned,Overprovisioned, orOptimized. -
Commercial software licenses in an account that are
InsufficientMetrics,NotOptimizedorOptimized. -
Amazon Aurora and Amazon RDS databases in an account that are
Underprovisioned,Overprovisioned,Optimized, orNotOptimized.
May throw AccessDeniedException.
May throw InternalServerException.
May throw InvalidParameterValueException.
May throw MissingAuthenticationToken.
May throw OptInRequiredException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter accountIds :
The ID of the Amazon Web Services account for which to return
recommendation summaries.
If your account is the management account of an organization, use this parameter to specify the member account for which you want to return recommendation summaries.
Only one account ID can be specified per request.
Parameter maxResults :
The maximum number of recommendation summaries to return with a single
request.
To retrieve the remaining results, make another request with the returned
nextToken value.
Parameter nextToken :
The token to advance to the next page of recommendation summaries.
Implementation
Future<GetRecommendationSummariesResponse> getRecommendationSummaries({
List<String>? accountIds,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'ComputeOptimizerService.GetRecommendationSummaries'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (accountIds != null) 'accountIds': accountIds,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return GetRecommendationSummariesResponse.fromJson(jsonResponse.body);
}