Interface Behavior.Builder

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

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

    • name

      The name you've given to the behavior.

      Parameters:
      name - The name you've given to the behavior.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metric

      Behavior.Builder metric(String metric)

      What is measured by the behavior.

      Parameters:
      metric - What is measured by the behavior.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metricDimension

      Behavior.Builder metricDimension(MetricDimension metricDimension)

      The dimension for a metric in your behavior. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics.

      Parameters:
      metricDimension - The dimension for a metric in your behavior. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metricDimension

      default Behavior.Builder metricDimension(Consumer<MetricDimension.Builder> metricDimension)

      The dimension for a metric in your behavior. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to metricDimension(MetricDimension).

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

      Behavior.Builder criteria(BehaviorCriteria criteria)

      The criteria that determine if a device is behaving normally in regard to the metric.

      In the IoT console, you can choose to be sent an alert through Amazon SNS when IoT Device Defender detects that a device is behaving anomalously.

      Parameters:
      criteria - The criteria that determine if a device is behaving normally in regard to the metric.

      In the IoT console, you can choose to be sent an alert through Amazon SNS when IoT Device Defender detects that a device is behaving anomalously.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • criteria

      default Behavior.Builder criteria(Consumer<BehaviorCriteria.Builder> criteria)

      The criteria that determine if a device is behaving normally in regard to the metric.

      In the IoT console, you can choose to be sent an alert through Amazon SNS when IoT Device Defender detects that a device is behaving anomalously.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to criteria(BehaviorCriteria).

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

      Behavior.Builder suppressAlerts(Boolean suppressAlerts)

      Suppresses alerts.

      Parameters:
      suppressAlerts - Suppresses alerts.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • exportMetric

      Behavior.Builder exportMetric(Boolean exportMetric)

      Value indicates exporting metrics related to the behavior when it is true.

      Parameters:
      exportMetric - Value indicates exporting metrics related to the behavior when it is true.
      Returns:
      Returns a reference to this object so that method calls can be chained together.