ArmComputeModelFactory.ScaleInPolicy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static Azure.ResourceManager.Compute.Models.ScaleInPolicy ScaleInPolicy(System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetScaleInRule> rules = default, bool? forceDeletion = default, bool? prioritizeUnhealthyVms = default);
static member ScaleInPolicy : seq<Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetScaleInRule> * Nullable<bool> * Nullable<bool> -> Azure.ResourceManager.Compute.Models.ScaleInPolicy
Public Shared Function ScaleInPolicy (Optional rules As IEnumerable(Of VirtualMachineScaleSetScaleInRule) = Nothing, Optional forceDeletion As Nullable(Of Boolean) = Nothing, Optional prioritizeUnhealthyVms As Nullable(Of Boolean) = Nothing) As ScaleInPolicy
Parameters
The rules to be followed when scaling-in a virtual machine scale set. <br><br> Possible values are: <br><br> Default When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in. <br><br> OldestVM When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal. <br><br> NewestVM When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal. <br><br>.
This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview).
This property allows you to prioritize the deletion of unhealthy and inactive VMs when a virtual machine scale set is being scaled-in.(Feature in Preview).
Returns
A new ScaleInPolicy instance for mocking.