provideAnomalyFeedback method
Future<ProvideAnomalyFeedbackResponse>
provideAnomalyFeedback({
- required String anomalyId,
- required AnomalyFeedbackType feedback,
Modifies the feedback property of a given cost anomaly.
May throw LimitExceededException.
Parameter anomalyId
:
A cost anomaly ID.
Parameter feedback
:
Describes whether the cost anomaly was a planned activity or you
considered it an anomaly.
Implementation
Future<ProvideAnomalyFeedbackResponse> provideAnomalyFeedback({
required String anomalyId,
required AnomalyFeedbackType feedback,
}) async {
ArgumentError.checkNotNull(anomalyId, 'anomalyId');
_s.validateStringLength(
'anomalyId',
anomalyId,
0,
1024,
isRequired: true,
);
ArgumentError.checkNotNull(feedback, 'feedback');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSInsightsIndexService.ProvideAnomalyFeedback'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AnomalyId': anomalyId,
'Feedback': feedback.toValue(),
},
);
return ProvideAnomalyFeedbackResponse.fromJson(jsonResponse.body);
}