/// <summary> /// Enables the specified job, allowing new tasks to run. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The id of the job to enable. /// </param> /// <param name='jobEnableOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <JobEnableHeaders> EnableAsync(this IJobOperations operations, string jobId, JobEnableOptions jobEnableOptions = default(JobEnableOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.EnableWithHttpMessagesAsync(jobId, jobEnableOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Enables the specified job, allowing new tasks to run. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The id of the job to enable. /// </param> /// <param name='jobEnableOptions'> /// Additional parameters for the operation /// </param> public static JobEnableHeaders Enable(this IJobOperations operations, string jobId, JobEnableOptions jobEnableOptions = default(JobEnableOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IJobOperations)s).EnableAsync(jobId, jobEnableOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public virtual Response Enable(string jobId, JobEnableOptions jobEnableOptions, CancellationToken cancellationToken = default) { return(RestClient.Enable(jobId, jobEnableOptions, cancellationToken).GetRawResponse()); }
/// <summary> /// Enables the specified Job, allowing new Tasks to run. /// </summary> /// <remarks> /// When you call this API, the Batch service sets a disabled Job to the /// enabling state. After the this operation is completed, the Job moves to the /// active state, and scheduling of new Tasks under the Job resumes. The Batch /// service does not allow a Task to remain in the active state for more than /// 180 days. Therefore, if you enable a Job containing active Tasks which were /// added more than 180 days ago, those Tasks will not run. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The ID of the Job to enable. /// </param> /// <param name='jobEnableOptions'> /// Additional parameters for the operation /// </param> public static JobEnableHeaders Enable(this IJobOperations operations, string jobId, JobEnableOptions jobEnableOptions = default(JobEnableOptions)) { return(operations.EnableAsync(jobId, jobEnableOptions).GetAwaiter().GetResult()); }
public virtual async Task <Response> EnableAsync(string jobId, JobEnableOptions jobEnableOptions, CancellationToken cancellationToken = default) { return((await RestClient.EnableAsync(jobId, jobEnableOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse()); }