$resource is just available in that event; this is a reference to the actual modResource that was just saved in the processor. You don’t have to do anything but use it. I just tested with this and it is working when using the Publish Resource context menu action where this event is called:
<?php
$modx->log(modX::LOG_LEVEL_ERROR, print_r($resource->toArray(), true));
?>
I get the resource output to my core/logs/error.log as expected.