Class SpotRestorePolicy


  • public final class SpotRestorePolicy
    extends Object
    Specifies the Spot-Try-Restore properties for the virtual machine scale set. <br><br> 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Boolean 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.
      String 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.
      void validate()
      Validates the instance.
      SpotRestorePolicy 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.
      SpotRestorePolicy 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 Detail

      • SpotRestorePolicy

        public SpotRestorePolicy()
    • Method Detail

      • enabled

        public Boolean 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

        public SpotRestorePolicy 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.
        Parameters:
        enabled - the enabled value to set.
        Returns:
        the SpotRestorePolicy object itself.
      • restoreTimeout

        public String 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

        public SpotRestorePolicy 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.
        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.