Package com.azure.compute.batch.models
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 Summary
ConstructorsConstructorDescriptionBatchAutoPoolSpecification
(BatchPoolLifetimeOption poolLifetimeOption) Creates an instance of BatchAutoPoolSpecification class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchAutoPoolSpecification
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchAutoPoolSpecification from the JsonReader.Get the autoPoolIdPrefix property: A prefix to be added to the unique identifier when a Pool is automatically created.getPool()
Get the pool property: The Pool specification for the auto Pool.Get the poolLifetimeOption property: The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools.Get the keepAlive property: Whether to keep an auto Pool alive after its lifetime expires.setAutoPoolIdPrefix
(String autoPoolIdPrefix) Set the autoPoolIdPrefix property: A prefix to be added to the unique identifier when a Pool is automatically created.setKeepAlive
(Boolean keepAlive) Set the keepAlive property: Whether to keep an auto Pool alive after its lifetime expires.Set the pool property: The Pool specification for the auto Pool.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BatchAutoPoolSpecification
Creates an instance of BatchAutoPoolSpecification class.- Parameters:
poolLifetimeOption
- the poolLifetimeOption value to set.
-
-
Method Details
-
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
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
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
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
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
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
- Specified by:
toJson
in interfacecom.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.
-