Interface Anomaly.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Anomaly.Builder,Anomaly>, SdkBuilder<Anomaly.Builder,Anomaly>, SdkPojo
Enclosing class:
Anomaly

public static interface Anomaly.Builder extends SdkPojo, CopyableBuilder<Anomaly.Builder,Anomaly>
  • Method Details

    • anomalyId

      Anomaly.Builder anomalyId(String anomalyId)

      The unique ID that CloudWatch Logs assigned to this anomaly.

      Parameters:
      anomalyId - The unique ID that CloudWatch Logs assigned to this anomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • patternId

      Anomaly.Builder patternId(String patternId)

      The ID of the pattern used to help identify this anomaly.

      Parameters:
      patternId - The ID of the pattern used to help identify this anomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • anomalyDetectorArn

      Anomaly.Builder anomalyDetectorArn(String anomalyDetectorArn)

      The ARN of the anomaly detector that identified this anomaly.

      Parameters:
      anomalyDetectorArn - The ARN of the anomaly detector that identified this anomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • patternString

      Anomaly.Builder patternString(String patternString)

      The pattern used to help identify this anomaly, in string format.

      Parameters:
      patternString - The pattern used to help identify this anomaly, in string format.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • patternRegex

      Anomaly.Builder patternRegex(String patternRegex)

      The pattern used to help identify this anomaly, in regular expression format.

      Parameters:
      patternRegex - The pattern used to help identify this anomaly, in regular expression format.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • priority

      Anomaly.Builder priority(String priority)

      The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log severity labels such as FATAL and ERROR and the amount of deviation from the baseline. Possible values are HIGH, MEDIUM, and LOW.

      Parameters:
      priority - The priority level of this anomaly, as determined by CloudWatch Logs. Priority is computed based on log severity labels such as FATAL and ERROR and the amount of deviation from the baseline. Possible values are HIGH, MEDIUM, and LOW.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • firstSeen

      Anomaly.Builder firstSeen(Long firstSeen)

      The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.

      Parameters:
      firstSeen - The date and time when the anomaly detector first saw this anomaly. It is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • lastSeen

      Anomaly.Builder lastSeen(Long lastSeen)

      The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.

      Parameters:
      lastSeen - The date and time when the anomaly detector most recently saw this anomaly. It is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      Anomaly.Builder description(String description)

      A human-readable description of the anomaly. This description is generated by CloudWatch Logs.

      Parameters:
      description - A human-readable description of the anomaly. This description is generated by CloudWatch Logs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • active

      Anomaly.Builder active(Boolean active)

      Specifies whether this anomaly is still ongoing.

      Parameters:
      active - Specifies whether this anomaly is still ongoing.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • state

      Anomaly.Builder state(String state)

      Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is Active. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed. If this behavior is now considered to be normal, the value is Baseline.

      Parameters:
      state - Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is Active. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed. If this behavior is now considered to be normal, the value is Baseline.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • state

      Anomaly.Builder state(State state)

      Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is Active. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed. If this behavior is now considered to be normal, the value is Baseline.

      Parameters:
      state - Indicates the current state of this anomaly. If it is still being treated as an anomaly, the value is Active. If you have suppressed this anomaly by using the UpdateAnomaly operation, the value is Suppressed. If this behavior is now considered to be normal, the value is Baseline.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • histogram

      Anomaly.Builder histogram(Map<String,Long> histogram)

      A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were detected at each of those runs. The times are specified in epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.

      Parameters:
      histogram - A map showing times when the anomaly detector ran, and the number of occurrences of this anomaly that were detected at each of those runs. The times are specified in epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • logSamples

      Anomaly.Builder logSamples(Collection<LogEvent> logSamples)

      An array of sample log event messages that are considered to be part of this anomaly.

      Parameters:
      logSamples - An array of sample log event messages that are considered to be part of this anomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • logSamples

      Anomaly.Builder logSamples(LogEvent... logSamples)

      An array of sample log event messages that are considered to be part of this anomaly.

      Parameters:
      logSamples - An array of sample log event messages that are considered to be part of this anomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • logSamples

      Anomaly.Builder logSamples(Consumer<LogEvent.Builder>... logSamples)

      An array of sample log event messages that are considered to be part of this anomaly.

      This is a convenience method that creates an instance of the LogEvent.Builder avoiding the need to create one manually via LogEvent.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to logSamples(List<LogEvent>).

      Parameters:
      logSamples - a consumer that will call methods on LogEvent.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • patternTokens

      Anomaly.Builder patternTokens(Collection<PatternToken> patternTokens)

      An array of structures where each structure contains information about one token that makes up the pattern.

      Parameters:
      patternTokens - An array of structures where each structure contains information about one token that makes up the pattern.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • patternTokens

      Anomaly.Builder patternTokens(PatternToken... patternTokens)

      An array of structures where each structure contains information about one token that makes up the pattern.

      Parameters:
      patternTokens - An array of structures where each structure contains information about one token that makes up the pattern.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • patternTokens

      Anomaly.Builder patternTokens(Consumer<PatternToken.Builder>... patternTokens)

      An array of structures where each structure contains information about one token that makes up the pattern.

      This is a convenience method that creates an instance of the PatternToken.Builder avoiding the need to create one manually via PatternToken.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to patternTokens(List<PatternToken>).

      Parameters:
      patternTokens - a consumer that will call methods on PatternToken.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • logGroupArnList

      Anomaly.Builder logGroupArnList(Collection<String> logGroupArnList)

      An array of ARNS of the log groups that contained log events considered to be part of this anomaly.

      Parameters:
      logGroupArnList - An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • logGroupArnList

      Anomaly.Builder logGroupArnList(String... logGroupArnList)

      An array of ARNS of the log groups that contained log events considered to be part of this anomaly.

      Parameters:
      logGroupArnList - An array of ARNS of the log groups that contained log events considered to be part of this anomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • suppressed

      Anomaly.Builder suppressed(Boolean suppressed)

      Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.

      Parameters:
      suppressed - Indicates whether this anomaly is currently suppressed. To suppress an anomaly, use UpdateAnomaly.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • suppressedDate

      Anomaly.Builder suppressedDate(Long suppressedDate)

      If the anomaly is suppressed, this indicates when it was suppressed.

      Parameters:
      suppressedDate - If the anomaly is suppressed, this indicates when it was suppressed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • suppressedUntil

      Anomaly.Builder suppressedUntil(Long suppressedUntil)

      If the anomaly is suppressed, this indicates when the suppression will end. If this value is 0, the anomaly was suppressed with no expiration, with the INFINITE value.

      Parameters:
      suppressedUntil - If the anomaly is suppressed, this indicates when the suppression will end. If this value is 0, the anomaly was suppressed with no expiration, with the INFINITE value.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • isPatternLevelSuppression

      Anomaly.Builder isPatternLevelSuppression(Boolean isPatternLevelSuppression)

      If this anomaly is suppressed, this field is true if the suppression is because the pattern is suppressed. If false, then only this particular anomaly is suppressed.

      Parameters:
      isPatternLevelSuppression - If this anomaly is suppressed, this field is true if the suppression is because the pattern is suppressed. If false, then only this particular anomaly is suppressed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.