listMetricAttributions method
Lists metric attributions.
May throw InvalidInputException.
May throw InvalidNextTokenException.
Parameter datasetGroupArn :
The metric attributions' dataset group Amazon Resource Name (ARN).
Parameter maxResults :
The maximum number of metric attributions to return in one page of
results.
Parameter nextToken :
Specify the pagination token from a previous request to retrieve the next
page of results.
Implementation
Future<ListMetricAttributionsResponse> listMetricAttributions({
String? datasetGroupArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.ListMetricAttributions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (datasetGroupArn != null) 'datasetGroupArn': datasetGroupArn,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListMetricAttributionsResponse.fromJson(jsonResponse.body);
}