MonitorConfig Class
- java.
lang. Object - com.
azure. resourcemanager. trafficmanager. models. MonitorConfig
- com.
Implements
public final class MonitorConfig
implements JsonSerializable<MonitorConfig>
Class containing endpoint monitoring settings in a Traffic Manager profile.
Constructor Summary
Constructor | Description |
---|---|
MonitorConfig() |
Creates an instance of Monitor |
Method Summary
Modifier and Type | Method and Description |
---|---|
List<Monitor |
customHeaders()
Get the custom |
List<Monitor |
expectedStatusCodeRanges()
Get the expected |
static
Monitor |
fromJson(JsonReader jsonReader)
Reads an instance of Monitor |
Long |
intervalInSeconds()
Get the interval |
String |
path()
Get the path property: The path relative to the endpoint domain name used to probe for endpoint health. |
Long |
port()
Get the port property: The TCP port used to probe for endpoint health. |
Profile |
profileMonitorStatus()
Get the profile |
Monitor |
protocol()
Get the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. |
Long |
timeoutInSeconds()
Get the timeout |
Json |
toJson(JsonWriter jsonWriter) |
Long |
toleratedNumberOfFailures()
Get the tolerated |
void |
validate()
Validates the instance. |
Monitor |
withCustomHeaders(List<MonitorConfigCustomHeadersItem> customHeaders)
Set the custom |
Monitor |
withExpectedStatusCodeRanges(List<MonitorConfigExpectedStatusCodeRangesItem> expectedStatusCodeRanges)
Set the expected |
Monitor |
withIntervalInSeconds(Long intervalInSeconds)
Set the interval |
Monitor |
withPath(String path)
Set the path property: The path relative to the endpoint domain name used to probe for endpoint health. |
Monitor |
withPort(Long port)
Set the port property: The TCP port used to probe for endpoint health. |
Monitor |
withProfileMonitorStatus(ProfileMonitorStatus profileMonitorStatus)
Set the profile |
Monitor |
withProtocol(MonitorProtocol protocol)
Set the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. |
Monitor |
withTimeoutInSeconds(Long timeoutInSeconds)
Set the timeout |
Monitor |
withToleratedNumberOfFailures(Long toleratedNumberOfFailures)
Set the tolerated |
Methods inherited from java.lang.Object
Constructor Details
MonitorConfig
public MonitorConfig()
Creates an instance of MonitorConfig class.
Method Details
customHeaders
public List
Get the customHeaders property: List of custom headers.
Returns:
expectedStatusCodeRanges
public List
Get the expectedStatusCodeRanges property: List of expected status code ranges.
Returns:
fromJson
public static MonitorConfig fromJson(JsonReader jsonReader)
Reads an instance of MonitorConfig from the JsonReader.
Parameters:
Returns:
Throws:
intervalInSeconds
public Long 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:
path
public String path()
Get the path property: The path relative to the endpoint domain name used to probe for endpoint health.
Returns:
port
public Long port()
Get the port property: The TCP port used to probe for endpoint health.
Returns:
profileMonitorStatus
public ProfileMonitorStatus profileMonitorStatus()
Get the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.
Returns:
protocol
public MonitorProtocol protocol()
Get the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
Returns:
timeoutInSeconds
public Long 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:
toJson
toleratedNumberOfFailures
public Long 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:
validate
public void validate()
Validates the instance.
withCustomHeaders
public MonitorConfig withCustomHeaders(List
Set the customHeaders property: List of custom headers.
Parameters:
Returns:
withExpectedStatusCodeRanges
public MonitorConfig withExpectedStatusCodeRanges(List
Set the expectedStatusCodeRanges property: List of expected status code ranges.
Parameters:
Returns:
withIntervalInSeconds
public MonitorConfig withIntervalInSeconds(Long intervalInSeconds)
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:
Returns:
withPath
public MonitorConfig withPath(String path)
Set the path property: The path relative to the endpoint domain name used to probe for endpoint health.
Parameters:
Returns:
withPort
public MonitorConfig withPort(Long port)
Set the port property: The TCP port used to probe for endpoint health.
Parameters:
Returns:
withProfileMonitorStatus
public MonitorConfig withProfileMonitorStatus(ProfileMonitorStatus profileMonitorStatus)
Set the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.
Parameters:
Returns:
withProtocol
public MonitorConfig withProtocol(MonitorProtocol protocol)
Set the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
Parameters:
Returns:
withTimeoutInSeconds
public MonitorConfig withTimeoutInSeconds(Long timeoutInSeconds)
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:
Returns:
withToleratedNumberOfFailures
public MonitorConfig 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.
Parameters:
Returns:
Applies to
Azure SDK for Java