Class ResponseBasedOriginErrorDetectionParameters
java.lang.Object
com.azure.resourcemanager.cdn.models.ResponseBasedOriginErrorDetectionParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponseBasedOriginErrorDetectionParameters>
public final class ResponseBasedOriginErrorDetectionParameters
extends Object
implements com.azure.json.JsonSerializable<ResponseBasedOriginErrorDetectionParameters>
The JSON object that contains the properties to determine origin health using real requests/responses.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ResponseBasedOriginErrorDetectionParameters class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResponseBasedOriginErrorDetectionParameters from the JsonReader.Get the httpErrorRanges property: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.Get the responseBasedDetectedErrorTypes property: Type of response errors for real user requests for which origin will be deemed unhealthy.Get the responseBasedFailoverThresholdPercentage property: The percentage of failed requests in the sample where failover should trigger.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withHttpErrorRanges(List<HttpErrorRangeParameters> httpErrorRanges) Set the httpErrorRanges property: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.withResponseBasedDetectedErrorTypes(ResponseBasedDetectedErrorTypes responseBasedDetectedErrorTypes) Set the responseBasedDetectedErrorTypes property: Type of response errors for real user requests for which origin will be deemed unhealthy.withResponseBasedFailoverThresholdPercentage(Integer responseBasedFailoverThresholdPercentage) Set the responseBasedFailoverThresholdPercentage property: The percentage of failed requests in the sample where failover should trigger.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ResponseBasedOriginErrorDetectionParameters
public ResponseBasedOriginErrorDetectionParameters()Creates an instance of ResponseBasedOriginErrorDetectionParameters class.
-
-
Method Details
-
responseBasedDetectedErrorTypes
Get the responseBasedDetectedErrorTypes property: Type of response errors for real user requests for which origin will be deemed unhealthy.- Returns:
- the responseBasedDetectedErrorTypes value.
-
withResponseBasedDetectedErrorTypes
public ResponseBasedOriginErrorDetectionParameters withResponseBasedDetectedErrorTypes(ResponseBasedDetectedErrorTypes responseBasedDetectedErrorTypes) Set the responseBasedDetectedErrorTypes property: Type of response errors for real user requests for which origin will be deemed unhealthy.- Parameters:
responseBasedDetectedErrorTypes- the responseBasedDetectedErrorTypes value to set.- Returns:
- the ResponseBasedOriginErrorDetectionParameters object itself.
-
responseBasedFailoverThresholdPercentage
Get the responseBasedFailoverThresholdPercentage property: The percentage of failed requests in the sample where failover should trigger.- Returns:
- the responseBasedFailoverThresholdPercentage value.
-
withResponseBasedFailoverThresholdPercentage
public ResponseBasedOriginErrorDetectionParameters withResponseBasedFailoverThresholdPercentage(Integer responseBasedFailoverThresholdPercentage) Set the responseBasedFailoverThresholdPercentage property: The percentage of failed requests in the sample where failover should trigger.- Parameters:
responseBasedFailoverThresholdPercentage- the responseBasedFailoverThresholdPercentage value to set.- Returns:
- the ResponseBasedOriginErrorDetectionParameters object itself.
-
httpErrorRanges
Get the httpErrorRanges property: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.- Returns:
- the httpErrorRanges value.
-
withHttpErrorRanges
public ResponseBasedOriginErrorDetectionParameters withHttpErrorRanges(List<HttpErrorRangeParameters> httpErrorRanges) Set the httpErrorRanges property: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.- Parameters:
httpErrorRanges- the httpErrorRanges value to set.- Returns:
- the ResponseBasedOriginErrorDetectionParameters object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ResponseBasedOriginErrorDetectionParameters>- Throws:
IOException
-
fromJson
public static ResponseBasedOriginErrorDetectionParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ResponseBasedOriginErrorDetectionParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ResponseBasedOriginErrorDetectionParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ResponseBasedOriginErrorDetectionParameters.
-