public virtual Response Delete(string poolId, PoolDeleteOptions poolDeleteOptions, CancellationToken cancellationToken = default) { return(RestClient.Delete(poolId, poolDeleteOptions, cancellationToken).GetRawResponse()); }
public virtual async Task <Response> DeleteAsync(string poolId, PoolDeleteOptions poolDeleteOptions, CancellationToken cancellationToken = default) { return((await RestClient.DeleteAsync(poolId, poolDeleteOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse()); }
/// <summary> /// Deletes a Pool from the specified Account. /// </summary> /// <remarks> /// When you request that a Pool be deleted, the following actions occur: the /// Pool state is set to deleting; any ongoing resize operation on the Pool are /// stopped; the Batch service starts resizing the Pool to zero Compute Nodes; /// any Tasks running on existing Compute Nodes are terminated and requeued (as /// if a resize Pool operation had been requested with the default requeue /// option); finally, the Pool is removed from the system. Because running /// Tasks are requeued, the user can rerun these Tasks by updating their Job to /// target a different Pool. The Tasks can then run on the new Pool. If you /// want to override the requeue behavior, then you should call resize Pool /// explicitly to shrink the Pool to zero size before deleting the Pool. If you /// call an Update, Patch or Delete API on a Pool in the deleting state, it /// will fail with HTTP status code 409 with error code PoolBeingDeleted. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the Pool to delete. /// </param> /// <param name='poolDeleteOptions'> /// Additional parameters for the operation /// </param> public static PoolDeleteHeaders Delete(this IPoolOperations operations, string poolId, PoolDeleteOptions poolDeleteOptions = default(PoolDeleteOptions)) { return(operations.DeleteAsync(poolId, poolDeleteOptions).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Pool from the specified Account. /// </summary> /// <remarks> /// When you request that a Pool be deleted, the following actions occur: the /// Pool state is set to deleting; any ongoing resize operation on the Pool are /// stopped; the Batch service starts resizing the Pool to zero Compute Nodes; /// any Tasks running on existing Compute Nodes are terminated and requeued (as /// if a resize Pool operation had been requested with the default requeue /// option); finally, the Pool is removed from the system. Because running /// Tasks are requeued, the user can rerun these Tasks by updating their Job to /// target a different Pool. The Tasks can then run on the new Pool. If you /// want to override the requeue behavior, then you should call resize Pool /// explicitly to shrink the Pool to zero size before deleting the Pool. If you /// call an Update, Patch or Delete API on a Pool in the deleting state, it /// will fail with HTTP status code 409 with error code PoolBeingDeleted. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the Pool to delete. /// </param> /// <param name='poolDeleteOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PoolDeleteHeaders> DeleteAsync(this IPoolOperations operations, string poolId, PoolDeleteOptions poolDeleteOptions = default(PoolDeleteOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(poolId, poolDeleteOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Deletes a pool from the specified account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The id of the pool to delete. /// </param> /// <param name='poolDeleteOptions'> /// Additional parameters for the operation /// </param> public static PoolDeleteHeaders Delete(this IPoolOperations operations, string poolId, PoolDeleteOptions poolDeleteOptions = default(PoolDeleteOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IPoolOperations)s).DeleteAsync(poolId, poolDeleteOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }