getRDSDatabaseRecommendations method
Returns Amazon Aurora and RDS database recommendations.
Compute Optimizer generates recommendations for Amazon Aurora and RDS databases that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.
May throw AccessDeniedException.
May throw InternalServerException.
May throw InvalidParameterValueException.
May throw MissingAuthenticationToken.
May throw OptInRequiredException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter accountIds :
Return the Amazon Aurora and RDS database recommendations to the specified
Amazon Web Services account IDs.
If your account is the management account or the delegated administrator of an organization, use this parameter to return the Amazon Aurora and RDS database recommendations to specific member accounts.
You can only specify one account ID per request.
Parameter filters :
An array of objects to specify a filter that returns a more specific list
of Amazon Aurora and RDS database recommendations.
Parameter maxResults :
The maximum number of Amazon Aurora and RDS database recommendations 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 Amazon Aurora and RDS database
recommendations.
Parameter resourceArns :
The ARN that identifies the Amazon Aurora or RDS database.
The following is the format of the ARN:
arn:aws:rds:{region}:{accountId}:db:{resourceName}
The following is the format of a DB Cluster ARN:
arn:aws:rds:{region}:{accountId}:cluster:{resourceName}
Implementation
Future<GetRDSDatabaseRecommendationsResponse> getRDSDatabaseRecommendations({
List<String>? accountIds,
List<RDSDBRecommendationFilter>? filters,
int? maxResults,
String? nextToken,
RecommendationPreferences? recommendationPreferences,
List<String>? resourceArns,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'ComputeOptimizerService.GetRDSDatabaseRecommendations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (accountIds != null) 'accountIds': accountIds,
if (filters != null) 'filters': filters,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (recommendationPreferences != null)
'recommendationPreferences': recommendationPreferences,
if (resourceArns != null) 'resourceArns': resourceArns,
},
);
return GetRDSDatabaseRecommendationsResponse.fromJson(jsonResponse.body);
}