describeDBRecommendations method

Future<DBRecommendationsMessage> describeDBRecommendations({
  1. List<Filter>? filters,
  2. DateTime? lastUpdatedAfter,
  3. DateTime? lastUpdatedBefore,
  4. String? locale,
  5. String? marker,
  6. int? maxRecords,
})

Describes the recommendations to resolve the issues for your DB instances, DB clusters, and DB parameter groups.

Parameter filters : A filter that specifies one or more recommendations to describe.

Supported Filters:

  • recommendation-id - Accepts a list of recommendation identifiers. The results list only includes the recommendations whose identifier is one of the specified filter values.
  • status - Accepts a list of recommendation statuses.

    Valid values:

    • active - The recommendations which are ready for you to apply.
    • pending - The applied or scheduled recommendations which are in progress.
    • resolved - The recommendations which are completed.
    • dismissed - The recommendations that you dismissed.
    The results list only includes the recommendations whose status is one of the specified filter values.
  • severity - Accepts a list of recommendation severities. The results list only includes the recommendations whose severity is one of the specified filter values.

    Valid values:

    • high
    • medium
    • low
    • informational
  • type-id - Accepts a list of recommendation type identifiers. The results list only includes the recommendations whose type is one of the specified filter values.
  • dbi-resource-id - Accepts a list of database resource identifiers. The results list only includes the recommendations that generated for the specified databases.
  • cluster-resource-id - Accepts a list of cluster resource identifiers. The results list only includes the recommendations that generated for the specified clusters.
  • pg-arn - Accepts a list of parameter group ARNs. The results list only includes the recommendations that generated for the specified parameter groups.
  • cluster-pg-arn - Accepts a list of cluster parameter group ARNs. The results list only includes the recommendations that generated for the specified cluster parameter groups.

Parameter lastUpdatedAfter : A filter to include only the recommendations that were updated after this specified time.

Parameter lastUpdatedBefore : A filter to include only the recommendations that were updated before this specified time.

Parameter locale : The language that you choose to return the list of recommendations.

Valid values:

  • en
  • en_UK
  • de
  • es
  • fr
  • id
  • it
  • ja
  • ko
  • pt_BR
  • zh_TW
  • zh_CN

Parameter marker : An optional pagination token provided by a previous DescribeDBRecommendations request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Parameter maxRecords : The maximum number of recommendations to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.

Implementation

Future<DBRecommendationsMessage> describeDBRecommendations({
  List<Filter>? filters,
  DateTime? lastUpdatedAfter,
  DateTime? lastUpdatedBefore,
  String? locale,
  String? marker,
  int? maxRecords,
}) async {
  final $request = <String, String>{
    if (filters != null)
      if (filters.isEmpty)
        'Filters': ''
      else
        for (var i1 = 0; i1 < filters.length; i1++)
          for (var e3 in filters[i1].toQueryMap().entries)
            'Filters.Filter.${i1 + 1}.${e3.key}': e3.value,
    if (lastUpdatedAfter != null)
      'LastUpdatedAfter': _s.iso8601ToJson(lastUpdatedAfter),
    if (lastUpdatedBefore != null)
      'LastUpdatedBefore': _s.iso8601ToJson(lastUpdatedBefore),
    if (locale != null) 'Locale': locale,
    if (marker != null) 'Marker': marker,
    if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
  };
  final $result = await _protocol.send(
    $request,
    action: 'DescribeDBRecommendations',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'DescribeDBRecommendationsResult',
  );
  return DBRecommendationsMessage.fromXml($result);
}