BatchJobUpdateParameters Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchJobUpdateParameters

Implements

public final class BatchJobUpdateParameters
implements JsonSerializable<BatchJobUpdateParameters>

Parameters for updating an Azure Batch Job.

Constructor Summary

Constructor Description
BatchJobUpdateParameters()

Creates an instance of BatchJobUpdateParameters class.

Method Summary

Modifier and Type Method and Description
static BatchJobUpdateParameters fromJson(JsonReader jsonReader)

Reads an instance of BatchJobUpdateParameters from the JsonReader.

BatchAllTasksCompleteMode getAllTasksCompleteMode()

Get the allTasksCompleteMode property: The action the Batch service should take when all Tasks in the Job are in the completed state.

BatchJobConstraints getConstraints()

Get the constraints property: The execution constraints for the Job.

Integer getMaxParallelTasks()

Get the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job.

List<BatchMetadataItem> getMetadata()

Get the metadata property: A list of name-value pairs associated with the Job as metadata.

BatchJobNetworkConfiguration getNetworkConfiguration()

Get the networkConfiguration property: (This property is not available by default.

BatchPoolInfo getPoolInfo()

Get the poolInfo property: The Pool on which the Batch service runs the Job's Tasks.

Integer getPriority()

Get the priority property: The priority of the Job.

Boolean isAllowTaskPreemption()

Get the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs.

BatchJobUpdateParameters setAllowTaskPreemption(Boolean allowTaskPreemption)

Set the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs.

BatchJobUpdateParameters setAllTasksCompleteMode(BatchAllTasksCompleteMode allTasksCompleteMode)

Set the allTasksCompleteMode property: The action the Batch service should take when all Tasks in the Job are in the completed state.

BatchJobUpdateParameters setConstraints(BatchJobConstraints constraints)

Set the constraints property: The execution constraints for the Job.

BatchJobUpdateParameters setMaxParallelTasks(Integer maxParallelTasks)

Set the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job.

BatchJobUpdateParameters setMetadata(List<BatchMetadataItem> metadata)

Set the metadata property: A list of name-value pairs associated with the Job as metadata.

BatchJobUpdateParameters setNetworkConfiguration(BatchJobNetworkConfiguration networkConfiguration)

Set the networkConfiguration property: (This property is not available by default.

BatchJobUpdateParameters setPoolInfo(BatchPoolInfo poolInfo)

Set the poolInfo property: The Pool on which the Batch service runs the Job's Tasks.

BatchJobUpdateParameters setPriority(Integer priority)

Set the priority property: The priority of the Job.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchJobUpdateParameters

public BatchJobUpdateParameters()

Creates an instance of BatchJobUpdateParameters class.

Method Details

fromJson

public static BatchJobUpdateParameters fromJson(JsonReader jsonReader)

Reads an instance of BatchJobUpdateParameters from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchJobUpdateParameters 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 BatchJobUpdateParameters.

getAllTasksCompleteMode

public BatchAllTasksCompleteMode getAllTasksCompleteMode()

Get the allTasksCompleteMode property: The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

Returns:

the allTasksCompleteMode value.

getConstraints

public BatchJobConstraints getConstraints()

Get the constraints property: The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged.

Returns:

the constraints value.

getMaxParallelTasks

public Integer getMaxParallelTasks()

Get the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job. (This property is not available by default. Please contact support for more information) The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.

Returns:

the maxParallelTasks value.

getMetadata

public List<BatchMetadataItem> getMetadata()

Get the metadata property: A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged.

Returns:

the metadata value.

getNetworkConfiguration

public BatchJobNetworkConfiguration getNetworkConfiguration()

Get the networkConfiguration property: (This property is not available by default. Please contact support for more information) The network configuration for the Job.

Returns:

the networkConfiguration value.

getPoolInfo

public BatchPoolInfo getPoolInfo()

Get the poolInfo property: The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool.

Returns:

the poolInfo value.

getPriority

public Integer getPriority()

Get the priority property: The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is left unchanged.

Returns:

the priority value.

isAllowTaskPreemption

public Boolean isAllowTaskPreemption()

Get the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs. (This property is not available by default. Please contact support for more information) If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.

Returns:

the allowTaskPreemption value.

setAllowTaskPreemption

public BatchJobUpdateParameters setAllowTaskPreemption(Boolean allowTaskPreemption)

Set the allowTaskPreemption property: Whether Tasks in this job can be preempted by other high priority jobs. (This property is not available by default. Please contact support for more information) If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.

Parameters:

allowTaskPreemption - the allowTaskPreemption value to set.

Returns:

the BatchJobUpdateParameters object itself.

setAllTasksCompleteMode

public BatchJobUpdateParameters setAllTasksCompleteMode(BatchAllTasksCompleteMode allTasksCompleteMode)

Set the allTasksCompleteMode property: The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

Parameters:

allTasksCompleteMode - the allTasksCompleteMode value to set.

Returns:

the BatchJobUpdateParameters object itself.

setConstraints

public BatchJobUpdateParameters setConstraints(BatchJobConstraints constraints)

Set the constraints property: The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged.

Parameters:

constraints - the constraints value to set.

Returns:

the BatchJobUpdateParameters object itself.

setMaxParallelTasks

public BatchJobUpdateParameters setMaxParallelTasks(Integer maxParallelTasks)

Set the maxParallelTasks property: The maximum number of tasks that can be executed in parallel for the job. (This property is not available by default. Please contact support for more information) The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.

Parameters:

maxParallelTasks - the maxParallelTasks value to set.

Returns:

the BatchJobUpdateParameters object itself.

setMetadata

public BatchJobUpdateParameters setMetadata(List<BatchMetadataItem> metadata)

Set the metadata property: A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged.

Parameters:

metadata - the metadata value to set.

Returns:

the BatchJobUpdateParameters object itself.

setNetworkConfiguration

public BatchJobUpdateParameters setNetworkConfiguration(BatchJobNetworkConfiguration networkConfiguration)

Set the networkConfiguration property: (This property is not available by default. Please contact support for more information) The network configuration for the Job.

Parameters:

networkConfiguration - the networkConfiguration value to set.

Returns:

the BatchJobUpdateParameters object itself.

setPoolInfo

public BatchJobUpdateParameters setPoolInfo(BatchPoolInfo poolInfo)

Set the poolInfo property: The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool.

Parameters:

poolInfo - the poolInfo value to set.

Returns:

the BatchJobUpdateParameters object itself.

setPriority

public BatchJobUpdateParameters setPriority(Integer priority)

Set the priority property: The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is left unchanged.

Parameters:

priority - the priority value to set.

Returns:

the BatchJobUpdateParameters object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to