Class SpotRestorePolicy
java.lang.Object
com.azure.resourcemanager.compute.models.SpotRestorePolicy
Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable
or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability
and pricing constraint.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenabled()Get the enabled property: Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints.Get the restoreTimeout property: Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.voidvalidate()Validates the instance.withEnabled(Boolean enabled) Set the enabled property: Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints.withRestoreTimeout(String restoreTimeout) Set the restoreTimeout property: Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.
-
Constructor Details
-
SpotRestorePolicy
public SpotRestorePolicy()Creates an instance of SpotRestorePolicy class.
-
-
Method Details
-
enabled
Get the enabled property: Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints.- Parameters:
enabled- the enabled value to set.- Returns:
- the SpotRestorePolicy object itself.
-
restoreTimeout
Get the restoreTimeout property: Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.- Returns:
- the restoreTimeout value.
-
withRestoreTimeout
Set the restoreTimeout property: Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.- Parameters:
restoreTimeout- the restoreTimeout value to set.- Returns:
- the SpotRestorePolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-