Class FaultInjectionConditionBuilder
java.lang.Object
com.azure.cosmos.test.faultinjection.FaultInjectionConditionBuilder
Fault injection condition builder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create new fault injection condition.connectionType
(FaultInjectionConnectionType connectionType) Set the connection type of the rule.endpoints
(FaultInjectionEndpoints endpoints) Set the physical endpoints of the rule.operationType
(FaultInjectionOperationType operationType) Set the operation type of the rule.Set the region of the rule.
-
Constructor Details
-
FaultInjectionConditionBuilder
public FaultInjectionConditionBuilder()
-
-
Method Details
-
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
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
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
Create new fault injection condition.- Returns:
- the
FaultInjectionCondition
.
-