/// <summary> /// Delete a job. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// Id of the job. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <JobDetails> DeleteAsync(this IJobsOperations operations, string jobId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(jobId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a job. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The Resource Group Name /// </param> /// <param name='jobName'> /// The name of the job Resource within the specified resource group. job names /// must be between 3 and 24 characters in length and use any alphanumeric and /// underscore only /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IJobsOperations operations, string resourceGroupName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, jobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }