共用方式為


ResponseBasedOriginErrorDetectionParameters Class

  • java.lang.Object
    • com.azure.resourcemanager.cdn.models.ResponseBasedOriginErrorDetectionParameters

Implements

public final class ResponseBasedOriginErrorDetectionParameters
implements JsonSerializable<ResponseBasedOriginErrorDetectionParameters>

The JSON object that contains the properties to determine origin health using real requests/responses.

Constructor Summary

Constructor Description
ResponseBasedOriginErrorDetectionParameters()

Creates an instance of ResponseBasedOriginErrorDetectionParameters class.

Method Summary

Modifier and Type Method and Description
static ResponseBasedOriginErrorDetectionParameters fromJson(JsonReader jsonReader)

Reads an instance of ResponseBasedOriginErrorDetectionParameters from the JsonReader.

List<HttpErrorRangeParameters> 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.

ResponseBasedDetectedErrorTypes responseBasedDetectedErrorTypes()

Get the responseBasedDetectedErrorTypes property: Type of response errors for real user requests for which origin will be deemed unhealthy.

Integer responseBasedFailoverThresholdPercentage()

Get the responseBasedFailoverThresholdPercentage property: The percentage of failed requests in the sample where failover should trigger.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

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.

ResponseBasedOriginErrorDetectionParameters withResponseBasedDetectedErrorTypes(ResponseBasedDetectedErrorTypes responseBasedDetectedErrorTypes)

Set the responseBasedDetectedErrorTypes property: Type of response errors for real user requests for which origin will be deemed unhealthy.

ResponseBasedOriginErrorDetectionParameters withResponseBasedFailoverThresholdPercentage(Integer responseBasedFailoverThresholdPercentage)

Set the responseBasedFailoverThresholdPercentage property: The percentage of failed requests in the sample where failover should trigger.

Methods inherited from java.lang.Object

Constructor Details

ResponseBasedOriginErrorDetectionParameters

public ResponseBasedOriginErrorDetectionParameters()

Creates an instance of ResponseBasedOriginErrorDetectionParameters class.

Method Details

fromJson

public static ResponseBasedOriginErrorDetectionParameters fromJson(JsonReader jsonReader)

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.

httpErrorRanges

public List 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.

responseBasedDetectedErrorTypes

public ResponseBasedDetectedErrorTypes responseBasedDetectedErrorTypes()

Get the responseBasedDetectedErrorTypes property: Type of response errors for real user requests for which origin will be deemed unhealthy.

Returns:

the responseBasedDetectedErrorTypes value.

responseBasedFailoverThresholdPercentage

public Integer responseBasedFailoverThresholdPercentage()

Get the responseBasedFailoverThresholdPercentage property: The percentage of failed requests in the sample where failover should trigger.

Returns:

the responseBasedFailoverThresholdPercentage value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withHttpErrorRanges

public ResponseBasedOriginErrorDetectionParameters withHttpErrorRanges(List 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.

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.

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.

Applies to