Microsoft.Azure.Commands.Batch.Models.BatchClient.DeleteJob C# (CSharp) Method

DeleteJob() public method

Deletes the specified job.
public DeleteJob ( BatchAccountContext context, string jobId, IEnumerable additionBehaviors = null ) : void
context BatchAccountContext The account to use.
jobId string The id of the job to delete.
additionBehaviors IEnumerable Additional client behaviors to perform.
return void
        public void DeleteJob(BatchAccountContext context, string jobId, IEnumerable<BatchClientBehavior> additionBehaviors = null)
        {
            if (string.IsNullOrWhiteSpace(jobId))
            {
                throw new ArgumentNullException("jobId");
            }

            JobOperations jobOperations = context.BatchOMClient.JobOperations;
            jobOperations.DeleteJob(jobId, additionBehaviors);
        }

Usage Example

Example #1
0
        /// <summary>
        /// Deletes a job used in a Scenario test.
        /// </summary>
        public static void DeleteJob(BatchController controller, BatchAccountContext context, string jobId)
        {
            RequestInterceptor interceptor = CreateHttpRecordingInterceptor();

            BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor };
            BatchClient           client    = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            client.DeleteJob(context, jobId, behaviors);
        }
All Usage Examples Of Microsoft.Azure.Commands.Batch.Models.BatchClient::DeleteJob
BatchClient