update_anomaly
async
¶
update_anomaly(
anomaly_detector_arn: AnomalyDetectorArn,
*,
config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = 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/async_cloud_watch_logs.py
7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 | |