/// <summary> /// Restarts the specified job. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Jobs or Jobs.Write. /// /// Required permissions: Jobs.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The specified job id. /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <JobDto> RestartJobAsync(this IJobs operations, JobsRestartJobParameters body = default(JobsRestartJobParameters), string expand = default(string), string select = default(string), long?xUIPATHOrganizationUnitId = default(long?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RestartJobWithHttpMessagesAsync(body, expand, select, xUIPATHOrganizationUnitId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Restarts the specified job. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Jobs or Jobs.Write. /// /// Required permissions: Jobs.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The specified job id. /// </param> /// <param name='expand'> /// Indicates the related entities to be represented inline. The maximum depth /// is 2. /// </param> /// <param name='select'> /// Limits the properties returned in the result. /// </param> /// <param name='xUIPATHOrganizationUnitId'> /// Folder/OrganizationUnit Id /// </param> public static JobDto RestartJob(this IJobs operations, JobsRestartJobParameters body = default(JobsRestartJobParameters), string expand = default(string), string select = default(string), long?xUIPATHOrganizationUnitId = default(long?)) { return(operations.RestartJobAsync(body, expand, select, xUIPATHOrganizationUnitId).GetAwaiter().GetResult()); }