MonitorConfig Class

  • java.lang.Object
    • com.azure.resourcemanager.trafficmanager.models.MonitorConfig

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 MonitorConfig class.

Method Summary

Modifier and Type Method and Description
List<MonitorConfigCustomHeadersItem> customHeaders()

Get the customHeaders property: List of custom headers.

List<MonitorConfigExpectedStatusCodeRangesItem> expectedStatusCodeRanges()

Get the expectedStatusCodeRanges property: List of expected status code ranges.

static MonitorConfig fromJson(JsonReader jsonReader)

Reads an instance of MonitorConfig from the JsonReader.

Long intervalInSeconds()

Get the intervalInSeconds property: The monitor interval for endpoints in this profile.

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.

ProfileMonitorStatus profileMonitorStatus()

Get the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.

MonitorProtocol protocol()

Get the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.

Long timeoutInSeconds()

Get the timeoutInSeconds property: The monitor timeout for endpoints in this profile.

JsonWriter toJson(JsonWriter jsonWriter)
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.

void validate()

Validates the instance.

MonitorConfig withCustomHeaders(List<MonitorConfigCustomHeadersItem> customHeaders)

Set the customHeaders property: List of custom headers.

MonitorConfig withExpectedStatusCodeRanges(List<MonitorConfigExpectedStatusCodeRangesItem> expectedStatusCodeRanges)

Set the expectedStatusCodeRanges property: List of expected status code ranges.

MonitorConfig withIntervalInSeconds(Long intervalInSeconds)

Set the intervalInSeconds property: The monitor interval for endpoints in this profile.

MonitorConfig withPath(String path)

Set the path property: The path relative to the endpoint domain name used to probe for endpoint health.

MonitorConfig withPort(Long port)

Set the port property: The TCP port used to probe for endpoint health.

MonitorConfig withProfileMonitorStatus(ProfileMonitorStatus profileMonitorStatus)

Set the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.

MonitorConfig withProtocol(MonitorProtocol protocol)

Set the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.

MonitorConfig withTimeoutInSeconds(Long timeoutInSeconds)

Set the timeoutInSeconds property: The monitor timeout for endpoints in this profile.

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.

Methods inherited from java.lang.Object

Constructor Details

MonitorConfig

public MonitorConfig()

Creates an instance of MonitorConfig class.

Method Details

customHeaders

public List customHeaders()

Get the customHeaders property: List of custom headers.

Returns:

the customHeaders value.

expectedStatusCodeRanges

public List expectedStatusCodeRanges()

Get the expectedStatusCodeRanges property: List of expected status code ranges.

Returns:

the expectedStatusCodeRanges value.

fromJson

public static MonitorConfig fromJson(JsonReader jsonReader)

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.

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:

the intervalInSeconds value.

path

public String path()

Get the path property: The path relative to the endpoint domain name used to probe for endpoint health.

Returns:

the path value.

port

public Long port()

Get the port property: The TCP port used to probe for endpoint health.

Returns:

the port value.

profileMonitorStatus

public ProfileMonitorStatus profileMonitorStatus()

Get the profileMonitorStatus property: The profile-level monitoring status of the Traffic Manager profile.

Returns:

the profileMonitorStatus value.

protocol

public MonitorProtocol protocol()

Get the protocol property: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.

Returns:

the protocol value.

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:

the timeoutInSeconds value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

the toleratedNumberOfFailures value.

validate

public void validate()

Validates the instance.

withCustomHeaders

public MonitorConfig withCustomHeaders(List customHeaders)

Set the customHeaders property: List of custom headers.

Parameters:

customHeaders - the customHeaders value to set.

Returns:

the MonitorConfig object itself.

withExpectedStatusCodeRanges

public MonitorConfig withExpectedStatusCodeRanges(List expectedStatusCodeRanges)

Set the expectedStatusCodeRanges property: List of expected status code ranges.

Parameters:

expectedStatusCodeRanges - the expectedStatusCodeRanges value to set.

Returns:

the MonitorConfig object itself.

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:

intervalInSeconds - the intervalInSeconds value to set.

Returns:

the MonitorConfig object itself.

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:

path - the path value to set.

Returns:

the MonitorConfig object itself.

withPort

public MonitorConfig withPort(Long port)

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.

withProfileMonitorStatus

public MonitorConfig withProfileMonitorStatus(ProfileMonitorStatus profileMonitorStatus)

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.

withProtocol

public MonitorConfig withProtocol(MonitorProtocol protocol)

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.

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:

timeoutInSeconds - the timeoutInSeconds value to set.

Returns:

the MonitorConfig object itself.

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:

toleratedNumberOfFailures - the toleratedNumberOfFailures value to set.

Returns:

the MonitorConfig object itself.

Applies to