예제 #1
0
 /// <summary>
 /// Updates the properties of a job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job whose properties you want to update.
 /// </param>
 /// <param name='jobUpdateParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='jobUpdateOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <JobUpdateHeaders> UpdateAsync(this IJobOperations operations, string jobId, JobUpdateParameter jobUpdateParameter, JobUpdateOptions jobUpdateOptions = default(JobUpdateOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(jobId, jobUpdateParameter, jobUpdateOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
예제 #2
0
 /// <summary>
 /// Updates the properties of a job.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job whose properties you want to update.
 /// </param>
 /// <param name='jobUpdateParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='jobUpdateOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static JobUpdateHeaders Update(this IJobOperations operations, string jobId, JobUpdateParameter jobUpdateParameter, JobUpdateOptions jobUpdateOptions = default(JobUpdateOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IJobOperations)s).UpdateAsync(jobId, jobUpdateParameter, jobUpdateOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #3
0
 public virtual Response Update(string jobId, JobUpdateParameter jobUpdateParameter, JobUpdateOptions jobUpdateOptions, CancellationToken cancellationToken = default)
 {
     return(RestClient.Update(jobId, jobUpdateParameter, jobUpdateOptions, cancellationToken).GetRawResponse());
 }
예제 #4
0
 /// <summary>
 /// Updates the properties of the specified Job.
 /// </summary>
 /// <remarks>
 /// This fully replaces all the updatable properties of the Job. For example,
 /// if the Job has constraints associated with it and if constraints is not
 /// specified with this request, then the Batch service will remove the
 /// existing constraints.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The ID of the Job whose properties you want to update.
 /// </param>
 /// <param name='jobUpdateParameter'>
 /// The parameters for the request.
 /// </param>
 /// <param name='jobUpdateOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static JobUpdateHeaders Update(this IJobOperations operations, string jobId, JobUpdateParameter jobUpdateParameter, JobUpdateOptions jobUpdateOptions = default(JobUpdateOptions))
 {
     return(operations.UpdateAsync(jobId, jobUpdateParameter, jobUpdateOptions).GetAwaiter().GetResult());
 }
예제 #5
0
 public virtual async Task <Response> UpdateAsync(string jobId, JobUpdateParameter jobUpdateParameter, JobUpdateOptions jobUpdateOptions, CancellationToken cancellationToken = default)
 {
     return((await RestClient.UpdateAsync(jobId, jobUpdateParameter, jobUpdateOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse());
 }