CloudWatchLogs / Client / update_anomaly

update_anomaly#

CloudWatchLogs.Client.update_anomaly(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.update_anomaly(
    anomalyId='string',
    patternId='string',
    anomalyDetectorArn='string',
    suppressionType='LIMITED'|'INFINITE',
    suppressionPeriod={
        'value': 123,
        'suppressionUnit': 'SECONDS'|'MINUTES'|'HOURS'
    }
)
Parameters:
  • anomalyId (string) – If you are suppressing or unsuppressing an anomaly, specify its unique ID here. You can find anomaly IDs by using the ListAnomalies operation.

  • patternId (string) – If you are suppressing or unsuppressing an pattern, specify its unique ID here. You can find pattern IDs by using the ListAnomalies operation.

  • anomalyDetectorArn (string) –

    [REQUIRED]

    The ARN of the anomaly detector that this operation is to act on.

  • suppressionType (string) – Use this to specify whether the suppression to be temporary or infinite. If you specify LIMITED, you must also specify a suppressionPeriod. If you specify INFINITE, any value for suppressionPeriod is ignored.

  • suppressionPeriod (dict) –

    If you are temporarily suppressing an anomaly or pattern, use this structure to specify how long the suppression is to last.

    • value (integer) –

      Specifies the number of seconds, minutes or hours to suppress this anomaly. There is no maximum.

    • suppressionUnit (string) –

      Specifies whether the value of value is in seconds, minutes, or hours.

Returns:

None

Exceptions