Class Anomaly

java.lang.Object
software.amazon.awssdk.services.cloudwatchomni.model.Anomaly
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Anomaly.Builder,Anomaly>

@Generated("software.amazon.awssdk:codegen") public final class Anomaly extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Anomaly.Builder,Anomaly>

This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

An anomaly detected for a monitored service.

See Also:
  • Method Details

    • anomalyId

      public final String anomalyId()

      The unique identifier of the anomaly episode.

      Returns:
      The unique identifier of the anomaly episode.
    • service

      public final String service()

      The monitored service the anomaly was detected on.

      Returns:
      The monitored service the anomaly was detected on.
    • signalType

      public final AnomalySignalType signalType()

      The kind of telemetry signal the anomaly was detected in.

      If the service returns an enum value that is not available in the current SDK version, signalType will return AnomalySignalType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from signalTypeAsString().

      Returns:
      The kind of telemetry signal the anomaly was detected in.
      See Also:
    • signalTypeAsString

      public final String signalTypeAsString()

      The kind of telemetry signal the anomaly was detected in.

      If the service returns an enum value that is not available in the current SDK version, signalType will return AnomalySignalType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from signalTypeAsString().

      Returns:
      The kind of telemetry signal the anomaly was detected in.
      See Also:
    • anomalyType

      public final String anomalyType()

      The analyzer-specific classification of what kind of anomaly this is.

      Returns:
      The analyzer-specific classification of what kind of anomaly this is.
    • severity

      public final Severity severity()

      The severity of the anomaly as most recently evaluated.

      If the service returns an enum value that is not available in the current SDK version, severity will return Severity.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from severityAsString().

      Returns:
      The severity of the anomaly as most recently evaluated.
      See Also:
    • severityAsString

      public final String severityAsString()

      The severity of the anomaly as most recently evaluated.

      If the service returns an enum value that is not available in the current SDK version, severity will return Severity.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from severityAsString().

      Returns:
      The severity of the anomaly as most recently evaluated.
      See Also:
    • description

      public final String description()

      A human-readable description of the detected behavior. Sensitive customer content.

      Returns:
      A human-readable description of the detected behavior. Sensitive customer content.
    • lastSeenAt

      public final Instant lastSeenAt()

      Timestamp of the most recent occurrence in this episode, serialized as epoch seconds.

      Returns:
      Timestamp of the most recent occurrence in this episode, serialized as epoch seconds.
    • firstSeenAt

      public final Instant firstSeenAt()

      Timestamp of the first occurrence in this episode, serialized as epoch seconds.

      Returns:
      Timestamp of the first occurrence in this episode, serialized as epoch seconds.
    • hasDetails

      public final boolean hasDetails()
      For responses, this returns true if the service returned a value for the Details property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • details

      public final Map<String,String> details()

      Arbitrary key-value details. Nested values are flattened to strings. Sensitive customer content.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasDetails() method.

      Returns:
      Arbitrary key-value details. Nested values are flattened to strings. Sensitive customer content.
    • title

      public final String title()

      Short human-readable label assigned by the analyzer. Sensitive customer content.

      Returns:
      Short human-readable label assigned by the analyzer. Sensitive customer content.
    • occurrenceCount

      public final Integer occurrenceCount()

      Total occurrences merged into this anomaly episode.

      Returns:
      Total occurrences merged into this anomaly episode.
    • sourceAccountId

      public final String sourceAccountId()

      Account that produced the signal (may differ from owner for centralized monitoring).

      Returns:
      Account that produced the signal (may differ from owner for centralized monitoring).
    • sourceRegion

      public final String sourceRegion()

      Region where the source signal was produced.

      Returns:
      Region where the source signal was produced.
    • nodeId

      public final String nodeId()

      Topology graph node ID resolved at write time. Absent when the topology resolver could not match the service to a graph node.

      Returns:
      Topology graph node ID resolved at write time. Absent when the topology resolver could not match the service to a graph node.
    • nodeType

      public final NodeType nodeType()

      Whether the node is a service, a resource, or a remote service.

      If the service returns an enum value that is not available in the current SDK version, nodeType will return NodeType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from nodeTypeAsString().

      Returns:
      Whether the node is a service, a resource, or a remote service.
      See Also:
    • nodeTypeAsString

      public final String nodeTypeAsString()

      Whether the node is a service, a resource, or a remote service.

      If the service returns an enum value that is not available in the current SDK version, nodeType will return NodeType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from nodeTypeAsString().

      Returns:
      Whether the node is a service, a resource, or a remote service.
      See Also:
    • cloudProvider

      public final String cloudProvider()

      Cloud provider from the topology node identity (e.g. "aws", "azure").

      Returns:
      Cloud provider from the topology node identity (e.g. "aws", "azure").
    • hasEvidenceSamples

      public final boolean hasEvidenceSamples()
      For responses, this returns true if the service returned a value for the EvidenceSamples property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • evidenceSamples

      public final List<Evidence> evidenceSamples()

      Up to 100 timestamped per-occurrence samples.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasEvidenceSamples() method.

      Returns:
      Up to 100 timestamped per-occurrence samples.
    • toBuilder

      public Anomaly.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Anomaly.Builder,Anomaly>
      Returns:
      a builder for type T
    • builder

      public static Anomaly.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Anomaly.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.