updateMetricAttribution method
Updates a metric attribution.
May throw InvalidInputException.
May throw ResourceAlreadyExistsException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
Parameter addMetrics :
Add new metric attributes to the metric attribution.
Parameter metricAttributionArn :
The Amazon Resource Name (ARN) for the metric attribution to update.
Parameter metricsOutputConfig :
An output config for the metric attribution.
Parameter removeMetrics :
Remove metric attributes from the metric attribution.
Implementation
Future<UpdateMetricAttributionResponse> updateMetricAttribution({
List<MetricAttribute>? addMetrics,
String? metricAttributionArn,
MetricAttributionOutput? metricsOutputConfig,
List<String>? removeMetrics,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.UpdateMetricAttribution'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (addMetrics != null) 'addMetrics': addMetrics,
if (metricAttributionArn != null)
'metricAttributionArn': metricAttributionArn,
if (metricsOutputConfig != null)
'metricsOutputConfig': metricsOutputConfig,
if (removeMetrics != null) 'removeMetrics': removeMetrics,
},
);
return UpdateMetricAttributionResponse.fromJson(jsonResponse.body);
}