update_anomaly
¶
update_anomaly(
anomaly_detector_arn: AnomalyDetectorArn,
*,
config_overrides: Optional[CloudWatchLogsClientConfig] = None,
anomaly_id: Optional[AnomalyId] = None,
pattern_id: Optional[PatternId] = None,
suppression_type: Optional[SuppressionType] = None,
suppression_period: Optional[SuppressionPeriod] = None,
baseline: Optional[Baseline] = None,
) -> None
Use this operation to suppress anomaly detection for a specified anomaly or pattern. If you suppress an anomaly, CloudWatch Logs won't report new occurrences of that anomaly and won't update that anomaly with new data. If you suppress a pattern, CloudWatch Logs won't report any anomalies related to that pattern.
You must specify either anomalyId or patternId, but you can't specify both parameters in the same operation.
If you have previously used this operation to suppress detection of a pattern or anomaly, you can use it again to cause CloudWatch Logs to end the suppression. To do this, use this operation and specify the anomaly or pattern to stop suppressing, and omit the suppressionType and suppressionPeriod parameters.
Parameters:
-
anomaly_id(Optional[AnomalyId], default:None) –If you are suppressing or unsuppressing an anomaly, specify its unique ID here. You can find anomaly IDs by using the ListAnomalies operation.
-
pattern_id(Optional[PatternId], default:None) –If you are suppressing or unsuppressing an pattern, specify its unique ID here. You can find pattern IDs by using the ListAnomalies operation.
-
anomaly_detector_arn(AnomalyDetectorArn) –The ARN of the anomaly detector that this operation is to act on.
-
suppression_type(Optional[SuppressionType], default:None) –Use this to specify whether the suppression to be temporary or infinite. If you specify
LIMITED, you must also specify asuppressionPeriod. If you specifyINFINITE, any value forsuppressionPeriodis ignored. -
suppression_period(Optional[SuppressionPeriod], default:None) –If you are temporarily suppressing an anomaly or pattern, use this structure to specify how long the suppression is to last.
-
baseline(Optional[Baseline], default:None) –Set this to
trueto prevent CloudWatch Logs from displaying this behavior as an anomaly in the future. The behavior is then treated as baseline behavior. However, if similar but more severe occurrences of this behavior occur in the future, those will still be reported as anomalies.The default is
false
Raises:
-
InvalidParameterException–A parameter is specified incorrectly.
-
OperationAbortedException–Multiple concurrent requests to update the same resource were in conflict.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceUnavailableException–The service cannot complete the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 | |