code: public void resize(String poolId, PoolResizeParameter poolResizeParameter) {
          resizeWithServiceResponseAsync(poolId, poolResizeParameter).toBlocking().single().body();
      }
docs: Changes the number of compute nodes that are assigned to a pool.
  You can only resize a pool when its allocation state is steady. If the pool is already resizing, the request fails with status code 409. When you resize a pool, the pool's allocation state changes from steady to resizing. You cannot resize pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a pool downwards, the Batch service chooses which nodes to remove. To remove specific nodes, use the pool remove nodes API instead.
  
  @param poolId The ID of the pool to resize.
  @param poolResizeParameter The parameters for the request.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws BatchErrorException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent