示例#1
0
 /// <summary>
 /// Disables the specified Job, preventing new Tasks from running.
 /// </summary>
 /// <remarks>
 /// The Batch Service immediately moves the Job to the disabling state. Batch
 /// then uses the disableTasks parameter to determine what to do with the
 /// currently running Tasks of the Job. The Job remains in the disabling state
 /// until the disable operation is completed and all Tasks have been dealt with
 /// according to the disableTasks option; the Job then moves to the disabled
 /// state. No new Tasks are started under the Job until it moves back to active
 /// state. If you try to disable a Job that is in any state other than active,
 /// disabling, or disabled, the request fails with status code 409.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The ID of the Job to disable.
 /// </param>
 /// <param name='disableTasks'>
 /// What to do with active Tasks associated with the Job. Possible values
 /// include: 'requeue', 'terminate', 'wait'
 /// </param>
 /// <param name='jobDisableOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static JobDisableHeaders Disable(this IJobOperations operations, string jobId, DisableJobOption disableTasks, JobDisableOptions jobDisableOptions = default(JobDisableOptions))
 {
     return(operations.DisableAsync(jobId, disableTasks, jobDisableOptions).GetAwaiter().GetResult());
 }