ExternalHealthPolicy Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. ExternalHealthPolicy
- com.
Implements
public final class ExternalHealthPolicy
implements JsonSerializable<ExternalHealthPolicy>
Specifies the external health policy for the virtual machine scale set.
Constructor Summary
| Constructor | Description |
|---|---|
| ExternalHealthPolicy() |
Creates an instance of External |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Boolean |
enabled()
Get the enabled property: If true, external health is enabled for this scale set. |
| Duration |
expiryDuration()
Get the expiry |
|
static
External |
fromJson(JsonReader jsonReader)
Reads an instance of External |
| Duration |
gracePeriod()
Get the grace |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
External |
withEnabled(Boolean enabled)
Set the enabled property: If true, external health is enabled for this scale set. |
|
External |
withExpiryDuration(Duration expiryDuration)
Set the expiry |
|
External |
withGracePeriod(Duration gracePeriod)
Set the grace |
Methods inherited from java.lang.Object
Constructor Details
ExternalHealthPolicy
public ExternalHealthPolicy()
Creates an instance of ExternalHealthPolicy class.
Method Details
enabled
public Boolean enabled()
Get the enabled property: If true, external health is enabled for this scale set. Cannot be set to true on instances where another health monitoring source is active (ApplicationHealth extension or SLB). Defaults to false.
Returns:
expiryDuration
public Duration expiryDuration()
Get the expiryDuration property: Defines how long the health status set by External Health API will last on the VM. If a signal is not received/updated within this time, the VM Health will be marked as "unknown". Uses the ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 3 hours (PT3H).
Returns:
fromJson
public static ExternalHealthPolicy fromJson(JsonReader jsonReader)
Reads an instance of ExternalHealthPolicy from the JsonReader.
Parameters:
Returns:
Throws:
gracePeriod
public Duration gracePeriod()
Get the gracePeriod property: Grace period for newly created VMs or when the External Health policy is first applied on VMSS. Uses the ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 4 hours (PT4H).
Returns:
toJson
validate
public void validate()
Validates the instance.
withEnabled
public ExternalHealthPolicy withEnabled(Boolean enabled)
Set the enabled property: If true, external health is enabled for this scale set. Cannot be set to true on instances where another health monitoring source is active (ApplicationHealth extension or SLB). Defaults to false.
Parameters:
Returns:
withExpiryDuration
public ExternalHealthPolicy withExpiryDuration(Duration expiryDuration)
Set the expiryDuration property: Defines how long the health status set by External Health API will last on the VM. If a signal is not received/updated within this time, the VM Health will be marked as "unknown". Uses the ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 3 hours (PT3H).
Parameters:
Returns:
withGracePeriod
public ExternalHealthPolicy withGracePeriod(Duration gracePeriod)
Set the gracePeriod property: Grace period for newly created VMs or when the External Health policy is first applied on VMSS. Uses the ISO 8601 format. Minimum: 5 minutes (PT5M), Maximum: 4 hours (PT4H).
Parameters:
Returns: