Class BatchAutoPoolSpecification

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

public final class BatchAutoPoolSpecification extends Object implements com.azure.json.JsonSerializable<BatchAutoPoolSpecification>
Specifies characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted.
  • Constructor Details

    • BatchAutoPoolSpecification

      public BatchAutoPoolSpecification(BatchPoolLifetimeOption poolLifetimeOption)
      Creates an instance of BatchAutoPoolSpecification class.
      Parameters:
      poolLifetimeOption - the poolLifetimeOption value to set.
  • Method Details

    • getAutoPoolIdPrefix

      public String getAutoPoolIdPrefix()
      Get the autoPoolIdPrefix property: A prefix to be added to the unique identifier when a Pool is automatically created. The Batch service assigns each auto Pool a unique identifier on creation. To distinguish between Pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long.
      Returns:
      the autoPoolIdPrefix value.
    • setAutoPoolIdPrefix

      public BatchAutoPoolSpecification setAutoPoolIdPrefix(String autoPoolIdPrefix)
      Set the autoPoolIdPrefix property: A prefix to be added to the unique identifier when a Pool is automatically created. The Batch service assigns each auto Pool a unique identifier on creation. To distinguish between Pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long.
      Parameters:
      autoPoolIdPrefix - the autoPoolIdPrefix value to set.
      Returns:
      the BatchAutoPoolSpecification object itself.
    • getPoolLifetimeOption

      public BatchPoolLifetimeOption getPoolLifetimeOption()
      Get the poolLifetimeOption property: The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools.
      Returns:
      the poolLifetimeOption value.
    • isKeepAlive

      public Boolean isKeepAlive()
      Get the keepAlive property: Whether to keep an auto Pool alive after its lifetime expires. If false, the Batch service deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the Job or Job Schedule completes. If true, the Batch service does not delete the Pool automatically. It is up to the user to delete auto Pools created with this option.
      Returns:
      the keepAlive value.
    • setKeepAlive

      public BatchAutoPoolSpecification setKeepAlive(Boolean keepAlive)
      Set the keepAlive property: Whether to keep an auto Pool alive after its lifetime expires. If false, the Batch service deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the Job or Job Schedule completes. If true, the Batch service does not delete the Pool automatically. It is up to the user to delete auto Pools created with this option.
      Parameters:
      keepAlive - the keepAlive value to set.
      Returns:
      the BatchAutoPoolSpecification object itself.
    • getPool

      public BatchPoolSpecification getPool()
      Get the pool property: The Pool specification for the auto Pool.
      Returns:
      the pool value.
    • setPool

      Set the pool property: The Pool specification for the auto Pool.
      Parameters:
      pool - the pool value to set.
      Returns:
      the BatchAutoPoolSpecification 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<BatchAutoPoolSpecification>
      Throws:
      IOException
    • fromJson

      public static BatchAutoPoolSpecification fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchAutoPoolSpecification from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchAutoPoolSpecification if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the BatchAutoPoolSpecification.