deleteAnomalyDetector method
Deletes the specified anomaly detection model from your account. For more information about how to delete an anomaly detection model, see Deleting an anomaly detection model in the CloudWatch User Guide.
May throw InternalServiceFault.
May throw InvalidParameterCombinationException.
May throw InvalidParameterValueException.
May throw MissingRequiredParameterException.
May throw ResourceNotFoundException.
Parameter dimensions :
The metric dimensions associated with the anomaly detection model to
delete.
Parameter metricMathAnomalyDetector :
The metric math anomaly detector to be deleted.
When using MetricMathAnomalyDetector, you cannot include
following parameters in the same operation:
-
Dimensions, -
MetricName -
Namespace -
Stat -
the
SingleMetricAnomalyDetectorparameters ofDeleteAnomalyDetectorInput
MetricMathAnomalyDetector property.
Parameter metricName :
The metric name associated with the anomaly detection model to delete.
Parameter namespace :
The namespace associated with the anomaly detection model to delete.
Parameter singleMetricAnomalyDetector :
A single metric anomaly detector to be deleted.
When using SingleMetricAnomalyDetector, you cannot include
the following parameters in the same operation:
-
Dimensions, -
MetricName -
Namespace -
Stat -
the
MetricMathAnomalyDetectorparameters ofDeleteAnomalyDetectorInput
SingleMetricAnomalyDetector property.
Parameter stat :
The statistic associated with the anomaly detection model to delete.
Implementation
Future<void> deleteAnomalyDetector({
List<Dimension>? dimensions,
MetricMathAnomalyDetector? metricMathAnomalyDetector,
String? metricName,
String? namespace,
SingleMetricAnomalyDetector? singleMetricAnomalyDetector,
String? stat,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'GraniteServiceVersion20100801.DeleteAnomalyDetector'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (dimensions != null) 'Dimensions': dimensions,
if (metricMathAnomalyDetector != null)
'MetricMathAnomalyDetector': metricMathAnomalyDetector,
if (metricName != null) 'MetricName': metricName,
if (namespace != null) 'Namespace': namespace,
if (singleMetricAnomalyDetector != null)
'SingleMetricAnomalyDetector': singleMetricAnomalyDetector,
if (stat != null) 'Stat': stat,
},
);
}