/// <summary>
 /// Lists the execution status of the Job Preparation and Job Release task for
 /// the specified job across the compute nodes where the job has run.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job.
 /// </param>
 /// <param name='jobListPreparationAndReleaseTaskStatusOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Microsoft.Rest.Azure.IPage <JobPreparationAndReleaseTaskExecutionInformation> > ListPreparationAndReleaseTaskStatusAsync(this IJobOperations operations, string jobId, JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions = default(JobListPreparationAndReleaseTaskStatusOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.ListPreparationAndReleaseTaskStatusWithHttpMessagesAsync(jobId, jobListPreparationAndReleaseTaskStatusOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Lists the execution status of the Job Preparation and Job Release Task for
 /// the specified Job across the Compute Nodes where the Job has run.
 /// </summary>
 /// <remarks>
 /// This API returns the Job Preparation and Job Release Task status on all
 /// Compute Nodes that have run the Job Preparation or Job Release Task. This
 /// includes Compute Nodes which have since been removed from the Pool. If this
 /// API is invoked on a Job which has no Job Preparation or Job Release Task,
 /// the Batch service returns HTTP status code 409 (Conflict) with an error
 /// code of JobPreparationTaskNotSpecified.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The ID of the Job.
 /// </param>
 /// <param name='jobListPreparationAndReleaseTaskStatusOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <JobPreparationAndReleaseTaskExecutionInformation> ListPreparationAndReleaseTaskStatus(this IJobOperations operations, string jobId, JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions = default(JobListPreparationAndReleaseTaskStatusOptions))
 {
     return(operations.ListPreparationAndReleaseTaskStatusAsync(jobId, jobListPreparationAndReleaseTaskStatusOptions).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists the execution status of the Job Preparation and Job Release task for
 /// the specified job across the compute nodes where the job has run.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job.
 /// </param>
 /// <param name='jobListPreparationAndReleaseTaskStatusOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static Microsoft.Rest.Azure.IPage <JobPreparationAndReleaseTaskExecutionInformation> ListPreparationAndReleaseTaskStatus(this IJobOperations operations, string jobId, JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions = default(JobListPreparationAndReleaseTaskStatusOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IJobOperations)s).ListPreparationAndReleaseTaskStatusAsync(jobId, jobListPreparationAndReleaseTaskStatusOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #4
0
        public virtual Pageable <JobPreparationAndReleaseTaskExecutionInformation> ListPreparationAndReleaseTaskStatus(string jobId, JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions, CancellationToken cancellationToken = default)
        {
            if (jobId == null)
            {
                throw new ArgumentNullException(nameof(jobId));
            }

            Page <JobPreparationAndReleaseTaskExecutionInformation> FirstPageFunc(int?pageSizeHint)
            {
                var response = RestClient.ListPreparationAndReleaseTaskStatus(jobId, jobListPreparationAndReleaseTaskStatusOptions, cancellationToken);

                return(Page.FromValues(response.Value.Value, response.Value.OdataNextLink, response.GetRawResponse()));
            }

            Page <JobPreparationAndReleaseTaskExecutionInformation> NextPageFunc(string nextLink, int?pageSizeHint)
            {
                var response = RestClient.ListPreparationAndReleaseTaskStatusNextPage(nextLink, jobId, jobListPreparationAndReleaseTaskStatusOptions, cancellationToken);

                return(Page.FromValues(response.Value.Value, response.Value.OdataNextLink, response.GetRawResponse()));
            }

            return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc));
        }