AutomaticRepairsPolicy Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. AutomaticRepairsPolicy
- com.
Implements
public final class AutomaticRepairsPolicy
implements JsonSerializable<AutomaticRepairsPolicy>
Specifies the configuration parameters for automatic repairs on the virtual machine scale set.
Constructor Summary
Constructor | Description |
---|---|
AutomaticRepairsPolicy() |
Creates an instance of Automatic |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
enabled()
Get the enabled property: Specifies whether automatic repairs should be enabled on the virtual machine scale set. |
static
Automatic |
fromJson(JsonReader jsonReader)
Reads an instance of Automatic |
String |
gracePeriod()
Get the grace |
Repair |
repairAction()
Get the repair |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Automatic |
withEnabled(Boolean enabled)
Set the enabled property: Specifies whether automatic repairs should be enabled on the virtual machine scale set. |
Automatic |
withGracePeriod(String gracePeriod)
Set the grace |
Automatic |
withRepairAction(RepairAction repairAction)
Set the repair |
Methods inherited from java.lang.Object
Constructor Details
AutomaticRepairsPolicy
public AutomaticRepairsPolicy()
Creates an instance of AutomaticRepairsPolicy class.
Method Details
enabled
public Boolean enabled()
Get the enabled property: Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
Returns:
fromJson
public static AutomaticRepairsPolicy fromJson(JsonReader jsonReader)
Reads an instance of AutomaticRepairsPolicy from the JsonReader.
Parameters:
Returns:
Throws:
gracePeriod
public String gracePeriod()
Get the gracePeriod property: The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
Returns:
repairAction
public RepairAction repairAction()
Get the repairAction property: Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
Returns:
toJson
validate
public void validate()
Validates the instance.
withEnabled
public AutomaticRepairsPolicy withEnabled(Boolean enabled)
Set the enabled property: Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
Parameters:
Returns:
withGracePeriod
public AutomaticRepairsPolicy withGracePeriod(String gracePeriod)
Set the gracePeriod property: The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
Parameters:
Returns:
withRepairAction
public AutomaticRepairsPolicy withRepairAction(RepairAction repairAction)
Set the repairAction property: Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
Parameters:
Returns:
Applies to
Azure SDK for Java