/// <summary> /// Cancels a running spark batch job. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='batchId'> /// Identifier for the batch job. /// </param> /// <param name='requestedBy'> /// Add default value for X-Requested-By in header. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SparkJobDeletedResult> DeleteSparkBatchJobAsync(this IJobOperations operations, int batchId, string requestedBy = "ambari", CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteSparkBatchJobWithHttpMessagesAsync(batchId, requestedBy, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }