Class MonitorConfig
java.lang.Object
com.azure.resourcemanager.trafficmanager.models.MonitorConfig
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MonitorConfig>
public final class MonitorConfig
extends Object
implements com.azure.json.JsonSerializable<MonitorConfig>
Class containing endpoint monitoring settings in a Traffic Manager profile.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the customHeaders property: List of custom headers.Get the expectedStatusCodeRanges property: List of expected status code ranges.static MonitorConfigfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MonitorConfig from the JsonReader.Get the intervalInSeconds property: The monitor interval for endpoints in this profile.path()Get the path property: The path relative to the endpoint domain name used to probe for endpoint health.port()Get the port property: The TCP port used to probe for endpoint health.Get the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.protocol()Get the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.Get the timeoutInSeconds property: The monitor timeout for endpoints in this profile.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the toleratedNumberOfFailures property: The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.voidvalidate()Validates the instance.withCustomHeaders(List<MonitorConfigCustomHeadersItem> customHeaders) Set the customHeaders property: List of custom headers.withExpectedStatusCodeRanges(List<MonitorConfigExpectedStatusCodeRangesItem> expectedStatusCodeRanges) Set the expectedStatusCodeRanges property: List of expected status code ranges.withIntervalInSeconds(Long intervalInSeconds) Set the intervalInSeconds property: The monitor interval for endpoints in this profile.Set the path property: The path relative to the endpoint domain name used to probe for endpoint health.Set the port property: The TCP port used to probe for endpoint health.withProfileMonitorStatus(ProfileMonitorStatus profileMonitorStatus) Set the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.withProtocol(MonitorProtocol protocol) Set the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.withTimeoutInSeconds(Long timeoutInSeconds) Set the timeoutInSeconds property: The monitor timeout for endpoints in this profile.withToleratedNumberOfFailures(Long toleratedNumberOfFailures) Set the toleratedNumberOfFailures property: The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.Methods inherited from class java.lang.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
-
MonitorConfig
public MonitorConfig()Creates an instance of MonitorConfig class.
-
-
Method Details
-
profileMonitorStatus
Get the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.- Returns:
- the profileMonitorStatus value.
-
withProfileMonitorStatus
Set the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.- Parameters:
profileMonitorStatus- the profileMonitorStatus value to set.- Returns:
- the MonitorConfig object itself.
-
protocol
Get the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.- Returns:
- the protocol value.
-
withProtocol
Set the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.- Parameters:
protocol- the protocol value to set.- Returns:
- the MonitorConfig object itself.
-
port
Get the port property: The TCP port used to probe for endpoint health.- Returns:
- the port value.
-
withPort
Set the port property: The TCP port used to probe for endpoint health.- Parameters:
port- the port value to set.- Returns:
- the MonitorConfig object itself.
-
path
Get the path property: The path relative to the endpoint domain name used to probe for endpoint health.- Returns:
- the path value.
-
withPath
Set the path property: The path relative to the endpoint domain name used to probe for endpoint health.- Parameters:
path- the path value to set.- Returns:
- the MonitorConfig object itself.
-
intervalInSeconds
Get the intervalInSeconds property: The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile.- Returns:
- the intervalInSeconds value.
-
withIntervalInSeconds
Set the intervalInSeconds property: The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile.- Parameters:
intervalInSeconds- the intervalInSeconds value to set.- Returns:
- the MonitorConfig object itself.
-
timeoutInSeconds
Get the timeoutInSeconds property: The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check.- Returns:
- the timeoutInSeconds value.
-
withTimeoutInSeconds
Set the timeoutInSeconds property: The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check.- Parameters:
timeoutInSeconds- the timeoutInSeconds value to set.- Returns:
- the MonitorConfig object itself.
-
toleratedNumberOfFailures
Get the toleratedNumberOfFailures property: The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.- Returns:
- the toleratedNumberOfFailures value.
-
withToleratedNumberOfFailures
Set the toleratedNumberOfFailures property: The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.- Parameters:
toleratedNumberOfFailures- the toleratedNumberOfFailures value to set.- Returns:
- the MonitorConfig object itself.
-
customHeaders
Get the customHeaders property: List of custom headers.- Returns:
- the customHeaders value.
-
withCustomHeaders
Set the customHeaders property: List of custom headers.- Parameters:
customHeaders- the customHeaders value to set.- Returns:
- the MonitorConfig object itself.
-
expectedStatusCodeRanges
Get the expectedStatusCodeRanges property: List of expected status code ranges.- Returns:
- the expectedStatusCodeRanges value.
-
withExpectedStatusCodeRanges
public MonitorConfig withExpectedStatusCodeRanges(List<MonitorConfigExpectedStatusCodeRangesItem> expectedStatusCodeRanges) Set the expectedStatusCodeRanges property: List of expected status code ranges.- Parameters:
expectedStatusCodeRanges- the expectedStatusCodeRanges value to set.- Returns:
- the MonitorConfig 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<MonitorConfig>- Throws:
IOException
-
fromJson
Reads an instance of MonitorConfig from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MonitorConfig 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 MonitorConfig.
-