deleteAnomalyDetector method

Future<void> deleteAnomalyDetector({
  1. required String metricName,
  2. required String namespace,
  3. required String stat,
  4. List<Dimension>? dimensions,
})

Deletes the specified anomaly detection model from your account.

May throw ResourceNotFoundException. May throw InternalServiceFault. May throw InvalidParameterValueException. May throw MissingRequiredParameterException.

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 stat : The statistic associated with the anomaly detection model to delete.

Parameter dimensions : The metric dimensions associated with the anomaly detection model to delete.

Implementation

Future<void> deleteAnomalyDetector({
  required String metricName,
  required String namespace,
  required String stat,
  List<Dimension>? dimensions,
}) async {
  ArgumentError.checkNotNull(metricName, 'metricName');
  _s.validateStringLength(
    'metricName',
    metricName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(namespace, 'namespace');
  _s.validateStringLength(
    'namespace',
    namespace,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(stat, 'stat');
  final $request = <String, dynamic>{};
  $request['MetricName'] = metricName;
  $request['Namespace'] = namespace;
  $request['Stat'] = stat;
  dimensions?.also((arg) => $request['Dimensions'] = arg);
  await _protocol.send(
    $request,
    action: 'DeleteAnomalyDetector',
    version: '2010-08-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteAnomalyDetectorInput'],
    shapes: shapes,
    resultWrapper: 'DeleteAnomalyDetectorResult',
  );
}