Class FaultInjectionConditionBuilder

java.lang.Object
com.azure.cosmos.test.faultinjection.FaultInjectionConditionBuilder

public final class FaultInjectionConditionBuilder extends Object
Fault injection condition builder.
  • Constructor Details

    • FaultInjectionConditionBuilder

      public FaultInjectionConditionBuilder()
  • Method Details

    • region

      public FaultInjectionConditionBuilder region(String region)
      Set the region of the rule. The rule will not be applicable if the request is targeting a different region. By default, it is null which means the rule can be applied in any region.
      Parameters:
      region - the region of the rule.
      Returns:
      the builder.
    • operationType

      public FaultInjectionConditionBuilder operationType(FaultInjectionOperationType operationType)
      Set the operation type of the rule. The rule will not be applicable if the request is targeting a different operation type. By default, it is null which means the rule can be applied to any operation type.
      Parameters:
      operationType - the operation type.
      Returns:
      the builder.
    • connectionType

      public FaultInjectionConditionBuilder connectionType(FaultInjectionConnectionType connectionType)
      Set the connection type of the rule. The rule will not be applicable if the request is targeting a different connection type. By default, it is direct.
      Parameters:
      connectionType - the connection type.
      Returns:
      the builder.
    • endpoints

      Set the physical endpoints of the rule. Only applicable in direct connection type.
      Parameters:
      endpoints - the physical endpoints.
      Returns:
      the builder.
    • build

      public FaultInjectionCondition build()
      Create new fault injection condition.
      Returns:
      the FaultInjectionCondition.