Interface SloRule.Builder

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

@Mutable @NotThreadSafe public static interface SloRule.Builder extends SdkPojo, CopyableBuilder<SloRule.Builder,SloRule>
  • Method Details

    • sloId

      SloRule.Builder sloId(String sloId)

      The SLO the alert is built on. It must be in the same space as the alert, and the caller must be allowed to read it. Required on create; omit on update to keep the current SLO.

      Parameters:
      sloId - The SLO the alert is built on. It must be in the same space as the alert, and the caller must be allowed to read it. Required on create; omit on update to keep the current SLO.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • condition

      SloRule.Builder condition(SloAlertCondition condition)

      What makes the alert fire. Exactly one member is set. Required on create; omit on update to keep the current condition. When supplied on update, the condition block is replaced whole.

      Parameters:
      condition - What makes the alert fire. Exactly one member is set. Required on create; omit on update to keep the current condition. When supplied on update, the condition block is replaced whole.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • condition

      default SloRule.Builder condition(Consumer<SloAlertCondition.Builder> condition)

      What makes the alert fire. Exactly one member is set. Required on create; omit on update to keep the current condition. When supplied on update, the condition block is replaced whole.

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

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

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

      SloRule.Builder evaluation(AlertEvaluation evaluation)

      The evaluation cadence and durations. Required on create; omit on update to keep the current evaluation settings. When supplied on update, the evaluation block is replaced whole.

      Parameters:
      evaluation - The evaluation cadence and durations. Required on create; omit on update to keep the current evaluation settings. When supplied on update, the evaluation block is replaced whole.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • evaluation

      default SloRule.Builder evaluation(Consumer<AlertEvaluation.Builder> evaluation)

      The evaluation cadence and durations. Required on create; omit on update to keep the current evaluation settings. When supplied on update, the evaluation block is replaced whole.

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

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

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

      SloRule.Builder noData(NoData noData)

      How the alert behaves when no fresh SLO measurement is available. Omit on create to use NODATA. Omit on update to keep the current behavior. When supplied on update, the noData block is replaced whole.

      Parameters:
      noData - How the alert behaves when no fresh SLO measurement is available. Omit on create to use NODATA. Omit on update to keep the current behavior. When supplied on update, the noData block is replaced whole.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • noData

      default SloRule.Builder noData(Consumer<NoData.Builder> noData)

      How the alert behaves when no fresh SLO measurement is available. Omit on create to use NODATA. Omit on update to keep the current behavior. When supplied on update, the noData block is replaced whole.

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

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

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