/// <summary> /// CancelJob. /// </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='reason'> /// Reason for cancellation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task CancelAsync(this IJobsOperations operations, string resourceGroupName, string jobName, string reason, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CancelWithHttpMessagesAsync(resourceGroupName, jobName, reason, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Cancels the given job. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dataServiceName'> /// The name of the data service of the job definition. /// </param> /// <param name='jobDefinitionName'> /// The name of the job definition of the job. /// </param> /// <param name='jobId'> /// The job id of the job queried. /// </param> /// <param name='resourceGroupName'> /// The Resource Group Name /// </param> /// <param name='dataManagerName'> /// The name of the DataManager Resource within the specified resource group. /// DataManager 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 CancelAsync(this IJobsOperations operations, string dataServiceName, string jobDefinitionName, string jobId, string resourceGroupName, string dataManagerName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CancelWithHttpMessagesAsync(dataServiceName, jobDefinitionName, jobId, resourceGroupName, dataManagerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Cancels a job on the device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name /// </param> /// <param name='jobName'> /// The jobName. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task CancelAsync(this IJobsOperations operations, string deviceName, string jobName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken)) { await operations.CancelWithHttpMessagesAsync(deviceName, jobName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Cancel 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 CancelAsync(this IJobsOperations operations, string jobId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CancelWithHttpMessagesAsync(jobId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }