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
7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 | |