ArmComputeModelFactory.AutomaticRepairsPolicy Method

Definition

public static Azure.ResourceManager.Compute.Models.AutomaticRepairsPolicy AutomaticRepairsPolicy(bool? enabled = default, string gracePeriod = default, Azure.ResourceManager.Compute.Models.RepairAction? repairAction = default);
static member AutomaticRepairsPolicy : Nullable<bool> * string * Nullable<Azure.ResourceManager.Compute.Models.RepairAction> -> Azure.ResourceManager.Compute.Models.AutomaticRepairsPolicy
Public Shared Function AutomaticRepairsPolicy (Optional enabled As Nullable(Of Boolean) = Nothing, Optional gracePeriod As String = Nothing, Optional repairAction As Nullable(Of RepairAction) = Nothing) As AutomaticRepairsPolicy

Parameters

enabled
Nullable<Boolean>

Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.

gracePeriod
String

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).

repairAction
Nullable<RepairAction>

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

A new AutomaticRepairsPolicy instance for mocking.

Applies to