listRecommendations method
List the Amazon Redshift Advisor recommendations for one or multiple Amazon Redshift clusters in an Amazon Web Services account.
May throw ClusterNotFoundFault.
May throw UnsupportedOperationFault.
Parameter clusterIdentifier :
The unique identifier of the Amazon Redshift cluster for which the list of
Advisor recommendations is returned. If the neither the cluster identifier
and the cluster namespace ARN parameters are specified, then
recommendations for all clusters in the account are returned.
Parameter marker :
A value that indicates the starting point for the next set of response
records in a subsequent request. If a value is returned in a response, you
can retrieve the next set of records by providing this returned marker
value in the Marker parameter and retrying the command. If the Marker
field is empty, all response records have been retrieved for the request.
Parameter maxRecords :
The maximum number of response records to return in each call. If the
number of remaining response records exceeds the specified MaxRecords
value, a value is returned in a marker field of the response. You can
retrieve the next set of records by retrying the command with the returned
marker value.
Parameter namespaceArn :
The Amazon Redshift cluster namespace Amazon Resource Name (ARN) for which
the list of Advisor recommendations is returned. If the neither the
cluster identifier and the cluster namespace ARN parameters are specified,
then recommendations for all clusters in the account are returned.
Implementation
Future<ListRecommendationsResult> listRecommendations({
String? clusterIdentifier,
String? marker,
int? maxRecords,
String? namespaceArn,
}) async {
final $request = <String, String>{
if (clusterIdentifier != null) 'ClusterIdentifier': clusterIdentifier,
if (marker != null) 'Marker': marker,
if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
if (namespaceArn != null) 'NamespaceArn': namespaceArn,
};
final $result = await _protocol.send(
$request,
action: 'ListRecommendations',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ListRecommendationsResult',
);
return ListRecommendationsResult.fromXml($result);
}