The answer to this question is not very simple. I will describe it step by step. Unfortunately, AnyLogic doesn't allow you to access separate resource units individually (there are a few functions like accessing specifically units that are seized, but this is not what you need). So follow the below steps:
Go to the Agent palette then drag and drop the first element called Agent
Choose "Population of Agents", then "I want to create a new agent type".
Name it as needed and fill the properties as shown below and click Finish.

Click on the resource pool and specify the highlighted properties as follows:

Create a function (by dragging and dropping it from the Agent Palette)
Design the function as shown below. What this function does is it checks if any unit of the resource pool is located in node1. If at least 1 is located in node1, it returns true, otherwise it returns false

Finally, go to the service and write the following. This means each time an agent enters the service, it will check the function. If it returns true, a unit of resourcePool will be seized, otherwise, a unit of resourcePool1 will be seized.

Of course these steps are rather generic, you'll need to adjust to match the number of resourcePools, nodes, etc. But that's as detailed as I can answer.