/// <summary>
 /// Deletes a job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job to delete.
 /// </param>
 /// <param name='jobDeleteOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static JobDeleteHeaders Delete(this IJobOperations operations, string jobId, JobDeleteOptions jobDeleteOptions = default(JobDeleteOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IJobOperations)s).DeleteAsync(jobId, jobDeleteOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job to delete.
 /// </param>
 /// <param name='jobDeleteOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <JobDeleteHeaders> DeleteAsync(this IJobOperations operations, string jobId, JobDeleteOptions jobDeleteOptions = default(JobDeleteOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(jobId, jobDeleteOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
Example #3
0
 public virtual Response Delete(string jobId, JobDeleteOptions jobDeleteOptions, CancellationToken cancellationToken = default)
 {
     return(RestClient.Delete(jobId, jobDeleteOptions, cancellationToken).GetRawResponse());
 }
Example #4
0
 /// <summary>
 /// Deletes a Job.
 /// </summary>
 /// <remarks>
 /// Deleting a Job also deletes all Tasks that are part of that Job, and all
 /// Job statistics. This also overrides the retention period for Task data;
 /// that is, if the Job contains Tasks which are still retained on Compute
 /// Nodes, the Batch services deletes those Tasks' working directories and all
 /// their contents.  When a Delete Job request is received, the Batch service
 /// sets the Job to the deleting state. All update operations on a Job that is
 /// in deleting state will fail with status code 409 (Conflict), with
 /// additional information indicating that the Job is being deleted.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The ID of the Job to delete.
 /// </param>
 /// <param name='jobDeleteOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static JobDeleteHeaders Delete(this IJobOperations operations, string jobId, JobDeleteOptions jobDeleteOptions = default(JobDeleteOptions))
 {
     return(operations.DeleteAsync(jobId, jobDeleteOptions).GetAwaiter().GetResult());
 }
Example #5
0
 public virtual async Task <Response> DeleteAsync(string jobId, JobDeleteOptions jobDeleteOptions, CancellationToken cancellationToken = default)
 {
     return((await RestClient.DeleteAsync(jobId, jobDeleteOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse());
 }