Class VirtualMachineScaleSetVMProtectionPolicy
java.lang.Object
com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMProtectionPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VirtualMachineScaleSetVMProtectionPolicy>
public final class VirtualMachineScaleSetVMProtectionPolicy
extends Object
implements com.azure.json.JsonSerializable<VirtualMachineScaleSetVMProtectionPolicy>
The protection policy of a virtual machine scale set VM.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of VirtualMachineScaleSetVMProtectionPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VirtualMachineScaleSetVMProtectionPolicy from the JsonReader.Get the protectFromScaleIn property: Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.Get the protectFromScaleSetActions property: Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withProtectFromScaleIn(Boolean protectFromScaleIn) Set the protectFromScaleIn property: Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.withProtectFromScaleSetActions(Boolean protectFromScaleSetActions) Set the protectFromScaleSetActions property: Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VirtualMachineScaleSetVMProtectionPolicy
public VirtualMachineScaleSetVMProtectionPolicy()Creates an instance of VirtualMachineScaleSetVMProtectionPolicy class.
-
-
Method Details
-
protectFromScaleIn
Get the protectFromScaleIn property: Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.- Returns:
- the protectFromScaleIn value.
-
withProtectFromScaleIn
Set the protectFromScaleIn property: Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.- Parameters:
protectFromScaleIn- the protectFromScaleIn value to set.- Returns:
- the VirtualMachineScaleSetVMProtectionPolicy object itself.
-
protectFromScaleSetActions
Get the protectFromScaleSetActions property: Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.- Returns:
- the protectFromScaleSetActions value.
-
withProtectFromScaleSetActions
public VirtualMachineScaleSetVMProtectionPolicy withProtectFromScaleSetActions(Boolean protectFromScaleSetActions) Set the protectFromScaleSetActions property: Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.- Parameters:
protectFromScaleSetActions- the protectFromScaleSetActions value to set.- Returns:
- the VirtualMachineScaleSetVMProtectionPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<VirtualMachineScaleSetVMProtectionPolicy>- Throws:
IOException
-
fromJson
public static VirtualMachineScaleSetVMProtectionPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VirtualMachineScaleSetVMProtectionPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VirtualMachineScaleSetVMProtectionPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the VirtualMachineScaleSetVMProtectionPolicy.
-