Class BatchPoolEnableAutoScaleContent

java.lang.Object
com.azure.compute.batch.models.BatchPoolEnableAutoScaleContent
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchPoolEnableAutoScaleContent>

public final class BatchPoolEnableAutoScaleContent extends Object implements com.azure.json.JsonSerializable<BatchPoolEnableAutoScaleContent>
Parameters for enabling automatic scaling on an Azure Batch Pool.
  • Constructor Details

    • BatchPoolEnableAutoScaleContent

      public BatchPoolEnableAutoScaleContent()
      Creates an instance of BatchPoolEnableAutoScaleContent class.
  • Method Details

    • getAutoScaleFormula

      public String getAutoScaleFormula()
      Get the autoScaleFormula property: The formula for the desired number of Compute Nodes in the Pool. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.
      Returns:
      the autoScaleFormula value.
    • setAutoScaleFormula

      public BatchPoolEnableAutoScaleContent setAutoScaleFormula(String autoScaleFormula)
      Set the autoScaleFormula property: The formula for the desired number of Compute Nodes in the Pool. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.
      Parameters:
      autoScaleFormula - the autoScaleFormula value to set.
      Returns:
      the BatchPoolEnableAutoScaleContent object itself.
    • getAutoScaleEvaluationInterval

      public Duration getAutoScaleEvaluationInterval()
      Get the autoScaleEvaluationInterval property: The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.
      Returns:
      the autoScaleEvaluationInterval value.
    • setAutoScaleEvaluationInterval

      public BatchPoolEnableAutoScaleContent setAutoScaleEvaluationInterval(Duration autoScaleEvaluationInterval)
      Set the autoScaleEvaluationInterval property: The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued.
      Parameters:
      autoScaleEvaluationInterval - the autoScaleEvaluationInterval value to set.
      Returns:
      the BatchPoolEnableAutoScaleContent object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<BatchPoolEnableAutoScaleContent>
      Throws:
      IOException
    • fromJson

      public static BatchPoolEnableAutoScaleContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchPoolEnableAutoScaleContent from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchPoolEnableAutoScaleContent 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 BatchPoolEnableAutoScaleContent.