ComputeBatchModelFactory.BatchJobUpdateOptions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Parameters for updating an Azure Batch Job.
public static Azure.Compute.Batch.BatchJobUpdateOptions BatchJobUpdateOptions(int? priority = default, bool? allowTaskPreemption = default, int? maxParallelTasks = default, Azure.Compute.Batch.BatchJobConstraints constraints = default, Azure.Compute.Batch.BatchPoolInfo poolInfo = default, Azure.Compute.Batch.BatchAllTasksCompleteMode? allTasksCompleteMode = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.BatchMetadataItem> metadata = default, Azure.Compute.Batch.BatchJobNetworkConfiguration networkConfiguration = default);
static member BatchJobUpdateOptions : Nullable<int> * Nullable<bool> * Nullable<int> * Azure.Compute.Batch.BatchJobConstraints * Azure.Compute.Batch.BatchPoolInfo * Nullable<Azure.Compute.Batch.BatchAllTasksCompleteMode> * seq<Azure.Compute.Batch.BatchMetadataItem> * Azure.Compute.Batch.BatchJobNetworkConfiguration -> Azure.Compute.Batch.BatchJobUpdateOptions
Public Shared Function BatchJobUpdateOptions (Optional priority As Nullable(Of Integer) = Nothing, Optional allowTaskPreemption As Nullable(Of Boolean) = Nothing, Optional maxParallelTasks As Nullable(Of Integer) = Nothing, Optional constraints As BatchJobConstraints = Nothing, Optional poolInfo As BatchPoolInfo = Nothing, Optional allTasksCompleteMode As Nullable(Of BatchAllTasksCompleteMode) = Nothing, Optional metadata As IEnumerable(Of BatchMetadataItem) = Nothing, Optional networkConfiguration As BatchJobNetworkConfiguration = Nothing) As BatchJobUpdateOptions
Parameters
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.
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.
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.
- constraints
- BatchJobConstraints
The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged.
- poolInfo
- BatchPoolInfo
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.
- allTasksCompleteMode
- Nullable<BatchAllTasksCompleteMode>
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).
- metadata
- IEnumerable<BatchMetadataItem>
A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged.
- networkConfiguration
- BatchJobNetworkConfiguration
(This property is not available by default. Please contact support for more information) The network configuration for the Job.
Returns
A new BatchJobUpdateOptions instance for mocking.