ScaleInPolicy Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. ScaleInPolicy
- com.
Implements
public final class ScaleInPolicy
implements JsonSerializable<ScaleInPolicy>
Describes a scale-in policy for a virtual machine scale set.
Constructor Summary
Constructor | Description |
---|---|
ScaleInPolicy() |
Creates an instance of Scale |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
forceDeletion()
Get the force |
static
Scale |
fromJson(JsonReader jsonReader)
Reads an instance of Scale |
List<Virtual |
rules()
Get the rules property: The rules to be followed when scaling-in a virtual machine scale set. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Scale |
withForceDeletion(Boolean forceDeletion)
Set the force |
Scale |
withRules(List<VirtualMachineScaleSetScaleInRules> rules)
Set the rules property: The rules to be followed when scaling-in a virtual machine scale set. |
Methods inherited from java.lang.Object
Constructor Details
ScaleInPolicy
public ScaleInPolicy()
Creates an instance of ScaleInPolicy class.
Method Details
forceDeletion
public Boolean forceDeletion()
Get the forceDeletion property: 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).
Returns:
fromJson
public static ScaleInPolicy fromJson(JsonReader jsonReader)
Reads an instance of ScaleInPolicy from the JsonReader.
Parameters:
Returns:
Throws:
rules
public List
Get the rules property: The rules to be followed when scaling-in a virtual machine scale set.
Possible values are:
**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.
**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.
**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.
.
Returns:
toJson
validate
public void validate()
Validates the instance.
withForceDeletion
public ScaleInPolicy withForceDeletion(Boolean forceDeletion)
Set the forceDeletion property: 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).
Parameters:
Returns:
withRules
public ScaleInPolicy withRules(List
Set the rules property: The rules to be followed when scaling-in a virtual machine scale set.
Possible values are:
**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.
**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.
**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.
.
Parameters:
Returns:
Applies to
Azure SDK for Java